DayOne to Obsidian script

Hi @dcb

Would you be willing to help another Day One deserter migrate journal entries to Obsidian?

I’m also running macOS Big Sur.

I also have python installed and likewise don’t know how to run the script…

Any guidance would be appreciated.

Sorry that I haven’t seen this until now. Did you get it working? Not sure I can add much more than the instructions already given.

In a terminal window, CD to the folder where you have the script then “python script name”

I used this the other day to import approximately 500 entries from Day One.

A few posts with images ended up with links to non-existent files, but no big deal and easy to fix manually.

Thanks for sharing.

Hi,

I’m trying to use this script but I get errors. I have been able to fix some (I don’t know Python really) but am stuck at
File "splitfile.py", line 40, in <module> with open(fn, encoding='utf-8') as json_file: TypeError: 'encoding' is an invalid keyword argument for this function

Any ideas how to fix this? I’m on a M1 MacBook Pro with the lastest release of Big Sur.

Best regards,
Björn

I think my python installation was messed up somehow. Running the script using Thonny it works fine.

Best regards,
Björn

this script was a lifesaver, thank you VERY much.

The only gotcha I found was that it imported all of my images as JPG files. Since they are primarily PNG, this meant that Obsidian can’t find them. They are IN Obsidian, but whenever a note references them, it uses some other (random, AFICT) string followed by a JPG extension. So I then open DayOne, get the actual file name and replace it in Obsidian. I’m sure there’s a better, faster, more scripted way to fix this, but it works for me.

Thank you again for making this script as I was able to import something like 12,000 entries from DayOne and no longer have to pay their subscription fee. Plus my data is MINE on my machine and backed up by my backup.

Thank you!

1 Like

What you could possibly do – very, very carefully – is use an editor that can replace text across multiple files and replace all .jpg with .png.

One other option to consider if you’re looking to export Day One journals is to use the Bear app as an intermediary. In Day One, export your journals to a JSON file. Import to Bear (Bear has an import function for Day One). Once your journal entries are all in Bear, you can export everything to Markdown. I did this last night for 3,700 journal entries, many with pictures, and it looks like they all came across perfectly.

In my case, I’m evaluating the Craft app as a replacement for Day One, but once Bear produces the markdown files, it should work fine in Obsidian as well.

3 Likes

Just found the script and this thread. I am excited to shift to obsidian.

I just ran the script, with photos in the same folder as the journal. There is some weirdness in the how the tags and first lines are interpreted, but I need to look at it more carefully.

First, the problem of photos. Maybe I am missing something, but do I need to manually copy the photos folder into the obsidian folder?

Thanks for any help with this and sorry for this basic question!

I wanted to edit my post with more info, but cannot, so I am adding here.

An example entry is like this below, but the jpeg is not copied to the directory journal/2016/2016-10 where the .md file is. I presume that is where it needs to be?

Here is the entry:

## `fas:CalendarAlt` Monday, 24 October 2016 at 6:18 PM
![[0039DADC702B4FD4AE8C4BCD5866F623.jpeg]]

---
**Metadata**
- Creation Date: 2016-10-24 18:18:25+01:00 (Africa/Douala)
- Location: [[Maroua, Maroua, Extreme-Nord, Cameroon]]

Ok, so I tested manually copying the whole Photos folder to Obsidian vault and that works, the photos can be anywhere.

So, is there a best practice? At the moment I have this Photos folder, and can browse it in Obsidian and then the photos appear in the notes.

Yes. Otherwise they won’t be found to display.

The beauty of Obsidian is that it can be anywhere in your vault and it will be found. Mine are all in Bins/Photos

Thanks. I now see that there is a feature request to hide folders from Obsidian interface, so I understand how that works now.

Thanks

On a somewhat related note, it is a bit frustrating that the icons package does not work with the live preview, at least that is my understanding.

Thanks again for the script!

1 Like

HI. I’m new to coding etc. When I copy the script over to terminal after entering python3 I get this (attached text).

Last login: Wed Jul 20 10:53:41 on ttys000
[email protected] ~ % python3
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 16:52:21)
[Clang 6.0 (clang-600.0.57)] on darwin
Type “help”, “copyright”, “credits” or “license” for more information.

/Users/sandeepnarayan/Downloads/Obsidian\ Plugins/dayone-to-obsidian-master/splitfile.py
File “”, line 1
/Users/sandeepnarayan/Downloads/Obsidian\ Plugins/dayone-to-obsidian-master/splitfile.py
^
SyntaxError: invalid syntax

Wrap the command with " perhaps?