pywaybackup 3.4.0__tar.gz → 3.4.1__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 (25) hide show
  1. {pywaybackup-3.4.0/pywaybackup.egg-info → pywaybackup-3.4.1}/PKG-INFO +1 -1
  2. {pywaybackup-3.4.0 → pywaybackup-3.4.1}/pyproject.toml +1 -1
  3. pywaybackup-3.4.0/pywaybackup/PyWaybackup.py → pywaybackup-3.4.1/pywaybackup/PyWayBackup.py +42 -43
  4. {pywaybackup-3.4.0 → pywaybackup-3.4.1}/pywaybackup/SnapshotCollection.py +0 -3
  5. pywaybackup-3.4.1/pywaybackup/__init__.py +1 -0
  6. {pywaybackup-3.4.0 → pywaybackup-3.4.1/pywaybackup.egg-info}/PKG-INFO +1 -1
  7. {pywaybackup-3.4.0 → pywaybackup-3.4.1}/pywaybackup.egg-info/SOURCES.txt +1 -1
  8. pywaybackup-3.4.0/pywaybackup/__init__.py +0 -1
  9. {pywaybackup-3.4.0 → pywaybackup-3.4.1}/LICENSE +0 -0
  10. {pywaybackup-3.4.0 → pywaybackup-3.4.1}/README.md +0 -0
  11. {pywaybackup-3.4.0 → pywaybackup-3.4.1}/pywaybackup/Arguments.py +0 -0
  12. {pywaybackup-3.4.0 → pywaybackup-3.4.1}/pywaybackup/Converter.py +0 -0
  13. {pywaybackup-3.4.0 → pywaybackup-3.4.1}/pywaybackup/Exception.py +0 -0
  14. {pywaybackup-3.4.0 → pywaybackup-3.4.1}/pywaybackup/Verbosity.py +0 -0
  15. {pywaybackup-3.4.0 → pywaybackup-3.4.1}/pywaybackup/Worker.py +0 -0
  16. {pywaybackup-3.4.0 → pywaybackup-3.4.1}/pywaybackup/archive_download.py +0 -0
  17. {pywaybackup-3.4.0 → pywaybackup-3.4.1}/pywaybackup/archive_save.py +0 -0
  18. {pywaybackup-3.4.0 → pywaybackup-3.4.1}/pywaybackup/db.py +0 -0
  19. {pywaybackup-3.4.0 → pywaybackup-3.4.1}/pywaybackup/helper.py +0 -0
  20. {pywaybackup-3.4.0 → pywaybackup-3.4.1}/pywaybackup/main.py +0 -0
  21. {pywaybackup-3.4.0 → pywaybackup-3.4.1}/pywaybackup.egg-info/dependency_links.txt +0 -0
  22. {pywaybackup-3.4.0 → pywaybackup-3.4.1}/pywaybackup.egg-info/entry_points.txt +0 -0
  23. {pywaybackup-3.4.0 → pywaybackup-3.4.1}/pywaybackup.egg-info/requires.txt +0 -0
  24. {pywaybackup-3.4.0 → pywaybackup-3.4.1}/pywaybackup.egg-info/top_level.txt +0 -0
  25. {pywaybackup-3.4.0 → pywaybackup-3.4.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pywaybackup
3
- Version: 3.4.0
3
+ Version: 3.4.1
4
4
  Summary: Query and download archive.org as simple as possible.
5
5
  Author-email: bitdruid <bitdruid@outlook.com>
6
6
  License: MIT License
@@ -7,7 +7,7 @@ packages = ["pywaybackup"]
7
7
 
8
8
  [project]
9
9
  name = "pywaybackup"
10
- version = "3.4.0"
10
+ version = "3.4.1"
11
11
  description = "Query and download archive.org as simple as possible."
12
12
  authors = [
13
13
  { name = "bitdruid", email = "bitdruid@outlook.com" }
@@ -190,46 +190,45 @@ class PyWayBackup:
190
190
 
191
191
  if self.save:
192
192
  archive_save.save_page(self.url)
193
- os._exit(1)
194
-
195
- db.init(self.dbfile, self.query_identifier)
196
- sc.init(self.mode)
197
-
198
- if not self.save:
199
- archive_download.startup()
200
-
201
- try:
202
- archive_download.query_list(
203
- self.csvfile,
204
- self.cdxfile,
205
- self.range,
206
- self.limit,
207
- self.start,
208
- self.end,
209
- self.explicit,
210
- self.filetype,
211
- self.statuscode,
212
- self.domain,
213
- self.subdir,
214
- self.filename,
215
- )
216
- archive_download.download_list(self.output, self.retry, self.no_redirect, self.delay, self.workers)
217
- except KeyboardInterrupt:
218
- print("\nInterrupted by user\n")
219
- self.keep = True
220
- signal.signal(signal.SIGINT, signal.SIG_IGN)
221
-
222
- except Exception as e:
223
- self.keep = True
224
- ex.exception(message="", e=e)
225
-
226
- finally:
227
- sc.csv_create(self.csvfile)
228
- sc.fini()
229
- vb.fini()
230
-
231
- if not self.keep:
232
- os.remove(self.dbfile) if os.path.exists(self.dbfile) else None
233
- os.remove(self.cdxfile) if os.path.exists(self.cdxfile) else None
234
-
235
- os._exit(1)
193
+
194
+ else:
195
+
196
+ db.init(self.dbfile, self.query_identifier)
197
+ sc.init(self.mode)
198
+
199
+ if not self.save:
200
+ archive_download.startup()
201
+
202
+ try:
203
+ archive_download.query_list(
204
+ self.csvfile,
205
+ self.cdxfile,
206
+ self.range,
207
+ self.limit,
208
+ self.start,
209
+ self.end,
210
+ self.explicit,
211
+ self.filetype,
212
+ self.statuscode,
213
+ self.domain,
214
+ self.subdir,
215
+ self.filename,
216
+ )
217
+ archive_download.download_list(self.output, self.retry, self.no_redirect, self.delay, self.workers)
218
+ except KeyboardInterrupt:
219
+ print("\nInterrupted by user\n")
220
+ self.keep = True
221
+ signal.signal(signal.SIGINT, signal.SIG_IGN)
222
+
223
+ except Exception as e:
224
+ self.keep = True
225
+ ex.exception(message="", e=e)
226
+
227
+ finally:
228
+ sc.csv_create(self.csvfile)
229
+ sc.fini()
230
+ vb.fini()
231
+
232
+ if not self.keep:
233
+ os.remove(self.dbfile) if os.path.exists(self.dbfile) else None
234
+ os.remove(self.cdxfile) if os.path.exists(self.cdxfile) else None
@@ -194,9 +194,6 @@ class SnapshotCollection:
194
194
  cls.db.cursor.execute("UPDATE snapshot_tbl SET response = NULL WHERE response = 'LOCK'") # reset locked to unprocessed
195
195
  cls.db.cursor.execute("SELECT * FROM csv_view WHERE response IS NOT NULL") # only write processed snapshots
196
196
  headers = [description[0] for description in cls.db.cursor.description]
197
- if "snapshot_id" in headers:
198
- snapshot_id_index = headers.index("snapshot_id")
199
- headers.pop(snapshot_id_index)
200
197
  with open(csvfile, "w", encoding="utf-8") as f:
201
198
  writer = csv.writer(f)
202
199
  writer.writerow(headers)
@@ -0,0 +1 @@
1
+ from .PyWayBackup import PyWayBackup
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pywaybackup
3
- Version: 3.4.0
3
+ Version: 3.4.1
4
4
  Summary: Query and download archive.org as simple as possible.
5
5
  Author-email: bitdruid <bitdruid@outlook.com>
6
6
  License: MIT License
@@ -4,7 +4,7 @@ pyproject.toml
4
4
  pywaybackup/Arguments.py
5
5
  pywaybackup/Converter.py
6
6
  pywaybackup/Exception.py
7
- pywaybackup/PyWaybackup.py
7
+ pywaybackup/PyWayBackup.py
8
8
  pywaybackup/SnapshotCollection.py
9
9
  pywaybackup/Verbosity.py
10
10
  pywaybackup/Worker.py
@@ -1 +0,0 @@
1
- from .PyWaybackup import PyWayBackup
File without changes
File without changes
File without changes