Convert a Day One JSON export into individual entries for Obsidian with the Google Photos plugin installed. Each entry is created as a separate page.
Additional features from @LucyDYu
- Supports importing videos, PDFs, audios, in addition to photos.
- Allows adding metadata for media, such as photo creation date and location (if available).
- Supports various media types, including jpeg, png, mov, mp4, and so on (audio type is fixed to m4a due to lack of type information in JSON).
- Easy configuration using YAML.
- Displays locations on a map for the entire entry and individual photos, audios, and videos (requires the map view plugin).
- Includes datetime, weather, and tags in the frontmatter.
- Supports additional tags to display in Obsidian separate from other note tags. (default = From/DayOne)
Additional features from @ezratock
- Photos and videos will be uploaded to Google Photos, and just the external link will be kept in your notes as per the Google Photos plugin.
- If a photo or video already in Google Photos seems to match the DayOne export, the script prompts the user to confirm the match instead of reuploading the file
- Supports multiple DayOne journals (DayOne Premium)
Allows renaming untitled DayOne entries with user inputRemoved, see below
Additional features from @tariquesani
- Refactored to use Jinja2 templates, currently only the main entry and photos are converted. I don't have DayOne premium
- Entries now stored as YYYY-MM-DD-Weekday.md in YYYY/MM-MMMM/ folder structure
- Photos, after thumbnail creation stored in YYYY/MM-MMMM/ folder structure as well
- Logging of errors to app.log for easier troubleshooting
- Force upload every photo to Google Photos via config.yaml setting, because at times you need to
- Cleaner.py to detect unuploaded photos
# Hello Obsidian
This is an example entry with a lot of text and media.
## Photo
![[imagefile.jpeg]]
## Audio
![[audiofile.m4a]]
## PDF
![[PDFfile.pdf]]
## Video
![[videofile.mp4]]
filename: Hello Obsidian
---
date: 2018-01-02 18:58:49 Tuesday
weather: City 13°C Mostly Cloudy
tags: From/DayOne, DayOne/Audio
locations:
---
# Hello Obsidian
This is an example entry with a lot of text and media.
## Photo
[![](imagethumbnail.jpeg)](https://photos.google.com/image_in_Google_Photos)
## Audio
Duration: 00:01:48
Date: 2018-01-01T15:24:17Z
Recording Device: iPhone Microphone
Location: [Place, City, Country](geo:latitude,longitude)
![[audiofile.m4a]]
## PDF
Title: PDF title
![[PDFfile.pdf]]
## Video
[![](thumbnails/videothumbnail.jpeg)](https://photos.google.com/video_in_Google_Photos)
Duration: 00:00:21
---
[Place, City, Country](geo:latitude,longitude)
- Python 3
- Obsidian Icons Plugin to display calendar marker at start of page heading
This script works with version 2024.13 of Day One. It has not been tested with any other versions.
DO NOT do this in your current vault. Create a new vault for testing. You are responsible for ensuring against data loss.
This script deletes folders if run a second time (however, choices that the user inputs are saved to the secrets
directory. This means the script can be stopped midway through and picked back up at any time).
This script renames files.
This script resizes images in the DayOne export (to max 400x400 by default).
- Export your journal from Day One in JSON format
- Expand that zip file
- Adjust the ROOT variable in
config.yaml
to point to the location where your zip file was expanded and Journal.json exists. You should also have several media folders here if there were photos audios etc in your journal. Additional settings can also be configured inconfig.yaml
. - Adjust the GOOGLE_PHOTOS_CREDS variable in
config.yaml
to point to the location of your Google Photos API Credentials JSON as shown below.-
In your Google Cloud Console, click
Photos Library API
(which should already show up if you followed the instructions to install the Google Photos plugin in Obsidian) -
Click
CREDENTIALS
>CREATE CREDENTIALS
>OAuth client ID
-
Choose
Desktop app
and clickCREATE
-
Click
DOWNLOAD JSON
-
Adjust the GOOGLE_PHOTOS_CREDS variable in
config.yaml
to point to that JSON file. It makes sense to save your credentials JSON in the secrets/ directory because then it will already be added to .gitignore
-
- If you not are using the Icons Plugin to display calendar marker at start of page heading set icons = False
- Run the script
- Change to the project directory:
cd /path/to/dayone-to-obsidian
- Install the required dependencies:
This command will install the necessary packages listed in the
pip install -r requirements.txt
requirements.txt
file. Alternatively, you can use:python3 -m pip install -r requirements.txt
- Run the
splitfile.py
script:python splitfile.py
- Change to the project directory:
- Check results in Obsidian
- If happy, move the folders to whatever vault you want them in.
- Processes all entries, including any blank ones you may have.
- If multiple entries on a day, each additional entry is treated seperately
- Adds metadata for whatever exists
- Location
- Datetime
- Tags
- Weather
- Tags can be prefixed (default = DayOne/) to show as subtags in Obsidian separate from other note tags
- Photos and videos inserted as Google Photos links