Uploading files to Trunk Notes using your web browser

The publicised way of getting a PDF file, or other type of file, into Trunk Notes is to use iTunes File Sharing. However if you are on a computer which doesn’t have iTunes – or you avoid iTunes – then don’t worry there is another way.

The first step is to put Trunk Notes into Wi-Fi Sharing mode. Simply tap the action button in the bottom right hand corner of the screen, and select Wi-Fi Sharing.

Photo 1 Photo 2

You will be given a web address to enter into your web browser on a computer on the same network. For me the address is http://192.168.1.110:10000

If you are asked for a username and password, and haven’t changed it in the Settings app, enter trunk and password.

To upload a file click the Upload button.

HomePage  Trunk Notes

You will now be given the opportunity to choose the file to upload. Once you have done this click Upload File.

Upload Restore Backup  Trunk Notes 1

When the file has been successfully uploaded you will be given the rather terse message ‘OK’. (This feature needs a little more work before it is made properly public in the manual!)

If now look at the list of pages in your wiki a new one will have been created representing the file. Tapping that entry will show you a thumbnail. Tap the thumbnail to view the whole of the file.

Photo 3 Photo 4

The new Trunk Notes theme – Love or Hate?

I slipped in an updated default theme into Trunk Notes 2.5.3.

The idea was to make links to wiki pages stand out more and be more easily distinguishable from web links.

Some emails have suggested that the old, cleaner, theme should be reintroduced – or at least there should be an easy way to switch between them.

In case you aren’t sure what I’m talking about here is the old theme (on the left) vs the new theme (on the right):

IOS SimulatorScreenSnapz004IOS SimulatorScreenSnapz003

The wiki page links are now highlighted in yellow surrounded by a rounded border. Top level titles have an underline, and the default font has changed from Arial to Trebuchet MS.

If you are someone who thinks the new style should be scrapped let me know! If you think it is an improvement let me know!

You can revert the style by turning on the custom stylesheet. To do this carry out the following steps:

  1. Tap on the Settings app (from the home screen with all your apps on)
  2. Scroll down until you find the settings for Trunk Notes
  3. Turn on “Custom Stylesheet”
  4. Double tap the (physical) home button on your device
  5. Hold down your finger on Trunk Notes then tap the – indicator button
  6. Go back into Trunk Notes and in the search bar type Special:SetStyleSheet
  7. Edit the page
  8. Remove all the text
  9. Paste the old stylesheet text into the page, then click Save. (The old stylesheet text is at the end of this blog post)

So if you detest the new style and want the simpler look of Trunk Notes 2.5.2 it is (fairly) easy to switch back. If I get enough comments pointing to the new style being horrible then I will bring back the old style in the next version of Trunk Notes.


Old stylesheet text:

body {
    font: medium Arial;
    font-size:16px;
    background-color: white;
    margin:0;
}

h1 {
    font-weight: bold;
    font-size: 20px;
}

h2 {
    font-weight: bold;
    font-size: 18px;
}

h3 {
    font-weight: bold;
    font-size: 16px;
}

#info {
    font: medium Arial;
    background: #CFCFCF;
    font-size: 12px;
    padding-left: 4px;
    margin-bottom: 0px;
    padding-top: 2px;
    padding-bottom: 2px;
    height: 14px;
}

.highlight {
    background-color: yellow;
}

.highlight-selected {
    background-color: red;
}

#contents {
    margin-top: 0px;
    padding-left: 8px;
    padding-right: 8px;
}

table {
    margin: 1em;
    border-collapse: collapse;
    width: 90%;
}

td, th {
    padding: .3em;
    border: 1px #ccc solid;
}

thead {
    background: #ccc;
}

a {
    text-decoration: none;
}

a.wiki-link {
    text-decoration: underline;
    border-bottom: none;
}

a.missing-wiki-link {
    color: red;
}

html {
    -webkit-text-size-adjust: none;
}

OmniOutliner to Markdown

I was doing some planning with OmniOutliner yesterday. I haven’t used it for over two years but decided it was a good fit for the task I had to do. Once I had created my outline I decided I wanted to add it to my Trunk Notes personal wiki.

Excitedly I saw a plugin for OmniOutliner to do exactly that – http://fletcherpenney.net/multimarkdown/. After a little playing I was impressed by all the features and the information available on the site and in the user’s guide. However the opml2mmd tool only included the first column. My reason for using OmniOutliner was the support for multiple columns.

OmniOutliner can export in a variety of formats. One of the simplest is Plain Text with tabs. This includes all the columns and even the column headings. Five minutes later I had a little Python script which easily handles my OmniOutliner document and converts it into sensibly formatted Markdown. I want columns two and above to appear as a bulleted list underneath the heading.

Here is an example OmniOutliner document (not the one I was working with, but it has the same format):

NewImage

As you can see I have three columns, and have included a note. I now export the document in the format Plain Text (with tabs) and run my Python script. Here is the resulting Markdown:

NewImage

The Python script is very quick and dirty (no error handling or proper command line arguments):

#!/usr/bin/env python


"""
Convert an export OmniOutliner (plain text with tabs) document to Markdown

@author: Matthew Kennard <mgkennard@appsonthemove.com>
"""

import sys

outline_path = sys.argv[1]

lines = open(outline_path).readlines()
column_headings = lines[0].strip().split('t')

for line in lines[1:]:
    # Get number of tabs at the start
    tabs = 0
    for c in line:
        if c != 't':
            break
        tabs += 1
    # Remove the tabs
    line = line.strip('t')
    if line.startswith('- '):
        # A branch
        line = line[2:]
        line = line.strip()
        if not line:
            continue
        columns = line.split('t')
        print '%s %s' % ('#' * (tabs + 1), columns[0])
        print
        for i, column_heading in enumerate(column_headings[1:]):
            column_n = i + 1
            if column_n < len(columns):
                print ' * %s: %s' % (column_headings[column_n], columns[column_n], )
        print
    else:
        # A note
        print line.strip()

I’m now happy that I can export my OmniOutliner planning documents and have them available on my iPhone in Trunk Notes.

The beauty of open formats (such as plain text or OPML which OmniOutliner also supports) is the ease with which you can convert your data for use in other applications. If you use Trunk Notes with other applications let me know!

The Importance Of Plain Text

Trunk Notes is just one of many iPhone/iPad apps that make a big thing of plain text. This is a refreshing trend. In the not too distant past it was all about proprietary file formats. If you used an obscure program ten years ago you will likely find it difficult or impossible to open your saved files today without resorting to hackery.

Thankfully times have changed and now it’s all about interoperability. Most modern programs, particularly on the Mac, make use of open file formats and offer multiple ways in which data can be exported. Many people steer well clear of programs which lock data in. With the rate of innovation who in their right mind would spend time building up a vital store of data in an app from which there is no way out?

Plain text is the ultimate in open file formats. A text file is something that can be viewed without the need for any software over and above what comes with your operating system. It’s also hard to think of a modern system which won’t also allow you to edit text files out of the box (just don’t try using Notepad on Windows and expect sanity!)

It’s often the case that once you introduce formatting of text (bold, italics, different sizes of font) you lose the ability to use plain text. The rise though of simple mark up languages – Markdown, Textile, … – provide an opportunity to keep things simple and still use plain text. The great thing about Markdown and other similar syntaxes is that most examples are perfectly readable even if you don’t know what Markdown is or that the text is anything other than plain text. After a while writing in Markdown becomes second nature.

Who would have trouble reading the following?

# To do lists

Stuff to do at the weekend:
 * Research buying a new car
 * Buy food for Saturday dinner party
 * Clean **toilet** and bath

Trunk Notes stores it’s text data internally in an SQLite database. However you can quickly export all your wiki pages as individual text files. You can also sync text files to a Dropbox account. Images, sounds and other files can be retrieved via iTunes File Sharing or again via Dropbox. Of course I hope that Trunk Notes users never feel the need to move to another app – but if they do then it should be very simple to get their data out of Trunk Notes in a sensible format.

In summary make sure that the apps and programs you trust with your notes and other data don’t stop you from migrating your information somewhere else in the future.

Getting More Out Of Trunk Notes

Trunk Notes is many things – a simple note taking app, an advanced personal wiki, a journaling tool, a place of private information, an iPhone app, a web server in your pocket. There are lots of places from which you can learn more about Trunk Notes. This blog post will give a brief run down of sources of information for getting more out of this powerful app.

SafariScreenSnapz004

First up is the Apps On The Move website. It gives a brief overview of the features in Trunk Notes and a link to the manual.

In addition to the manual (which comes with Trunk Notes) are some extra tools – Mac OS X command line decryption program/TextMate bundle, and Trunk Sync.

IOS SimulatorScreenSnapz012 IOS SimulatorScreenSnapz013

The Trunk Notes app on your iPhone/iPad/iPod Touch has lots of documentation built in. Just tap on the action button in the bottom right hand corner and choose help. You can then easily access the user guide, Markdown syntax, advanced formatting, dynamic content functions and the forum. There is also a handy getting started guide.

SafariScreenSnapz006

The iPad 2 Project Book has a whole chapter on getting started with Trunk Notes. It is a great place if you are a beginner in the world of personal wikis. It also has some excellent information about GarageBand, creating movies on your iPad and more. You can download a sample chapter and the index from the publishers website.

SafariScreenSnapz005

If you want information on more advanced usage the forum is a great tool. I have been astonished with what some users have done with Trunk Notes. Some of the highlights from the forum include:

SafariScreenSnapz007

Trunk Notes uses Markdown to help format your wiki pages. There are loads of great resources available. Try typing in Markdown into Google and start browsing. Some of the most useful include:

SafariScreenSnapz008

The final source of information I am going to mention is blogs. The Apps On The Move blog has a whole host of articles on doing cool stuff with Trunk Notes. There are also other blog articles written by others scattered around the Internet (this one is cool for Mac users)

I hope the links in this blog post have given you some useful sources of information and ideas about how you can get the most out of Trunk Notes. If you have any sources you would like to add please add them to the comments below.