Trunk Notes – My Recipe Book

I store many different types of note in Trunk Notes. I plan my working week, keep track of bills and jot down new app ideas.

However my most popular tag is Recipes.

photo
The tag cloud from my HomePage

I am forever copy/pasting recipes from websites, but I also have some of my own creations.

Here is the Markdown for a simple pasta recipe I prepared and ate this evening. Since I didn’t get home until nearly 8pm and I wasn’t cooking for my girlfriend tonight this serves one person and can be ready in about 15 minutes…

SimpleMushroomChorizoPasta

Serves: 1

# Ingredients

 * 1 small onion, roughly chopped
 * 1/2 tin of chopped tomatoes
 * 1 large portobello mushroom, chopped
 * some chopped chorizo sausage
 * garlic infused olive oil
 * glug of red wine
 * some pasta
 * 1/2 teaspoon of mixed herbs
 * sea salt, pepper to taste

# Method

 1. Boil a kettle of water for the pasta
 1. In a large saucepan dry fry the chorizo sausage for a couple of minutes (might start smoking a little) - medium to high heat
 1. Add the mushroom and fry for a minute more. Make sure the mushroom is coated in the oil from the sausage
 1. Add the garlic infused olive oil and onion then saute on a lower heat for 2-3 minutes
 1. Throw the red wine into the pan together with the mixed herbs - should be bubbling
 1. Whilst the wine is being absorbed pour the hot water from the kettle into another saucepan together with some salt. Once the water is boiling nicely add the pasta and simmer for ten minutes (or whatever it tells you on the back of the packet)
 1. As soon as the pasta has been dropped into the water add the tin of chopped tomatoes to the sausage, mushrooms and onion. If you like add some salt and pepper. Stir every couple of minutes and make sure the heat isn’t too high that the sauce dries up
 1. When the pasta is ready drain all but a couple of tablespoons of the water. Toss the pasta with the sauce and serve

I apologise for “some pasta” and “some chopped chorizo sausage” – I use whatever feels appropriate for my hunger!

 

Snippets!! How to use the new !! snippet feature in Trunk Notes

Snippets are a feature of Trunk Notes to help you enter text quickly on your iPhone and iPad. In this blog post I will show you how snippets can help you quickly insert the current date/time and aid your creativity.

Some characters are quicker to type than others, especially on the small keyboard on the iPhone. If you want to insert some Markdown into Trunk Notes often defining a snippet can hugely speed up text entry. For example I have a snippet with the name Snippet:l. When I type lxx (that is the snippet name, without the Snippet: prefix, and the execute text xx) Trunk Notes inserts and puts the cursor just before the >. Much quicker than switching keyboards to find all the punctuation symbols.

Trunk Notes has had support for this kind of snippet for some time. In 2.4.2 snippets were made even more powerful by allowing you to define snippets with dynamic content in which is ‘executed’ before being inserted.

Timestamps

One obvious use for this is inserting a timestamp. I can type in txx and Trunk Notes will insert the current date and time.

To create a timestamp snippet follow these steps:

  1. Create a new wiki page with the name Snippet:t
  2. Enter the text !!{{timestamp}} and tap Save

Now when you type txx into a note Trunk Notes will expand the dynamic content {{timestamp}} and insert the date (and time depending on your settings) into your note. Without the !! Trunk Notes would just insert the text {{timestamp}}.

To create a custom timestamp you can supply arguments to the timestamp function.

Here are some examples:

  • !!{{timestamp yyyy dd/MM}} might insert 2011 10/02 (that is year day/month)
  • !!{{timestamp HH:mm}} for 21:52 (hour:minute)
  • !!{{timestamp EEEE}} for Thursday (the day name)

The timestamp function is really flexible. For full details on what all the codes are you can use see unicode.org.

Randomness

Here is something you might find fun (or maybe even useful if you are a creative type.)

If you are writing something and are stuck for the ideal word to use why not have Trunk Notes pick one for you at random.

The first task is to come up with a list of words which you want Trunk to pick from at random. I created a page called Adjectives and added the following (you may want to use a much longer list):

adorable
average
bright
gleaming
magnificent
prickly
repulsive
teeny-tiny
yummy

I then created my snippet. I called it Snippet:adj (so I can then type in adjxx and have my random word inserted). Snippet:adj contains the following text:

!!{{random Adjectives}}

Now whenever I type in adjxx Trunk Notes will insert a random adjective. Excellent if you use adorable magnificent Trunk Notes for writing short stories or poems!

How might you use !! ??

These are just two suggestions for using the !! snippets feature. If you find a cool use of !! let us know in the comments or start a forum thread.

 

A quick look at the Trunk Notes web server

Trunk Notes is great for viewing and editing a personal wiki on your iPhone and iPad. One feature that really makes it stand out from other note taking apps is its built in web server.

For creating or editing longer notes or quickly copying/pasting information on your computer the Wi-Fi Sharing feature really helps. It activates the web server that comes with Trunk Notes and allows you to use Trunk Notes from your web browser. All you need is Trunk Notes running on your iPhone or iPad and a computer with a browser on the same wi-fi network.

Start by putting Trunk Notes into Wi-Fi Sharing mode. Tap the action button on the toolbar and choose Wi-Fi Sharing:

iOS SimulatorScreenSnapz001

Trunk Notes will tell you the address on which it can be contacted. Here the address is http://192.168.1.102:10000

iOS SimulatorScreenSnapz002

You can now go to your web browser and type in this complete address:

SafariScreenSnapz001

By default Trunk Notes comes configured with a username and password. If you haven’t changed then in the Settings app on your iOS device then enter the defaults – trunk and password.

SafariScreenSnapz002

You should now see your Trunk Notes HomePage in your browser.

LittleSnapperScreenSnapz001

You can browse your wiki just like you do on your iOS device. Here is a quick overview of what’s being shown to you:

  1. This is the name of the current page being displayed. Notice that the page name is surrounded by [[ ]]. [[ ]] in Trunk Notes is used to explicitly indicate a link to another page. Note that you don’t need to use this but some people think it makes what is a link clearer.
  2. Click here to always return to your home page
  3. If you want to edit the text on a page click the Edit button
  4. For a quick listing of all the pages in your wiki click All Pages
  5. This allows you to search your wiki and create page. More about this in a moment…
  6. Export HTML creates a zipped copy of your wiki which you can save to your computer, uncompress and browse in a web browser. You can even upload the HTML pages in here directly to your website
  7. Backup creates a zipped copy of your wiki but just the raw text of each note. So rather than the formatted displayed version of each page you will get the Markdown source code
  8. Upload gives you the ability to upload text files to your wiki and restore a backup you have taken previously
  9. A quick overview of any tags that this page might have. In this example the page has no tags
  10. The page content itself. The same styles that appear on your iPhone/iPad will appear in your browser

Editing a page

When you click Edit you will be taken to the edit view.

SafariScreenSnapz005

The edit view is split into three main sections.

The first section is the list of tags which you can apply to a page. Simply tick or untick those tags which you want a page to have. You must click Save for these to take affect.

The second section is the page text. This is the same Markdown text you see on your iPhone/iPad. A toolbar at the top can help you with bold, italics, adding links and creating lists.

The last section is a preview of how the page will look when viewed. This updates in realtime as you edit the text at the top. One caveat here is that the parsers on the device and in the web browser work slightly differently so the preview may not match exactly how the page will look – but it should be pretty close.

If you want to cancel any changes you have made then do so by clicking Cancel.

Searching

You can very quickly search your entire wiki by typing some text in the search field and clicking Search or pressing the return key.

In this example I have searched for the work prawn.

SafariScreenSnapz006

Trunk Notes tries to make it as clear as possible what has been matched.

First comes any pages which have the exact title entered. Since I don’t have a page called Prawn I am given the opportunity to create one.

Next comes any pages whose titles start with the word prawn. Here I have one match PrawnPeaTomatoCurry. You can see when that page was last edited and how popular that page is.

Finally comes any pages which have the string prawn anywhere in their content or title. The pages are listed in order of most recently edited – the top match being one I had for dinner about an hour ago, very tasty! You can also see that the top two recipes featuring prawns are AsparagusMintLemonRisotto and SpicyPrawnCurry. The OnePanPrawnAndTomatoCurry wasn’t that great.

I hope now that you can see how powerful the Trunk Notes Wi-Fi Sharing mode can be. I often edit quite large pages using this and capture snippets of useful text from web pages. If you fit Trunk Notes Wi-Fi Sharing mode into your work flow let me know in the comments!

 

Trunk Notes 2.4.3

Trunk Notes 2.4.3 has been submitted to Apple for approval. This release contains a few bug fixes and some minor enhancements.

The changes include:

  • Random function now evaluates wiki functions before displaying line
  • Full text search now only requires two or more characters
  • Fixed: Fix for case insensitive searching for some international characters
  • Fixed: Inline CSS now correctly handled
  • Fixed: functions correctly expanded in blockquotes

The text search change will prove useful for users of languages such as Chinese, and the improved case insensitive searching should help you if you speak Russian or other languages which previously slightly confused Trunk Notes. Thanks to a Trunk Notes user, Peter, for helping sort this out.

The modified random function will allow you to pick lines at random from pages containing other dynamic content.

The most interesting thing that Trunk Notes 2.4.3 allows you to do is more advanced CSS styling.

For example you might always want a list of back links displayed at the bottom of each wiki page. So you define Special:Footer to have the text {{backlinks}}. This however will show a bulleted list of backlinks taking up room on the page.

What would be nicer is to have the back links listed horizontally and in a smaller font.

In 2.4.3 this is (sort of) easy. Here is my Special:Footer (whose text remember is appended to the bottom of every page),

Screen Shot 2012 08 18 at 21 01 59

It starts off with a horizontal line (the —–). What then follows is a CSS style. This is how in web pages you define how something appears – colours, fonts, borders, etc. There are lots of references on the web if you aren’t familiar with CSS.

Finally comes the backlinks function. A special syntax is used to apply the style defined above so the back links appear differently. The line starts with a ‘>’ and then has the style name with %’s either side. Anything that appears immediately below which also has a ‘>’ at the start of the line will have this style applied.

Here is what it might look like:

Screen Shot 2012 08 18 at 21 02 09

Not a terribly exciting screenshot but you get the idea. This technique works both on the device and in Wi-Fi Sharing mode.

I look forward to seeing how far users might take this technique.