From 56881e34043ebc3b11f292dc569d14d857b039a0 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 29 Jun 2019 18:12:26 +0100 Subject: [PATCH] Show header only --- epicyon.py | 8 ++++---- person.py | 6 +++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/epicyon.py b/epicyon.py index 4b461f6e9..97f8325fb 100644 --- a/epicyon.py +++ b/epicyon.py @@ -47,13 +47,13 @@ setPreferredUsername(username,domain,'badger') setBio(username,domain,'Some personal info') #createPublicPost(username, domain, https, "G'day world!", False, True, None, None, 'Not suitable for Vogons') #archivePosts(username,domain,4) -outboxJson=createOutbox(username,domain,https,2,True,None) -pprint(outboxJson) +#outboxJson=createOutbox(username,domain,https,2,True,None) +#pprint(outboxJson) -#runDaemon(domain,port,federationList,useTor) +runDaemon(domain,port,federationList,useTor) #testHttpsig() -sys.exit() +#sys.exit() #pprint(person) #print('\n') diff --git a/person.py b/person.py index f2974d81d..02300b07e 100644 --- a/person.py +++ b/person.py @@ -166,8 +166,11 @@ def personOutboxJson(domain: str,path: str,https: bool,noOfItems: int) -> []: if not '/outbox' in path: return None + # Only show the header by default + headerOnly=True + # handle page numbers - pageNumber=None + pageNumber=None if '?page=' in path: pageNumber=path.split('?page=')[1] if pageNumber=='true': @@ -178,6 +181,7 @@ def personOutboxJson(domain: str,path: str,https: bool,noOfItems: int) -> []: except: pass path=path.split('?page=')[0] + headerOnly=False if not path.endswith('/outbox'): return None