Rhinote Documentation
Last updated March 24, 2008
Except where otherwise noted, this documentation applies to both the Linux and Windows versions of Rhinote.
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
Known Issues (please read)
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.3 or later and its
Tkinter module installed. It has been successfully run on various
distributions of Linux, as well as Windows 98SE, ME, and XP. I cannot
speak to its performance on the Mac OS; please contact
me with details if you manage to run Rhinote on a Macintosh. If you
decide to try it, you should probably use the Windows version.
You can download Python for a variety of platforms at www.python.org. The latest version of Rhinote is always available from http://greyspace.letzebuerg.org/projects.php.
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
. Make sure that the first line of the script (#!/usr/bin/python
) points to your Python binary. If it doesn't, change it.
On Windows, double-clicking on the rhinote-win.pyw script should run it, provided you have Python installed.
When the Rhinote note appears, simpy click anywhere inside the text
field and start typing. 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:
- Ctrl-x: cut highlighted text
- Ctrl-c: copy highlighted text
- Ctrl-v: paste text from clipboard (should work with text copied/cut from any application)
- Ctrl-n: open new (blank) note
- Ctrl-o: open file (via a file dialog)
- Ctrl-s: save current text
- Ctrl-a: save current text as filename.
- Ctrl-p: print current text [Linux only]
- Ctrl-h: display help
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.
A Note on File Extensions
For the sake of convenience, I introduced the .rhi
file extension in Rhinote's Save and Open dialogs under "Files of
type". Any files saved with this extension are still plain text files;
the .rhi
extension merely makes it a little easier to
find Rhinote notes later. Of course, notes (being plain text) can be
saved with any file extension you choose, or with none.
Known Issues
So far, I've run into only one specific problem with Rhinote. It may
not always play nice with other Python applications that make changes
in the way your desktop environment works. Specifically, I ran into
trouble trying to issue commands to Rhinote after I had run (and
subsequently exited) the dfm
Python-based file manager for Linux. Other than that, I've used Rhinote
alongside a multitude of other programs, both on Linux and Windows,
without ill effects.
One thing that you might initially think is an issue: if
you open blank notes from within an existing note, and then issue any
commands that result in a pop-up dialog (save/save as/open/help), the
dialog will appear above the original note. You may think that you're about to perform the operation in the first note rather than in the one you want
to, but that isn't the case; it's just a quirk in the way Tkinter does
things, and your specified operation will happen in the note from which
you issued the command.
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 because of its obvious resemblance to paper
sticky-notes. You can change the color to anything you like by editing
this line, under
def Rhinote():
in the rhinote.py
source:
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.
- Change the font: In the line quoted above,
font =
defines the font in which the note's text is displayed-- Helvetica
is the font name, 9
is the font size (in points), and bold
is the font style. Any of these parameters can be changed. The font can be any named font on your system. For example, try font = ("Courier 10 italic")
and see what you get.
- Disable word-wrap: Again, in the
t = TextWidget
line, 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 scrollbar to navigate your note, but it's your option.
- 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 clicking and dragging, its default size at
startup is defined by this line (again, in the code under
def Rhinote():
):
In this example, 240 is the width (in pixels) and 255 the height. Either can be changed to whatever value you wish.
- Disable the "File Saved" dialog:
You might find the "File Saved" pop-up 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:
It 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 (with a # at the beginning) 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 many of the
simpler GUI-based 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 change the
way Rhinote 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 include a save-changes-before-exit function.
Contact and Support
Please send your complaints, comments, and/or questions to
marvboyes@gmail.com. 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 accomodate 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 several 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, my web-design mentor and the author of the marvelous PHP-based weblogging platform Poster,
made several suggestions to make the code more easily-navigable and
user-friendly, and the distribution archive a little 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?