Hi, I’m Herb Bowie, and I’m responsible for the concepts and code behind Notenik, a simple but powerful system for taking, collecting and referencing notes. On the following pages I’ll provide a gradual introduction to the version of Notenik written in Swift specifically for macOS.
I’ll start off by explaining my primary motivations behind the creation of Notenik.
I love notes. I like being able to write down some words – a few or a bunch – about something that interests me and then refer back to them later.
I like the simplicity and flexibility of notes.
I want to store my notes in an open, non-proprietary format that I can easily write, read and understand, but also in a format that can be usefully manipulated by a number of software tools.
I want my notes to be portable. I want to be able to easily move them around from one device to another, from one platform to another, without losing anything in the process.
I want my notes to be durable. I don’t want to have to worry about being unable to read them a few years down the road because some piece of software is no longer available or some “free” service has gone out of business.
I want some basic application software for working with my notes to be open-source and available on as many platforms as possible.
I want to be able to organize my notes in a variety of useful ways.
I want to be able to usefully extend this basic idea of a note in as many ways as possible, while still remaining true to all of my motivations above.
I want a simple, sturdy user interface that I can apply to as much stuff as possible.
I’m sharing these motivations upfront because, if these same ideas appeal to you, then there’s a good chance it will be worth your while to read a bit further. On the other hand, if you have different sorts of interests, then it’s probably best to just stop now and go about your business.
From this point on, I’ll introduce one concept at a time.
You’re already reading this intro, so obviously I don’t need to tell you how to find this. But here’s a few other help items that are available, including some that may not be so obvious.
This User Guide is available as a web page from the Notenik site and from the Notenik Help Menu.
But the same content is also available as a Collection of Help Notes, by selecting the corresponding Open Command from Notenik’s Help menu. You may find it a little easier to read and navigate in this form, plus you can practice using Notenik as you read the Intro!
In its most basic form, a Note consists of a Title and a Body.
A Title consists of a few words telling you what the Note is about.
The Body consists of the text of the Note, containing as many words as you like.
If no Title is specified within a Note file, then the file name (without the extension) will be used as the Title of the Note.
Each Note is stored as a separate text file, in the UTF-8 format, capable of being read and modified by any text editor, on almost any computer system in the world.
The file name is generally identical to the Note’s title, with the exception of a few occasional tweaks to avoid running afoul of various common operating system limitations.
Any of the following file extensions may be used:
The two preferred extensions are ‘.txt’ (short for text) and ‘.md’ (short for markdown – more on this later).
Use the Text Edit Note command under the Note menu to open the currently displayed Note in your default text editor.
Each Note is part of a Collection, and each Collection is stored in its own folder (aka directory). Each Note within a Collection must have its own unique Title.
You can organize your Notes into as many Collections as you would like, and store each Collection wherever you would like.
The Notenik application can open multiple Collections at a time, each in its own window. The Open Recent command under the File menu provides easy access to recently opened Collections.
You may use a command under the File menu to designate the current Collection as your Essential Collection. Once identified, this will be the first Collection opened each time the application launches.
The Save As command under the File menu allows you to save an entire Collection in a new location, with the option to either keep the current location (effectively making a copy) or to delete it (effectively moving the Collection to a new location).
You might want to use the New command on the File menu to create your first Collection now, if you don’t already have one created.
The Display tab shows you what your Note looks like. Your note is formatted as a web page, and displayed within Notenik using a built-in web browser. If you click on a hyperlink within the display, then the linked page will replace your Note. If you wish to get back to your Note, then click on the Refresh button in the Toolbar. If your Note has a Link value, then click on the Launch Link button in the Toolbar to see the linked page within your default web browser, instead of Notenik’s internal browser. The Edit tab lets you make changes to the Field Values of a Note.
Use the ‘+’ (plus) sign on the Toolbar to clear the Field Values and prepare to Add a new Note.
Use the ‘-’ (minus) sign on the Toolbar to delete the currently selected Note.
Click on the OK button on the Toolbar, or click on the Display tab, to complete and save your latest entries on the Edit tab.
The Note Menu also has equivalent commands, with keyboard shortcuts, to add a New Note or Delete a Note.
You can alter the typeface and font size used on the Display tab by selecting the Display Appearance item under the Format menu, or by clicking on the Display Fonts button on the toolbar. You may then pick a typeface and font from the displayed dropdown menus or, if you’d like, enter the CSS you’d like to be used directly, bypassing the limits of these menus.
You may also alter the font size used on the Edit tab through use of the commands available to you under the View menu.
The first half of the Notenik display shows all the Notes in your current Collection as a simple list, initially sorted by Title. You can navigate through this list using some of the buttons on the Toolbar:
Some of the same navigational commands are available under the Note menu, with handy keyboard shortcuts noted on the right. There you will also find a command to scroll the list so as to bring the currently selected Note into view at the top of the displayed Notes.
Since a Collection of Notes lives on your local storage as a folder full of text files, it can be easily synced to the cloud and/or to other devices via a service such as Dropbox or iCloud. Simply store your Collection somewhere in your Dropbox folder, or in your iCloud Drive folder.
Markdown is a simple syntax for formatting plain text files so that they can be easily read and written by humans, but also can easily be converted into HTML for use on the Web. If you’d like, you can use the Markdown syntax for formatting the body of each note. But it’s not required.
When you view a Note on the Display tab, you will see the Body Field Value converted to HTML using a Markdown parser. If you haven’t used any special Markdown formatting, then the text will simply appear as you entered it.
Notenik uses the Down parser to convert from Markdown to HTML.
I’ve said that, at their most basic, each Note consists of a Title Field and a Body Field. But each Note can actually contain any number of fields.
Each Field in a Note consists of the Field’s Label, followed by a colon and one or more spaces, followed by the Field’s Value.
In other words, something like this:
Title: This is a Sample Note
Field Labels must follow a few rules. A Field Label must always start at the beginning of a line. A Field Label may not consist of more than 48 characters, and may not contain a comma (’,’).
The Field Value may be specified on the same line, and/or on one or more following lines.
The Body Field, if present, will always be the last Field in a Note, since all following text will be assumed to be part of the Body (even if it contains strings of text that might otherwise appear to be additional Field Labels).
Each Field Label may be considered to have a proper form (including capitalization, spaces and punctuation), and a common form (the proper form without capitalization, whitespace or punctuation). The common form is considered to be the key identifier for the Field, so that any variations of the Label that include the same letters and digits in the same sequence will be considered equivalent.
The Tags Field offers another way to organize the Notes within a Collection. Tags may be used to group related notes into categories. One or more tags may be associated with each note, and each tag may contain one or more sub-tags. A period or a slash may be used to separate one level of a tag from the next level, with the period being preferred. A comma or a semi-colon may be used to separate one tag from another, with the comma being preferred.
Click on the Tags tab to see your Notes organized by tags, instead of appearing in a straight List. If a Note has multiple Tags assigned, then it will appear multiple times on the Tags tab, once for each Tag. By adding multiple levels to your Tags, you can effectively organize your Notes into an outline.
A Link Field within Notenik is intended to hold a URL: a hyperlink to a location on the Web (or to a local file, if you’d prefer to use it that way). You can easily Launch a link from within Notenik by clicking on the Launch Link button in the Toolbar.
Adding a Link to a Note doesn’t necessarily reduce the Note to a simple Bookmark, but this is certainly one way to use a Collection of Notes.
Note that if you use a Link to point to a local folder containing another Notenik Collection, then Launching that Link will result in opening the linked Collection within Notenik.
You may use the Set Local Link command under the Note menu to choose a file or folder to be linked; the resulting ‘file:///’ style of URL will then replace any value previously stored in the Link field for the current Note.
By default, Notenik shows only four Fields for a Note: Title, Link, Tags and Body. However, this default may be altered by placing a file named ‘template.txt’ or ‘template.md’ within a Collection’s folder. Such a file should be in the normal Notenik format, although the Field Labels specified need not have any accompanying values. When such a template file is found, the field names found in this file will be used as the fields to be displayed and maintained for that Collection, overriding the default four. You may use the Preferences command under the Collection menu to modify the template for the current Collection. Just put a check mark next to whichever fields you’d like to use for that particular Collection. Then click on the OK button to save your template with the indicated fields.
You can also use any text editor to modify the sample template file to reflect the fields you desire for that Collection.
When creating a new Collection, you will be presented with the Collection Preferences window automatically, to give you a chance to customize the fields to be used for that new Collection.
The file extension used for the template file will be used as the file extension for Notes subsequently created within the Collection.
Following is a sample Note file, showing all of the Fields that Notenik treats as special in some way. Feel free to copy and paste to create a template file, as described in the previous section.
Title: The unique title for this note Author: The author of the Note Date: 2016-12-13 Status: 0 - Suggested Type: The type of note Seq: Rev Letter or Version Number Tags: One or more tags, separated by commas Link: http://notenik.com Rating: 5 Index: Index Term 1; Code: A block of programming code Teaser: A brief sample of the note Body: The substance of the note
Add a Seq Field to a Collection (using a template file) in order to specify a sequence number, revision letter, version number or priority to be associated with each Note. A Seq field may contain letters, digits and one or more periods (aka decimal points) or hyphens or a dollar sign (’$’).
You may wish to assign a unique Seq value to each Note in a Collection, but Notenik does not require this (in other words, it does allow duplicate Seq values to be assigned to different Notes).
If you’d like to see your Notes listed in sequence by their assigned number, you can use the Sort Menu to change the sequence of the displayed list from Title to Seq + Title.
If you want to insert a new note with a Seq Value already assigned to another Note, then first select the other Note, then use the Increment command under the Note menu to increment the Seq field of the existing note, as well as following notes that might otherwise cause duplicate Seq values.
To add a new Note with the next available Seq value, first select the last note in the list (the one with the highest seq field) and then add a New Note in the normal manner.
Add an optional Status Field to your Collection, indicating each Note’s degree of completion, and you have a basic To Do List.
Status values are usually selected from the following standard list. Note that each status may be represented by a single digit and/or an associated label. The digits serve to place the values into an approximate life cycle sequence.
The labels may be modified by placing a series of integer + label pairs in the Value area of the relevant template file, with separating punctuation. Such a template line might look something like this:
Status: 1 - Idea; 4 - In Work; 9 - Published;
Look under the File menu for an option to Purge Notes that have been Canceled or Completed. You’ll be given the option of discarding the purged Notes, or of copying them to another location.
Add a Date field to a Collection in order to track the date each note was officially published, or a due date for each note. A date may be expressed in any of a number of common formats. It may also be a partial date, such as a year, or a year and a month. It may or may not contain a specific time of day.
Note that the Date field has several helpful editing tools. You can enter a free-form date yourself, or you can use a Calendar widget to pick dates from a Calendar. You can use the Today button to set the date to Today’s date, and you can use the Recurs button to apply the Recurs rule, if one has been supplied.
If you need to export a Collection in a format suitable for sorting by Date, then you may wish to use the Standardize Dates to YMD command under the Collection menu to make sure that all dates are stored in a yyyy-mm-dd format suitable for sorting.
Add a Recurs field to a Collection to cause a Date for a Note to recur on a regular basis.
Specify a recurs rule using normal English, such as “Every 3 months,” “Every Tuesday” or “Every Year.”
Use the Recurs button on the Date editing row to apply the rule to the current Date associated with the selected Note.
Add a Status field, a Seq field, a Date field and a Recurs field to a Collection, and you have all the elements of a personal task management system.
A Collection such as this can use the Date field to track due dates, and/or the Seq field to track priorities. If desired, use the Tags field to group tasks by context and/or by project.
If you use the Close Note option under the Note menu, then you can cause the Due Date to recur (if a Recurs field is available), or the Status field to show the task as Completed, if it is not eligible to recur.
The Sort menu contains two options specific to task tracking. The first option sorts all the Notes in a list by Date and then Seq, while the second option sorts all tasks by Seq and then Date. In both cases, completed tasks sort to the bottom of the list.
And don’t forget the Purge Option under the File menu, which will allow you to purge Cancelled and Completed Notes from a Collection.
Add a Code field to a Collection in order to store a code snippet as part of each Note in that Collection. The code block you enter in a Code field will be formatted on the Display tab enclosed in pre and code tags, so that line breaks will be honored, and the code will be displayed using a monospaced font.
The Search field on the Toolbar allows you to search for the entered text, and display the first Note containing this text in any field being searched. After finding the first occurrence, you may use the Find Again command under the Note menu to search for the next Note containing the specified text. The Search function will search each Note’s Title, Link, Tags and Body fields for matching text. Case (upper- or lower-) will be ignored for the purposes of the Search.
You can use whatever Field Labels you want within a Collection, but there are a few other Field Labels that have some special Notenik logic associated with them.
Author – The author(s) of the Note.
Rating – Your rating of the note, on a scale of one to five.
Type – The type of note. Any values may be used to distinguish between different types of notes within a collection.
Teaser – An excerpt from the note used as a teaser in a list of notes. The teaser may be formatted using Markdown.
You may also attach any number of files to your Notes. Here’s the way this feature works.
Start by selecting the Note that is to receive the attachments.
Use the Add Attachment item under the Attachments menu in the Toolbar to add an Attachment to your Note. You will then be prompted to select the file to be attached, and then to specify an optional suffix that can be used to distinguish this attachment from other files attached to the same note. After you supply the requested information, Notenik will copy the indicated file to the “files” folder within your Collection. The file will be given a name that starts with the same name as the Note, followed by the specified suffix, and then followed by the original file extension. The original file will remain as-is.
Once a Note has attachments, you may open one of them by selecting it from the same Attachments menu in the Toolbar. The request will then be passed on to the operating system, and the attachment will be opened in whatever application is assigned to files of that type.
If you’d like to delete an Attachment, select the Delete Attachment item under the Note menu. If more than one attachment for that Note exists, then you will be prompted to specify the one you wish to delete. Be aware, though, that when you delete an Attachment, the underlying file in the files folder will be deleted.
If you change the Title of a Note, then any files attached to the Note will be automaticallly renamed to match the new Title for the Note.
If you delete a Note, then its attachments (if any) will be deleted as well.
In case you’re wondering, the association between a Note and its Attachments is based solely on matching file names. In other words, if you wish to delete an attachment by using your operating system to delete the file from the files folder, then that’s perfectly ok with Notenik: the next time you open that Collection, Notenik will have no “memory” of that attachment. By the same token, if you wish to use your OS to place a new attachment in the files folder, with a name matching that of a Note, then Notenik will recognize that new file as an attachment for the Note the next time you open that Collection.
Notenik provides a function for merging data from Notes into a template file in order to create one or more output text files.
The text files created may be of any type, but certainly one of the most useful formats is html, allowing users to generate one or more Web pages from their notes.
See the Merge Template File Spec for complete information on the expected format of a Merge Template file.
Template files should be placed in a folder named ‘reports’ within the Collection folder where the reports are to be used. Each template file should include the word ‘template’ somewhere within its file name.
Once a template file is created, suitably named and placed, it will become available as a report that can be selected from a drop-down (identified with a gear icon) on the Collection’s toolbar.
Selecting a report will then cause the Collection’s notes to be merged into the corresponding template file, creating whatever ouput is identified in the template file.
Notenik can play a script file that will execute a series of data transformations. Data can be input from one or more Notenik Collections and/or from tab-delimited or comma-separated files. The input data can be sorted and filtered using any of the fields contained within the data. The data can then be used as input to a Template file, or output to a new tab-delimited or comma-separated file.
See the Merge Script File Spec for a complete description of a Script file.
Place one or more script files within the reports folder for a Collection, and these files will then become available as Reports.
Scripts will be executed within a separate Scripter window.
You can import and export a Collection in a variety of formats, using commands found under the File menu. Following are the supported formats.
Import/Export in Notenik Format
You can import and export your Notes in the current collection from/to a folder in the same Notenik format.
Import/Export in Tab-Delimited Format
Each Note will be represented as one row/line, and each field will be represented in a separate column. Tabs are used to separate columns. This format is suitable for import into MS Excel, for example.
Import/Export in CSV Format
Each Note will be represented as one row/line, and each field will be represented in a separate column. Commas are used to separate columns. This format is suitable for import into MS Excel, for example.
When exporting the Notes in a Collection, you will be presented with a few options for the export.
Output Format: Described above.
File extension: Pick from the list or type in a custom extension.
Use Tags Export Prefs? Select ‘Yes’’ if you wish the current Tags Export Prefs to be applied. You may filter the notes to be exported, for any of the output formats (other than the Notenik format), by adjusting the entries in the Tags Export preferences. You may specify one or more Tags to be selected, so that only notes containing those Tags will be exported. You may also suppress one or more Tags, meaning that exported notes will have those Tags removed from the resulting output.
For example, if you have a collection of blog entries stored as a Collection of Notes, and you have multiple blogs to which they are published, you can specify Tags for the relevant blogs for each note, and then select only those Notes when publishing a particular blog (and suppress the Tags for the other blogs).
If you leave the Tags to Select field blank, then all Notes will be exported.
Note that the Tags Export Preferences are global across all Collections.
Split Tags? Select ‘Yes’ if you wish one row to be written for each Tag on each Note. This will result in a special export in which each Note may be written multiple times, once for each Tag in the Note’s Tags field. Notes without any Tags will be written only once, with a blank Tag field. In other cases, the Tag field will contain a single Tag, even if the Tags field contains multiple Tags.
Add Web Extensions? Select ‘Yes’ to add a number of fields that can be useful for generating Web pages.
If you have a Collection of Notes representing Web Bookmarks, then you may wish to use the ‘Favorites’ tag to identify the bookmarks you reference most often. You may then use a sub-tag within the ‘Favorites’ tag to organize your favorite bookmarks into categories. Once you’ve identified your Favorites, then you may use the Favorites to HTML command under the File menu to create a Web page containing all your favorite bookmarks, organized under headings representing the categories you have chosen. Notenik will display your favorites in four columns, with a maximum of 32 lines per column. Assuming a reasonable number of favorite bookmarks, these will typically display all of your favorites within a single Web page on your Mac. You may then wish to identify the resulting page as the homepage within all of your Web browsers (Safari, Chrome, etc.).
In addition to the normal Open and Open Recent commands under the File menu, Notenik also has an Open Parent Realm command.
You may invoke this command to specify a folder containing one or more Collections, and/or one or more Script files. Notenik will scan all likely folders within the parent folder, looking for Notenik Collections and Scripts. Notenik will then display these Collections and Script files within a new window, as if they were Notes within a Collection. You may then click on the Launch Link command in the Toolbar to perform the appropriate action: either opening a Collection within Notenik, or preparing a Script file for execution within the Scripter window.
Note that the Tags tab will organize these Collections and Scripts by folder, and also by type of link.
Notenik is a modern, well-mannered Mac application, which means that it does not presume to have free run of your hard drive, roaming wantonly wherever it will.
In other words, to use Apple’s terminology, Notenik is sandboxed.
At the same time, Notenik does not take all the data you have given it and stash it away in some secret location that only Notenik can access because — well, it’s your data. You can store it wherever you like. It’s stored in plain sight. You can see it whenever you want. And if you want to open that data using your favorite text editor, then more power to you. Have at it. Knock yourself out.
These two Notenik traits can sometimes come into conflict, however. If you store your Notenik data in lots of different Collections, and store those Collections in different places, then Notenik may sometimes have trouble getting access to them.
Here’s how this works.
Any Collection folder that you select through the Open command under the File menu will be available to you, because you have explicitly selected it for use by Notenik.
Any Collection folder that you select using the Open Recent command under the File menu will be available to you, because macOS remembers that you previously gave Notenik permission to access that Collection.
If you use the Open Parent Realm command under the File menu to have Notenik search for its Collections within a parent folder, then those collections will be available to be opened, because you have explicitly given Notenik permission to access everything within that parent folder.
In general, the rules above will be enough to cover most situations. If they prove too restrictive, though, you can always grant Notenik full disk access in the Security & Privacy pane of System Preferences.
Under the Window Menu, you’ll find an entry for the Log window. You can usually ignore the Log, but if Notenik is not behaving as you think it should, a look at the Log window can sometimes help determine what is going on.
Following are the keyboard shortcuts available within the app. When combined with the CMD key, these keys can be used as handy shortcuts.
A - Select All
C - Copy
E - Open Essential Collection
F - Find
G - Find Again
H - Hide Notenik
I - Increment Date or Seq
K - Close Note
M - Minimize
N - New Note
O - Open
Q - Quit Notenik
S - Save Note
T - Text Edit Note
U - Catch Up Daily Tasks
V - Paste
W - Close Window
X - Cut
1 - Sort by Title
2 - Sort by Seq + Title
3 - Sort Tasks by Date
4 - Sort Tasks by Seq
5 - Sort by Author
[ - Prior Note
] - Next Note
→ - Scroll to Selected Note
‘=’ - Increase Edit Font Size
‘-’ - Decrease Edit Font Size
Each Collection is stored within its own folder. You may store each Collection wherever you like. You may wish to store one or more of your Collections in a special folder used by a syncing service such as iCloud or Dropbox, in which case your Collection will be synced just like any other files and folders managed by that service. Within each Collection folder you will find one file for each Note in the Collection, with the file name based closely on the Note’s title.
In addition to the Note files, the following special files and folders may be found within a Collection folder.
Each Collection folder will contain a special file named ‘- INFO.nnk’. This is a plain text file, in Notenik format, containing some handy metadata about the Collection, such as the last sort sequence set for it. If you sync a Collection to other devices using a service such as iCloud or Dropbox, then this metadata will be synced as well.
Each Collection folder will also contain a special file named ‘- README.txt’. This file simply identifies the folder as a Notenik Collection.
Each Collection folder will normally also contain a ‘template.txt’ or ‘template.md’ file identifying the fields used within the Collection.
A ‘files’ folder will contain any Attachments for the Collection.
A ‘reports’ sub-folder may contain a number of Template files and/or Script files.
Notenik source code is available on GitHub.
Notenik also makes use of CoreXLSX to read XLSX files. CoreXLSX is also separately licensed.
If you have questions about Notenik, bug reports, or requests for enhancements, please shoot me a note at firstname.lastname@example.org and I’ll try to get back to you as quickly as I can.
Users can now play a Script file that will run a series of data transformations.
Each Note can have one or more Attachments.
This new Notenik Preferences tab allows the user to specify tags to select and tags to suppress.
Users can now pick from previously identified tags when entering a new one.
The Split Tags command under the File menu will split the tags for each Note, and write one output row for each Tag for each Note. Notes without tags will be written out only once; Notes with multiple tags will be written out once for each Tag. In addition to the Tags column, a Tag (singular) column will be added to the front of each row, containing one particular Tag for the Note. This export file can be used, for example, to create an index page for each Tag.
Execution of this command will change all the dates in all the Notes for the current Collection so that they are stored in yyyy-mm-dd format, which can be useful to ensure than an export file sorts correctly on date.
Markdown conversion now renders embedded HTML and does a smart typographic conversion.
Occasional problem with erroneous blanks in the ‘X’ column (indicating done or not) is now fixed.
The File Menu now has a new command to export Favorites to HTML. This allows the user to identify favorite bookmarks using the ‘Favorites’ tag and then export those favorites to a four-column Web page.
Merge Templates may now be created, stored in a reports folder, and then run from a Collection’s Toolbar.
Miscellaneous bug fixes and improvements.
This is the initial release of Notenik written in Swift.