Welcome, Guest
Python Scripts for ComicRack

TOPIC: How do I determine ComicRack's Version?

How do I determine ComicRack's Version? 7 years 2 months ago #9143

  • cbanack
  • cbanack's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1318
  • Thank you received: 503
  • Karma: 181
Hi guys,

I'm trying to find a way to check ComicRack's version number (i.e. 0.9.128, etc) from within my script.

A lot of my script users are reporting bugs because they are running my script on an older version of ComicRack. I'd like to change my script so that it warns the user when their version of ComicRack is not current enough...

So does anyone know where in the ComicRack API I can find this information?

Thanks in advance!
The administrator has disabled public write access.

Re:How do I determine ComicRack's Version? 7 years 2 months ago #9144

  • cbanack
  • cbanack's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1318
  • Thank you received: 503
  • Karma: 181
Oops, looks like I found the answer to my own question:

ComicRack.App.ProductVersion
The administrator has disabled public write access.

Re:How do I determine ComicRack's Version? 7 years 2 months ago #9145

cbanack wrote:
Oops, looks like I found the answer to my own question:

ComicRack.App.ProductVersion

is there a total list of these methods/variables? I'm looking for one that can remove a book from the library.
The administrator has disabled public write access.

Re:How do I determine ComicRack's Version? 7 years 2 months ago #9147

  • cbanack
  • cbanack's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1318
  • Thank you received: 503
  • Karma: 181
Hmmm, there's no list really, you basically have to dig through the functions that cYo has added to his code. When you find something that looks likely, you just try it out with some sample code from inside your script.

I obtained a list of all of the functions and variables on the ComicRack.App object by adding something like the following lines to the beginning of my script:
for s in dir(ComicRack.App):
   print(s)

Then when I ran my script in ComicRack, it printed a a VERY long list of accessible functions to the debug output window. I did a search on that list for "version" and that's how I found the one I wanted.

Of course, if you know specifically what you need, I suppose you could always ask cYo--he probably has all of this stuff stored in his head somewhere...
Last Edit: 7 years 2 months ago by cbanack.
The administrator has disabled public write access.

Re:How do I determine ComicRack's Version? 7 years 2 months ago #9156

cbanack wrote:
I obtained a list of all of the functions and variables on the ComicRack.App object by adding something like the following lines to the beginning of my script:
for s in dir(ComicRack.App):
   print(s)

Oh, that may work for me. Simple ideas are often overlooked, eh? :)
Of course, if you know specifically what you need, I suppose you could always ask cYo--he probably has all of this stuff stored in his head somewhere...

I've asked several times if there's a method to remove an entry in the library (basically, I want a script to clean up after itself) and they've been ignored. So, I would not reccomend that method.

Thanks Cory!
The administrator has disabled public write access.

Re:How do I determine ComicRack's Version? 7 years 2 months ago #9158

  • cYo
  • cYo's Avatar
  • Offline
  • Moderator
  • Posts: 3476
  • Thank you received: 675
  • Karma: 181
Next release will have some new API methods to add new eComics and remove them.
The administrator has disabled public write access.

Re:How do I determine ComicRack's Version? 7 years 2 months ago #9159

cYo wrote:
Next release will have some new API methods to add new eComics and remove them.

Excellent. One other long-time request of mine that I'd like to get your input on (for or against) is hooking into the list/folder structure. For instance, being able to loop like such:
for folder in library:
____print folder.Name
____for list in folder:
________print list.Name
________for book in list:
____________<existing book operations>

This would be great for some file backup scripts I'd like to right. What do you think?
The administrator has disabled public write access.
Time to create page: 0.241 seconds

Who's Online

We have 209 guests and 2 members online