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永不抽风
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
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
Yuque2md - Offline download the markdown file and image from yuque

yuque2md 按照语雀知识库里的目录,导出语雀知识库中所有的markdown文档,并离线图片到本地 使用 安装 Python3.x clone 项目 下载依

JiaJianHuang 4 Oct 30, 2022
markdown2: A fast and complete implementation of Markdown in Python

Markdown is a light text markup format and a processor to convert that to HTML. The originator describes it as follows: Markdown is a text-to-HTML con

Trent Mick 2.4k Dec 30, 2022
Markdown Presentations for Tech Conferences, Training, Developer Advocates, and Educators.

March 1, 2021: Service on gitpitch.com has been shutdown permanently. GitPitch 4.0 Docs Twitter About Watch the Introducing GitPitch 4.0 Video Visit t

David Russell 5.4k Jan 05, 2023
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
😸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
Comprehensive Markdown plugin built for Django

Django MarkdownX Django MarkdownX is a comprehensive Markdown plugin built for Django, the renowned high-level Python web framework, with flexibility,

neutronX 740 Jan 08, 2023
A super simple script which uses the GitHub API to convert your markdown files to GitHub styled HTML site.

A super simple script which uses the GitHub API to convert your markdown files to GitHub styled HTML site.

Çalgan Aygün 213 Dec 22, 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
A command line tool that can convert Day One data into markdown files.

Introduction Features Before Start Export data from Day One Check Integrity Special Cases for Photo Extension Name Audio Extension Name Usage Known Is

gyro永不抽风 26 Dec 31, 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
Pure-python-server - A blogging platform written in pure python for developer to share their coding knowledge

Pure Python web server - PyProject A blogging platform written in pure python (n

Srikar Koushik Satya Viswanadha 10 Nov 07, 2022
Extensions for Python Markdown

PyMdown Extensions Extensions for Python Markdown. Documentation Extension documentation is found here: https://facelessuser.github.io/pymdown-extensi

Isaac Muse 685 Jan 01, 2023
Provides syntax for Python-Markdown which allows for the inclusion of the contents of other Markdown documents.

Markdown-Include This is an extension to Python-Markdown which provides an "include" function, similar to that found in LaTeX (and also the C pre-proc

Chris MacMackin 85 Dec 30, 2022
Markdown journal template.

Markdown Journal Template Description This project contains a script which creates a markdown journal template for the current year by creating a mark

Stephen McAleese 2 Mar 06, 2022
Converts a grading Excel sheet into Markdown documents.

GradeDocs Turns Excel worksheets into grade/score documents. Example Given such an Excel Worksheet (see examples/example.xlsx): The following commands

Patrick Bucher 1 Dec 19, 2021
A Python library to retrieve annotations and notes from Zotero and save them into Markdown files.

Zotero to Markdown Generate Markdown files from Zotero annotations and notes. With new Zotero PDF Reader, all highlights are saved in the Zotero datab

Essi Alizadeh 20 Nov 03, 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