Welcome, Guest
Python Scripts for ComicRack

TOPIC: ArchiveTester for comicbooks

ArchiveTester for comicbooks 3 years 7 months ago #38970

  • BigCabbage
  • BigCabbage's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 4
  • Karma: 0
Hi,

I have been creating and using this program in order to make sure my comic book archives are not corrupt.
It works quite simple:
  1. You start the program, indicate the root folder of your (new) comics and press 'Start'.
  2. If it finds a .RAR, .ZIP, .CBR or .CBZ file, it will test them
  3. If the archive is Solid, it adds ' (Solid)' at the end, just before the file extension
  4. If the archive is okay, it adds ' (Ok)' at the end, just before the file extension
  5. If the archive is broken, it adds ' (Broken)' at the end, just before the file extension
  6. If the file has extension .cbz, but it is actually a .RAR, it will rename it to .cbr
  7. If the file has extension .cbr, but it is actually a .ZIP, it will rename it to .cbz
  8. If the archive already contains '(Ok)' or '(Broken)', checking of the archive will be skipped

I ran this on my comic collection before indexing, so I can now run it once in a while after I add new comics. It will check everything, but skip the already checked ones so it is quite fast.
Added value for me is that Solid archives are identified, so I can - in case of duplicates - remove the solid ones.

BEWARE: If you run this on your existing collection, you need to re-scrape everything because the filename will be changed!!! Or you will need to run some mass-updates on your library to fix the filenames....

I just post this here since it was really useful for me and it might be useful to you too.
Good luck!

PS: prerequisites are 7-zip, both 32 and 64 bit versions should work. I run it myself on Win64
Attachments:
The administrator has disabled public write access.
The following user(s) said Thank You: boshuda

ArchiveTester for comicbooks 3 years 7 months ago #38974

  • boshuda
  • boshuda's Avatar
  • Offline
  • Gold Boarder
  • Posts: 296
  • Thank you received: 65
  • Karma: 8
What does Solid mean?
The administrator has disabled public write access.

ArchiveTester for comicbooks 3 years 7 months ago #38975

  • BigCabbage
  • BigCabbage's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 4
  • Karma: 0
Solid archives are a type of RAR files where all files within the archive are treated like a large, single file. This means that ComicRack cannot extract a single file without extracting first all preceding files.
ComicRack for Android does not even like Solid Archives, it will not display them (AFAIK). If you search the ComicRack forums for 'Solid Archives' you'll find cYo himself complain about them as well.
Since I like reading my comics on my Android Tablet, they cannot be Solid ones. So by having them marked as such, I can easily choose between duplicates where one is Solid and the other is not...

Hope this helps.
The administrator has disabled public write access.

ArchiveTester for comicbooks 3 years 6 months ago #39190

  • Hutzelock
  • Hutzelock's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 1
  • Karma: 0
Can you do one with the option only to mark bad ones? Bigggggg colection and i dont want to scrape everything again :P
The administrator has disabled public write access.

ArchiveTester for comicbooks 3 years 6 months ago #39191

  • burnshroom
  • burnshroom's Avatar
  • Offline
  • Junior Boarder
  • Posts: 25
  • Thank you received: 2
  • Karma: 2
Or what about an option for a test mode, that doesn't actually make changes at all but simply outputs the test results via a text file.

Then we can look through the output and selectively correct the broken files. Seems counter productive to have it change every file and then have to rescrape everything, especially for those with larger collections.

Although I supposed after the first pass then it would be properly renamed for future passes unless it gets broken between passes 1 and 2+.
The administrator has disabled public write access.

ArchiveTester for comicbooks 3 years 6 months ago #39192

  • BigCabbage
  • BigCabbage's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 4
  • Karma: 0
Good idea.

I like the idea of the test mode, will try to add it this afternoon.
But indeed, the positive side it that you can re-run it on (very!) large sets and it will only scan those archives which are new, meaning it is very fast.
If you use this 'test' mode, it will tell you which archives are 'Broken' and 'Solid', but not mark them as such in the file name. When you re-run the tool, it will again scan your entire collection.

When I faced this issue, I solved it this way:
1) I made sure ComicRack was closed
2) I edited the AppData\Roaming\cYo\ComicRack\ComicDB.xml using notepad++ and performed these edits:
2a) Replace '.cbz">' with ' (Ok).cbz">'
2b) Replace '.cbr">' with ' (Ok).cbr">'
3) Since this assumes all your archives are okay, it should have no impact on your collection. Should there be broken archives, they will have to be re-scraped but you probably want to replace them anyway
4) Now run ArchiveTester on your entire collection. You can interrupt the tool if you need to do other things, then restart it later again and it will continue
5) Once everything has been processed, you can start ComicRack again.
6) With the modified ComicDB.xml, everything should work directly without the need for re-scraping (except for the ones marked 'Solid').

Hope this helps.
The administrator has disabled public write access.

ArchiveTester for comicbooks 3 years 6 months ago #39199

  • kimpe
  • kimpe's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 3
  • Karma: 1
Thank you for the script. Are these changes in the 1.1 version or are you going to revise to 1.2?
The administrator has disabled public write access.

ArchiveTester for comicbooks 3 years 6 months ago #39202

  • BigCabbage
  • BigCabbage's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 4
  • Karma: 0
With the current 1.1 release you can do what I described above.

For the 1.2 release, I'll add the test mode, but the problem with that mode is what I described before, you'll have to manage yourself which files to test or it will test everything all over again each time you run it.
The reason I built it was that I got tired or remembering which files I already checked and which are new. Now I simply re-run it on my library and it will find itself those files in need for checking, even if the new and/or old ones have moved to different locations.
The administrator has disabled public write access.

ArchiveTester for comicbooks 3 years 4 months ago #39856

  • boshuda
  • boshuda's Avatar
  • Offline
  • Gold Boarder
  • Posts: 296
  • Thank you received: 65
  • Karma: 8
The script isn't working for me. It's looking for 7-zip in c:\program files(x86), whereas mine lives in c:\program files\
The administrator has disabled public write access.

ArchiveTester for comicbooks 3 years 4 months ago #40000

  • mal
  • mal's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 2
  • Karma: -1
Any update on the 1.2 version with the test option in it ? Really looking forward to it.
The administrator has disabled public write access.
Time to create page: 0.276 seconds

Who's Online

We have 289 guests and 5 members online