Welcome, Guest
Python Scripts for ComicRack

TOPIC: malor89's Perl Scripts

Re: malor89's Perl Scripts 6 years 10 months ago #11166

  • 600WPMPO
  • 600WPMPO's Avatar
  • Offline
  • Moderator
  • Posts: 3788
  • Thank you received: 557
  • Karma: 232
malor89 wrote:
I'm currently working on updating the fixnames.pl to include prompting and some other features that have become standard with the later scripts. Plus I'm tweaking the algorithms to improve the results a little.
That is very good ! Waiting eagerly for the updates.. :)
Now Playing: The ComicRack Manual (Online)

See my new comics & gadgets on: Tumblr!
The administrator has disabled public write access.

Re: malor89's Perl Scripts 6 years 10 months ago #11197

  • malor89
  • malor89's Avatar
  • Offline
  • Senior Boarder
  • Posts: 73
  • Thank you received: 16
  • Karma: 17
fixnames.pl - updated 12/3/10
Attempts to fix file names that have had all the special characters changed to spaces or underscores
- Standardizes spacing around parentheses
- Removes double file types and sets file type to lower case
- Adds parentheses around year, ctc, c2c, noads, fixed, of pages, of covers, scanner
- Adds parentheses around number of issues in limited series. [ex. (of 4)]
- Removes file copy number at end of file name. [ex. filename (2)]

Updates from previous version:
- added option for prompting before changing the name
- more agressively adds parentheses around thing and makes sure the number of parentheses match
- added code to skip the recycle bin, etc.
- added addition comments explaining what most lines of the code does.
Attachments:
Last Edit: 6 years 10 months ago by malor89.
The administrator has disabled public write access.
The following user(s) said Thank You: 600WPMPO

Re: malor89's Perl Scripts 6 years 10 months ago #11200

  • 600WPMPO
  • 600WPMPO's Avatar
  • Offline
  • Moderator
  • Posts: 3788
  • Thank you received: 557
  • Karma: 232
malor89 wrote:
fixnames.pl - updated 12/3/10
Updates from previous version:
- added option for prompting before changing the name
- more agressively adds parentheses around thing and makes sure the number of parentheses match
- added code to skip the recycle bin, etc.
- added addition comments explaining what most lines of the code does.
malor is working hard...Good Update..!! :)
$publishers = "Papercutz|Eclipse|AC|Adhouse Books|After Hours|Alternative|Angry Viking|Ankama Editions|Antarctic|Ape|Approbation|Arcana Studio|Arch Enemy|Archaia Studios|Aspen|Atomic Book|Avatar|Awesome|Azteca|Beckett|Beta 3|Big Bang|Bluewater|Bongo|Boom!|BroadSword|Calvary|Casterman|Claypool|Crystal Fractal|Dabel Brothers|Dark Horse|Devil\'s Due|Drawn and Quarterly|DrMaster|Dupuis|Dynamite|Epic|Eros|Evil Twin|Fantagraphics|Fluid Friction|Fox Atomic|Gemstone|Gimmicksmile|Heritage|Heroic|Humanoids|Icon|IDW Publishing|IDW|Image|Imagination|Imperium|Last Gasp|Liquid|Manuscript|Markosia|Marvel Age|Mirage|Moonstone Books|NBM|Neko|New Baby|New England|Nifty|Oni|Paradox|Penny-Farthing|Prism|Radical|Radio Comix|Raj|Rebellion|Red 5|Rip Off|Seven Seas|Shanda Fantasy Arts|Shot in the Dark|Sirius|Slave Labor Graphics|Terminal|Teshkeel|THENEXTART|Titan Books|TOKYOPOP|Top Cow|Top Shelf|UDON|Valiant|Viper|WaRP Graphics|Wildstorm|Yaoi|Zenescope Enterainment|Zenescope";
#$unused = "Archie|About|DC|Marvel|Class|Vertigo|MAX|Milestone"; #removed because they match too much
:P That's a huge list.. I wonder what use these are in the fixnames script ?

p.s. Your excellent scripts have again given me an idea.. (hope you are not tired of them already :laugh: )
Why not make a GUI that contains all the scripts, and can be accessed by right-click.. something like the file menu tools program here:

Now Playing: The ComicRack Manual (Online)

See my new comics & gadgets on: Tumblr!
Last Edit: 6 years 10 months ago by 600WPMPO.
The administrator has disabled public write access.

Re: malor89's Perl Scripts 6 years 10 months ago #11206

  • malor89
  • malor89's Avatar
  • Offline
  • Senior Boarder
  • Posts: 73
  • Thank you received: 16
  • Karma: 17
600WPMPO wrote:
:P That's a huge list.. I wonder what use these are in the fixnames script ?

p.s. Your excellent scripts have again given me an idea.. (hope you are not tired of them already :laugh: )
Why not make a GUI that contains all the scripts, and can be accessed by right-click.. something like the file menu tools program
The list of publishers came from wikipedia or the like. A lot of them, I'm never heard of.

It looks like "file menu tools" lets you add custom commands, so you might already be able to use it to do what you want. Since I've added prompting to most everything, I've just switched to using a batch file to run all my regular scripts in a row (setmodfied, fixnames, listsort). I don't mind suggestions, because it show interest, even complaints can sometimes be better than not getting any feedback at all.
Last Edit: 6 years 10 months ago by 600WPMPO. Reason: corrected quoted post format
The administrator has disabled public write access.

Re: malor89's Perl Scripts 6 years 10 months ago #11218

  • 600WPMPO
  • 600WPMPO's Avatar
  • Offline
  • Moderator
  • Posts: 3788
  • Thank you received: 557
  • Karma: 232
malor89 wrote:
It looks like "file menu tools" lets you add custom commands, so you might already be able to use it to do what you want.
Why didn't I think of this earlier..?:silly:

Here I am now with all the scripts neatly stacked in the context menu B)



Filemenu tools also allows for custom icons, so I have replaced the 2 .bat scripts with the perl icon..
malor89 wrote:
I've just switched to using a batch file to run all my regular scripts in a row (setmodfied, fixnames, listsort).
I think the batch file can also be quite useful for us too if you could please share it... :)
Now Playing: The ComicRack Manual (Online)

See my new comics & gadgets on: Tumblr!
Last Edit: 6 years 10 months ago by 600WPMPO.
The administrator has disabled public write access.

Re: malor89's Perl Scripts 6 years 10 months ago #11223

  • malor89
  • malor89's Avatar
  • Offline
  • Senior Boarder
  • Posts: 73
  • Thank you received: 16
  • Karma: 17
600WPMPO wrote:
I think the batch file can also be quite useful for us too if you could please share it... :)
Prepare to be amazed:
perl setmodified.pl
perl fixnames.pl
perl listsort.pl
perl makesort.pl

Then put it in a text file renamed with a .bat extension.
You may need to use the full path to the perl.exe
The administrator has disabled public write access.
The following user(s) said Thank You: 600WPMPO

Re: malor89's Perl Scripts 6 years 10 months ago #11224

  • 600WPMPO
  • 600WPMPO's Avatar
  • Offline
  • Moderator
  • Posts: 3788
  • Thank you received: 557
  • Karma: 232
I was just using the makesort + listsort scripts for arranging last week's 0-days, and I have got a few suggestions for improving the scripts:

  • Archives belonging to new series (that are added to the library for the first time) do not naturally have a folder of their name. You have to make new folders in their respective places, and assign them the proper path. When I run makesort.pl, it somehow doesn't add these new empty folders into the sortlist.txt. Is this just me, or a bug ?
  • When I run listsort, it gives the "no match found" error, and ends the matter there. I feel it should prompt for a path for files it doesn't find the path for.
  • Even better would be the ability in listsort to make a new directory at the path we assign. Something like .. "the given folder doesn't exist, would you like to make a folder at this assigned address ?"

p.s. Thanks for the .bat file.. Both you & Perl indeed keep on amazing me !
Now Playing: The ComicRack Manual (Online)

See my new comics & gadgets on: Tumblr!
Last Edit: 6 years 10 months ago by 600WPMPO.
The administrator has disabled public write access.

Re: malor89's Perl Scripts 6 years 10 months ago #11227

  • malor89
  • malor89's Avatar
  • Offline
  • Senior Boarder
  • Posts: 73
  • Thank you received: 16
  • Karma: 17
It's not a bug it's a feature. makesort.pl creates a list based on file names, not directory names. So, one could group multiple titles in a single folder regardless of the name.

Basically I figured it was quicker and easier to sort new comics manually than trying to type it in, but I might add that as an option.
The administrator has disabled public write access.

Re: malor89's Perl Scripts 6 years 10 months ago #11240

  • malor89
  • malor89's Avatar
  • Offline
  • Senior Boarder
  • Posts: 73
  • Thank you received: 16
  • Karma: 17
makesort.pl - Now can generate list of missing comics!

- Still works like before, but now has the option to generate an organized listing of comics, showing were comics are missing in a series.
- Lots of options to change what gets shown.

Example:
Fatman	4-5,8,10
  Missing: 6,7,9
Fatman - Battle of the Bulge	1-4
Fatman Noir	1,3-4
  Missing: 2
Robodog	1-6
By default it only lists comics from 2010 and 2011 to show what recent comics you might have missed. The script double checks missing comics and doesn't show the issue as missing if the script finds it at all regardless of year. The more standard the file names, the better the script works. Effort was made to be reasonably tolerant of naming, but not every possible naming scheme is supported. I didn't try to differentiate between multiple volumes of the same title. Only title with three or more issues are shown.
Attachments:
Last Edit: 6 years 10 months ago by malor89.
The administrator has disabled public write access.

Re: malor89's Perl Scripts 6 years 10 months ago #11243

  • 600WPMPO
  • 600WPMPO's Avatar
  • Offline
  • Moderator
  • Posts: 3788
  • Thank you received: 557
  • Karma: 232
malor89 wrote:
makesort.pl - Now can generate list of missing comics!
Still works like before, but now has the option to generate an organized listing of comics, showing were comics are missing in a series.
This is very good ! :)

More karma coming your way, malor89 !!

The script works fine, and lists all my comics with missing issues & duplicates in just a few seconds.. that's malor riding on perl's running horse for us !! :laugh:

One little thing though: in the code it says that
$showmissingonly = 1;   # Set to 1 to show all titles, set to 0 to only show titles with missing issues
It should be the other way round, 1 for missing titles & 0 for all:
$showmissingonly = 1;   # Set to 0 to show all titles, set to 1 to only show titles with missing issues
:unsure: Also, I didn't fully understand this option:
$showfinished = 1; # Set to 1 to list limited series that you have the last issue
Turning it off or on made no difference to my comiclist.txt file.

:unsure: I also wished to know exactly how does the script handle comics for which only one issue is present ? This includes one-shots as well as series for which we have got only 1 issue (either 1st issue or greater). I feel that it ignores these even when generating the complete list with all options turned on.
Now Playing: The ComicRack Manual (Online)

See my new comics & gadgets on: Tumblr!
The administrator has disabled public write access.
Time to create page: 0.459 seconds

Who's Online

We have 248 guests and 7 members online