Welcome, Guest
Python Scripts for ComicRack

TOPIC: Data Manager 2.xx Series for ComicRack

Data Manager 2.xx Series for ComicRack 6 months 1 hour ago #47790

  • jkthemac
  • jkthemac's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 767
  • Thank you received: 253
  • Karma: 55
You really are confusing what Regex is with what you want to use it for. They are two very different things.

Regex is a standard. Yes there are a number of implementations but they all seek to do the same basic thing with different syntax. What those implementations do is a standard thing and in Python that standard is implemented by the function.

What you are seeking to do isn't Regex. It is something else. Something that is logically flawed even if you desire it. There are a number of problems with your approach not least that it is prone to infinite loops and unpredictable behaviour.

This isn't a toggle thing this is a logical thing and also a standards issue. If you call a function RegexReplace it should do just that. Use the standard Regex Replace procedures. It shouldn't do something else.

Your 'I don't believe in qweqwertyrty standards' should leave a single qwerty. That is what Regex is supposed to do. When you use Search and Replace in Word it runs through everything once. It doesn't run until it has exhausted itself and it won't potentially run in an infinite loop forever.

Your solution actually makes hundreds of normal working Regex replacements impossible, meaning anyone wanting to use it will either have to totally relearn it from trial and error. For someone like myself that is steeped in Regex, that is just going to confuse, frustrate and alienate.

Also, Comicrack already uses Python Regex in the standard manner in Smart Lists and indeed in other scripts. Having two different ways of doing the same thing is not best practice for a script that extends the functionality of an existing program.
Last Edit: 6 months 1 hour ago by jkthemac.
The administrator has disabled public write access.

Data Manager 2.xx Series for ComicRack 5 months 4 weeks ago #47800

  • T3KN0Gh057
  • T3KN0Gh057's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 407
  • Thank you received: 114
  • Karma: 27
...
The administrator has disabled public write access.

Data Manager 2.xx Series for ComicRack 4 months 3 weeks ago #47974

  • cloudbank
  • cloudbank's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 2
  • Karma: 0
I've searched high and low and tried a lot of different things, but I can't figure out how to implement this one rule - change Title from all UPPERCASE to Title Case.

I've got some titles that have come through in all UPPERCASE - some single words, some multiple. I'd like to run through and change them all to Title Case, but I can't figure out the right regex rule for this. Anyone have any pointers on how to implement this?

Thanks :)
The administrator has disabled public write access.

Data Manager 2.xx Series for ComicRack 4 months 3 weeks ago #47984

  • Surfal666
  • Surfal666's Avatar
  • Offline
  • Senior Boarder
  • Posts: 64
  • Thank you received: 4
  • Karma: 2
Have they been through the ComicVine Scraper? It should have fixed up the titles to match their 'official' casing... Otherwise you'd have to write rules to fix up the title as you see fit.
The administrator has disabled public write access.

Data Manager 2.xx Series for ComicRack 4 months 3 weeks ago #47985

  • cloudbank
  • cloudbank's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 2
  • Karma: 0
Yeah, the titles came from ComicVine scraping, but I think the title data in ComicVine for this series is sloppy. Some are capitalized and some are not, regardless of how they appear in the original comic.
The administrator has disabled public write access.

Data Manager 2.xx Series for ComicRack 4 months 3 weeks ago #47990

  • rmagere
  • rmagere's Avatar
  • Offline
  • Gold Boarder
  • Posts: 223
  • Thank you received: 24
  • Karma: 7
Usually that's when I edit Comicvine to fix the data to match the comic (and not my taste) so that if I ever rescrape in the future the information is correct.
It's a pain compared to a simple find and replace but feel in the long run it's the best solution.
The administrator has disabled public write access.

Data Manager 2.xx Series for ComicRack 4 months 3 weeks ago #47995

  • jkthemac
  • jkthemac's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 767
  • Thank you received: 253
  • Karma: 55
cloudbank wrote:
I've searched high and low and tried a lot of different things, but I can't figure out how to implement this one rule - change Title from all UPPERCASE to Title Case.

I've got some titles that have come through in all UPPERCASE - some single words, some multiple. I'd like to run through and change them all to Title Case, but I can't figure out the right regex rule for this. Anyone have any pointers on how to implement this?

Thanks :)

This would need a dedicated script, Regex can match the structure of various cases, but not actually manage the substitution. Most examples of how to do this online will use Regex to locate individual words to pass to a script, but this isn't an option here unless you fancy writing your own script to do this.

I agree that this is the kind of situation where editing the database itself is preferable. As long as you tag your changes as being based upon the title page of the comic you shouldn't get any push back from the editors of said comics.
The administrator has disabled public write access.

Data Manager 2.xx Series for ComicRack 3 months 4 weeks ago #48071

  • perezmu
  • perezmu's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1114
  • Thank you received: 64
  • Karma: 51
Sorry, stupid question - I was going to finally test this script, and I kind of remember there was a manual somewhere... but I cannot seem to find it... help anyone?

Thanks
The administrator has disabled public write access.

Data Manager 2.xx Series for ComicRack 3 months 2 weeks ago #48081

  • Kurt
  • Kurt's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 3
  • Karma: 2
Is there any way to set up a ruleset to check a series for a colon ( : ) and only apply the text that is before the colon to the series group? Once I get passed my DC and Marvel books, the way I organize my books, 99% of the remainder of books the series group is what is in front of a colon. It would be much easier to have one catch all rule.
Last Edit: 3 months 2 weeks ago by Kurt.
The administrator has disabled public write access.

Data Manager 2.xx Series for ComicRack 3 months 2 weeks ago #48082

  • Kurt
  • Kurt's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 3
  • Karma: 2
perezmu wrote:
Sorry, stupid question - I was going to finally test this script, and I kind of remember there was a manual somewhere... but I cannot seem to find it... help anyone?

Thanks

Perezmu, you may have found this since you asked the question over a week ago, but here is an old version of the manual I found - storage.googleapis.com/google-code-archi...ager/Manual_v3.4.pdf
The administrator has disabled public write access.
Time to create page: 0.215 seconds

Who's Online

We have 172 guests and 2 members online