Last active
June 15, 2017 05:48
-
-
Save gerv/f7a9fbf64a9a259593321ae6d9d32e9e to your computer and use it in GitHub Desktop.
Hacky script to use desktop scripting to move notes from Tomboy to Simplenote
This file contains 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
# This script works with autokey - https://github.com/autokey/autokey/ | |
# Define a hotkey (e.g. F12), make sure the Tomboy "Search All Notes" window and the Simplenote window are open | |
# Then just keep hitting F12. One note will be imported each time. | |
# Note: no formatting is preserved :-( | |
def activate_tomboy(): | |
window.activate("Search All Notes") | |
time.sleep(0.25) | |
def open_next_tomboy_note(): | |
keyboard.send_key("<down>") | |
keyboard.send_keys("<ctrl>+o") | |
time.sleep(0.25) | |
def copy_from_tomboy(): | |
keyboard.send_keys("<ctrl>+a") | |
keyboard.send_keys("<ctrl>+c") | |
keyboard.send_keys("<ctrl>+w") | |
def paste_into_simplenote(): | |
window.activate("Simplenote") | |
time.sleep(0.25) | |
keyboard.send_keys("<ctrl>+n") | |
time.sleep(0.25) | |
keyboard.send_keys("<ctrl>+v") | |
activate_tomboy() | |
open_next_tomboy_note() | |
copy_from_tomboy() | |
paste_into_simplenote() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment