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!

6 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!

2 Likes

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.

2 Likes

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.

3 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:

2 Likes

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.

1 Like

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.

Thanks for the tutorial. I am trying to convert a .aeon file to a markdown file by placing the .aeon file on top of the aeon3obsidian icon but it is not creating the .md file as you have written. Is there anything else I need to follow?

The aeon3obsidian.py script should create a folder that contains a whole set of .md files. This folder should be found in the same directory where your .aeon file is located. If your .aeon file path is for example “c:\Users\Snoopy\Documents\my timeline.aeon”, the folder containing the .md files is “c:\Users\Snoopy\Documents\my timeline”.

Please make sure that all requirements are met. Drag/drop only works if Python is properly installed on your computer, so that aeon3obsidian.py is recognized by your operating system as a Python script. Which Python version have you installed?

In case of doubt, please start the aeon3obsidian.py script from the command line as described, so you get an error message that might help.

1 Like

Hello Peter. Thanks for your reply. I am currently using the latest python, Python 3.12.3. The “aeon3obsidian.py” program is recognized in my system as a .py python file. I am trying to drag and drop .aeon file onto the program but no .md file is created. :frowning:

I don’t have enough information to help you, I’m afraid.
So Python is installed correctly? Fine.
By the way, please make sure to use the Python installation offered by python.org. There is also a variant from the Microsoft Store, but numerous problems are reported with this on the web.

Next, we have to find out whether there is a specific problem with your timeline. I tested the aeon3obsidian.py script with the “Murder on the Orient Express” example project, which is working fine for me. So you may want to try this out on your PC.

You can open this example project with Aeon Timeline 3, save the .aeon file to a test folder, then try to export the Markdown files. Does this work via drag/drop?

Next, you can try to start aeon3obsidian.py from a command prompt like so:

aeon3obsidian.py (path-to-aeon-file)

If the path to your aeon filename contains blanks, you need to enclose the path in double quotes.
If the program runs, you will see messages, like so:

The Markdown files are in a subfolder:

aeon3obsidian-folder

If something goes wrong, a meaningful error message should be displayed.

Good luck.

1 Like

Thanks for your help. I am getting following error. Can u check and guide how to solve it.