Bear Versoning Export – Apple Shortcuts
2023-04-01 at 17:34 IST
Have been testing and playing with the newly updated Bear Actions in Apple Shortcuts.
I’m very impressed and pleased withe the Export Note action:
- It can export in all the formats supported by Bear 2.0
- When saving the file from Shortcut, it sets modified and created dates from note onto exported file.
So I’m exited to share a couple of sample shortcuts below.
Use them as they are, modify, improve, mess them up, or trash as you please
Table of Contents
- Bear Export Versoning - Shortcut
- Automatic sync of iCloud folder to Dropbox & OneDrive with Automator script on Mac
- Bear Dropbox Export – Shortcut
Bear Export Versoning - Shortcut
Incremental Export/Backup of Bear Notes
Overview
- Saves directly to local iCloud Drive folder
- Incremental – only exporting notes updated since last run
(compares with last run date-stamp, saved in *bear-export-settings.json file). - Search: @last7days -@locked to exlude password protected notes.
- After full backup/export, use this daily (or how often necessary) for incremental backup/versioning.
- Tips: Panda is great for previews, to check/compare verisons, before single note restore.
- Exports into new nested daily folders: (yyyy-MM/yyyy-MM-dd)
- iCloud: Shortcuts/bear-export/Year-Month/Y-M-Day/{Title} - {creation date}-{version#)
- Makes it esay to find and also to clean up after new full backups – or whenever.
- Or edit this Shortcut to make export flat, or whatever suits you better
- Notes with images or attachments will save as .bear files (zipped .textbundles)
- get renamed to .textpack here, for better compability with Panda, Marked, etc.),
- Notes without images/attachments, are exported as .md files.
- Notes will export with new version# for each run if already in today’s folder.
(Note! this does not work with .textbundles – they get treated as folders and messed up) - All files get Created Date trailing: “file-name - yyyy-MM-dd_HHmm.ext
- to ensure uninque filenames for notes with same titles:
- for easy info when export to cloud services, where created time stamp is lost,
- and if you delete a note and make a new one with same title, you’ll have them both!
- Tips: Schedule this (in the Shortcuts app) to run automatically on iPhone once (or a couple of times) a day.
Automatic sync of iCloud folder to Dropbox & OneDrive with Automator script on Mac
Download from Dropbox: Automator: Bear Export Versoning to Dropbox.workflow
- Automator Folder Action, triggered by Bear Export Versoning Shortcut above
- Uses rsync script to copy from local iCloud folder to local Dropbox & OneDrive folders
- Works very well when the above shortcut is run on Mac.
- Can be a delay when Bear Export Versoning Shortcut is run on iOS/iPad.
- Will not sync from iOS/iPad if Mac is not online.
- Supports .textbundle to Dropbox (current version for Mac)
Bear Dropbox Export – Shortcut
Experimental and Similar to Bear Export Versioning above.
- Exports directly to Dropbox.
- in a single folder and no versioning.
- Good for use on mobile for direct sync to Web, Windows or Android.
- Doesn’t work offline!
- Can be slow to run on slow networks.
- Dropbox-action doesn’t support .textbundle!
- no logging of export runs to log-file.
- No settings-shortcut, but the one above can easily be modified
#bear/shortcuts @trix180