Welcome, Guest
Python Scripts for ComicRack

TOPIC: Organize Library Files & Folders 2.0

Re:Organize Library Files & Folders 2.0 8 years 4 months ago #4017

  • pcvii
  • pcvii's Avatar
  • Offline
  • Expert Boarder
  • Posts: 80
  • Thank you received: 1
  • Karma: 0
I'm not sure how you would run it in debug mode. Unless you run it via the source code. I'm gonna try adding the scripts folder to the settings see if that helps. I noticed that the shortcut runs Comicrack with the working directory as the scripts folder. I'm using V 0.9.101 according to the About box.

I don't feel like setting up vc++ or what ever comic rack is setup in to try to fix a bug heh.

##########################################################################
# ImportComicInfo.py
#
# Searches for information from the beta webservice and returns the XML
# Scripts based on work by wadegiles
#
##########################################################################

That's from the top of the script I ran before this one. I'm not sure how old the script is. He didn't credit a version number or anything.

My thought was when a script somehow changes the working directory other scripts break. Like I said I have had this problems with other scripts before.

Like the TagsFromName.py then tried to use GuidedRename.py and didn't work. It was looking in TagsFromName's subfolder where it keeps the regular expressive saves.
The administrator has disabled public write access.

Re:Organize Library Files & Folders 2.0 8 years 4 months ago #4018

  • oraclexview
  • oraclexview's Avatar
  • Offline
  • Moderator
  • aka SoundWave
  • Posts: 906
  • Thank you received: 182
  • Karma: 37
OK, in the Zip file I provided, there is a Python file by the name "OrganizeLibraryFilesFolders21Test.py". Open this file with the Notepad program and search for the two lines that start with "#@Hook". The first line will say "#@Hook L"; change this to "#@Hook Library". The second line will say, "#@Hook L, B"; change this to "#@Hook Library, Books".

The next thing to do is open ComicRack in debug mode that shows the script window. Right click on ComicRack in your Start menu. Select Properties. Go to the Target field and add at the end of the listed directory a space then -dso -ssc. For example:
"N:\\Program Files\\ComicRack\\ComicRack.exe" -dso -ssc

Now click the OK button. Now when you select ComicRack, it opens in a mode where it's not pre compiled and the script window is show.

Select about 5 to 10 books, and then run the script. Now copy the the text written to the script window and post it here so I can see exactly what it says.

Onyx X aka SoundWave
The administrator has disabled public write access.

Re:Organize Library Files & Folders 2.0 8 years 4 months ago #4021

  • pcvii
  • pcvii's Avatar
  • Offline
  • Expert Boarder
  • Posts: 80
  • Thank you received: 1
  • Karma: 0
Wow it's taking forever for it to load with the script output enabled. heh. It keeps calling ParseComicPath for all of the files I have its taking like 10-20 seconds a file and I have a lot of files. Is there a way to not show debugging till I actually run a script? this is just loading everything.
Last Edit: 8 years 4 months ago by pcvii.
The administrator has disabled public write access.

Re:Organize Library Files & Folders 2.0 8 years 4 months ago #4022

  • oraclexview
  • oraclexview's Avatar
  • Offline
  • Moderator
  • aka SoundWave
  • Posts: 906
  • Thank you received: 182
  • Karma: 37
The script does take much longer to run in the non pre compiled mode. That's why I suggested that you only select 5 to 10 books at a time to test the the script. It shouldn't take more than 10 to 15 (depending on your system) minutes to run on this many files.

Onyx X aka SoundWave
The administrator has disabled public write access.

Re:Organize Library Files & Folders 2.0 8 years 4 months ago #4023

  • oraclexview
  • oraclexview's Avatar
  • Offline
  • Moderator
  • aka SoundWave
  • Posts: 906
  • Thank you received: 182
  • Karma: 37
Also, you might want to consider installing the latest build, 0.9.109 DevBuild, as this might be the solution to all the issues you're having. I think I recall others saying that cYo had made changes to the source code which have affected the way script work. I know my scripts have always been written to work in the 0.9.109 DevBuild since this was the version I had already installed on my laptop when I began writing this script. I feel that 0.9.109 DevBuild has a few extra features that improves on the application as a whole.

I do understand that you may only want to be running the latest stable version, but I can thus far say that the latest DevBuild has yet to cause me problems.

Onyx X aka SoundWave
The administrator has disabled public write access.

Re:Organize Library Files & Folders 2.0 8 years 4 months ago #4024

  • pcvii
  • pcvii's Avatar
  • Offline
  • Expert Boarder
  • Posts: 80
  • Thank you received: 1
  • Karma: 0
I just downloaded the other version. I didn't realize I hadn't downloaded it yet. I think what was taking so long was the auto scan folders setting I had set. I mean I went to bed and when I woke up it still was loading the comics. So yea I think that's what was taking so long. I'm gonna run this newer version hopefully your right that it was some old bug.

*updated*
I am still getting an error. I'm starting it in debug mode again.

i'll have to clear the library i guess it's taking forever to load.
Last Edit: 8 years 4 months ago by pcvii.
The administrator has disabled public write access.

Re:Organize Library Files & Folders 2.0 8 years 4 months ago #4026

  • pcvii
  • pcvii's Avatar
  • Offline
  • Expert Boarder
  • Posts: 80
  • Thank you received: 1
  • Karma: 0
Calling 'OrganizeLibraryFilesFolders21Test'...

Compilation of 'C:\\Program Files\\ComicRack\\Scripts\\OrganizeLibraryFilesFolders21\\OrganizeLibraryFilesFolders21Test.py'

Current directory is  C:\\Program Files\\ComicRack

Configuration text file directory is  C:\\Program Files\\ComicRack\\OrganizeLibraryFilesFolders21

Configuration Library Root Directory text file name is  ConfigLibraryRootDirectory.txt

Full path of configuaration text file is  C:\\Program Files\\ComicRack\\OrganizeLibraryFilesFolders21\\ConfigLibraryRootDirectory.txt

ConfigLibraryRootDirectory.txt  does not exist! DARN

Starting root folder for library is EMPTY 

FolderDialog's Selectedpath is  D:\\Books

User selected root folder for library is  D:\\Books

Current directory is  C:\\Program Files\\ComicRack

Configuration text file directory is  C:\\Program Files\\ComicRack\\OrganizeLibraryFilesFolders21

Configuration Library Root Directory text file name is  ConfigLibraryRootDirectory.txt

Full path of configuaration text file is  C:\\Program Files\\ComicRack\\OrganizeLibraryFilesFolders21\\ConfigLibraryRootDirectory.txt

ConfigLibraryRootDirectory.txt  does not exist! DARN

Could not find a part of the path 'C:\\Program Files\\ComicRack\\OrganizeLibraryFilesFolders21\\ConfigLibraryRootDirectory.txt'.

It worked. It was looking in C:\\Program Files\\ComicRack\\OrganizeLibraryFilesFolders21 instead of C:\\Program Files\\ComicRack\\Scripts\\OrganizeLibraryFilesFolders21

I'm not sure why.

I noticed the Shortcut's working directory is
"C:\\Program Files\\ComicRack"
it used to be
"C:\\Program Files\\ComicRack\\Scripts"

*edit*
I noticed changing the working directory made the error go away. I'll try using other script and then using this again see if It still errors again.
Last Edit: 8 years 4 months ago by pcvii.
The administrator has disabled public write access.

Re:Organize Library Files & Folders 2.0 8 years 4 months ago #4027

  • pcvii
  • pcvii's Avatar
  • Offline
  • Expert Boarder
  • Posts: 80
  • Thank you received: 1
  • Karma: 0
Calling 'ParseComicPath'...

D:\\Books\\13+ T+ - Teens & Up\\(Unknown Publisher)\\Bleach\\Bleach #-106 - The Onmitsukidou.cbz

Series Bleach #

Number 106
Calling 'OrganizeLibraryFilesFolders21Test'...

Compilation of 'C:\\Program Files\\ComicRack\\Scripts\\OrganizeLibraryFilesFolders21\\OrganizeLibraryFilesFolders21Test.py'

Current directory is  C:\\Program Files\\ComicRack\\Scripts

Configuration text file directory is  C:\\Program Files\\ComicRack\\Scripts\\OrganizeLibraryFilesFolders21

Configuration Library Root Directory text file name is  ConfigLibraryRootDirectory.txt

Full path of configuaration text file is  C:\\Program Files\\ComicRack\\Scripts\\OrganizeLibraryFilesFolders21\\ConfigLibraryRootDirectory.txt

ConfigLibraryRootDirectory.txt  does exist! YES

Existing library root directory is  D:\\Books

ConfigLibraryRootDirectory.txt  does exist and root directory is set so now process selected books.





IssueNumberDictionary is  {}

IssueNumberList is  []

TestComicSeries is EMPTY

IssueYearDictionary is  {}

IssueYearList is  []

TestComicSeries2 is EMPTY





Issue Number Dictionary for all books is  {}





expected int, got getset_descriptor

I noticed a couple stray errors from when i loaded your current version of the script.

here is the xml data of the manga
<?xml version="1.0"?>
<ComicInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Title>The Onmitsukidou</Title>
  <Series>Bleach</Series>
  <Number>-106</Number>
  <Genre>Manga</Genre>
  <PageCount>20</PageCount>
  <AgeRating>13+ T+ - Teens &amp; Up</AgeRating>
  <Manga>Yes</Manga>
  <Pages>
    <Page Image="0" ImageSize="152298" ImageWidth="816" ImageHeight="1200" />
    <Page Image="1" ImageSize="109604" ImageWidth="822" ImageHeight="1200" />
    <Page Image="2" ImageSize="185351" ImageWidth="815" ImageHeight="1200" />
    <Page Image="3" Type="FrontCover" ImageSize="98262" ImageWidth="812" ImageHeight="1200" />
    <Page Image="4" ImageSize="171273" ImageWidth="818" ImageHeight="1200" />
    <Page Image="5" ImageSize="179695" ImageWidth="815" ImageHeight="1200" />
    <Page Image="6" ImageSize="121343" ImageWidth="807" ImageHeight="1200" />
    <Page Image="7" ImageSize="189260" ImageWidth="808" ImageHeight="1200" />
    <Page Image="8" ImageSize="154497" ImageWidth="802" ImageHeight="1200" />
    <Page Image="9" ImageSize="189143" ImageWidth="816" ImageHeight="1200" />
    <Page Image="10" ImageSize="138790" ImageWidth="817" ImageHeight="1200" />
    <Page Image="11" ImageSize="114917" ImageWidth="810" ImageHeight="1200" />
    <Page Image="12" ImageSize="127871" ImageWidth="813" ImageHeight="1200" />
    <Page Image="13" ImageSize="205415" ImageWidth="818" ImageHeight="1200" />
    <Page Image="14" ImageSize="173138" ImageWidth="817" ImageHeight="1200" />
    <Page Image="15" ImageSize="172416" ImageWidth="808" ImageHeight="1200" />
    <Page Image="16" ImageSize="704218" ImageWidth="808" ImageHeight="1200" />
    <Page Image="17" ImageSize="171094" ImageWidth="808" ImageHeight="1200" />
    <Page Image="18" ImageSize="499367" ImageWidth="1639" ImageHeight="1198" />
    <Page Image="19" Type="Advertisment" ImageSize="97265" ImageWidth="800" ImageHeight="800" />
  </Pages>
</ComicInfo>
The administrator has disabled public write access.

Re:Organize Library Files & Folders 2.0 8 years 4 months ago #4028

  • oraclexview
  • oraclexview's Avatar
  • Offline
  • Moderator
  • aka SoundWave
  • Posts: 906
  • Thank you received: 182
  • Karma: 37
Yes, it looks like that's where the problem is located. The working directory should be your Scripts folder where ComicRack is installed. So for example, I have ComicRack installed here (the Target):
"C:\\Program Files\\ComicRack\\ComicRack.exe"
Thus, my working directory is (the Start in):
"C:\\Program Files\\ComicRack\\Scripts"

That's from my shortcut file for ComicRack. So the script I wrote, assumes it's located in it's own subfolder which is "OrganizeLibraryFilesFolders21" with ComicRack's working directory as the root folder.
So for example in my case, the script is expecting to be located here:
"C:\\Program Files\\ComicRack\\Scripts\\OrganizeLibraryFilesFolders21"

So it looks like that where the problem is. ComicRack scripts only work properly if they are located either directly in the installed "Scripts" folder or any subfolder within that folder.

Onyx X aka SoundWave
The administrator has disabled public write access.

Re:Organize Library Files & Folders 2.0 8 years 4 months ago #4029

  • pcvii
  • pcvii's Avatar
  • Offline
  • Expert Boarder
  • Posts: 80
  • Thank you received: 1
  • Karma: 0
Calling 'StartTagsFromName'...

Compilation of 'TagsFromName.py'

.*\\\\(?<Series>.+?)\\] {0,1}\\#(?<Number>.+?) {0,1}-{0,1} {0,1}(?<Title>.*?)$

.*\\\\(?<Series>.+?)\\] {0,1}\\#(?<Number>.+?) {0,1}-{0,1} {0,1}(?<Title>.*?)$

File D:\\Books\\13+ T+ - Teens & Up\\(Unknown Publisher)\\Bleach\\Bleach #-106 - The Onmitsukidou

Calling 'StartTagsFromName'...

Compilation of 'TagsFromName.py'

Syntax error at [0, 0]: Could not find file 'C:\\Program Files\\ComicRack\\Scripts\\TagPatterns\\TagsFromName.py'.

	in file 'TagsFromName.py'

Calling 'OrganizeLibraryFilesFolders21Test'...

Current directory is  C:\\Program Files\\ComicRack\\Scripts\\TagPatterns

Configuration text file directory is  C:\\Program Files\\ComicRack\\Scripts\\TagPatterns\\OrganizeLibraryFilesFolders21

Configuration Library Root Directory text file name is  ConfigLibraryRootDirectory.txt

Full path of configuaration text file is  C:\\Program Files\\ComicRack\\Scripts\\TagPatterns\\OrganizeLibraryFilesFolders21\\ConfigLibraryRootDirectory.txt

ConfigLibraryRootDirectory.txt  does not exist! DARN

Starting root folder for library is EMPTY 

FolderDialog's Selectedpath is  D:\\Books\\13+ T+ - Teens & Up\\(Unknown Publisher)\\Bleach

User selected root folder for library is  D:\\Books

Current directory is  C:\\Program Files\\ComicRack\\Scripts\\TagPatterns

Configuration text file directory is  C:\\Program Files\\ComicRack\\Scripts\\TagPatterns\\OrganizeLibraryFilesFolders21

Configuration Library Root Directory text file name is  ConfigLibraryRootDirectory.txt

Full path of configuaration text file is  C:\\Program Files\\ComicRack\\Scripts\\TagPatterns\\OrganizeLibraryFilesFolders21\\ConfigLibraryRootDirectory.txt

ConfigLibraryRootDirectory.txt  does not exist! DARN

Could not find a part of the path 'C:\\Program Files\\ComicRack\\Scripts\\TagPatterns\\OrganizeLibraryFilesFolders21\\ConfigLibraryRootDirectory.txt'.

here's the error I was having when i would run some scripts then the others break because it changes the working directory.
The administrator has disabled public write access.
Time to create page: 0.193 seconds

Who's Online

We have 218 guests and 3 members online