## Layout

There are two modes in RedNotebook, the edit mode and the preview mode.

## Text

The main text field is the container for your normal diary entries like this one:

Today I went to the pet shop and bought a tiger. Then we went to the pool park and had a nice time playing ultimate frisbee. Afterwards we watched "Life of Brian".

## Format

As you see, the text can be formatted bold, italic, --struck through-- and underlined. As a convenience there is also the "Format" button.

A blank line starts a new paragraph, two backslashes \\ result in a newline.

To see the result, click on the "Preview" button. You can also see how this text was formatted by looking at its source.

Lists can be created by using the following syntax, if you use "+" instead of "-" you can create a numbered list:

- First Item
- Indented Item
- Do not forget two blank lines after a list



## Hashtags

Tagging is easy. Just use #hashtags like on twitter.

RedNotebook lets you insert images, files and links into your entries. To do so, select the appropriate option in the "Insert" pull-down menu above the main text field. The text will be inserted at the current cursor position. Note that currently, the things you insert are only linked to, but not copied into your journal directory.

With the insert button you cannot insert links to directories on your computer. Those can be inserted manually however ([Home file:///home/] becomes Home).

## Entry references

You can reference days in your journal by simply writing the date in [YYYY-MM-DD] format. A date like 2019-02-14 will be rendered as a clickable link in preview mode.

Alternatively, you can name your references. For example,

[Today #2019-02-14] was a good day.

will be shown as

Today was a good day.

## Templates

RedNotebook supports templates. Click on the arrow next to the "Template" button to see some options. You can have one template for every day of the week and unlimited arbitrarily named templates. The files 1.txt to 7.txt in the template directory correspond to the templates for each day of the week. The current weekday's template will be filled into the text area when you click on "Template". You can open the template files from inside RedNotebook by opening the menu next to the "Template" button.

## Search

On the left you find the search box. Double-clicking on a day in the search results lets you jump to it.

You can search for text or dates (e.g. 2014, 2014-01, 2014-01-19).

## Clouds

The most frequently used words will appear in the word cloud on the left. Its contents are only refreshed when RedNotebook starts and when the journal is saved.

If a word appears in the cloud that you don't want to see there, right-click and select to hide it. Alternatively, you can open the Preferences dialog and add the word to the cloud blacklist. Short words with less than five letters can be white-listed there as well. [Regular expressions http://docs.python.org/library/re.html] are allowed in the lists. If you want to hide words with special characters, you can escape them with a backslash: 3\.50\?

You can limit the number of displayed words by tweaking the 'Tags in cloud' configuration option. If this option is set to 0, no tags are displayed.

You can hide the word cloud by adding the regular expression .* to the blacklist. This will filter out all words.

## Spellcheck

RedNotebook supports spellchecking your entries. This feature needs the pyenchant library (python-enchant on Ubuntu). Spellchecking can be turned on and off by toggling the menu item in the "Edit" menu.

You can select the spellchecking language by right-clicking on the main text area (in edit mode) and choosing it from the submenu "Languages".

### Adding custom dictionaries under Windows

You can add more aspell dictionary files to the directory <RedNotebook Dir>\lib\aspell-0.60\. If RedNotebook is running, you need to restart it for new dictionaries to be recognized. You can find aspell dictionaries at ftp://ftp.gnu.org/gnu/aspell/dict/0index.html. Please read the README files included in the tarballs for information on how to compile the necessary files.

## Options

Make sure you check out the customizable options in the preferences dialog. You can open this dialog by clicking on the entry in the "Edit" menu.

## Save

Everything you enter will be saved automatically at regular intervals and when you exit the program. To avoid data loss you should backup your journal regularly. "Backup" in the "Journal" menu saves all your entered data in a zip file.

## Export

In the "Journal" menu you also find the "Export" button. Click on "Export" and export your diary to Plain Text, PDF, HTML or Latex.

Since version 0.9.2 you can also directly export your journal to PDF. If the option does not show up in the export assistant, you need to install pywebkitgtk version 1.1.5 or later (the package is sometimes called python-webkit).

Latex caveats

Make sure to type all links with the full path including the protocol:

## Synchronize across multiple computers

Syncing RedNotebook with a remote server is easy. You can either use a cloud service like Dropbox or save your journal to your own server.

### Dropbox

If you have a Dropbox account, you can just save your journal in a subdirectory of the Dropbox folder in your home directory. Alternatives to Dropbox, which give you complete control over your where your data is stored, include Syncthing.

### Directly save to remote FTP or SSH server

With Linux you can have your journal directory on a remote server. To use the feature you have to connect your computer to the remote server. This is most easily done in Nautilus by clicking on "File" -> "Connect to Server". Be sure to add a bookmark for the server. This way you can see your server in Nautilus at all times on the left side. The next time you open RedNotebook you will find your server in the "New", "Open" and "Save As" dialogs. There you can select a new folder on the server for your journal.

### Language

To change the language on Linux, use the environment variables LANGUAGE, LC_CTYPE and/or LC_TIME:

• LANGUAGE sets the language for the interface (i.e., text on buttons, menus, etc.).
• LC_CTYPE sets the language for the spell checker.
• LC_TIME sets the language for the date strings (weekday names, month names, etc.).

The environment variable LC_ALL sets both LC_CTYPE and LC_TIME simultaneously. For example, to have a German interface, start a terminal and call LANGUAGE=de_DE.utf8 rednotebook.

On Windows, set or create the LANGUAGE environment variable with the desired language code (e.g., de, de_DE or de_DE.UTF-8):

1. Right-click My Computer and click Properties.
2. In the System Properties window, click on the Advanced tab (Windows XP) or go to Advanced System Settings (Windows 7).
3. In the Advanced section, click the Environment Variables button.
4. Click the New button and insert LANGUAGE at the top and your language code at the bottom.

### Titles

You can insert titles into your post by adding "="s around your title text. = My Title = is the biggest heading, ===== My Title ===== is the smallest heading. A title line can only contain the title, nothing else.

Numbered titles can be created by using "+" instead of "=". ""+ My Title +"" produces a title like "1.", +++++ My Title +++++ produces a title like 0.0.0.0.1

### Insert HTML or Latex code

To insert custom code into your entries surround the code with single quotes. Use 2 single quotes for inline insertions and 3 single quotes if you want to insert a whole paragraph. For paragraphs be sure to put the single quotes on their own line.

Text Output
''<font color="red">Red</font>'' Red
''$a^2$'' $a^2$ (a2 in Latex)

This feature can be used to insert e.g. Latex formulas:

'''
$$\sum_{i=1}^{n} i = rac{ncdot (n+1)}{2}$$
'''


will produce a nice looking formula in the Latex export.

### Verbatim text (Preserve format)

To insert preformatted text preserving newlines and spaces, you can use the backquotes (). Use 2 backquotes for inline insertions and 3 backquotes if you want to insert a whole paragraph. For paragraphs be sure to put the backquotes on their own line.

Two examples (have a look at the source to see how it's done):

To install rednotebook use sudo apt-get install rednotebook.

class Robot:
def greet(self):
print 'Hello World'

robot = Robot()
robot.greet()


### Unparsed text

Formatting commands inside two pairs of "" are not interpreted (""**not bold**"").

Comments can be inserted after percent signs (%). They will not be shown in the preview and the exports. The % has to be the first character on the line.

### List of all entries

To get a list of your entries search for "-". You can sort the resulting list chronologically by pressing the "Date" button.

## Command line options

usage: generate-help.py [-h] [--version] [--date START_DATE] [journal]

RedNotebook is a modern desktop journal. It lets you format, tag and
templates, spell check your notes, and export to plain text, HTML or
Latex.

positional arguments:
journal            (optional) Specify the directory storing the journal data.
The journal argument can be one of the following:
- An absolute path (e.g. /home/username/myjournal)
- A relative path (e.g. ../dir/myjournal)
- The name of a directory under $HOME/.rednotebook/ (e.g. myjournal) If the journal argument is omitted then the last session's journal path will be used. At the first program start, this defaults to "$HOME/.rednotebook/data".

options:
-h, --help         show this help message and exit
--version          show program's version number and exit
--date START_DATE  load specified date (format: YYYY-MM-DD)



## Data format

The content of a RedNotebook journal is saved in a directory with many files, not just one file. The directory name is used as a name for the journal.

In the directory there are several files all conforming to the naming scheme <year>-<month>.txt (e.g. 2010-05.txt). Obviously these files correspond to months (e.g. May 2010).

Each month file contains plain text for the days of that month. The text is actually YAML markup. Without the (unnecessary) python directives the files look like this:

24: {text: "This is a normal text entry."}
25:
Ideas: {"Invent Anti-Hangover machine": null}
text: "This is another text entry, shown in the main text area."
`

As you can see, the data format uses a dictionary (hashmap) for storing the information. The outer dictionary has the day numbers as keys and the day content as values. The day values consist of another dictionary. It can have a key "text" whose value will be inserted in the main content area. Additionally there can be multiple other keys that stand for the categories that belong to that day. Each category contains a dictionary mapping category entries to the null value.

In summary the data format is a hierarchy of dictionaries. This way the format can be easily extended if the need for that arises.

All textual content can be formatted with http://txt2tags.org markup.

## Questions

If you have any questions or comments, feel free to post them on the mailing list or contact me directly.

## Bugs

There is no software without bugs, so if you encounter one please drop me a note. This way RedNotebook can get better, not only for you, but for all users.

Bug reports should go here, but if you don't know how to use that site, a simple mail is equally fine.