A Quick Update On The Next Release Of Trunk Notes

Hello. I thought I would post a quick update on what is happening with the next release of Trunk Notes.

The next release will be 3.0! It won’t offer much in the way of new features, but has had parts of it extensively rewritten. Trunk Notes was the second iOS app I wrote back in February 2009. Since then much has changed, both in what is offered by iOS and my own knowledge at developing for the platform. Although much of the code for Trunk Notes is fairly well structured, some it had become confused and kept introducing and reintroducing bugs. Many of these issues were to do with layout of the UI, particularly with the toolbars, and annoyingly hard to reproduce problems when not on Wi-Fi. Instead of continually trying to patch up the code I decided on rewriting and cleaning up some of the core UI code. This isn’t quite yet finished but is getting to a state where it can be sent to some kind people who have volunteered to help test Trunk Notes 3.0.

Once I’ve released 3.0 I will be in an excellent position to push ahead with some more radical changes to the UI to bring it in line with some higher marketshare note taking apps. However don’t worry, I realise what makes Trunk Notes special and what it is that keeps you using it on your iPhones, iPod Touches and iPads. Maybe I will even have time to finish the much promised Mac version (and get beyond a prototype for Android).

It is an exciting time to be a mobile developer, and although personal wikis aren’t exactly mainstream they are very powerful tools and developing Trunk Notes is great fun. There is more than one personal wiki available for iOS – however as a mobile app Trunk Notes is arguably the most powerful, and despite my lack of marketing a search for “personal wiki iOS” on Google has Trunk Notes the first named app in the results. Hopefully 2013 will see Trunk Notes gain more momentum and reach out to more people looking to manage information on their mobile devices.

Apps On The Move

Trunk Notes Early Access Build – minor update

A tiny update to the Trunk Notes for Mac “Early Access Build” is now available. The tiny update refers to it now sorting the page lists so that the most recently changed is at the top. The next non-tiny update will make this configurable and include file watching so that if a page is updated on Dropbox or by another app Trunk Notes will pick that up immediately.

If you are using the previous version it is probably best if you keep it around (and backup your wiki) before trying this – just in case!

Download Trunk Notes for Mac EAB 20120807

Trunk Notes for Mac – Early Access Build

WARNING! WARNING! WARNING! If you don’t want to run potentially buggy, pre-beta, pre-release software on your Mac turn away now!


UPDATE: If you tried the 20120729 build and found searching caused a crash try updating to the 20120730 build (link at bottom of page)

I hope the above warning is dramatic enough to deter users who only want a polished, finished version of Trunk Notes for Mac. Lots of distractions such as my day job, girlfriend, Word Frazzle!, Trunk Notes for iOS, … have colluded to me missing many self imposed deadlines for getting Trunk Notes for Mac finished and released. As such I have decided to throw caution to the wind and release what I’m terming an ‘Early Access Build’. There are some (but not many) additional features to implement and already identified bugs to fix before I would call Trunk Notes for Mac 1.0 a beta, however it might be interesting for some users to have a play with a build now – and not wait another month or possibly more.

Some details about this build:

  • It is sandboxed – which is great for keeping everything secure and partitioned away from the rest of your data and apps. By default all your notes are installed in the sandbox environment. If you want to store your wiki somewhere else set a default location from the preferences.
  • It is developer signed. This way you know that this has come from Apps On The Move (Matthew Kennard).
  • I have been using a slightly earlier build for keeping notes for a couple of months and so far haven’t had too many issues.
  • It isn’t advised that you use this with Trunk Notes for iOS. However, if you really want to and are aware of the consequences (i.e. it might mess up your data), you can hook it up to use a wiki you synchronise using Dropbox. Bring up the preferences, select a custom location for the wiki, and choose the folder containing the notes/ and files/ directories. You will need to restart the Mac app to detect changes to the wiki – however Dropbox will be updated fairly quickly as soon as you save a page.
  • The icon is an example of programmer art – I will be shortly commissioning an icon. However I am interested to hear what people think of the concept, rather than the execution, of the current icon.
  • The only functions implemented are {{image}} and {{lua}}.
  • You need to be running Mac OS X 10.7 or above. This build has only been tested on the GM version of Mountain Lion.
  • Although the preferences indicate that you can change the syntax highlighting style and viewing CSS this isn’t operational in this build. It will be once I have some nice defaults created.
  • Search is very basic – and the pages are listed in no particular order in the sidebar. This is the next feature I will be working on.
  • The list continuation still needs a little work before its really nice to use.
  • This build does not expire – however it is also completely unsupported.

Some tips on using Trunk Notes for Mac:

  • Switch quickly between Markdown and HTML mode using the keyboard shortcut SHIFT+CMD+E. HTML mode and Markdown mode will be renamed to something more friendly in a later release.
  • Use the keyboard shortcuts CMD+[ and CMD+] to go quickly back and forwards in the history. This works in both Markdown and HTML modes.
  • CMD+L will take you directly to the search field.
  • CMD+N creates a new page. Type in the page name, press return and start typing. If you are currently focused on the search field then the search text will be used as the basis for the new page name.
  • To import images or PDFs files into the wiki simply drag them to the Trunk Notes icon on the dock.
  • Clicking an image/PDF on the File: page will open that image/PDF in Preview.
  • There are some Markdown specific editing features. For example select some text and press CMD+B to make it bold. The text stays selected so you can press CMD+B a second time to remove the bold.
  • You can tag notes – bring up the inspector to see the list of tags. The tags applied to the current note will be ticked.
  • If you want to open up a page in another editor simply drag the proxy icon to the icon of the other app.

Finally, what you have been waiting for, is the download link:

I look forward to your feedback. Feel free to email your comments to mgkennard@appsonthemove.com or add to the Apps On The Move forum!

Trunk Notes 2.6.2 – minor Lua change

I have just submitted a minor update to Trunk Notes. In addition to a long overdue fix to sound recording (and support for a compressed format for much smaller recordings) there has been a minor update to Lua.

Lua scripting now knows some basic information about the device it is running on. This was prompted by users asking whether they could have different CSS files for the iPad and  iPhone. With this new Lua feature it should be simple to add this with a little bit of scripting.

Here is the excerpt from the manual describing this new feature:

Lua has access to some information about the device Trunk Notes is running on. This can be useful for customizing your wiki depending on whether it is running on your iPhone or iPad.

A device table in the global environment has the following fields:

  • name – e.g. Matt’s iPad
  • systemName – e.g. iPhone OS
  • systemVersion – e.g. 5.1.1
  • model – e.g. iPad
  • localizedModel – if your locale defines a different name for the device.

For example:

if device.model == "iPad" then
return "This is an iPad!"
return "This is not an iPad"

Trunk Notes scripting

Trunk Notes 2.6.0 is nearly ready for some final testing and release. It is quite a bit speedier than previous versions of Trunk Notes (especially for those with large wikis) and now has it’s own scripting language.

Adding scripting to Trunk Notes makes it even more powerful. Users can now do things in Trunk Notes that could previously only be done in desktop editors. Whilst this is only a starting point there are still lots of things to play with.

The scripting language built into Trunk Notes is Lua, a language ideal for embedding into applications. It is a very small, fast and powerful language which is easy to use and has lots of exciting features. Check out the Lua website for more information.

To whet your appetite here are a couple of examples of Lua scripts in Trunk Notes.

Day/Night example

There are a number of users who have experimented with JavaScript solutions to have Trunk Notes automatically switch between two stylesheets depending on the time of day.

Using the new Lua scripting it becomes possible to do this much more easily – and elegantly.

In my Header page, which gets included in every document, I add a call to a Lua script which will include the relevant stylesheet:

{{lua DayNight.lua}}

This will run the commands contained in the page DayNight.lua and insert the result into the current page.

Here is my DayNight.lua page:

hour = tonumber(os.date('%H'))
if hour < 7 or hour > 20 then
    return "{{stylesheet Night.css}}"
    return "{{stylesheet Day.css}}"

As you can see anything returned from Lua is treated as Markdown and included at the point where the script was called.

Manipulating the wiki

What you couldn’t do in JavaScript, even if you tried really really hard, was create new wiki entries. This is now almost trivial. An example:

-- Create a new wiki page (if this page already exists the new_page will be nil)
new_page = wiki.new('MyNewPage')
-- Put the date in the contents of the page
new_page.contents = os.date()
-- Tag this as Journal and Lua (tags are created if necessary)
new_page.tags = {'Journal', 'Lua'}
-- Save the page
-- Return the page name
return new_page.title

There are also Lua functions for searching the wiki, getting lists of tags and retrieving existing pages. Arguments can be passed to scripts, e.g. {{lua ExampleScript.lua, argument 1, argument 2}} and retrieved through the args array.

Scratching the surface

I’m looking forward to see what new and innovative uses the Trunk Notes community makes of Lua scripting. Trunk Notes 2.6.0 is going through some final testing now before it is submitted to Apple next week (probably).

Keep having fun with Trunk Notes – stay productive!

(Lua scripting will play a big part in making Trunk Notes for Mac a powerful wiki to have on your desktop. Watch this space!)