Convert notes from Bear.app to Markdown tree-structured notes. This script was written for transfering notes from Bear to Typora, may have some bugs but it worked for me ;)
- Python3.
- extract tags from notes
- create structured directories based on tags
- selection of tag which should be used for note if multiple tags are used in note
- YAML heading with complete list of tags
- edit mode for incorrectly detected tags during run of script
- move attachments (and local pics) to relative directories in new paths
- build index file with
build-tags.py
- dry run
- auto-detect notes & attachments in directory
- fix tag detection
- fix incorrect grabbing local path from pics (for paths using urlencoding / special chars in name)
- add some config files / parameters
WARNING! script is moving directories, so if something will go wrong you need to delete all from
BEAR_DIRandNOTE_DIRand repeat all steps!
- Create empty directories and specify them in script:
BEAR_DIR(default:BearNotes) - for input Bear NotesNOTE_DIR(default:Notes) - for output notes in tree structure
- Export notes from Bear to
BEAR_DIR:- Click on Notes in Bear
Cmd + Ato select them allCmd + Shift + S, selectMarkdownand put them in yourBEAR_DIR.
- Edit variables
BEAR_DIRandNOTE_DIRor run script with arguments. - Run script:
python3 export-bear2typora.pyorpython3 export-bear2typora.py $NOTE_DIR $BEAR_DIR.- if you see multiple tags for note, you can choose which one you want use to build a directory tree structure
- if you see incorrect flag detected, you can edit
tagsarray by enteringeinstead of index.
Generally it is not possible to support multiple tags with directory structure (you can try to emulate it with symbolic links, but Typora doesn't like this solution), but you can actually build index-tree which will contain list of all tags with relative links to notes.
I created small script which is creating index.md in root directory of notes, I am running it after creating new note / tags modification of existing note.
Before 1st run you need to configure it (if you are using ~/Dropbox/Notes as your root directory of notes, then everything should be setup) check the source and comments for more info.
Final file is looking like this:
# Index Tags
- tag1
- [note1.md](path/to/note1.md)
- tag2
- subtag1
- [note2.md](path/to/note2.md)
- [note3.md](path/to/note3.md)
Last Update: timestampFor me :P For people which are migrating from Bear to pure markdown based notes.
Yes, if you are uploading it somewhere I will be more than happy if you put also link to this repo and mention me as author :)
Maybe, but rather not. This is purely hobbist project - if you want you can always fork this repo and create pull request.