Skip to content
Offerel edited this page Apr 29, 2024 · 9 revisions

PrimitiveNotes Plugin

This is a very simple notes plugin for Roundcube. Primarily notes in HTML, Markdown and TXT (UTF-8) format but also images (jpg, png) and PDF files are supported. The files are stored in a compatible format to TagSpaces, so that you can transfer these notes directly.

Installation

  • Extract the downloaded archive into Roundcube’s plugin directory <roundcube>/plugins/ and rename it to primitivenotes.
  • copy config.inc.php.dist to config.inc.php
  • change $config['notes_path'] to the path path where the note files are stored. You can use %u as a placeholder for the username. If $config['notes_path'] = '/mnt/hdd/homes/%u/files/Notes' and the username is [email protected], then the resulting path reads /mnt/hdd/homes/[email protected]/files/Notes/
  • Activate the plugin in /config/config.inc.php in the way that you add it to the active plugins array, like $config['plugins'] = array('primitivenotes');

Issues

For issue reporting, please use the issue tracker at Codeberg.org. I have disabled the issue tracker on GitHub.com

How to report bugs

If the plugin does not work as expected, the error should be reported here as a issue. I will then try to fix the problem. However, I need your help to find the cause of the problem. Important are especially the different log files.

  • Mainly I need the output of the browser's webconsole. In most browsers under Windows, you can access it by pressing the F12 key, please tell me all listed errors and warnings.
  • The output of the Roundcube error log file is also useful. Please attach this to the issue. Remove any confidential text
  • Sometimes the issue depends more at the server configuration. Helpful in these cases are the two logfiles of the webserver: error.log and access.log
  • There is also a separate PHP Logfile. Please attach this file also to the issue

Please also note that I can only give very limited tips and advice on server configuration.

FAQ

How is the path to the notes is calculated?

The path consists of: $config['notes_basepath'] + <Roundcube username> + $config['notes_folder']. This is an absolute path. This construct ensures that every user has his own folder for his notes. For example, if you have the following config:

$config['notes_basepath'] = '/mnt/hdd/homes/';
$config['notes_folder'] = '/Notes/';

and your username in Roundcube is fox example [email protected], the resulting path /mnt/hdd/homes/example [email protected]/Notes/. This directory must be writeable to the webserver user.

Why is Roundcube's standard editor not used?

In principle, this would work. However, TinyMCE has various problems with external content and other shortcomings. CKEditor is therefore used as the standard HTML editor. In config.inc.php you can switch the editor accordingly with $config['html_editor']. However, the default is CKEditor.

Which formats are supported?

Supported formats are HTML, TXT, Markdown, PDF, JPG and PNG. For the formats HTML, TXT and Markdown you can change the content of the note, the name and the keywords. For the formats PDF, JPG and PNG only name and keywords. Standard format is HTML. HTML is also used for new notes.

How are the keywords of the notes stored?

These are saved as part of the file name of a note. In this way, the schema remains identical across all formats. The naming scheme is compatible with the format used by TagSpaces. The naming of a file is done according to the scheme Example:"New note[keyword keyword2].html".

What is a YAML header?

A YAML header hold some metadata like information's in a file. In case for YAML support in PrimitiveNotes, it's supported only for markdownfiles. You can enable the YAML header support in the config file, if you set $config['yaml_support'] = true;. If it set to false, the old behavior is used and the tags are saved in the filename. This feature is useful when you work with other editor's like "Epsilon Notes" or "QOwnNotes". You can find more about YAML headers at http://epsilonexpert.com/e/info/tags.php?i=1

Example Notes Workflow

Desktop

On the desktop there are quite a lot of programs with which you can edit notes in Markdown format. I personally use Obsidian MD and sometimes QOwnNotes. Both are available for Windows, Linux and the Mac. There are many ways to get the note files to your PC. You can synchronize them, for example with programs like GoodSync, FreeFileSync or any other file syncing app. Or you can mount the directory with the notes directly into the system as a drive via a WebDAV share. Thus the notes always remain syncronous with PrimitivNotes.

For QOwnNotes I added a script in the helpers directory. With this script you can easily import the tags into QOwnNotes and attach them to your note.

Android

Since I was faced with the problem of how to use the notes under Android, I would like to explain to you how I solved it.

Under Android I use notes in Markdown format. That's why I set this as the default in the Roundcube plugin. Under Android there are several programs that can display and edit Markdown. Markor works best for my needs. This program searches for notes in an adjustable directory on the device. You copy all notes into a corresponding folder on the device and set its path in Markor. Another options Obsidian MD.

To synchronize the notes you can synchronize the folder of the notes with sync apps. You can use the Synchronize Ultimate or FolderSync apps for this purpose. Both have a variety of supported protocols and services. Both can be used to synchronize at intervals or immediately after a change and to set various conditions and exceptions.