Skip to content

Instantly share code, notes, and snippets.

@typoman
Last active April 8, 2019 15:48
Show Gist options
  • Save typoman/6f33da6e262f61cbd10dce0b5e579e4b to your computer and use it in GitHub Desktop.
Save typoman/6f33da6e262f61cbd10dce0b5e579e4b to your computer and use it in GitHub Desktop.
Export Robofont settings to iCloud
from mojo.UI import exportPreferences
import os.path
homeDir = os.path.expanduser("~")
exportPreferences("%s/Library/Mobile Documents/com~apple~CloudDocs/Preferences/Robofont/settings" %homeDir)
@typoman
Copy link
Author

typoman commented Apr 8, 2019

The path which is written inside the script should exist. So before putting this script in the startup section of Robofont preferences, create the folder manually. Copy the folder path in Finder by selecting the folder and pressing CMD+ALT+C, then paste and remove the home path directory from the path which should start with Users/YourUserName. Now on every Robofont start up your preferences should be saved and depending on the folder, uploaded to the cloud. For import you can simply double click the settings file or you can use:

from mojo.UI import importPreferences
import os.path
homeDir = os.path.expanduser("~")
importPreferences("%s/Library/Mobile Documents/com~apple~CloudDocs/Preferences/Robofont/settings" %homeDir)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment