A command line tool that can convert Day One data into markdown files.

Overview

Introduction

A command line tool that can convert Day One data into markdown files.

Features

Following metadata are supported:

  • Creation Date
  • Modification Date
  • Device Model
  • Operating System
  • Day One UUID
  • Time Zone
  • Starred
  • All Day
  • Pinned
  • Device
  • Hashtags
  • Activity
  • Walking Steps

Example preview:

These are implemented through css and html tags, so are not able to be previewed on GitHub.

Audios and videos are also supported. Some markdown editor might not be able to preview badges, audios, and videos. In this case, converting to HTML is recommended. As long as the browser supports and tags, those media would be rendered.

Before Start

Export data from Day One

The first step is to export data from Day One.

Goto Settings -> Import/Export -> Export Day One JSON (.zip) and you should click on include media files.

Wait for couple of seconds (hours, I hate the iCloud service in mainland China), and you would get a zip file.

Check Integrity

Note that, the data you dumped might be damaged, and some files may be missing. To continue, it is recommended to use the tool provided to check data integrity.

$ python3 .\resource_checker.py check --help     
Usage: resource_checker.py check [OPTIONS] DIRECTORY

  Check data integrity. Only photos, audios, and videos are supported.

  ARGUMENTS:

  * DIRECTORY: path of unzipped Day One data

Options:
  --help  Show this message and exit.

If some files are missing, don't worry. The tool will tell you the md5 hash of the file, and you can search through the JSON data and find in which entry the data is located. For example, if you've found ad7f659d748c1a41c753907c6946eb03 is located in the following data,

{
	"creationDate" : "2020-10-01T13:21:01Z",
	"photos" : [
		{
		"orderInEntry" : 5,
		"md5" : "ad7f659d748c1a41c753907c6946eb03",
		// ...
		}, 
		// ...
	],
	// ...
}

It implies that the file you are looking for is a photo, and is located in the 2020-10-01 entry, and is the (5 + 1) th asset in the entry.

Now the only thing to do is to find out the photo, and rename it to its md5 hash value and then copy it to the ./photo folder.

Special Cases for Photo Extension Name

Note that in some circumstances, the extension name of the image you found is different from the type field in the image json. Feel free to change the dumped data. The checker program will calculate the md5 value for each file indexed, and will inform you if anything is going wrong.

e.g. If the image you found have the png extension, and the json data looks like the following:

"photos" : [
	{
	"orderInEntry" : 5,
	"md5" : "ad7f659d748c1a41c753907c6946eb03",
	"type": "jpeg", // feel free to change to "png"
	// ...
	}, 
	// ...
],

Audio Extension Name

Most audios have m4a as extension name. However, the dumped json data might have aac as the value of format field:

"audios" : [
	{
		"fileSize" : 372838,
		"orderInEntry" : 4,
		"duration" : 55.68,
		"favorite" : false,
		"format" : "aac", // Here it is
		"md5" : "3c93e9d7389628f6b364e1b2029cd046",
		// ...
	}
]

Feel free to change it into m4a. The only rule is that you should keep the extension name of audio files and format field value the same.

Usage

$ python3 .\converter.py convert --help
Usage: converter.py convert [OPTIONS] DIRECTORY

  Convert dumped data to markdown files        

  ARGUMENTS:

  * DIRECTORY: path of unzipped Day One data   

Options:
  --help  Show this message and exit.

The converted files are located in the ./markdown folder relative to Day One data folder.

Known Issues

Following formats are not supported, 'cause I am not subscribing the app any more. If any one is interested in supporting those formats, feel free to send me dumped data, and I will take a look on them.

  • Sketch
  • File
  • Scan
  • Template

Some text attributes cannot be retained, for example red text, because they are not exported explicitly in dumped data, neither in text field, nor in richText field.

TODO

  • Location
  • Weather
Owner
gyro永不抽风
OIer | Amateur Programer | osu! | 宅 | 高三
gyro永不抽风
WyPyPlus is a minimal wiki in 42 lines of Python code.

🍦 WyPyPlus: A personal wiki in 42 lines of code 🍦 WyPyPlus (pronounced "whippy plus") is a minimalist wiki server in 42 lines of code based on wypy

Leo Chen 8 Apr 07, 2022
Lightweight Markdown dialect for Python desktop apps

Litemark is a lightweight Markdown dialect originally created to be the markup language for the Codegame Platform project. When you run litemark from the command line interface without any arguments,

10 Apr 23, 2022
😸Awsome markdown readme for your profile or your portfolio

GitHub Profile Readme Description That's a simple and minimalist README.md for your profile Usage You can download or copy to your repository and make

0 Jul 24, 2022
A Discord Bot for rendering Markdown

Markdown to PDF Bot A discord bot that accepts markdown files (or messages) and displays them as images. Prerequisite To install, you must have have :

1 Oct 21, 2021
A Python implementation of John Gruber’s Markdown with Extension support.

Python-Markdown This is a Python implementation of John Gruber's Markdown. It is almost completely compliant with the reference implementation, though

Python-Markdown 3.1k Dec 30, 2022
Application that converts markdown to html.

Markdown-Engine An application that converts markdown to html. Installation Using the package manager [pip] pip install -r requirements.txt Usage Run

adriano atambo 1 Jan 13, 2022
A lightweight and fast-to-use Markdown document generator based on Python

A lightweight and fast-to-use Markdown document generator based on Python

快乐的老鼠宝宝 1 Jan 10, 2022
Toci is a markdown tool to generate an outline from a given Jupyter notebook.

Toci is a markdown tool to generate an outline from a given Jupyter notebook. It traverses the markdown cells of a given ipynb file to form a toc for you.

Hakan Özler 7 Jan 22, 2022
A automated python script that creates mark-down files to read for the aes keys and other useful information.

Archive A automated python script that creates mark-down files to read for the aes keys and other useful information. Table of Contents Benbot Automat

Tector 13 Dec 14, 2022
A markdown lexer and parser which gives the programmer atomic control over markdown parsing to html.

A markdown lexer and parser which gives the programmer atomic control over markdown parsing to html.

stonepresto 4 Aug 13, 2022
A fast yet powerful Python Markdown parser with renderers and plugins.

Mistune v2 A fast yet powerful Python Markdown parser with renderers and plugins. NOTE: This is the re-designed v2 of mistune. Check v1 branch for ear

Hsiaoming Yang 2.2k Jan 04, 2023
Mdformat is an opinionated Markdown formatter that can be used to enforce a consistent style in Markdown files

Mdformat is an opinionated Markdown formatter that can be used to enforce a consistent style in Markdown files. Mdformat is a Unix-style command-line tool as well as a Python library.

Executable Books 180 Jan 06, 2023
Rich-cli is a command line toolbox for fancy output in the terminal

Rich CLI Rich-cli is a command line toolbox for fancy output in the terminal, built with Rich. Rich-cli can syntax highlight a large number of file ty

Textualize 2.5k Jan 02, 2023
An automated scanning, enumeration, and note taking tool for pentesters

EV1L J3ST3R An automated scanning, enumeration, and note taking tool Created by S1n1st3r Meant to help easily go through Hack The Box machine and TryH

14 Oct 02, 2022
A minimal platform for Markdown-based blogs

madblog This project provides a minimal blogging platform based on Markdown files. Demos This project powers the following blogs: Platypush My persona

Fabio Manganiello 2 Aug 02, 2022
Preview GitHub README.md files locally before committing them.

Grip -- GitHub Readme Instant Preview Render local readme files before sending off to GitHub. Grip is a command-line server application written in Pyt

Joe Esposito 5.9k Jan 08, 2023
Mdut: a tool for generating Markdown URL tags

mdut mdut (pronounced "em-doot") is a tool for generating Markdown URL tags. It

Nik Kantar 2 Feb 17, 2022
A Straightforward Markdown Journal

Introducing Pepys: A straightforward markdown journal "It is rightly made for those who love to document their daily life events" - FOSSBytes Pepys is

Luke Briggs 23 Nov 12, 2022
CiteURL is an extensible tool that parses legal citations and makes links to websites where you can read the cited language for free.

CiteURL is an extensible tool that parses legal citations and makes links to websites where you can read the cited language for free. It can be used t

15 Dec 27, 2022
Static site generator that supports Markdown and reST syntax. Powered by Python.

Pelican Pelican is a static site generator, written in Python. Write content in reStructuredText or Markdown using your editor of choice Includes a si

Pelican dev team 11.3k Jan 05, 2023