forked from mylar3/mylar3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IMP: Update look4untaggedcbzs.py (@DieselTech) FIX: Tweaked Issue ID parsing to handle any subsequent numbers in Notes field (@falo2k) FIX: Rechecking Story-Arc directory fails on missing issue numbers (@qubidt) FIX:(mylar3#1179) Allow for POST method on pages where large amounts of data is being sent (ie.config/manage) FIX:(mylar3#1321) Imprints would take json naming convention over CV (ini option added)
- Loading branch information
Showing
12 changed files
with
72 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,41 @@ | ||
from lib2to3.pgen2.token import NEWLINE | ||
import sys | ||
import zipfile | ||
import os | ||
import subprocess | ||
from zipfile import BadZipFile | ||
from pathlib import Path | ||
|
||
results = subprocess.run(['find', '.', '-iname', '*.cbz'], universal_newlines = True, stdout=subprocess.PIPE) | ||
results = Path().cwd().glob('**/*.cbz') | ||
file1 = open("notags.txt", "a") | ||
file2 = open("badzip.txt", "a") | ||
|
||
for result in results.stdout.splitlines(): | ||
|
||
for result in results: | ||
tagged = 0 | ||
target_zip = str(result) | ||
# with pathlib your result is always going to be | ||
# a path object | ||
# making this unnecessary | ||
target_zip = result | ||
# print("file: %s" % target_zip) | ||
try: | ||
with zipfile.ZipFile(target_zip) as zip_file: | ||
for member in zip_file.namelist(): | ||
if 'ComicInfo.xml' in member: | ||
tagged = 1 | ||
if tagged == 0: | ||
print("Filename %s is not metatagged" % target_zip) | ||
print('Filename %s is not metatagged' % target_zip) | ||
stuff= f'Filename {target_zip} is not metatagged' + os.linesep | ||
file1.write(stuff) | ||
elif tagged == 1: | ||
next | ||
# print("filename %s is correctly metatagged" % target_zip) | ||
else: | ||
print("Something's not right! %s" % target_zip) | ||
except BadZipFile: | ||
print("%s is a bad zipfile!" % target_zip) | ||
print("%s is a bad zipfile!" % target_zip) | ||
badstuff= f'{target_zip} is a bad zipfile' + os.linesep | ||
file2.write(badstuff) | ||
|
||
file1.close() | ||
file2.close() |