-
-
Save akastrin/c8c0157cc380a7f15f10a2f2b8685883 to your computer and use it in GitHub Desktop.
org-mobile-sync
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; org-mobile-sync | |
| (defun org-mobile-clean-pre-push() | |
| (with-temp-buffer | |
| (shell-command "rm ~/mobileorg/*" t))) | |
| (defun org-mobile-rclone-sync-post-push() | |
| (with-temp-buffer | |
| (shell-command "rclone sync ~/mobileorg Dropbox:Apps/MobileOrg --exclude \.DS_Store" t))) | |
| (defun org-mobile-rclone-sync-pre-pull() | |
| (with-temp-buffer | |
| (shell-command "rm ~/mobileorg/*" t) | |
| (shell-command "rclone sync Dropbox:Apps/MobileOrg ~/mobileorg" t))) | |
| (add-hook 'org-mobile-pre-push-hook 'org-mobile-clean-pre-push) | |
| (add-hook 'org-mobile-post-push-hook 'org-mobile-rclone-sync-post-push) | |
| (add-hook 'org-mobile-pre-pull-hook 'org-mobile-rclone-sync-pre-pull) | |
| (add-hook 'kill-emacs-hook 'org-mobile-push) | |
| (require 'org-mobile) | |
| (org-mobile-pull) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment