I have been adding a “notebooking” feature to rIDL (a more fully featured IDL command line replacement, see this post for an introduction to rIDL) which can save commands entered, the output log, and graphics created into a single HTML file, like this (shown in miniature on the right). The commands entered to produce this page are shown in ridl_notebook_demo.pro.
The goal for notebooking is to be able to quickly produce a log of input and output (both text and graphics) in a single file in a visually appealing manner. This notebook should be able to be published in some manner easily (hence HTML output). Notebooks could easily be created demonstrating how to perform some action and showing the expected output.
All that is required are the notebook
and :save_graphic
rIDL magic commands:
rIDL> :notebook output.html
rIDL> restore, filepath('globalwinds.dat', subdir=['examples','data'])
rIDL> s = streamline(u, v, x, y, rgb_table=3, auto_color=1, $
..... x_streamparticles=50, y_streamparticles=50, $
..... arrow_size=0., font_size=11)
rIDL> :save_graphic
The :save_graphic
command currently works for saving the current new graphic, iTool, or direct graphics window.
rIDL is still only available from the subversion repo:
$ svn co http://svn.idldev.com/ridl/trunk ridl
It should build on Mac OS X “fairly easily” (requires installing GNU readline) and on Linux with a bit more work.
November 3rd, 2010 at 5:22 pm
I have not yet tried it, but the description makes it sound excellent to make examples. It is particularly impressive that it works with Graphics, iTools and DG.
If it could output IDLDoc instead of HTML, it would be even more excellent, as most of what I record goes into IDLDoc examples. I guess nearly all the rest goes into newsgroup posts, for which HTML is probably well suited.
November 3rd, 2010 at 5:32 pm
That’s a cool idea, I think an option to produce rst output would be worthwhile.
June 17th, 2011 at 2:41 pm
OK, there is now a preference system that let’s you specify whether you want your notebook output as HTML or rst.
It can be set for the current session, by doing
(the other option is “HTML”).
To set the option permanently, add
to the prefs.ini file in the app user directory, i.e., on UNIX systems it’s in ~/.idl/mgalloy/ridl/prefs.ini.