Exporting Aeon Timeline 3 to Obsidian

A year ago, I wrote a Python script that creates several Aeon 3 reports in Markdown format:

Now there is also a script that creates a whole set of Markdown files that are linked to each other according to the “Participant” and “Location” relationships in Aeon Timeline 3.

With Obsidian, an exported event page looks like this:

For me, it’s just a proof of concept. Maybe someone would like to play around with it.

Have fun!

3 Likes

That’s so cool! I love it!

I hope one day this could sync with Aeon, and tweaking the data in one would update the data in the other. That would be perfect!

1 Like

At the moment, I can read .aeon files, but I cannot write them (in contrast to Aeon Timeline 2 .aeonzip files, which I can synchronize with yWriter, for example).

For details, see this discussion thread:

Currently, in aeon3obsidian.py is a lot of code that is reused from Aeon 3 to yWriter export. This is why the export is limited to a yWriter-like data structure. The development potential therefore lies in exporting all user-defined structural elements and relationships as far as possible.

Another problem, which would also apply to an Aeon 3 internal synchroniser, is that Aeon Timeline has a fixed data structure, whereas Obsidian only has a set of interlinked files with free-form content. I imagine that reconstructing a hierarchy backwards from this would be complicated and error-prone.

1 Like

Another day of vacation has passed and I have rewritten the program from scratch. Now it creates a page for each element of the Aeon 3 timeline project and includes all relationships when linking.
The Aeon example of “Murder on the Orient Express” is really fun to browse with Obsidian.

1 Like

That’s cool! I see Obsidian has released the JSON format used for canvas documents. That might be fun to experiment with.

For those who are still using Aeon Timeline 2, I also made an Obsidian exporter today:

The conversion result of the Murder on the Orient Express example timeline looks very similar to the pages exported from Aeon 3:

On a side note, about synchronizing:
In contrast to the AT3 .aeon file format, I can write the AT2 .aeonzip files back, so synchronizing AT2 with Obsidian doesn’t seem completely impossible. However, like I mentioned above, there is the fundamental problem that the Obsidian pages do not contain any structured data from which a reliable reference to the Aeon data structure can be established.

Update: I still have to find out to what extent Obsidian Properties are suitable for structuring the pages.

2 Likes

In case there are Python programmers here who want to develop the program further, I have compiled some topics here:

1 Like

Obsidian support YAML header, so you can use that as a Structured Data section.

In my research I use YAML for “metadata” like dates, names, types etc.

So a YAML header for a newspaper can look like this:


type: Newspaper
name: “Newpaper Name”
country: “Name of country”
city: “Name of City of published newspaper”
published date: “yyyy-mm-dd”
tags: (“tag 1”, “tag 2”, “Yet another tag”)


etc. etc.

You can also add relation types, start and end dates etc. in the YAML

It is also possible to create markdown tables with wikilinks for Obsidian, you just need to us “/” in front of the wikilink inside the table.

Well, yes, this is called “properties” in Obsidian, and I addressed the topic with issue#2.
Properties consist of key-value pairs, where the values may also be arrays, but neither multi-line text nor wikilinks, as far as I found out. And since the keys appear on the page, they may need translation, depending on the timeline setup.

However, I don’t use Aeon 3 or Obsidian myself, and there’s no sign of anyone else actually using my script. So let’s wait for someone else to pick up the topic if needed.

1 Like

There is an add-on for Obsidian that can utilize wikilinks in the YAML, or it was, I’m not sure if it is still “active”.

Regarding multiline text, that is not possible, but you can use multi-word strings…

But I wouldn’t add a YAML keypair with a 100-words text-string…

I have been looking at some of your scripts, but not had the concentrations to sit down and actually do something with them… since I’m not into Python or any other programming languages except som really short scripts and a little VBA, I will have to use a lot of time before I actually can start change anything.

I have heard of people putting paragraphs into frontmatter with Obsidian, though. And links as well.

I feel like this is do-able. All of this information and tech is new to me, but like a plot-point that somehow comes together in the third act, it feels like there’s a way to tie it all together. I just don’t know how yet. But I am fiddling with it and am trying to use your scripts for it too :slight_smile:

1 Like

That’s the right way to go: first gain experience with what’s there.
Anyway, I chose Python as the programming language because it is particularly easy to learn. The people who develop the program further should be people who use it themselves, that’s how it’s traditionally done in the open source community.
Good luck!

1 Like

I just found another python script that exports CSV data to Obsidian frontmatter - Spreadsheet to Obsidian Project: CSV to MD Files Script (Python) · marcusolsson/obsidian-projects · Discussion #581 · GitHub

There has to be a way to make this all work together and somehow sync…

Ok, so I’ve played with the script above (Spreadsheet to Obsidian Project: CSV to MD Files Script (Python) · marcusolsson/obsidian-projects · Discussion #581 · GitHub), and I’m pretty close to making this work!

First, I exported .aeon into .csv, making sure to move the column ‘Label’ on the far left so it’s first. I run the script and we get outputted mds (with ‘Label’ as the file name) and info like this in the frontmatter of each file (between three dashes - - - )

---
Type: Character
Color: Grey
Siblings: Morgaine
Start Date: 11808-01-08 21:30
End Date: 11852-08-05 23:30
---

That gives us a number of properties for each exported item, like ‘Start Date’ to ‘Type’ and various relationships.

Now what I changed. For the last part of the script:

             # Open the .md file for writing
            with open(md_filename, 'w', encoding='utf-8') as md_file:
                # Write attributes to the .md file
                md_file.write('---\n')
                for header in headers:
                    if header != headers[0] and row[header]:
                        md_file.write(f"{header}: {row[header]}\n")
                md_file.write('---\n')

I change the line

md_file.write(f"{header}: {row[header]}\n")

to

md_file.write(f"{header}: ‘[[{row[header]}]]’\n")

Adding ‘[[ ]]’ to the outside of row[header] turns the information into a usable wiki-link in Obsidian’s properties.

In the Source Mode for the md files it now looks like:

---
Type: '[[Character]]'
Color: '[[Grey]]'
Siblings: '[[Morgaine]]'
Start Date: '[[11808-01-08 21:30]]'
End Date: '[[11852-08-05 23:30]]'
---

and in the File Properties there is now a hyperlink!

image

The problem is for properties that have several different items.

For something like my Extended Family section, it smushes all of the names together, and the hyperlink is… that long one-word-smush.

---
Extended Family: '[[Sioris,Piers,Eglė,Rhianu,Síofra,Ophion,Elwin,Gwythyr]]'
---

Meaning that I have 1 hyperlink that’s just:

Sioris,Piers,Eglė,Rhianu,Síofra,Ophion,Elwin,Gwythyr

BUT, if the frontmatter is changed up, and each item is on its own line, with the hyperlink brackets and the apostrophe (like this):

---
Extended Family:
- '[[Sioris]]'
- '[[Piers]]'
- '[[Eglė]]'
- '[[Rhianu]]'
- '[[Síofra]]'
- '[[Ophion]]'
- '[[Elwin]]'
- '[[Gwythyr]]'
---

it shows up in Properties as separate hyperlinked files!

image

Now I just need to be able to make the script understand that certain columns don’t need a hyperlink at all (like summary), and others need just one hyperlink, and others are several different things in the column and need to be exported as a list.

I assume I have to change up this part

if header != headers[0] and row[header]:
md_file.write(f"{header}: {row[header]}\n")

To be about specific columns instead of all of them, and that might need some extra changes.

For something like my Extended Family section, it smushes all of the names together, and the hyperlink is… that long one-word-smush.

Well, that’s exactly the same as I experienced when trying out the properties.
Maybe it’s easier to first create some example pages by hand, then adjust your script so that it creates the page the right way.

By the way, processing csv with Python is explained here:

it shows up in Properties as separate hyperlinked files!

Are you sure that it’s still a property? How would it look like outsides the properties markers?
Remember, the point of using properties is to faciliate reading the data back as (key : value) pairs.

Edit: Actually, there are list properties defined for Obsidian. But think about how you will read back them later.

By the way, here is the documentation about Obsidian properties:

Now I just need to be able to make the script understand that certain columns don’t need a hyperlink at all.

Basically, you have to distinguish between “plain” properties and relationships.
If you parse the .aeon file, you can see that, but when processing the csv files, it’s not that easy.
You can try to process the csv files in several runs, first collecting names in a list, so you can see what can be linked in the second run.
However, in the Beta version of Aeon, the short names used for relationships are not explicitly exported, so the linked pages may have the full name.