Skip to content

Commit 6ed5198

Browse files
committed
Merge branch 'h/requirements-fix'
1 parent 9b422bb commit 6ed5198

File tree

4 files changed

+4
-27
lines changed

4 files changed

+4
-27
lines changed

pywaybackup/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.6.0"
1+
__version__ = "0.6.1"

pywaybackup/archive.py

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#import threading
22
import requests
33
import os
4-
import magic
54
import gzip
65
import threading
76
import time
@@ -266,23 +265,4 @@ def download(download_entry, connection, status_message):
266265
v.write(status_message)
267266
return False
268267
v.write(f"FAILED -> download, append to failed_urls: {download_url}")
269-
return False
270-
271-
272-
# scan output folder and guess mimetype for each file
273-
# if add file extension if not present
274-
# def detect_filetype(filepath):
275-
# v.write(f"\nDetecting filetypes...")
276-
# path = Path(filepath)
277-
# if not path.is_dir():
278-
# v.write(f"\n-----> ERROR: {filepath} is not a directory"); return
279-
# for file_path in path.rglob("*"):
280-
# if file_path.is_file():
281-
# file_extension = file_path.suffix
282-
# if not file_extension:
283-
# mime_type = magic.from_file(str(file_path), mime=True)
284-
# file_extension = mime_type.split("/")[-1]
285-
# new_file_path = file_path.with_suffix('.' + file_extension)
286-
# file_path.rename(new_file_path)
287-
# v.write(f"NO EXT -> {file_path}")
288-
# v.write(f" NEW -> {new_file_path}")
268+
return False

pywaybackup/main.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ def main():
2222
optional.add_argument('-o', '--output', type=str, help='Output folder')
2323
optional.add_argument('-v', '--verbosity', type=str, default="standard", choices=["standard", "progress", "json"], help='Verbosity level')
2424
special = parser.add_argument_group('special')
25-
#special.add_argument('--detect-filetype', action='store_true', help='If a file has no extension, try to detect the filetype')
2625
special.add_argument('--retry', type=int, default=0, metavar="X-TIMES", help='Retry failed downloads (opt tries as int, else infinite)')
2726
special.add_argument('--worker', type=int, default=1, metavar="AMOUNT", help='Number of worker (simultaneous downloads)')
2827

@@ -46,8 +45,6 @@ def main():
4645
else:
4746
archive.download_list(snapshots, args.output, args.retry, args.worker)
4847
archive.remove_empty_folders(args.output)
49-
# if args.detect_filetype:
50-
# archive.detect_filetype(args.output)
5148
v.close()
5249

5350
if __name__ == "__main__":

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
python-magic==0.4.27
2-
requests==2.31.0
1+
requests==2.31.0
2+
tqdm==4.66.2

0 commit comments

Comments
 (0)