pywaybackup 1.2.5__tar.gz → 1.2.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. pywaybackup-1.2.6/.github/ISSUE_TEMPLATE/bug.md +25 -0
  2. pywaybackup-1.2.6/.gitignore +164 -0
  3. {pywaybackup-1.2.5 → pywaybackup-1.2.6}/PKG-INFO +3 -2
  4. pywaybackup-1.2.6/dev/pip_build.sh +16 -0
  5. pywaybackup-1.2.6/dev/venv_create.sh +17 -0
  6. pywaybackup-1.2.6/pywaybackup/__version__.py +1 -0
  7. {pywaybackup-1.2.5 → pywaybackup-1.2.6}/pywaybackup/archive.py +3 -3
  8. {pywaybackup-1.2.5 → pywaybackup-1.2.6}/pywaybackup.egg-info/PKG-INFO +3 -2
  9. {pywaybackup-1.2.5 → pywaybackup-1.2.6}/pywaybackup.egg-info/SOURCES.txt +9 -1
  10. pywaybackup-1.2.6/pywaybackup.egg-info/requires.txt +8 -0
  11. pywaybackup-1.2.6/requirements.txt +4 -0
  12. pywaybackup-1.2.6/test/cdx.example.com.200 +2851 -0
  13. pywaybackup-1.2.6/test/cdx.example.com.404 +9163 -0
  14. pywaybackup-1.2.6/test/cdx.example.com.small.200 +46 -0
  15. pywaybackup-1.2.5/pywaybackup/__version__.py +0 -1
  16. pywaybackup-1.2.5/pywaybackup.egg-info/requires.txt +0 -3
  17. {pywaybackup-1.2.5 → pywaybackup-1.2.6}/LICENSE +0 -0
  18. {pywaybackup-1.2.5 → pywaybackup-1.2.6}/README.md +0 -0
  19. {pywaybackup-1.2.5 → pywaybackup-1.2.6}/pywaybackup/Exception.py +0 -0
  20. {pywaybackup-1.2.5 → pywaybackup-1.2.6}/pywaybackup/SnapshotCollection.py +0 -0
  21. {pywaybackup-1.2.5 → pywaybackup-1.2.6}/pywaybackup/Verbosity.py +0 -0
  22. {pywaybackup-1.2.5 → pywaybackup-1.2.6}/pywaybackup/__init__.py +0 -0
  23. {pywaybackup-1.2.5 → pywaybackup-1.2.6}/pywaybackup/arguments.py +0 -0
  24. {pywaybackup-1.2.5 → pywaybackup-1.2.6}/pywaybackup/helper.py +0 -0
  25. {pywaybackup-1.2.5 → pywaybackup-1.2.6}/pywaybackup/main.py +0 -0
  26. {pywaybackup-1.2.5 → pywaybackup-1.2.6}/pywaybackup.egg-info/dependency_links.txt +0 -0
  27. {pywaybackup-1.2.5 → pywaybackup-1.2.6}/pywaybackup.egg-info/entry_points.txt +0 -0
  28. {pywaybackup-1.2.5 → pywaybackup-1.2.6}/pywaybackup.egg-info/top_level.txt +0 -0
  29. {pywaybackup-1.2.5 → pywaybackup-1.2.6}/setup.cfg +0 -0
  30. {pywaybackup-1.2.5 → pywaybackup-1.2.6}/setup.py +0 -0
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: Bug
3
+ about: Describe a faulty behavior
4
+ title: ''
5
+ labels: bug
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Describe**
11
+ Describe the bug / unexpected event
12
+
13
+ **Snapshot to reproduce**
14
+ <a href="https://example.com">If possible add a link to the snapshot which caused the error.</a>
15
+
16
+ **Command to reproduce**
17
+ `Add the used command`
18
+
19
+ **Terminal output**
20
+ ```
21
+ Insert exception / output if possible - remove private folders / files
22
+ ```
23
+
24
+ **Additional context**
25
+ Add any other context about the problem here.
@@ -0,0 +1,164 @@
1
+ waybackup_snapshots/
2
+
3
+ # Byte-compiled / optimized / DLL files
4
+ __pycache__/
5
+ *.py[cod]
6
+ *$py.class
7
+
8
+ # C extensions
9
+ *.so
10
+
11
+ # Distribution / packaging
12
+ .Python
13
+ build/
14
+ develop-eggs/
15
+ dist/
16
+ downloads/
17
+ eggs/
18
+ .eggs/
19
+ lib/
20
+ lib64/
21
+ parts/
22
+ sdist/
23
+ var/
24
+ wheels/
25
+ share/python-wheels/
26
+ *.egg-info/
27
+ .installed.cfg
28
+ *.egg
29
+ MANIFEST
30
+
31
+ # PyInstaller
32
+ # Usually these files are written by a python script from a template
33
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
34
+ *.manifest
35
+ *.spec
36
+
37
+ # Installer logs
38
+ pip-log.txt
39
+ pip-delete-this-directory.txt
40
+
41
+ # Unit test / coverage reports
42
+ htmlcov/
43
+ .tox/
44
+ .nox/
45
+ .coverage
46
+ .coverage.*
47
+ .cache
48
+ nosetests.xml
49
+ coverage.xml
50
+ *.cover
51
+ *.py,cover
52
+ .hypothesis/
53
+ .pytest_cache/
54
+ cover/
55
+
56
+ # Translations
57
+ *.mo
58
+ *.pot
59
+
60
+ # Django stuff:
61
+ *.log
62
+ local_settings.py
63
+ db.sqlite3
64
+ db.sqlite3-journal
65
+
66
+ # Flask stuff:
67
+ instance/
68
+ .webassets-cache
69
+
70
+ # Scrapy stuff:
71
+ .scrapy
72
+
73
+ # Sphinx documentation
74
+ docs/_build/
75
+
76
+ # PyBuilder
77
+ .pybuilder/
78
+ target/
79
+
80
+ # Jupyter Notebook
81
+ .ipynb_checkpoints
82
+
83
+ # IPython
84
+ profile_default/
85
+ ipython_config.py
86
+
87
+ # pyenv
88
+ # For a library or package, you might want to ignore these files since the code is
89
+ # intended to run in multiple environments; otherwise, check them in:
90
+ # .python-version
91
+
92
+ # pipenv
93
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
94
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
95
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
96
+ # install all needed dependencies.
97
+ #Pipfile.lock
98
+
99
+ # poetry
100
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
101
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
102
+ # commonly ignored for libraries.
103
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
104
+ #poetry.lock
105
+
106
+ # pdm
107
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
108
+ #pdm.lock
109
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
110
+ # in version control.
111
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
112
+ .pdm.toml
113
+ .pdm-python
114
+ .pdm-build/
115
+
116
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
117
+ __pypackages__/
118
+
119
+ # Celery stuff
120
+ celerybeat-schedule
121
+ celerybeat.pid
122
+
123
+ # SageMath parsed files
124
+ *.sage.py
125
+
126
+ # Environments
127
+ .env
128
+ .venv
129
+ env/
130
+ venv/
131
+ ENV/
132
+ env.bak/
133
+ venv.bak/
134
+
135
+ # Spyder project settings
136
+ .spyderproject
137
+ .spyproject
138
+
139
+ # Rope project settings
140
+ .ropeproject
141
+
142
+ # mkdocs documentation
143
+ /site
144
+
145
+ # mypy
146
+ .mypy_cache/
147
+ .dmypy.json
148
+ dmypy.json
149
+
150
+ # Pyre type checker
151
+ .pyre/
152
+
153
+ # pytype static type analyzer
154
+ .pytype/
155
+
156
+ # Cython debug symbols
157
+ cython_debug/
158
+
159
+ # PyCharm
160
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
161
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
162
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
163
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
164
+ #.idea/
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pywaybackup
3
- Version: 1.2.5
3
+ Version: 1.2.6
4
4
  Summary: Download snapshots from the Wayback Machine
5
5
  Home-page: https://github.com/bitdruid/python-wayback-machine-downloader
6
6
  Author: bitdruid
@@ -11,7 +11,8 @@ Description-Content-Type: text/markdown
11
11
  License-File: LICENSE
12
12
  Requires-Dist: requests==2.31.0
13
13
  Requires-Dist: tqdm==4.66.2
14
- Requires-Dist: python-magic==0.4.27
14
+ Requires-Dist: python-magic==0.4.27; sys_platform == "linux"
15
+ Requires-Dist: python-magic-bin==0.4.14; sys_platform == "win32"
15
16
 
16
17
  # python wayback machine downloader
17
18
 
@@ -0,0 +1,16 @@
1
+ #!bin/bash
2
+
3
+ # path of the script
4
+ SCRIPT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
5
+ TARGET_PATH="$SCRIPT_PATH/.."
6
+
7
+ # install dependencies
8
+ pip install twine wheel setuptools
9
+
10
+ # build
11
+ python $TARGET_PATH/setup.py sdist bdist_wheel --verbose
12
+ python -m twine upload dist/*
13
+ #pip install -e $TARGET_PATH
14
+
15
+ # clean up
16
+ rm -rf $TARGET_PATH/build $TARGET_PATH/dist # $TARGET_PATH/*.egg-info
@@ -0,0 +1,17 @@
1
+ #!bin/bash
2
+
3
+ # path of the script
4
+ SCRIPT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
5
+ TARGET_PATH="$SCRIPT_PATH/.."
6
+ echo "Preparing virtual environment in $TARGET_PATH"
7
+ # Create a virtual environment
8
+ if [ ! -d "..$SCRIPT_PATH/.venv" ]; then
9
+ python3 -m venv "$TARGET_PATH/.venv"
10
+ fi
11
+
12
+ # update pip
13
+ "$TARGET_PATH/.venv/bin/python" -m pip install --upgrade pip
14
+ "$TARGET_PATH/.venv/bin/python" -m pip install twine wheel setuptools
15
+
16
+ # install requirements
17
+ "$TARGET_PATH/.venv/bin/python" -m pip install -r "$TARGET_PATH/requirements.txt"
@@ -0,0 +1 @@
1
+ __version__ = "1.2.6"
@@ -382,15 +382,15 @@ def csv_close(csv_path: str, url: str):
382
382
  if sc.count(collection=True) > 0:
383
383
  if os.path.exists(csv_path): # append to existing file
384
384
  existing_rows = set()
385
- with open(csv_path, mode='r') as file: # read existing rows
385
+ with open(csv_path, mode='r', newline='') as file: # read existing rows
386
386
  existing_rows = set(csv_read(file))
387
- with open(csv_path, mode='a') as file: # append new rows
387
+ with open(csv_path, mode='a', newline='') as file: # append new rows
388
388
  row = csv.DictWriter(file, sc.SNAPSHOT_COLLECTION[0].keys())
389
389
  for snapshot in sc.SNAPSHOT_COLLECTION:
390
390
  if snapshot["response"] is not False and snapshot["url_archive"] not in existing_rows: # only append handled snapshots
391
391
  row.writerow(snapshot)
392
392
  else: # create new file
393
- with open(csv_path, mode='w') as file:
393
+ with open(csv_path, mode='w', newline='') as file:
394
394
  row = csv.DictWriter(file, sc.SNAPSHOT_COLLECTION[0].keys())
395
395
  row.writeheader()
396
396
  for snapshot in sc.SNAPSHOT_COLLECTION:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pywaybackup
3
- Version: 1.2.5
3
+ Version: 1.2.6
4
4
  Summary: Download snapshots from the Wayback Machine
5
5
  Home-page: https://github.com/bitdruid/python-wayback-machine-downloader
6
6
  Author: bitdruid
@@ -11,7 +11,8 @@ Description-Content-Type: text/markdown
11
11
  License-File: LICENSE
12
12
  Requires-Dist: requests==2.31.0
13
13
  Requires-Dist: tqdm==4.66.2
14
- Requires-Dist: python-magic==0.4.27
14
+ Requires-Dist: python-magic==0.4.27; sys_platform == "linux"
15
+ Requires-Dist: python-magic-bin==0.4.14; sys_platform == "win32"
15
16
 
16
17
  # python wayback machine downloader
17
18
 
@@ -1,6 +1,11 @@
1
+ .gitignore
1
2
  LICENSE
2
3
  README.md
4
+ requirements.txt
3
5
  setup.py
6
+ .github/ISSUE_TEMPLATE/bug.md
7
+ dev/pip_build.sh
8
+ dev/venv_create.sh
4
9
  pywaybackup/Exception.py
5
10
  pywaybackup/SnapshotCollection.py
6
11
  pywaybackup/Verbosity.py
@@ -15,4 +20,7 @@ pywaybackup.egg-info/SOURCES.txt
15
20
  pywaybackup.egg-info/dependency_links.txt
16
21
  pywaybackup.egg-info/entry_points.txt
17
22
  pywaybackup.egg-info/requires.txt
18
- pywaybackup.egg-info/top_level.txt
23
+ pywaybackup.egg-info/top_level.txt
24
+ test/cdx.example.com.200
25
+ test/cdx.example.com.404
26
+ test/cdx.example.com.small.200
@@ -0,0 +1,8 @@
1
+ requests==2.31.0
2
+ tqdm==4.66.2
3
+
4
+ [:sys_platform == "linux"]
5
+ python-magic==0.4.27
6
+
7
+ [:sys_platform == "win32"]
8
+ python-magic-bin==0.4.14
@@ -0,0 +1,4 @@
1
+ requests==2.31.0
2
+ tqdm==4.66.2
3
+ python-magic==0.4.27; sys_platform == 'linux'
4
+ python-magic-bin==0.4.14; sys_platform == 'win32'