Version 6, last updated by sirebral at June 11, 2010 21:34 UTC
CherryPy
What is CherryPy?
CherryPy is a python plugin that allows users to open a folder to the internet. It is a 'pythonic, object-oriented HTTP Framework', http://www.cherrypy.org/
How is CherryPy used in OpenRPG?
CherryPy is used by the OpenRPG software to allow users one method of loading images from their hard drive onto their game table. The plugin written for OpenRPG opens four folders, webfiles, webfiles/Textures, webfiles/Maps, webfiles/Miniatures. When a user has CherryPy running and set as their method for loading images they may browse these four folder for any image to load onto the map.
CherryPy offers a lot more usage than just loading images. Users who have their character sheets in HTML can link to the character sheet in their webfiles folder and others will be able to see it. Servers will also be able to host their own images, or if they desire, they can host their own little web page that describes the server for Clients to travel too.
The CherryPy plugin is secure in such way that the webfiles folder on your HD acts as the root. When a person attempts to access any folder that is above webfiles they will default to webfiles. The CherryPy plugin also does not recognize folders that have not been specifically designated in the plugin. While you may create new folders, the software will not locate those folders at this time. Users can still access those folders if you link to them correctly.
Setting up CherryPy to work for you (NEW!!)
In the newest build of Traipse, {090718-00} or greater, CherryPy is nearly completely integrate into your software. CherryPy is now super easy to setup.
- Enable the CherryPy plugin. The plugin defaults to port 6775. Don't start the CherryPy web server jus yet. If you want to change the default port then you need to tell CherryPy which port to use. Use this command
/cherrypy port ####replacing the #'s with your port number. - You will need to forward the chosen port or CherryPy might cause your software to crash, or it might not work at all. For more information on how to forward a port with your router please visit: http//:portfoward.com/
- Ensure your Settings are setup to use the CherryPy server. In the OpenRPG menu choose Settings (or press Ctrl + S). Under the Networking Tab look for the setting LocalorRemote. Make sure that setting is set to Local. Then press Ok.
- Turn CherryPy on!
That's it!! CherryPy now uses an extremely small web page to scrape your IP info from so you don't need to do anything for this. CherryPy also saves your port settings so you only need to set the port once and the software will remember.
CherryPy may interact with your firewall, so you will need to ensure that your firewall grants access to your port also. In testing this has been an automatic feature of the firewall that happens when you start CherryPy for the first time.
Setting up CherryPy to work for you (OLD)
- Enable CherryPy. CherryPy can be found in the Plugins Control panel. You can enable CherryPy here, and even set it to auto-enable each time you start OpenRPG. The plugin starts off and set at a default port of 9557. If you are running a server you will want to change this to 9558. Don't start the plugin just yet.
- Forward your Port. You need to ensure the port you have selected is forwarded by your Router and your Firewall. For information on how to forward a port with your router please visit: http://portforward.com/
- Find your external IP. Users will be visiting your webfiles folder by looking at your external IP. To find your external IP travel to: http://www.whatismyip.com
- Save Settings. You will now need to save your settings so users know where your computer will be located on the internet. In the OpenRPG menu choose Settings (or press Ctrl + S). Under the Networking Tab look for the settings LocalImageBaseURL and LocalorRemote. In your LocalImageBaseURL you will need to set the URL like this: http://Your IP:Port/webfiles/ Make sure LocalorRemote says Local. Then press Ok.
- Enable Plugin. CherryPy is now setup and you can start the plugin. To start the plugin look under the Plugin menu for the CherryPy item and check the 'On' box. You can now direct users to web pages on your local folders, and browse and load images from your local HD.
If you cannot Forward a Port
If you cannot forward a port, albeit you don't know how, the process is too difficult, or the router does not belong to you, there is another option. Users can change the LocalorRemote setting to Remote and they will upload their images to a remote server that will host the images.