Welcome, Guest
General discussion about ComicRack

TOPIC: Scanners technical question... and posible forum communitie project

Scanners technical question... and posible forum communitie project 3 weeks 3 days ago #48430

  • Alan Scott
  • Alan Scott's Avatar
  • Offline
  • Gold Boarder
  • Posts: 264
  • Thank you received: 20
  • Karma: 10
No need to apologize... ANY new software has to go through a cycle of bug fixes and what-have-you before it works well... I'm not surprised, nor am I flustered at all. Especially now that I can just copy/paste errors to you from the console, it's no effort at all to do. Everything today I reported, I've been sitting here with my wife watching TV, with my laptop by me. No trouble at all, and I'm just thankful to ever get this script at all. Errors aside, it's worked very well getting the scanner names right.
... The failure to appreciate... is perfectly understandable, because the readership never evaluates old material in the context of the cultural climate in which it was created, or the state of the art at the time it was created.
Marty Pasko
The administrator has disabled public write access.
The following user(s) said Thank You: Xelloss

Scanners technical question... and posible forum communitie project 3 weeks 3 days ago #48431

  • Xelloss
  • Xelloss's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 455
  • Thank you received: 117
  • Karma: 24
I know, but I try to release my scripts better "tested" and more finished, the problem with this one is that I cannot test it in my own pc... not correctly at least... The first version I released worked perfectly in my pc, but it had A LOT of problems in other libraries and pcs that I didn't see in my testing...

I think once the "hasshing part" is working ok, it will be easier to test before posting it here...

Although the name recognising algorithm (and the priorities it will have that are VERY subjetive) will take some time to perfect...
Last Edit: 3 weeks 3 days ago by Xelloss.
The administrator has disabled public write access.

Scanners technical question... and posible forum communitie project 3 weeks 2 days ago #48432

  • Stonepaw
  • Stonepaw's Avatar
  • Offline
  • Moderator
  • Posts: 921
  • Thank you received: 268
  • Karma: 173
I love the idea of this script and I think it has a lot of potential. Unfortunately with computer problems and various crises my CR library no longer exists in an organised form that I can run this script on.

I took a look at the script and I figured I'd add some constructive comments. I wasn't sure if you knew about these features of python.

1st)
if lbook.ScanInformation != "" and lbook.ScanInformation != None and....
Can be simplified to just:
if lbook.ScanInformation and ...
As None and an empty string are considered false and a non-empty string is considered true. This can make your code simpler in a few places.

Python true and truthiness testing is very powerful and convenient

2nd)
I would highly recommend using elif statements in your simplify function as it will become very unreadable very quickly otherwise. However, regex might be a nicer way to do that string replacement.
The administrator has disabled public write access.
The following user(s) said Thank You: Xelloss

Scanners technical question... and posible forum communitie project 3 weeks 2 days ago #48433

  • Xelloss
  • Xelloss's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 455
  • Thank you received: 117
  • Karma: 24
Thanks for the advices!

The code is still in the starting phases, so it is quite chaotic right now... (a lot of debugging lines and lines that only applied in my collection to test it quicker), so don't pay much attention to the code yet XD

About the != None, I didn't know that, I will have that in mind :)

About the simplify function, this is and old function I have been using for a while now (in other scripts). I made it when I was taking my first steps in Python when didn't know about elif... I will take a look at it and try to update it...

About regex, I find it too cryptic to use... I understand it, and I can write the rules in it, but usually it takes me more time to edit than simple python rules...Not a fan of using it in python... (I don't work well with how regex works... and also I find it hard to debug or update when I want to make changes). In other words, I find it easier to read using python conditions, and I don't think the performance boost of regex really makes a difference here.

All the same, this simplify is only temporary, I was planning in writing a more specific simply for this script when I reach the "polishing" phase of the coding. Right now I used a copy of the function from other script to make it faster XD

btw, I am ashamed you looked at the code right now... It was not supposed to be seen yet... it is a disaster of a code right now XD
Last Edit: 3 weeks 1 day ago by Xelloss.
The administrator has disabled public write access.

Scanners technical question... and posible forum communitie project 3 weeks 1 day ago #48434

  • Alan Scott
  • Alan Scott's Avatar
  • Offline
  • Gold Boarder
  • Posts: 264
  • Thank you received: 20
  • Karma: 10
Here's the errors found after first run of the script...


File Attachment:

File Name: ScannerSca...rs-2.txt
File Size:157 KB



...Unfortunately, the script is not autofilling any scanner names on any issues on this version.
... The failure to appreciate... is perfectly understandable, because the readership never evaluates old material in the context of the cultural climate in which it was created, or the state of the art at the time it was created.
Marty Pasko
The administrator has disabled public write access.

Scanners technical question... and posible forum communitie project 3 weeks 1 day ago #48435

  • Alan Scott
  • Alan Scott's Avatar
  • Offline
  • Gold Boarder
  • Posts: 264
  • Thank you received: 20
  • Karma: 10
No wait... it is filling most tags it should, there are just a couple I first ran it on that it isn't. Sorry about that.
... The failure to appreciate... is perfectly understandable, because the readership never evaluates old material in the context of the cultural climate in which it was created, or the state of the art at the time it was created.
Marty Pasko
The administrator has disabled public write access.

Scanners technical question... and posible forum communitie project 3 weeks 1 day ago #48437

  • Xelloss
  • Xelloss's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 455
  • Thank you received: 117
  • Karma: 24
Ok, a lot of changes in this one:


File Attachment:

File Name: ScannerSca...crplugin
File Size:132 KB
The administrator has disabled public write access.
The following user(s) said Thank You: Alan Scott

Scanners technical question... and posible forum communitie project 3 weeks 1 day ago #48441

  • Alan Scott
  • Alan Scott's Avatar
  • Offline
  • Gold Boarder
  • Posts: 264
  • Thank you received: 20
  • Karma: 10
CONGRATULATIONS!!!!!! It now works all the way through with no errors! It took a few minutes to run at first, right each call of the script takes about 1 minute.

Now we can move on to improving the quality of the data. Take a look at Flashpoint - Citizen Cold #03 (October, 2011).cbr. It keeps insisting that the scanner is HP. It should be DangerAngel-CPS. I have files with this proper scanner name, and the same scanner tag jpg.

It's nice to be past all those errors!
... The failure to appreciate... is perfectly understandable, because the readership never evaluates old material in the context of the cultural climate in which it was created, or the state of the art at the time it was created.
Marty Pasko
The administrator has disabled public write access.
The following user(s) said Thank You: Xelloss

Scanners technical question... and posible forum communitie project 3 weeks 1 day ago #48442

  • Xelloss
  • Xelloss's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 455
  • Thank you received: 117
  • Karma: 24
THAT IS THE IDEA XD

Now the difficult part is that, to improve the "I.A." that detect the name... Let me see that case tomorrow when I am at home... I cannot now U_U
The administrator has disabled public write access.

Scanners technical question... and posible forum communitie project 3 weeks 1 day ago #48443

  • Alan Scott
  • Alan Scott's Avatar
  • Offline
  • Gold Boarder
  • Posts: 264
  • Thank you received: 20
  • Karma: 10
Cool, fair enough, my man. Talk to ya tomorrow...
... The failure to appreciate... is perfectly understandable, because the readership never evaluates old material in the context of the cultural climate in which it was created, or the state of the art at the time it was created.
Marty Pasko
The administrator has disabled public write access.
Time to create page: 0.225 seconds

Who's Online

We have 240 guests and 4 members online