for example::
- hooke> help current
+ hooke> help load_playlist
-will give help on the ``current`` command.
+will give help on the ``load_playlist`` command.
+
+Leaving Hooke
+-------------
+
+When you're done with an interactive Hooke session, you can close the
+session with ``exit`` or its aliases ``quit`` and ``EOF`` (``EOF`` is
+the end of the stdin stream, which is Ctrl-d in many shells).
Creating a playlist
-------------------
You then can ``cd`` (change directory) to the directory::
- hooke> cd c:\curves
+ hooke> cd --path c:\curves
Type ``pwd`` (print working directory) to check the directory is correct.::
(they’re synonyms).::
hooke> ls
- [’mycurve.000’, ’mycurve.001’, ...
- ]
+ mycurve.000
+ mycurve.001
+ ...
Now you are ready to generate the playlist. The command to use is
-``genlist``.::
-
- hooke> genlist mycurve.*
+``glob_curves_to_playlist``.::
-You can also generate a playlist containing all what you find in the
-directory by typing:
+ hooke> glob_curves_to_playlist mycurve.*
- hooke> genlist c:\curves
+You can also be more specific with wildcards. For example
-If you want to select what curves to see, based on the filename, you
-can use wildcards. For example::
-
- hooke> genlist mycurve.05*
+ hooke> glob_curve_to_playlist mycurve.05*
will take only curves from :file:`mycurve.050` to :file:`mycurve.059`.
-Note that by using ``genlist`` you just generate the playlist in the
-local session. To save your playlist to a file for future reuse,
-type::
+Note that by using ``glob_curve_to_playlist`` you just generate the
+playlist in the local session. To save your playlist to a file for
+future reuse, type::
- hooke> savelist mylist
+ hooke> save_playlist --output mylist
In this example, the list will be saved in the file
:file:`mylist.hkp`. Hooke will add the extension ``.hkp`` (Hooke
playlist) to the playlist if you forget to. The ``.hkp`` file is an
XML file you can read and edit with any text editor (i.e. Wordpad), if
-needed. If you want to load it, simply issue ``loadlist mylist.hkp``
-or ``loadlist mylist``, Hooke will add ``.hkp`` if necessary.
+needed. If you want to load it, simply issue ``load_playlist
+mylist.hkp`` or ``load_playlist mylist``, Hooke will add ``.hkp`` if
+necessary.
If, generating the playlist, you are including by chance a non-force
curve file that Hooke cannot open, Hooke will print an error and
Navigating the playlist
-----------------------
-Now you can navigate through your playlist using the commands `next`
-and `previous` or, their aliases `n` and `p`. You don’t need to
-type `n` every time to run along a list of curves. If you press
+Now you can navigate through your playlist using the commands
+``next_curve`` and ``previous_curve``. You don’t need to type
+``next_curve`` every time to run along a list of curves. If you press
Return to an empty prompt, Hooke will repeat the last command you
issued explicitly. You can also navigate through the command history
-by using the up and down arrows. From the last curve of your
-playlist, `n` will wrap around to the first curve. Analogously,
-issuing `p` at the first curve will jump to the last.
+by using the up and down arrows, or auto-complete partial commands
+with TAB. From the last curve of your playlist, ``next_curve`` will
+wrap around to the first curve. Analogously, issuing
+``previous_curve`` at the first curve will jump to the last.
You can also jump to a given curve::
- hooke> jump c:\curves\mycurve.012
+ hooke> jump_to_curve 14
-where the path can be either an absolute path, or a path relative to
-the directory holding the playlist file.
+will jump to the 14th curve in the playlist. TODO: jump_to_curve
+<PATH>, where the path can be either an absolute path or a path
+relative to the directory holding the playlist file.
Taking notes
------------
You can take notes about the curves you are looking at. Just type
-`note` followed by the text you want to append to that curve. Hooke
-will save the text in your current playlist and in an external log
-file. The output will look like this::
+``add_note`` followed by the text you want to append to that curve.
+Hooke will save the text in your current playlist and in an external
+log file (TODO: no external file yet. Is this important?). The
+output will look like this::
Notes taken at Sun Sep 17 20:42:07 2006
- /home/cyclopia/work/tris/20060620a.041 | This is a note
- /home/cyclopia/work/tris/20060620a.207 | This is another note
- /home/cyclopia/work/tris/20060620a.286 | This is a third one
+ /home/cyclopia/work/tris/20060620a.041 | This is a note
+ /home/cyclopia/work/tris/20060620a.207 | This is another note
+ /home/cyclopia/work/tris/20060620a.286 | This is a third one
The log file name can be configured (:doc:`config`), but it defaults
to :file:`hooke.log`.
-Usually curves you annotated are useful later. You can copy the curves
-you annotated to a different directory by using the ``copylog``
-command.
+Usually curves you annotated are useful later. You can create a
+playlist for only annotated curves with
- hooke> copylog c:\nicecurves
+ hooke> note_filter_playlist --name c:\curves\nice.hkp
-will copy all curves you have annotated to the :file:`c:\nicecurves`
-directory. Make sure that the directory already exists before doing
-that. TODO: replace with::
+will create sub-playlist :file:`c:\curves\nice.hkp`. Make sure that
+the target directory (here :file:`c:\curves\`) already exists before
+doing that.
- hooke> copylist --log c:\curves\nice.hkp
+If you change your mind about a note, you can remove it with
+``clear_note``.
Exporting curves
----------------
You can export Hooke curves as images and as text columns. To export
-as images, issue the ``export`` command followed by the filename.
-Supported formats are PNG (raster) and EPS (Encapsulated Postscript,
-vector). The export format is determined by the filename extension,
-so ``export foo.png`` and ``export foo.eps`` will save PNG and EPS
-files respectively.
-
-To export as text, use the ``txt`` command, followed by the
-filename. The output is a text file containing columns (first two are
-X and Y of extension, second two are X and Y of retraction).
+as images or text, use the ``export_block`` command. Supported
+formats are PNG (Portable Network Graphic, raster) and EPS
+(Encapsulated Postscript, vector). The export format is determined by
+the filename extension, so ``export_block foo.png``, ``export_block
+foo.eps``, and ``export_block foo.txt`` will save PNG, EPS, and
+TAB-delimited text files respectively.
TODO: multiple cycles? Solution: blank lines for "breaks", add option
to extract specific sections using Python's slice notation.
+If you don't want the entire block, try the ``cut`` command.
Interacting with the plot
-------------------------
-----------------
You can set environment variables to influence the behaviour of
-Hooke. The command to use is ``set``.
+Hooke. The command to use is ``set_config``.
You can alter permanently the behaviour of Hooke by setting these
variables in a Hooke configuration file. See :doc:`config` for