forked from indymedia/epicyon
Posts option can accept actor
parent
4af8ce9d5f
commit
b835e161e9
12
epicyon.py
12
epicyon.py
|
@ -386,6 +386,14 @@ if baseDir.endswith('/'):
|
||||||
|
|
||||||
if args.posts:
|
if args.posts:
|
||||||
if '@' not in args.posts:
|
if '@' not in args.posts:
|
||||||
|
if '/users/' in args.posts:
|
||||||
|
postsNickname = getNicknameFromActor(args.posts)
|
||||||
|
postsDomain, postsPort = getDomainFromActor(args.posts)
|
||||||
|
args.posts = postsNickname + '@' + postsDomain
|
||||||
|
if postsPort:
|
||||||
|
if postsPort != 80 and postsPort != 443:
|
||||||
|
args.posts += ':' + str(postsPort)
|
||||||
|
else:
|
||||||
print('Syntax: --posts nickname@domain')
|
print('Syntax: --posts nickname@domain')
|
||||||
sys.exit()
|
sys.exit()
|
||||||
if not args.http:
|
if not args.http:
|
||||||
|
@ -395,8 +403,12 @@ if args.posts:
|
||||||
proxyType = None
|
proxyType = None
|
||||||
if args.tor or domain.endswith('.onion'):
|
if args.tor or domain.endswith('.onion'):
|
||||||
proxyType = 'tor'
|
proxyType = 'tor'
|
||||||
|
if domain.endswith('.onion'):
|
||||||
|
args.port = 80
|
||||||
elif args.i2p or domain.endswith('.i2p'):
|
elif args.i2p or domain.endswith('.i2p'):
|
||||||
proxyType = 'i2p'
|
proxyType = 'i2p'
|
||||||
|
if domain.endswith('.i2p'):
|
||||||
|
args.port = 80
|
||||||
elif args.gnunet:
|
elif args.gnunet:
|
||||||
proxyType = 'gnunet'
|
proxyType = 'gnunet'
|
||||||
getPublicPostsOfPerson(baseDir, nickname, domain, False, True,
|
getPublicPostsOfPerson(baseDir, nickname, domain, False, True,
|
||||||
|
|
Loading…
Reference in New Issue