Bear is a wonderful notes editor, and I’ve started using it to power a little static site with some of my thoughts.
I’m still iterating on the best approach to get my content out of Bear. My first attempt read notes from Bear’s SQLite database directly, but more recently I’ve been looking into using Bear’s own export features.
Bear taught me about the TextBundle format, which seems like a good fit for this use case. The format has room for custom app metadata (See the section The Meta Data File
in the link above) where additional attributes can be exported alongside a note.
Right now Bear’s text bundle info.json
looks like this:
{
"transient" : false,
"version" : 2,
"creatorIdentifier" : "net.shinyfrog.bear",
"net.shinyfrog.bear" : {
"version" : "2.0",
"bear-note-unique-identifier" : "FA5C2D56-CB93-4EAE-B4EB-25B98BC36B22"
},
"type" : "net.daringfireball.markdown"
}
It would be awesome if this was enriched with note-specific metadata that Bear knows about, e.g. something like this:
{
"transient" : false,
"version" : 2,
"creatorIdentifier" : "net.shinyfrog.bear",
"net.shinyfrog.bear" : {
"version" : "3.0",
"bear-note-unique-identifier" : "FA5C2D56-CB93-4EAE-B4EB-25B98BC36B22",
"title": "Trying something new.",
"tags": ["#pub", "#til"],
"createdDate": "2024-12-08T13:01",
"modifiedDate": "2024-12-08T14:02",
},
"type" : "net.daringfireball.markdown"
}
If this feature request is taken up, my intuition is that the most valuable additions would be attributes that are not able to be parsed out of the Markdown file, such as creation and modification dates.
Having the title and tags and title in the metadata would also be very helpful in minimizing downstream work, though, since extracting them correctly otherwise requires re-parsing the note as Markdown and extracting the tags using a regular expression that matches Bear’s multi-word tags.
Thank you for your consideration and for the great app.