mirror of https://gitlab.com/bashrc2/epicyon
Delete option
parent
27908a5fad
commit
227961e9af
30
epicyon.py
30
epicyon.py
|
@ -162,6 +162,8 @@ parser.add_argument('--maxposts', dest='archiveMaxPosts', type=str,default=None,
|
||||||
help='Maximum number of posts in in/outbox')
|
help='Maximum number of posts in in/outbox')
|
||||||
parser.add_argument('--message', dest='message', type=str,default=None, \
|
parser.add_argument('--message', dest='message', type=str,default=None, \
|
||||||
help='Message content')
|
help='Message content')
|
||||||
|
parser.add_argument('--delete', dest='delete', type=str,default=None, \
|
||||||
|
help='Delete a specified post')
|
||||||
parser.add_argument('--repeat','--announce', dest='announce', type=str,default=None, \
|
parser.add_argument('--repeat','--announce', dest='announce', type=str,default=None, \
|
||||||
help='Announce/repeat a url')
|
help='Announce/repeat a url')
|
||||||
parser.add_argument('--sendto', nargs='+',dest='sendto', \
|
parser.add_argument('--sendto', nargs='+',dest='sendto', \
|
||||||
|
@ -219,8 +221,8 @@ if args.tests:
|
||||||
|
|
||||||
if args.testsnetwork:
|
if args.testsnetwork:
|
||||||
print('Network Tests')
|
print('Network Tests')
|
||||||
#testPostMessageBetweenServers()
|
testPostMessageBetweenServers()
|
||||||
#testFollowBetweenServers()
|
testFollowBetweenServers()
|
||||||
testClientToServer()
|
testClientToServer()
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
|
@ -380,6 +382,30 @@ if args.announce:
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
|
if args.delete:
|
||||||
|
if not nickname:
|
||||||
|
print('Specify a nickname with the --nickname option')
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
|
if not args.password:
|
||||||
|
print('Specify a password with the --password option')
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
|
session = createSession(domain,port,useTor)
|
||||||
|
personCache={}
|
||||||
|
cachedWebfingers={}
|
||||||
|
print('Sending delete request of '+args.delete)
|
||||||
|
|
||||||
|
sendDeleteViaServer(session,nickname,args.password,
|
||||||
|
domain,port, \
|
||||||
|
httpPrefix,args.delete, \
|
||||||
|
cachedWebfingers,personCache, \
|
||||||
|
True)
|
||||||
|
for i in range(10):
|
||||||
|
# TODO detect send success/fail
|
||||||
|
time.sleep(1)
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
if args.follow:
|
if args.follow:
|
||||||
# follow via c2s protocol
|
# follow via c2s protocol
|
||||||
if '.' not in args.follow:
|
if '.' not in args.follow:
|
||||||
|
|
Loading…
Reference in New Issue