Welcome, Guest
Python Scripts for ComicRack

TOPIC: Fully paginating function?

Fully paginating function? 7 years 3 months ago #9404

Anyone know of a cool scriptable way for CR to search through a book and read the info from all the pages without opening and paging through each book manually?
The administrator has disabled public write access.

Re: Fully paginating function? 7 years 3 months ago #9406

  • Shinrai
  • Shinrai's Avatar
  • Offline
  • Platinum Boarder
  • With great power comes great W/T.
  • Posts: 885
  • Thank you received: 81
  • Karma: 33
I have no idea specifically waht you mean by 'reading the info from all the pages'. File format/resolution/etc?
The administrator has disabled public write access.

Re: Fully paginating function? 7 years 3 months ago #9412

Shinrai wrote:
I have no idea specifically waht you mean by 'reading the info from all the pages'. File format/resolution/etc?

Yep. Right now, CR only reads the info from pages on an as-needed basis. That means if you try to run a script that uses any data from book.Pages, it only returns data for pages opened/displayed, often just the cover and first page. The manual way to treat this is to open the book, then go to the pages thumbnail tab and it will grab all the data for each page. What I'm looking for is a function to do that scriptably.
The administrator has disabled public write access.

Re: Fully paginating function? 7 years 3 months ago #9419

  • Shinrai
  • Shinrai's Avatar
  • Offline
  • Platinum Boarder
  • With great power comes great W/T.
  • Posts: 885
  • Thank you received: 81
  • Karma: 33
Yep, this would be useful. (I'm curious what you're planning to do with it...anything exciting? ;p)
The administrator has disabled public write access.

Re: Fully paginating function? 7 years 3 months ago #9424

Shinrai wrote:
Yep, this would be useful. (I'm curious what you're planning to do with it...anything exciting? ;p)

Took someone's advice (yours? can't remember) to write a script to find the average file size per page. And I'm doing it by looping over each page (rather than use the total file size) to a) avoid including the xml file in the file size and b) prepare for when cYo (hopefully) adds more data to the Page (like DPI and dimensions). Saving it to a tag now, but may move it to a Notes structure.
The administrator has disabled public write access.
Time to create page: 0.158 seconds

Who's Online

We have 277 guests and one member online