# name of the developer B.developer = 'RoboDocs' # URL of the developer B.developerURL = 'http://github.com/roboDocs' # extension icon (file path or NSImage) imagePath = os.path.join(resourcesPath, 'icon.png') B.icon = imagePath # version of the extension B.version = '0.2.6' # should the extension be launched at start-up? B.launchAtStartUp = True # script to be executed when RF starts B.mainScript = 'hello.py' # does the extension contain html help files? B.html = True # minimum RoboFont version required for this extension B.requiresVersionMajor = '4' B.requiresVersionMinor = '0' # scripts which should appear in Extensions menu B.addToMenu = [{ 'path': 'doSomething.py', 'preferredName': 'do something',
import os import shutil from mojo.extensions import ExtensionBundle lib_path = os.path.dirname(__file__) extension_file = 'MeasureHandles.roboFontExt' extension_path = os.path.join(os.path.join(lib_path, 'extension'), extension_file) # extension_html = os.path.join(lib_path, "_docs") extension_lib_path = os.path.join(extension_path, 'lib') print 'building extension...', B = ExtensionBundle() B.name = u"Measure Handles Tool" B.developer = u'Gustavo Ferreira, Johannes Breyer' B.developerURL = 'http://hipertipo.com/' B.version = "0.1" B.mainScript = "MeasureHandlesTool.py" B.launchAtStartUp = 1 B.addToMenu = [] B.requiresVersionMajor = '1' B.requiresVersionMinor = '5' B.infoDictionary["html"] = 0 B.infoDictionary["com.robofontmechanic.Mechanic"] = { "repository" : "johannesbreyer/HandleLength", "description" : "A tool to display length & angle of bezier handles in a glyph", } B.save(extension_path, libPath=lib_path, htmlPath=None, resourcesPath=None, pycOnly=False) print 'done.\n'
from mojo.extensions import ExtensionBundle basePath = os.path.dirname(__file__) extensionPath = os.path.join(basePath, "ThemeManager.roboFontExt") libPath = os.path.join(basePath, "lib") htmlPath = os.path.join(basePath, "html") resourcesPath = os.path.join(basePath, "resources") B = ExtensionBundle() B.name = "Theme Manager" B.version = "1.0.2" B.developer = "Connor Davenport and Andy Clymer" B.developerURL = 'http://www.connordavenport.com/ http://www.andyclymer.com/' B.launchAtStartUp = False B.addToMenu = [{ 'path': 'ThemeManager.py', 'preferredName': 'Theme Manager...', 'shortKey': '', }] B.requiresVersionMajor = '3' B.requiresVersionMinor = '1' B.infoDictionary["html"] = True B.save(extensionPath, libPath=libPath, htmlPath=htmlPath, resourcesPath=resourcesPath, pycOnly=False)
requirementsPath = os.path.join(basePath, "requirements.txt") resourcesPath = os.path.join(sourcePath, "resources") if not os.path.exists(resourcesPath): resourcesPath = None extensionFile = "%s.roboFontExt" % name buildPath = os.path.join(basePath, "build") extensionPath = os.path.join(buildPath, extensionFile) # Build the extension. B = ExtensionBundle() B.name = name B.developer = developer B.developerURL = developerURL B.version = version B.launchAtStartUp = launchAtStartUp B.mainScript = mainScript docPath = os.path.join(sourcePath, "documentation") haveDocumentation = False if os.path.exists(os.path.join(docPath, "index.html")): haveDocumentation = True elif os.path.exists(os.path.join(docPath, "index.md")): haveDocumentation = True if not haveDocumentation: docPath = None B.html = haveDocumentation B.requiresVersionMajor = roboFontVersion.split(".")[0] B.requiresVersionMinor = roboFontVersion.split(".")[1] B.addToMenu = menuItems with open(licensePath) as license: B.license = license.read()
from mojo.extensions import ExtensionBundle # data extension_file = 'hTools2.roboFontExt' lib_path = os.path.dirname(os.path.dirname(hTools2.__file__)) base_path = os.path.dirname(lib_path) extension_path = os.path.join(base_path, extension_file) html_path = os.path.join(base_path, "Documentation/build/html") # create bundle B = ExtensionBundle() # meta B.name = "hTools2" B.developer = 'Gustavo Ferreira' B.developerURL = 'http://hipertipo.com/' B.version = "1.6" B.mainScript = "add-RF-menu.py" B.launchAtStartUp = True B.addToMenu = [] # lib B.requiresVersionMajor = '1' B.requiresVersionMinor = '5' B.infoDictionary["repository"] = 'gferreira/hTools2' # html B.html = 1 # save bundle B.save(extension_path, libPath=lib_path, htmlPath=html_path, resourcesPath=None, pycOnly=False)
import os from mojo.extensions import ExtensionBundle basePath = os.path.dirname(__file__) extensionPath = os.path.join(basePath, "ControlBoard.roboFontExt") libPath = os.path.join(basePath, "lib") htmlPath = os.path.join(basePath, "html") resourcesPath = os.path.join(basePath, "resources") B = ExtensionBundle() B.name = "ControlBoard" B.version = "0.22b" B.mainScript = "ControlBoard.py" B.developer = "Andy Clymer" B.developerURL = 'http://www.andyclymer.com/' B.launchAtStartUp = False B.addToMenu = [{"path" : "ControlBoard.py", "preferredName" : "ControlBoard", "shortKey" : ""}] B.requiresVersionMajor = '1' B.requiresVersionMinor = '5' B.infoDictionary["html"] = True B.save(extensionPath, libPath=libPath, htmlPath=htmlPath, resourcesPath=resourcesPath, pycOnly=False) print "Done"