Day One Markdown



Using Markdown tables in Day One is a great way to keep track of your weight loss, height, and other body measurements. Converting DayOne journals into markdown files. Work in progress. Export you DayOne journal as JSON and unzip the folder. Put the script in the unzipped folder. Run the script./do2md.py Journal.json; Results: Each entry is now converted to an MD file. Name of the file is the date-time of the entry. A title is added as the date-time.

Update: After writing this post, I built a tool to help encode these templates. See the bottom of this post for more info.

After posting my Beer Log action for Launch Center Pro yesterday, I got a couple of questions about how to generate those pretty tables in Day One.

Day One has extensive support for rendering Markdown. In fact, it supports MultiMarkdown, which is a superset of Markdown that includes some additional goodies like footnotes and–most importantly–tables.

Even though you can create tables with Markdown, most people don’t. The syntax is really quite ugly. Here’s an example:

One

Ew.

The inimitable Dr. Drang wrote a detailed explanation of Markdown tables, so I’ll link to that here rather than try to write my own explanation. His is quite good.

Deconstructing the coffee log

Day One Markdown Book

The raw Launch Center Pro (LCP) action that Ben Tsai released is URL-encoded. It has to be in order for LCP to understand it. For us to customize it, it would help to decode it. You can do this in one of several ways. TextTool for iOS has encode and decode functions. For creating the Beer Log, I used this web-based tool by Eric Meyer.

Day One Markdown Pdf

Here’s the original Coffee Log after decoding:

Now that we can read the Markdown table syntax, customizing the table is pretty straight-forward. Note the fields inside square brackets. Those are specific to LCP.

Before installing it in LCP, you’ll need to re-encode your action again once you’re done tweaking it. This is where it gets tricky. Microsoft access database help.

Re-encoding

You can’t just re-encode the entire string. Looking back at Ben’s action, parts of the URL are encoded, and other parts aren’t.

One

If it were completely encoded, it would look like this: All nexus expansions free.

One

Virtual pc v5.0 download. See the difference? It’s the square brackets (and everything inside them).

If the square brackets end up encoded along with the rest of the string, LCP won’t understand it. You won’t get any prompts or lists, and your action will silently fail, or the app will throw an error.

Instead, you’ll have to encode your string piece by piece. Encode everything that isn’t inside square brackets, and piece your URL together.

Yes, it’s a pain, but I haven’t found an easier way to go about it. You’ll probably have to debug syntax errors along the way, but if you’re careful, it shouldn’t take long to get the hang of it.

Update: This app can handle the encoding for you. You can build your entire table in the editor, then click the Encode Template button. Code for the app is available on GitHub.