tagged note editor (tag-not-ed)
Written by Manuel Arriaga (marriaga followed by stern . nyu . edu).
Copyright (C) 2006 Manuel Arriaga
Licensed under the GNU General Public License version 2. See the file
COPYING for details.
Version: 1.0 (2006/Feb/12)
DESCRIPTION:
Tag-not-ed is a system for managing a collection of tagged text files. ("Tagged" refers to the "text files", not the "text"!) It is composed of
- a simple python program which keeps an index associating files with the tags which have been applied to them
and
- a jed mode which allows you to easily create, tag and search for notes to which certain tags have been applied.
I wrote it as an attempt at having a chance of ever finding again stuff I wrote down in the past, e.g., notes for a particular reading. Hence the reference to "notes"; in reality you can use it to manage any collection of text files.
- INSTALLATION
0- Install jed [http://www.jedsoft.org/jed] and a recent version of python [http://www.python.org] if you don't have them on your system. : )
1- Place tag-not-ed.sl in your JED_ROOT/lib dir (e.g., if jed is installed in /usr/local/jed, put it in /usr/local/jed/lib)
2- Append
autoload("tag_not_ed_mode", "tag-not-ed.sl");
to your jed initialization file (either the system-wide file located in JED_ROOT/lib or your personal ~/.jedrc).
3- Place indexer.py somewhere in your path.
4- Edit the 'CONFIGURATION' section at the top of tag-not-ed.sl (optional).
5- Edit the value of 'index_filename' and 'tags_filename' at the top of indexer.py (optional). [Note that the value of 'tags_filename' in this file must match the value of the same-named variable in tag-not-ed.sl.]
USING tag-not-ed:
You start tag-not-ed by calling
$ jed -f tag_not_ed_mode
(If you use bash you might like putting something like
alias tne="jed -f tag_not_ed_mode"
in one of your shell initialization files.)
Once jed starts you will be presented with an empty buffer called "[new note]". When you want to save a new note, you invoke the "save_note" function. Then you will be prompted for a title. After providing a title you will be able to tag it. This is done by selecting tags in the tag editor, which is made up of two buffers: "**TAGS**" and "**selected tags**". The first time you run tag-not-ed both will be empty, but the former will remember the tags you have previously defined as you go along. In the **TAGS** buffer you can do the following:
- move around (PageUp/PageDown and arrow keys), search using Ctrl-S or Ctr-R;
- add a new tag (press 'a' on the tag which will act as a "parent")
- delete a tag (press 'd' on the tag to delete; watch out, all its children will be deleted, too!)
- rename a tag (press 'r' on the tag to be renamed)
- move a tag (press 'm' on the tag to move, then press 'enter' on the new parent for that tag; note that all children of first tag will also be moved)
- select (or deselect a previously selected) tag (press the space bar; note that the tag you selected show up in the **selected tags* buffer at the top or bottom of the screen).
- quit the tagger, signalling you are done with your selection of tags (press the 'enter' key)
- quit the tagger cancelling the selection of any tags (press 'q')
If you are feeling disoriented (understandable! : ) ), remember that the main purpose of the tag editor is to SELECT tags, i.e., to press the space-bar on the tag(s) which (i) you think describe the note you are tagging (when saving a note) or (ii) describe the notes you are looking for (when running query).
One important and unintuitive thing to remember: the last empty line in the **TAGS** buffer acts as the "root" of the tag hierarchy. This means that, e.g., to create a new top-level tag you should place the cursor on that last empty line and press 'a'. (Similarly, to move a tag to the top-level of the hierarchy you press 'm' on that tag, then place the cursor on the last line and press 'enter'.)
To run a query, you must invoke the function "run_query". This will allow you to select the tags which will define the query: only notes to which all the tags you select have been applied will be listed in the **matching notes** buffer. (Again, when you are done tagging you should press 'enter' to proceed with the query or 'q' to cancel the query.) To move between matches you can invoke the "move_to_previous_match" and "move_to_next_match" functions from any buffer, or simply go to the **matching notes** buffer, place the cursor on the line listing the title of the note you wish to open and then press 'enter' (which runs the function "open_match_under_cursor").
Two other functions you might invoke are "retag_note", which allows you to modify the tags which are currently associated with an existing note, and "rename_note", which allows you to change a note's title. Another function, "list_untagged", allows you to view all notes to which you didn't apply any tag at all. This can be useful if you save things in a hurry and later wish to return to them so that you can tag them adequately. Finally, there is a convenience function called "close_all_other_buffers" which tag-not-ed's propensity to keep a large number of buffers open makes quite useful: it will leave nothing except for the current buffer (and "[new note]") open.
And, to help you (and me! : ) ) find our way around this miserably "designed" (?) but for me very satisfying interface you should call the function "show_keybindings" (by default bound to ESC t-h, i.e., hold down the 'escape' key, press 't', release 'escape' and then press 'h').
The easiest way to call these functions is to bind them to convenient keys at the top of the tag-not-ed.sl file.
I hope you enjoy using tag-not-ed! Feel free to contact me about it at the address provided at the top of this file. In its current form the program is completely UN-self-explanatory and this file does not do more than give you some very tenuous light on how to use it, either! So just email me if you have any questions.
/ Manuel Arriaga
