Rhinote
desktop notes in Python

Rhinote Documentation

[Click here for an unstyled (plain) version of this document]

Rhinote is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Rhinote is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

About
Installation
Usage
A Note on the Windows Version
Printing Notes
A Note on File Extensions
Limitations and Wishlist
"Hacking" Rhinote
Contact and Support
Acknowledgements

About: Rhinote is a small, simple Python/Tkinter script that provides virtual "sticky-notes" on your desktop. It's handy for jotting down quick notes or holding copied text that you plan to paste elsewhere later. Notes can be saved (as plain ASCII text) for later viewing/editing with Rhinote or any other text editor. While many such "sticky-note" programs exist for virtually all computing platforms, Rhinote is extremely simple, lightweight, and "keyboard-friendly."

Rhinote should run on any computer that has Python 2.5 or later and its Tkinter module installed. It has been successfully run on various distributions of Linux, as well as Windows 98SE, ME, XP, and Vista, and Mac OS X.

You can download Python for a variety of platforms at www.python.org. The latest version of Rhinote is always available from http://rhinote.tuxfamily.org.

Installation: Simply put the rhinote.py (or rhinote-win.pyw, if you're using Windows) script wherever you keep scripts. No formal installation is required.

Usage: On Linux, use a terminal to cd to the directory where rhinote.py lives and type python rhinote.py (or python rhinote.py & to get your command prompt back). Optionally, you may turn rhinote.py into an executable by placing it in your ~/bin directory, renaming it rhinote, and making it executable with (for example) chmod +x rhinote

On Windows, double-clicking on the rhinote-win.pyw script should run it, provided you have Python installed.

When the Rhinote note appears, simply start typing, or paste (Ctrl-V) any text you've already cut/copied to your system clipboard. Rhinote will automatically wrap words at the ends of lines (see "Hacking" Rhinote to change this behavior).

Rhinote offers a set of very simple text and file manipulation tools; all commands are keyboard-driven. Pressing Ctrl-h at any time will display all available commands:

A Note on the Windows Version: You may (or may not) have noticed that the Windows version of the script has a slightly different file extension (.pyw) from the Linux version (.py). This is so the program will run in Windows without also opening a command prompt. This is probably the way you'll want it to work most of the time. If you want the command prompt back (it would be useful if you decided to make changes to the code and want see what's happening "under the hood"), simply change the file extension to .py

Printing Notes (Linux Only): The Linux version of Rhinote offers a very rudimentary printing "system" (if you want to call it that). It uses the enscript program to format the text, then passes the result to lpr for printing. As long as you have these two programs installed (most Linux distributions do), Rhinote notes will print on your default printer.

Limitations and Wishlist: At the moment, Rhinote is not very smart. It will not ask for confirmation when you exit, and any text in a given note will vanish if you don't save it first. Put simply, there is no save-before-exit functionality. I desperately want this, though, and will include it in a future version as soon as I learn how to do it. If you're a Python programmer who knows how to implement it, I'd love to hear about it.

I would also like to learn how to implement the printing function in the Windows version; again, if you know how, please contact me.

"Hacking" Rhinote: Since Rhinote has no formal configuration system, any changes to the program's look and feel must be made in the source code. Luckily, Rhinote is extremely simple and any changes should be easy to make. The following are some examples (and please note that any changes must be saved, and the application restarted, in order for them to take effect; and since you're editing source, you might want to work from a copy, just in case...):

· Change the note's background color: I chose the default color for its obvious resemblance to paper sticky-notes. You can change this default color to anything you like by editing this line, under def Rhinote(): in the rhinote.py (or .pyw) source:

  t = TextWidget(r, bg = '#f9f3a9', wrap = 'word', undo = True)

The color is defined (in hex) in the bg = '#f9f3a9' section. Simply change this to whatever hex triplet you'd like and save the file. (If you don't have a desktop application with the means to determine a color's hex notation, you can use this website.)

· Change the note's default size: Another arbitrary choice I made when writing the program, and another parameter that can be easily changed. While Rhinote's window can be resized like any other by simply clicking and dragging its border, the default size at startup is defined in this line (again, in the code under def Rhinote():):

  r.geometry('220x235')

In this example, 220 is the width (in pixels) and 235 is the height. Either can be changed to whatever value you wish.

· Disable word-wrap: Going back to the line beginning t = TextWidget, simply change wrap = 'word' to wrap = 'none'. I'm not sure why you'd want to do this, since you won't get a nifty horizontal scrollbar to navigate your note, but it's your option.

· Disable the "File Saved" dialog: You might find this dialog annoying every time you save a file (since an asterisk in Rhinote's titlebar indicates whether or not changes to a file have been saved). To disable it, look for the following line:

  tkMessageBox.showinfo ('FYI', 'File Saved')

This line occurs twice in the code: at the end of the def save_file function, and again at the end of def save_file_as. Simply comment out the lines (put a # at the beginning of each) or delete them, and this potentially-annoying feature will be gone.

· Change Rhinote's default keybindings: In choosing which keys to assign to Rhinote's command set, I simply followed the more-or-less established conventions of the simpler GUI text editors. If you don't like my choices, feel free to change them: you'll find the keybindings in the def __init__ section of the source, near the end of the file. I suppose you could even make Rhinote's commands behave just like their counterparts in GNU Emacs, though I can't imagine why anyone would want to. ;)

There are certainly many other ways to modify the way Rhinote looks and behaves; feel free to make whatever changes or improvements you like. I would be delighted to hear of any, especially if you can figure out how to implement a save-changes-before-exit function.

Contact and Support: Please send your complaints, comments, and/or questions to greyspace(AT)tuxfamily.org. My life will be easier, and your response quicker, if you use the word 'Rhinote' somewhere in the subject line. While I'll do what I can to help you or to accommodate your requests, please don't expect any sort of Pythonic wisdom. I learned just enough Python to do what I wanted; that is, to make this program. I use the heck out of it as written, so I'm not inclined to introduce a lot of new features. I'm not saying it won't happen; but if you need more from a text widget than Rhinote provides, there are many excellent programs which might better suit your needs.

Acknowledgements: Most of what little I know of Python I learned from watching the denizens of the Python-Tutor and Tkinter-Discuss mailing lists. In particular, Michael Lange provided me with a great deal of help in turning Rhinote into a semi-respectable piece of scripting.

KiyuKo, author of the splendid PHP-based weblogging platform Poster and the 90% feature-complete and GTK-based Rhinote-clone Gina, made several suggestions for making Rhinote's code more easily-navigable, and the distribution archive a lot more sensible. He is also the creator and maintainer of the Rhinote package for Debian Linux.

Yes, I do like to hear myself type. Isn't it funny that this documentation is almost twice as large as the program it describes?