Welcome, Guest
Python Scripts for ComicRack

TOPIC: Organize Library Files & Folders 2.0

Re:Organize Library Files & Folders 2.0 8 years 2 months ago #3986

  • pcvii
  • pcvii's Avatar
  • Offline
  • Expert Boarder
  • Posts: 80
  • Thank you received: 1
  • Karma: 0
I edited my post with the updated info. i fixed it myself woot! :P
The administrator has disabled public write access.

Re:Organize Library Files & Folders 2.0 8 years 2 months ago #3987

  • oraclexview
  • oraclexview's Avatar
  • Offline
  • Moderator
  • aka SoundWave
  • Posts: 906
  • Thank you received: 182
  • Karma: 37
The script should already take into account the Month field being empty. I'll update the script to handle when the Publisher and Year field are also empty.

Thanks for the heads up!
Onyx X aka SoundWave
The administrator has disabled public write access.

Re:Organize Library Files & Folders 2.0 8 years 2 months ago #3988

  • pcvii
  • pcvii's Avatar
  • Offline
  • Expert Boarder
  • Posts: 80
  • Thank you received: 1
  • Karma: 0
though i noticed if the year and month are empty.

it puts a ( at the end
the file name appears as Fathom #01 (.cbz

i'm looking at putting (and book.Year != -1) in the month if statements to check for no year.
The administrator has disabled public write access.

Re:Organize Library Files & Folders 2.0 8 years 2 months ago #3990

  • pcvii
  • pcvii's Avatar
  • Offline
  • Expert Boarder
  • Posts: 80
  • Thank you received: 1
  • Karma: 0
you script pretty much does take into account when they are empty the
dir=dir
line wasn't working though.

and like i said when year is empty and month is empty the new name has a ( before the .cbz just chilling there.
Last Edit: 8 years 2 months ago by pcvii.
The administrator has disabled public write access.

Re:Organize Library Files & Folders 2.0 8 years 2 months ago #3991

  • pcvii
  • pcvii's Avatar
  • Offline
  • Expert Boarder
  • Posts: 80
  • Thank you received: 1
  • Karma: 0
else:
if book.ShadowYear != -1:
name = name + str(book.ShadowYear) + ")"
else:
name = name.rstrip(" (")

I added the extra
else: name = name.rstrip(" (")
and that removed the extra ( from the file names.
Last Edit: 8 years 2 months ago by pcvii.
The administrator has disabled public write access.

Re:Organize Library Files & Folders 2.0 8 years 2 months ago #3992

  • oraclexview
  • oraclexview's Avatar
  • Offline
  • Moderator
  • aka SoundWave
  • Posts: 906
  • Thank you received: 182
  • Karma: 37
Organize Library Files & Folders 2.1.1

Here is an updated script with some changes to address some fields that may be missing data.

Fixes:
1) I fixed the issue with the dir variable improperly referencing itself.
2) I set the script to create an "Unknown Publisher" folder when a book's Publisher value is empty.
3) I set the script to update a book's Year value to the current year when book's Year and ShadowYear are both empty.

This should keep the user from running into exception errors when running the script and still allow it to function as close as it is intended to when important data is absent.

Onyx X aka SoundWave

IMPORTANT
Update to script is located on page 8. The attachment in this post has been removed as of Friday, July 31, 2009, and an updated version, 2.1.2, is now located on page 8, post #4052.

Thanks!
Attachments:
Last Edit: 8 years 2 months ago by oraclexview.
The administrator has disabled public write access.

Re:Organize Library Files & Folders 2.0 8 years 2 months ago #3993

  • perezmu
  • perezmu's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1114
  • Thank you received: 64
  • Karma: 51
Gorgeus! Thanks!
The administrator has disabled public write access.

Re:Organize Library Files & Folders 2.0 8 years 2 months ago #3996

  • pcvii
  • pcvii's Avatar
  • Offline
  • Expert Boarder
  • Posts: 80
  • Thank you received: 1
  • Karma: 0
I have a problem where sometimes it works fine then the pop up asking for a location of a folder. The one you get the first time. I pick the same one. But then it errors.

I think that for some reason the folder being detected for script is detected as the wrong one. It doesn't always happen though.

Problem seems to go away when i restart it.

I've had this issue with a couple other addons. Like when I ran the one that uses regular expressions to pull data from the file names. Then trying to run the guided rename script. I get an error of incorrect path. Or can't find script in path or something like that.

Your's isn't giving an error of incorrect path. It just isn't getting the saved folder variable. And failing to save it again.

I get the exception has been thrown by the target of an invocation.

Also the icons that are normally in the menus aren't showing up. I think this is a bug in comic rack not the scripts. *shrugs*

I just wanna say it doesn't always happen Sometimes it does and sometimes it doesn't.
The administrator has disabled public write access.

Re:Organize Library Files & Folders 2.0 8 years 2 months ago #3997

  • pcvii
  • pcvii's Avatar
  • Offline
  • Expert Boarder
  • Posts: 80
  • Thank you received: 1
  • Karma: 0
It started to not work when I executed the script
Import Comic Book XML Info...
The administrator has disabled public write access.

Re:Organize Library Files & Folders 2.0 8 years 2 months ago #4001

  • oraclexview
  • oraclexview's Avatar
  • Offline
  • Moderator
  • aka SoundWave
  • Posts: 906
  • Thank you received: 182
  • Karma: 37
pcvii:
It is possible that it's an issue with ComicRack itself. What you can do is run the script in ComicRack debug mode, and then let me know exactly what the script output says when it errors out on you. I have yet to have a problem with this myself. I'm running Windows Vista 32-bit with ComicRack version 0.9.109 DevBuild. What versions are you running?

Onyx X aka SoundWave
The administrator has disabled public write access.
Time to create page: 0.302 seconds

Who's Online

We have 207 guests and 6 members online