diff options
author | neeshy | 2021-01-16 17:52:13 -0500 |
---|---|---|
committer | neeshy | 2021-01-16 17:52:13 -0500 |
commit | 7b8fa20edbc5697e99fc409b12b3552b97db8964 (patch) | |
tree | ec2ba8baf475b17842f7d0032f904ae4fe06043c /infinityctl-unix_original-scrape-mode.patch | |
parent | 714ff7d24bd13c54de8adc88e14ed89e4de07c54 (diff) | |
download | aur-7b8fa20edbc5697e99fc409b12b3552b97db8964.tar.gz |
rename patches
Diffstat (limited to 'infinityctl-unix_original-scrape-mode.patch')
-rw-r--r-- | infinityctl-unix_original-scrape-mode.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/infinityctl-unix_original-scrape-mode.patch b/infinityctl-unix_original-scrape-mode.patch new file mode 100644 index 000000000000..996cfead082c --- /dev/null +++ b/infinityctl-unix_original-scrape-mode.patch @@ -0,0 +1,37 @@ +--- a/infinitychan.py ++++ b/infinitychan.py +@@ -287,18 +287,21 @@ + threadviewer.parser.parse_post(report['reason']))) + + +-def scrape_files(board, thread, mode='unix'): ++def scrape_files(board, thread, mode='unix_original'): + """Download all of a thread's files.""" + for post in posts(board, thread): + files = get_files(post) + for i, file in enumerate(files): +- if mode == 'unix': ++ if mode == 'unix' \ ++ or mode == 'unix_original': + if is_dedup(file): + name = str(post['time'] * 1000 + post['no'] % 1000) + if len(files) != 1: + name += '-{}'.format(i) + else: + name = file['tim'] ++ if mode == 'unix_original': ++ name += '_' + file['filename'] + elif mode == 'plain': + name = file['tim'] + elif mode == 'original': +--- a/infinityctl ++++ b/infinityctl +@@ -72,7 +72,7 @@ + ('-c', '--count'): {'action': 'store_true'}, + ('-f', '--follow'): {'action': 'store_true'}, + ('-i', '--interval'): {'type': float}, +- ('-m', '--mode'): {'choices': ('unix', 'plain', 'original')}, ++ ('-m', '--mode'): {'choices': ('unix', 'plain', 'original', 'unix_original')}, + ('-n', '--number'): {'type': int}, + ('-o', '--ocr'): {'action': 'store_true'}, + ('-r', '--raw'): {'action': 'store_true'}, |