forked from indymedia/epicyon
Notes on archiving posts
parent
7dfa210023
commit
de5c637241
20
README.md
20
README.md
|
@ -315,3 +315,23 @@ python3 epicyon.py --nickname [yournick] --domain [name] --follow othernick@doma
|
||||||
```
|
```
|
||||||
|
|
||||||
You may or may not need to use the *--port*, *--https* and *--tor* options, depending upon how your server was set up.
|
You may or may not need to use the *--port*, *--https* and *--tor* options, depending upon how your server was set up.
|
||||||
|
|
||||||
|
## Archiving posts
|
||||||
|
|
||||||
|
You can archive old posts with:
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
python3 epicyon.py --archive [directory]
|
||||||
|
```
|
||||||
|
|
||||||
|
Which will move old posts to the given directory. You can also specify the number of weeks after which images will be archived, and the maximum number of posts within in/outboxes.
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
python3 epicyon.py --archive [directory] --archiveweeks 4 --maxposts 256
|
||||||
|
```
|
||||||
|
|
||||||
|
If you want old posts to be deleted for data minimization purposes then the archive location can be set to */dev/null*.
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
python3 epicyon.py --archive /dev/null --archiveweeks 4 --maxposts 256
|
||||||
|
```
|
||||||
|
|
40
epicyon.py
40
epicyon.py
|
@ -408,6 +408,26 @@ if args.changepassword:
|
||||||
print('Passwords file not found')
|
print('Passwords file not found')
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
|
archiveWeeks=4
|
||||||
|
if args.archiveWeeks:
|
||||||
|
archiveWeeks=args.archiveWeeks
|
||||||
|
archiveMaxPosts=256
|
||||||
|
if args.archiveMaxPosts:
|
||||||
|
archiveMaxPosts=args.archiveMaxPosts
|
||||||
|
|
||||||
|
if args.archive:
|
||||||
|
if args.archive.lower().endswith('null') or \
|
||||||
|
args.archive.lower().endswith('delete') or \
|
||||||
|
args.archive.lower().endswith('none'):
|
||||||
|
args.archive=None
|
||||||
|
print('Archiving with deletion of old posts...')
|
||||||
|
else:
|
||||||
|
print('Archiving to '+args.archive+'...')
|
||||||
|
archiveMedia(baseDir,args.archive,archiveWeeks)
|
||||||
|
archivePosts(baseDir,args.archive,archiveMaxPosts)
|
||||||
|
print('Archiving complete')
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
if not args.domain and not domain:
|
if not args.domain and not domain:
|
||||||
print('Specify a domain with --domain [name]')
|
print('Specify a domain with --domain [name]')
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
@ -440,26 +460,6 @@ if args.backgroundImage:
|
||||||
print('Background image was not added for '+args.nickname)
|
print('Background image was not added for '+args.nickname)
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
archiveWeeks=4
|
|
||||||
if args.archiveWeeks:
|
|
||||||
archiveWeeks=args.archiveWeeks
|
|
||||||
archiveMaxPosts=256
|
|
||||||
if args.archiveMaxPosts:
|
|
||||||
archiveMaxPosts=args.archiveMaxPosts
|
|
||||||
|
|
||||||
if args.archive:
|
|
||||||
if args.archive.lower().endswith('null') or \
|
|
||||||
args.archive.lower().endswith('delete') or \
|
|
||||||
args.archive.lower().endswith('none'):
|
|
||||||
args.archive=None
|
|
||||||
print('Archiving with deletion of old posts...')
|
|
||||||
else:
|
|
||||||
print('Archiving to '+args.archive+'...')
|
|
||||||
archiveMedia(baseDir,args.archive,archiveWeeks)
|
|
||||||
archivePosts(baseDir,args.archive,archiveMaxPosts)
|
|
||||||
print('Archiving complete')
|
|
||||||
sys.exit()
|
|
||||||
|
|
||||||
if federationList:
|
if federationList:
|
||||||
print('Federating with: '+str(federationList))
|
print('Federating with: '+str(federationList))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue