Skip to content

Commit

Permalink
Merge pull request #8 from tsaklidis/development
Browse files Browse the repository at this point in the history
Bug fix + confuse all (comments and posts) at once
  • Loading branch information
tsaklidis authored Feb 2, 2024
2 parents 0c99a45 + 98108d8 commit ce193a7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/cleaner.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,15 @@

if bulk.lower() == 'a':
log('What do you want to confuse?\nComments=C '
'Submissions=S', 'question')
'Submissions=S, Both=B', 'question')
what = input('[Ans]:')

if what.lower() == 'c':
account.confuser(comments=True)
elif what.lower() == 's':
account.confuser(submission=True)
elif what.lower() == 'b':
account.confuser(submission=True, comments=True)
else:
quit('Not known action provided, quiting...')

Expand Down
10 changes: 7 additions & 3 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,15 +148,19 @@ def confuser(self, submission=None, comments=None, id=None, size=10):
log('Confusing submission text but NOT title...')
for s in data:
self.try_for_rollback(s, sub=True)
self.reddit.submission(s).edit(get_text(size))
# Older praw versions
# self.reddit.submission(s).edit(get_text(size))
s.edit(get_text(size))

elif comments:
if comments:
log('This may take some time. Loading data...')
data = self.user_activity(comments=True)
log('Confusing comments...')
for c in data:
self.try_for_rollback(c, sub=False)
self.reddit.comment(c).edit(get_text(size))
# Older praw versions
# self.reddit.comment(c).edit(get_text(size))
c.edit(get_text(size))
log(f'Confused {len(data)} items.')

def delete_activity(self, submission=None, comments=None, id=None):
Expand Down

0 comments on commit ce193a7

Please sign in to comment.