Merged changed from pteek with fixes.

pull/30/head
x89 10 years ago
parent 98adee0fba
commit 2658074f47

3
.gitignore vendored

@ -1,3 +1,6 @@
2015*.txt
2016*.txt
2017*.txt
*.cfg
*.pyc
shreddit.conf

@ -28,9 +28,6 @@ clear_vote = False
# Overview: both submissions and comments. Comments / Submitted are as expected.
item = overview
# Save comments and posts before deleting them?
keep_a_copy = True
# Anything in this list won't be deleted, coma delimited
# spaces should work as .strip() is called after splitting
# on comma.
@ -58,4 +55,7 @@ whitelist_gilded = True
# except on whitelisted subreddits but after 3 months delete everything.
nuke_hours = 0
# Save a copy to disk of comments and posts before deleting them.
keep_a_copy = False
# vim: syntax=config

@ -155,7 +155,7 @@ for thing in things:
thing_json = json.dumps(d)
if isinstance(thing, Submission):
if verbose && keep_a_copy:
if verbose and keep_a_copy:
print('Saving a copy of submission: #{id} {url}'.format(
id=thing.id,
url=thing.url)
@ -187,4 +187,5 @@ for thing in things:
if not edit_only:
thing.delete()
if keep_a_copy:
copy_file.close()

Loading…
Cancel
Save