Jumpy - Jump into Python (and onto XBMC)
Jumpy (Java Underlay for Modules in PYthon) is a framework for scripts or other external processes to plug into PS3 Media Server (or its cousin UMS) and mainly- add folders and media items to the xmb.
- act as user-defined external players.
Jumpy began with my having grown tired of occasionally poaching stuff 'by hand' from xbmc addons for use in PMS, and deciding to see if I could mock the xbmc plugin API itself so as to run these addons under PMS as-is. The result is Jumpy plus jumpy-xbmc, an included set of python modules to 'jump' the xbmc addons.
Jumpy-xbmc works with most xbmc video addons: Hulu, Free Cable, Al Jazeera, PBS, Academic Earth, YouTube, and many more. Addons are 'mostly' functional in the sense that all content is shown but interactive features that require user input are inactive.
Jumpy itself is general-purpose, of course, and you can use it to plug your own scripts, python or other, into PMS as well.
Quick Setup
- Shut down PMS.
- Put the installer (
) in your PMS plugins folder.
- Launch it and follow through as usual with external package installers if prompted (yes, you can install to alternate locations or skip packages if you want).
Future updates can be installed directly from the jumpy gui panel.
You should end up with
jumpy, python, py4j, XBMC, rtmpdump,
phantomjs, youtube-dl, and an updated PMS.conf all ready to go and can skip
the grey section below ('mostly', i.e. maybe install
some xbmc addons or
PMSEncoder).
Requirements
XBMC Installation ("optional")
PhantomJS Installation (optional)
Plugin Installation
- Python 2.7. To make life simpler add python to your system path and then set up easy_install.
- py4j.
- rtmpdump and PMSEncoder, not required strictly speaking but useful with PMS.
XBMC Installation ("optional")
- Install xbmc using the default configuration for your platform.
- Install and configure some addons inside xbmc (and of course test them too, some are broken). You may need to configure username/password depending on the addon, and so on.
PhantomJS Installation (optional)
-
To use the included webreader browser install phantomjs
in one of these places:
- inside your PMS installation's binaries folder (i.e. in win32, linux or osx).
- or inside the plugins/jumpy/webreader folder.
- or anywhere, adding its binary folder path to the
bin.pathsetting in PMS.conf (create it if it doesn't exist):bin.path = c:\\path\\to\\phantomjsFolder
Plugin Installation
- Unzip jumpy-0.2.7.zip to your PMS plugins folder.
- Open up PMS.conf and set
python.path, e.g.python.path = c:\\Python27\\python
If you're using rtmpdump, or want to enable a script language, let's say perl, create a.pathfor each if it doesn't already exist:rtmpdump.path = c:\\rtmpdump\\rtmpdump.exe perl.path = c:\\perl\\bin\\perl.exe
- Restart PMS. You should see a 'Jumpy' folder on the xmb containing the examples and any media addons found in your xbmc user directory.
-
When updating by hand you may want to merge any new sections or changes in
plugins/jumpy/examples/sample-jumpy-scripts.ini
into your own jumpy-scripts.ini.
Bookmarks
-
Press the Add bookmark button in any folder to create a bookmark inside Jumpy > Bookmarks. These are saved to jumpy-bookmarks.ini in your PMS profile folder (wherever PMS.conf is). You can edit this file, for instance to change the labels or reorder the items.
Log and Conf
-
Locations are according to your PMS installation (for quick access use the buttons on gui panel, otherwise see jumpy's init messages inside your debug.log for the specific paths):
- jumpy.log: located wherever debug.log is.
- jumpy.conf: located wherever PMS.conf is.
The available settings are:
# whether to activate bookmarks (true|false) bookmarks=true # whether to qualify the bookmark name (true|false) # e.g. 'Live :ESPN' instead of just 'Live' verbose_bookmarks=true # how often to refresh folder content in minutes # (-1=never|0=always|1=one minute) refresh=60 # whether to check for updates (true|false) check_update=true # whether to copy log output to the console (true|false) debug=false # whether to act as a url resolver (true|false) url_resolver=true
- PMS.conf:
If you need to override the locations where jumpy looks for xbmc set:
# xbmc user folder xbmc.path = c:\\path\\to\\my\\XBMC # xbmc program folder xbmc.main.path = c:\\path\\to\\program\\XBMC
You can set paths where external binaries needed by your scripts can be found, separating them with ';' in Windows or ':' in linux/mac:bin.path = c:\somewhere\bin;c:\somewhere elseYou can also specify your preferred text editor for opening files from the gui:text.editor = c:\\path\\to\\my\\textEditor
See also Resolver and Interpreters for more PMS.conf settings.
-
When reporting bugs please set logging to TRACE and attach these together as one zip file (or use the DbgPack plugin):
-
•PMS.conf •debug.log •jumpy.log •jumpy-scripts.ini •pmsencoder.log
jumpy-scripts.ini
-
Scripts are registered with jumpy via entries inside the user file jumpy-scripts.ini, which is located wherever
PMS.conf is in your setup. For quick access use the button on the gui.
Each script has its own section, where the section name
[...] is also the label, interpreted as a
unix-style path branching from jumpy's top folder:
[My Scripts/foo] cmd = c:\path\to\foo.bat arg1 arg2unless it begins with a '
+' or '-',
in which case it will be executed automatically at startup or shutdown respectively (and the rest of
the label is irrelevant):
[+hi] cmd = c:\path\to\hello.bat [-bye] cmd = c:\path\to\goodbye.batTo disable a script put a '
#' at the beginning of
the section name:
[#+hi]
cmd = c:\path\to\hello.bat
If cmd begins with the keyword pms it will be
interpreted as an API call using command-line syntax. The entry
below is equivalent to the first example above:
[+foo] cmd = pms addFolder "My Scripts/foo" "c:\path\to\foo.bat arg1 arg2"
Webreader
-
Webreader is a "poor man's" browser for PMS, which takes a snapshot of a given
web page and streams it as video. The view pans left to right (or optionally
right to left) and top to bottom in 4 second shots across the page. It requires PhantomJS
to be intalled.
- Press pause to stop panning and read, press again to continue.
- Pressing back takes you to the top of the page (on my Sony Bluray anyway, your renderer may behave differently).
Try one of the web pages in the Web Reader folder on the xmb to see how it works, but basically:
To add web pages edit the
[+webreader] section of
jumpy-scripts.ini, adding one page per line in this form:
data = name, url, [style, thumb]where
nameis the item's label (or unix-style path).urlis the address of the web page.styleis an optional field to control presentation and playback using this syntax:format:delay_seconds:buffer_mb+pan:rdb_style:rdb_size:rdb_marginformatis the only required part and is either:webpagewhich is the default. Herepancan bertlfor right to left panning.graphicswhich maximizes the vertical overlap and is better suited to viewing images as opposed to reading text.- or both, e.g.
webpage+rtl:graphics.
readability(orrdb) which uses the arc90labs readability script to clean up web pages into stripped-down article-like versions for easy reading.rdb_styleis eithernewspaper(default),novel,ebook,terminal,apertura, orathelas.rdb_size(font) is eitherx-small,small,medium(default),large, orx-large.rdb_marginis eitherx-narrow,narrow,medium(default),wide, orx-wide.
delay_seconds:buffer_mbare playback settings.
thumb is an image file or a pre-defined icon.
Some examples:
; a typical page (webpage format by default) data = My Pages/p1, http://www.foo.org/index.html ; a page in readabilty format data = My Pages/p2, http://www.foo.org/article.html, rdb ; an rtl page in webpage format with a 10s delay data = My Pages/p3, http://www.foo.org/index.html, webpage:10+rtl ; a page in readabilty novel format with a 10s delay and large font data = My Pages/p4, http://www.foo.org/article.html, rdb:10+novel:largeyou can also include a csv file
data = name, filename.csv, [style, thumb]where the csv file looks like this:
# csv columns are: label, url, [style, thumb] # default style is webpage # comments and blank lines are allowed My Pages/p1, http://www.foo.org/index.html My Pages/p2, http://www.foo.org/article.html, rdb My Pages/p3, http://www.foo.org/index.html, webpage:10+rtl My Pages/p4, http://www.foo.org/article.html, rdb:10+novel:large
Feedreader
-
Feedreader loads rss feeds for browsing with webreader. Usage is similar to webreader
except that the default style is
readability.
To add feeds edit the
[+feedreader] section of
jumpy-scripts.ini, adding one feed per line in this form:
data = name, feedurl, [style, thumb]or a csv file containing feed urls
data = name, filename.csv, [style, thumb]where the csv file looks like this:
# csv columns are: label, url, [style, thumb] # default style is readability # comments and blank lines are allowed World news/World news, http://www.guardian.co.uk/world/, webpage:10 World news/World news, http://www.guardian.co.uk/world/rss World news/UK, http://www.guardian.co.uk/uk/rss World news/Europe, http://www.guardian.co.uk/world/europe/roundup/rss
Resolver
-
Jumpy acts as a url resolver for unresolved WEB.conf items (youtube, vimeo, many more)
in UMS if it can find either the
xbmc urlresolver addon
or the youtube-dl python library.
- xbmc: two new addons are auto-installed:
- script.module.jumpy (Programs>jumpy)
- repository.jumpy.addons (System>Add-ons>Get Add-ons>jumpy repo)
- youtube-dl: There's no general reason to change anything in Linux/OS-X,
but If you're on Windows and have the Channels Plugin (which
already resolves using youtube-dl in Windows) you may want to disable it in jumpy by
editing plugins/jumpy/lib/resolver.py:
################# configuration: use True/False ################# enable_xbmc = True enable_youtube_dl = False ################################################################# - Install from zip in xbmc: script.module.urlresolver
- Download youtube-dl's
latest Full source tarball, untar and point
to its youtube_dl subfolder in UMS.conf:
youtube-dl.lib.path = c:\\path\\to\\youtube-dl\\youtube_dl
Both are automatically added by the jumpy installer: