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 #4044

  • pcvii
  • pcvii's Avatar
  • Offline
  • Expert Boarder
  • Posts: 80
  • Thank you received: 1
  • Karma: 0
I did my best to shrink this down to fit under 120 kb. I used comic rack to export with smaller images. i noticed it was still too big so i deleted some images. but this file does cause the error for me so maybe that'll help ya.
The administrator has disabled public write access.

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

  • pcvii
  • pcvii's Avatar
  • Offline
  • Expert Boarder
  • Posts: 80
  • Thank you received: 1
  • Karma: 0
grrr .cbz won't upload i need to rename to .zip. this time it should go.

File Attachment:

File Name: bleach307shrinked.zip
File Size:83 KB
The administrator has disabled public write access.

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

  • oraclexview
  • oraclexview's Avatar
  • Offline
  • Moderator
  • aka SoundWave
  • Posts: 906
  • Thank you received: 182
  • Karma: 37
pcvii:
Thanks for the example eComic file. That was what I needed to fix the problem you were getting. I'm going to post the updated script in a few minutes!

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

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

  • oraclexview
  • oraclexview's Avatar
  • Offline
  • Moderator
  • aka SoundWave
  • Posts: 906
  • Thank you received: 182
  • Karma: 37
Configuration Library Root Directory Dialog 1.0.1
Organize Library Files & Folders 2.1.2

Here is an updated script with some changes to address the issues that pcvii pointed out. Thanks for feedback!

Fixes:
1) In subscript “ConfigLibRootDirectory10” I fixed the issue with properly grabbing the ComicRack scripts directory. Originally, it would error out if the current working directory was permanently changed by another script.
2) In main script “OrganizeLibraryFilesFolders21” I fixed the issue with properly grabbing the ComicRack scripts directory. Originally, it would error out if the current working directory was permanently changed by another script.
3) In the previous update, where I set the script to update a book's Year value to the current year when book's Year and ShadowYear are both empty, I wrote the code improperly and thus it caused the following error: “expected int, got getset_descriptor”. This issue has now been fixed and tested.

If any of you run into other errors, or have some cool ideas to add to this script, please let me know. I’m still learning this language so bare with me. With that said, hopefully there aren’t any other major holes in the script. Enjoy!

Onyx X aka SoundWave

File Attachment:

File Name: OrganizeLi...dfff.zip
File Size:13 KB
The administrator has disabled public write access.

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

  • pcvii
  • pcvii's Avatar
  • Offline
  • Expert Boarder
  • Posts: 80
  • Thank you received: 1
  • Karma: 0
I was thinking something along the lines of
http://comicrack.cyolito.com/index.php?option=com_kunena&Itemid=9&func=view&catid=13&id=807 would be nice.

You could gather the data for each field. Then use some saved settings on how those users want that data distrusted.

Like Guided Rename has a GUI you setup some kinda reg expression replacement thing and you can spit out a file renamed now you want it.

If you put that method into a dialog where you can save that setting. Then the users of this script could configure the way your script does its job. Instead of needing to hard code in changes they want.

Also I don't like how it automatically uses this year when there isn't one. I think it should just not print a year when it doesn't have a year. I think that should be a check box or something. :)

I like having the Title field in my file names and I like having Age Rating folders before breaking down into Publisher folders. I've hard coded those changes into mine.

Just some thoughts :)
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 #4060

  • oraclexview
  • oraclexview's Avatar
  • Offline
  • Moderator
  • aka SoundWave
  • Posts: 906
  • Thank you received: 182
  • Karma: 37
Actually, wadegiles’ “Guided eComic file renaming - full GUI” script inspired me to write/edit Python scripts in the first place. It’s a WONDERFUL piece of code. I even robbed one of wadegiles’ more basic GUI interfaces to help enhance my script. I do want to eventually update this script to the level that “Guided” script is at and beyond, but I’m not quite ready to fully dissect wadegiles’ script so that I can understand every aspect of it and change/add to it in a way that is actually more useful for myself and others.

At the moment I’m in the process of learning about regular expressions in general and as related to Python. I realized quickly that regular expressions aren’t very easy to understand (at least not for myself). So, first I want to add the ability for the user to pull scan type and scanner name from their files and update the XML info file. Secondly, I eventually want the user to be able to write their own defined regular expressions into the script without having to fully understand the syntax which can feel overwhelming.

At some point, I’m also going to add the option for the user to either access the script as it is, in its basic form, or to access the script in an advance format that gives the user more options and control on how the script affects the library. This would include disabling putting the Year at the end of the Series folder and setting the folders to be other fields other than just the Publisher, Imprint and Series.

So believe me, all your suggestions are great and I had already decided to add them all to the script eventually for some time now, but only after I’ve decided how to properly add data from and to the Tags/Notes field in relation to the file name and also once I’ve decided how I want to set up the dialog interface so that it’s useful without being cumbersome and lacking simplicity.

So keep all thoughts on this script coming, both good and bad (especially if the bad thoughts are errors), and I’ll do what I can as I learn more.

Thanks!
Onyx X aka SoundWave
Last Edit: 8 years 4 months ago by oraclexview.
The administrator has disabled public write access.

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

  • RevQuixo
  • RevQuixo's Avatar
  • Offline
  • Gold Boarder
  • Posts: 280
  • Thank you received: 26
  • Karma: 12
Hey great script...a quick question though, when running the script it appears that the year assigned to the Series in the folder structure is mimicing whatever the published year of the comic. So if I run the script on a comic book that originated in 1962 but was published in 2009 (Amazing Spider-Man for example) I am getting an Amazing Spider-Man (2009 Series) folder. If I then go and automatically move an older comic it creates a new folder represeting the year of publication for whatever it happedned to be..consequently I have a Amazing Spider-Man 62, 63, 64, 65...etc folders each containg a dozen comics...

Is this normal? I am storing the year that the series originated in via the ComicVine script method in the volume area of teh comic info.
The administrator has disabled public write access.

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

  • oraclexview
  • oraclexview's Avatar
  • Offline
  • Moderator
  • aka SoundWave
  • Posts: 906
  • Thank you received: 182
  • Karma: 37
It's good to know that you're getting usage out of the script. As far as your question, the way the Series folder is named, is dependent on your selection set that you're running the script on. I suggested earlier that when you run this script, you run it on every eComic within that series. This allows the script to take the earliest Year within the selection set and set the folder Year to that value.

So, for example, if you select every "Amazing Spider-man" eComic that you have in your library, the folder will be given the Year of the earliest book within that Series. So, if #62 is your earliest book in the Amazing Spider-man Series and you've got all of the 12 eComics in this Series selected, the folder would be named "Amazing Spider-man (1968 Series)" and all 12 books would be placed within this folder.

Eventually, I will update this script to automatically grab the earliest eComic in a Series without you having to select the whole Series manually. Currently, the only other way around this is to run the script on your entire library by running the script from the Menu bar.

Onyx X aka SoundWave
Last Edit: 8 years 4 months ago by oraclexview.
The administrator has disabled public write access.

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

  • pcvii
  • pcvii's Avatar
  • Offline
  • Expert Boarder
  • Posts: 80
  • Thank you received: 1
  • Karma: 0
Though it only does the earliest year for the ones you selected. So you can end up with multiple folders of different years. Unless you run the script on all of the series at once.
The administrator has disabled public write access.

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

  • oraclexview
  • oraclexview's Avatar
  • Offline
  • Moderator
  • aka SoundWave
  • Posts: 906
  • Thank you received: 182
  • Karma: 37
Correct. The script sets the folder to the seriest Year based only on the selected eComics within that series. So either, you run this script on the total eComics you have for that Series (to avoid potentially having multiple folders with different years) or you run the script from the Menu bar because this will run the script on your whole library regardless of the selection set.

Like I said though, a future update will address this so that the user will no longer have to pay as much attention to books selected.

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

Who's Online

We have 266 guests and one member online