tehshrike / backup-bear-notes Goto Github PK
View Code? Open in Web Editor NEWBack up your Bear Notes as markdown files.
Back up your Bear Notes as markdown files.
I don't feel very comfortable with handling deleted or renamed cards by wiping everything in the target directory besides the notes that are currently in Bear.
However, if there is a "trashed" (deleted) note in Bear, we can probably safely delete the file with the matching file name from the target directory.
You can see the query is currently filtering out all trashed notes here:
Line 36 in 01ecd25
If that query were changed to
SELECT ZTITLE AS title, ZTEXT AS text, ZTRASHED AS trashed FROM ZSFNOTE
the following code could either write the file out, or delete any potentially-existing file with that name, based on the trashed
value.
It would be useful to me if, instead of dumping all markdown files to the same output directory, they could be output based on tags.
So if a document had the #cool
and #fancy/pants
tags, the file would be written to both the cool
directory, and the pants
directory inside the fancy
directory.
Documents without a tag could be written either to the root output directory, or an untagged
directory. Without having thought about it a lot yet I'm leaning towards untagged
.
This feature should probably be enabled by a new argument, maybe --use-tags-as-directories
or something. mri
could be used for easiness.
The (unreleased) version of this app in the master branch will throw an error if pointed at a directory that does not contain every deleted file that exists in the database.
I noted that the slash replacement was replacing e.g. 23/01/2020 with 23-01/2020.
This article explains why this is the case - https://stackoverflow.com/questions/1967119/why-does-javascript-replace-only-first-instance-when-using-replace
The fix appears to be to change the slash replacement to:
const filename = ${ title.replace(/\//g, "-") }.md
Hi, If the document contains images, the conversion will fail and MD will not contain images
I'm getting a lot of errors on installing. Tried to use sudo as well, but it doesn't work. This is on MacOS Catalina 10.15.3. Any pointers?
errors.txt
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.