Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
developer:developing_scripts_basics [2015/12/30 16:04]
127.0.0.1 external edit
developer:developing_scripts_basics [2016/10/21 20:18] (current)
172.98.67.120 [Packaging and deploying]
Line 59: Line 59:
  
   def RenumberBooks(books):​   def RenumberBooks(books):​
-with books beeing ​a collection of book objects with the above specified properties. Whatever you do in this method will be reflected in ComicRack. Let's say you want a quick shortcut to clear the ratings on all books. The script would look something like this:+with books being a collection of book objects with the above specified properties. Whatever you do in this method will be reflected in ComicRack. Let's say you want a quick shortcut to clear the ratings on all books. The script would look something like this:
 <code python> <code python>
   def RenameBookFiles(books):​   def RenameBookFiles(books):​
Line 142: Line 142:
 HelpLink ​   = http://​comicrack.cyolito.com HelpLink ​   = http://​comicrack.cyolito.com
 </​code>​ </​code>​
 +Put your python files, auxillary files (images, config files, etc), and the Package.ini into a .zip file, then rename the .zip file to a .crplugin file.  For example your MyAwesomeScript.zip file structure could look like the following:
 +<​code>​
 +myawesomescript.py
 +Package.ini
 +</​code>​
 +It could also look like the following:
 +<​code>​
 +myawesomescript.py
 +Package.ini
 +awesomelogo.png
 +config.txt
 +errors.log
 +</​code>​
 +
 +Then, rename MyAwesomeScript.zip to MyAwesomeScript.crplugin  ​
 +
 Such packages can be simply installed and removed from the Preferences/​Advanced dialog. Such packages can be simply installed and removed from the Preferences/​Advanced dialog.

Navigation