# script to be executed when RF starts
B.mainScript = 'angleRatioTool.py'

# does the extension contain html help files?
B.html = htmlPath is not None

# minimum RoboFont version required for this extension
B.requiresVersionMajor = '4'
B.requiresVersionMinor = '0'

# scripts which should appear in Extensions menu
B.addToMenu = [
    {
        'path': 'angleRatioTool.py',
        'preferredName': 'Angle Ratio Tool',
        'shortKey': '',
    },
]

if licensePath:
    # license for the extension
    with open(licensePath) as license:
        B.license = license.read()

# compile and save the extension bundle
print('building extension...', end=' ')
B.save(extensionPath,
       libPath=libPath,
       htmlPath=htmlPath,
       resourcesPath=resourcesPath,
B.html = htmlPath is not None

# minimum RoboFont version required for this extension
B.requiresVersionMajor = '3'
B.requiresVersionMinor = '2'

# scripts which should appear in Extensions menu
B.addToMenu = [
    {
        'path': 'editThatNextMaster.py',
        'preferredName': '⏩ Next Master',
        'shortKey': (1179648, ']'),
    },
    {
        'path': 'editThatPreviousMaster.py',
        'preferredName': '⏪ Previous Master',
        'shortKey': (1179648, '['),
    },
    {
        'path': 'editShuffle.py',
        'preferredName': '⏪ Shuffle',
        'shortKey': '\'',
    },
]

if licensePath:
    # license for the extension
    with open(licensePath) as license:
        B.license = license.read()

# compile and save the extension bundle
extensionPath = os.path.join(basePath, "AndysRFHacks.roboFontExt")
libPath = os.path.join(basePath, "lib")
htmlPath = os.path.join(basePath, "html")
resourcesPath = os.path.join(basePath, "resources")

B = ExtensionBundle()

B.name = "Andy's RF Hacks"
B.version = "1.3"
B.developer = "Andy Clymer"
B.developerURL = 'http://www.andyclymer.com/'

B.mainScript = "Setup.py"
B.launchAtStartUp = True
B.addToMenu = [{
    'path': 'Manager.py',
    'preferredName': 'Preferences',
    'shortKey': '',
}]

B.requiresVersionMajor = '3'
B.requiresVersionMinor = '1'
B.infoDictionary["html"] = True

B.save(extensionPath,
       libPath=libPath,
       htmlPath=htmlPath,
       resourcesPath=resourcesPath,
       pycOnly=False)

print("Done")
Example #4
0
import os
from mojo.extensions import ExtensionBundle

basePath = os.path.dirname(__file__)
extensionPath = os.path.join(basePath, "SlightlyBetterTransform.roboFontExt")
libPath = os.path.join(basePath, "lib")
htmlPath = os.path.join(basePath, "html")
resourcesPath = os.path.join(basePath, "resources")

B = ExtensionBundle()

B.name = "Slightly Better Transform"
B.version = "1.2"
B.mainScript = "SlightlyBetterTransform.py"

B.developer = "Andy Clymer"
B.developerURL = 'http://www.andyclymer.com/'

B.launchAtStartUp = True
B.addToMenu = []
B.requiresVersionMajor = '3'
B.requiresVersionMinor = '1'
B.infoDictionary["html"] = True

B.save(extensionPath,
       libPath=libPath,
       htmlPath=htmlPath,
       resourcesPath=resourcesPath,
       pycOnly=False)

print("Done")
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"
extension_path = os.path.join(lib_path, 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"CompareOTFs"
B.developer = u'Gustavo Ferreira'
B.developerURL = 'http://hipertipo.com/'
B.version = "0.11"
B.mainScript = ""
B.launchAtStartUp = 0
B.addToMenu = [
    {
        'path' : 'compare-otfs.py',
        'preferredName' : 'CompareOTFs',
        'shortKey' : '',
    },
]
B.requiresVersionMajor = '1'
B.requiresVersionMinor = '5'
B.infoDictionary["html"] = 0
B.save(extension_path, libPath=lib_path, htmlPath=None, resourcesPath=None, pycOnly=False)
print 'done.\n'

print 'cleaning up extension files...'

# remove git repository from extension

if os.path.exists(extension_path):
    # remove git repository
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)

print("Done")
Example #8
0
# script to be executed when RF starts
#B.mainScript = 'startup.py'

# does the extension contain html help files?
B.html = htmlPath is not None

# minimum RoboFont version required for this extension
B.requiresVersionMajor = '3'
B.requiresVersionMinor = '2'

# scripts which should appear in Extensions menu
B.addToMenu = [
    {
        'path': 'browser.py',
        'preferredName': 'GlyphBrowser',
        'shortKey': 'g',
    },
]

if licensePath:
    # license for the extension
    with open(licensePath) as license:
        B.license = license.read()

# compile and save the extension bundle
print('building extension...', end=' ')
B.save(extensionPath,
       libPath=libPath,
       htmlPath=htmlPath,
       resourcesPath=resourcesPath,
Example #9
0
import os
from mojo.extensions import ExtensionBundle

libPath = os.path.dirname(__file__)
extensionFile = 'codeColors.roboFontExt'
extensionPath = os.path.join(libPath, extensionFile)

print('building extension...', end='')

B = ExtensionBundle()
B.name = "codeColors"
B.developer = 'RoboDocs'
B.developerURL = 'http://github.com/roboDocs/'
B.version = "0.0.1"
B.mainScript = ""
B.launchAtStartUp = 0
B.addToMenu = [{
    'path': 'dialog.py',
    'preferredName': 'CodeColors',
    'shortKey': ''
}]
B.requiresVersionMajor = '3'
B.requiresVersionMinor = '0'
B.save(extensionPath, libPath=libPath, resourcesPath=None, pycOnly=False)

print('done!\n')
Example #10
0
# ----------------

B = ExtensionBundle()
B.name = "Glyph Construction"
B.developer = 'Frederk Berlaen'
B.developerURL = 'http://typemytype.com/'
B.version = '0.5'
B.launchAtStartUp = 0
B.mainScript = ''
B.html = True
B.requiresVersionMajor = '1'
B.requiresVersionMinor = '5'
B.addToMenu = [
    {
        'path'         : 'glyphConstructionUI.py',
        'preferredName': 'Glyph Builder',
        'shortKey'     : '',
    },
]

with open(licensePath, mode="r", encoding="utf-8") as f:
    B.license = f.read()
B.repositoryURL = 'http://github.com/typemytype/GlyphConstruction/'
B.summary = 'A simple, human-readable, powerful language for describing how shapes are constructed.'

# ---------------
# build extension
# ---------------

# copy README file into 'html' folder as 'index.md'
shutil.copyfile(readmePath, os.path.join(htmlPath, 'index.md'))
Example #11
0
B = ExtensionBundle()
B.name = "GroupSpacing"
B.developer = 'Gustavo Ferreira'
B.developerURL = 'http://hipertipo.com'
B.icon = os.path.join(basePath, 'icon.png')
B.version = '0.3.2'
B.launchAtStartUp = False
B.mainScript = ''
B.html = True
B.requiresVersionMajor = '3'
B.requiresVersionMinor = '2'
B.addToMenu = [
    {
        'path': 'groupSpacing.py',
        'preferredName': 'GroupSpacing',
        'shortKey': '',
    },
]

with open(licensePath) as license:
    B.license = license.read()

# copy README & imgs to extension docs

shutil.copyfile(os.path.join(basePath, 'README.md'),
                os.path.join(htmlPath, 'index.md'))
imgsFolder = os.path.join(basePath, 'imgs')
htmlImgsFolder = os.path.join(htmlPath, 'imgs')
if not os.path.exists(htmlImgsFolder):
    os.makedirs(htmlImgsFolder)
Example #12
0
B.developer = "Andy Clymer"
B.developerURL = 'http://www.andyclymer.com/'

B.mainScript = "ProjectionViewControl.py"
B.launchAtStartUp = False
B.addToMenu = [
    {
        'path' : 'ProjectionViewControl.py',
        'preferredName': 'Enable 3D Projection View Control',
        'shortKey' : '',
    },
    {
        'path' : 'ProjectionPreview.py',
        'preferredName': '3D Projection Preview...',
        'shortKey' : '',
    },
    {
        'path' : 'RotateFontWindow.py',
        'preferredName': 'Build Rotated Masters...',
        'shortKey' : '',
    },
    {
        'path' : 'DesignSpacePreview.py',
        'preferredName': 'Rotated DesignSpace Preview...',
        'shortKey' : '',
    }]
    
B.requiresVersionMajor = '3'
B.requiresVersionMinor = '3'
B.infoDictionary["html"] = True
Example #13
0
B.launchAtStartUp = True

# script to be executed when RF starts
B.mainScript = "customEvents.py"

# does the extension contain html help files?
B.html = True

# minimum RoboFont version required for this extension
B.requiresVersionMajor = "4"
B.requiresVersionMinor = "2"

# scripts which should appear in Extensions menu
B.addToMenu = [{
    "path": "OverlayUFOs.py",
    "preferredName": "Overlay UFOs",
    "shortKey": "",
}]

# license for the extension
with open(licensePath) as license:
    B.license = license.read()

# compile and save the extension bundle
print("building extension...", end=" ")
B.save(extensionPath,
       libPath=libPath,
       htmlPath=htmlPath,
       resourcesPath=resourcesPath)
print("done!")
Example #14
0
B = ExtensionBundle()
B.name = "tempEdit"
B.developer = 'Gustavo Ferreira'
B.developerURL = 'http://hipertipo.com'
B.icon = None  # os.path.join(basePath, 'tempEditMechanicIcon.png')
B.version = '0.3'
B.launchAtStartUp = False
B.mainScript = ''
B.html = False
B.requiresVersionMajor = '3'
B.requiresVersionMinor = '2'
B.addToMenu = [
    {
        'path': 'tempEdit.py',
        'preferredName': 'tempEdit',
        'shortKey': '',
    },
]

with open(licensePath) as license:
    B.license = license.read()

# copy README & imgs to extension docs

# shutil.copyfile(os.path.join(basePath, 'README.md'), os.path.join(htmlPath, 'index.md'))
# imgsFolder = os.path.join(basePath, 'imgs')
# htmlImgsFolder = os.path.join(htmlPath, 'imgs')
# if not os.path.exists(htmlImgsFolder):
#     os.makedirs(htmlImgsFolder)
Example #15
0
if os.path.exists(extensionPath):
    print "\tremoving old RoboFont extension..."
    shutil.rmtree(extensionPath)

# build new extension
print "\trebuilding the RoboFont extension..."
B = ExtensionBundle()
B.name = "RoboFab Docs"
B.developer = "RoboFab Developers"
B.developerURL = "http://robofab.org/"
B.version = "0.1"
B.mainScript = ""
B.launchAtStartUp = 0
B.addToMenu = [{
    "path" : "docs.py",
    "preferredName" : "RoboFab Docs",
    "shortKey" : "",
}]
B.requiresVersionMajor = "1"
B.requiresVersionMinor = "5"
B.infoDictionary["html"] = 0
B.infoDictionary["com.robofontmechanic.Mechanic"] = {
    "repository" : "roboDocs/roboFabDocs",
    "description" : "The RoboFab Documentation as a RoboFont extension",
}
B.save(extensionPath, libPath=libPath, resourcesPath=None, pycOnly=False)

# remove git repository from extension
extensionLibPath = os.path.join(extensionPath, 'lib')
if os.path.exists(extensionLibPath):
    # remove git repository
Example #16
0
from __future__ import absolute_import
from __future__ import print_function
import os
from mojo.extensions import ExtensionBundle

basePath = os.path.dirname(__file__)
extensionPath = os.path.join(basePath, "BezierSurgeon.roboFontExt")
libPath = os.path.join(basePath, "lib")
# htmlPath = os.path.join(basePath, "html")

B = ExtensionBundle()

B.name = "Bezier Surgeon"
B.version = "0.201"
B.developer = "Connor Davenport"
B.developerURL = 'http://www.connordavenport.com/'
B.mainScript = "BezierSurgeon.py"
B.launchAtStartUp = True
B.addToMenu = [{
    'path': 'BezierSurgeon.py',
    'preferredName': 'Bezier Surgeon',
    'shortKey': '',
}]

B.requiresVersionMajor = '3'
B.requiresVersionMinor = '1'
# B.infoDictionary["html"] = True

B.save(extensionPath, libPath=libPath, pycOnly=False)
# htmlPath=htmlPath,
print("Done")
if os.path.exists(extensionPath):
    print "\tremoving old RoboFont extension..."
    shutil.rmtree(extensionPath)

# build new extension
print "\trebuilding the RoboFont extension..."
B = ExtensionBundle()
B.name = "RoboFab Docs"
B.developer = "RoboFab Developers"
B.developerURL = "http://robofab.org/"
B.version = "0.1"
B.mainScript = ""
B.launchAtStartUp = 0
B.addToMenu = [{
    "path": "docs.py",
    "preferredName": "RoboFab Docs",
    "shortKey": "",
}]
B.requiresVersionMajor = "1"
B.requiresVersionMinor = "5"
B.infoDictionary["html"] = 0
B.infoDictionary["com.robofontmechanic.Mechanic"] = {
    "repository": "roboDocs/roboFabDocs",
    "description": "The RoboFab Documentation as a RoboFont extension",
}
B.save(extensionPath, libPath=libPath, resourcesPath=None, pycOnly=False)

# remove git repository from extension
extensionLibPath = os.path.join(extensionPath, 'lib')
if os.path.exists(extensionLibPath):
    # remove git repository
# ----------------

B = ExtensionBundle()
B.name = "Glyph Construction"
B.developer = 'Frederk Berlaen'
B.developerURL = 'http://typemytype.com/'
B.version = '0.4'
B.launchAtStartUp = 0
B.mainScript = ''
B.html = True
B.requiresVersionMajor = '1'
B.requiresVersionMinor = '5'
B.addToMenu = [
    {
        'path'         : 'glyphConstructionUI.py',
        'preferredName': 'Glyph Builder',
        'shortKey'     : '',
    },
]

with codecs.open(licensePath, mode="r", encoding="utf-8") as f:
    B.license = f.read()
B.repositoryURL = 'http://github.com/typemytype/GlyphConstruction/'
B.summary = 'A simple, human-readable, powerful language for describing how shapes are constructed.'

# ---------------
# build extension
# ---------------

print('building extension...', end=" ")
B.save(extensionPath, libPath=libPath, htmlPath=htmlPath)
Example #19
0
extensionFile = "%s.roboFontExt" % name
buildPath = os.path.join(basePath, "build")
extensionPath = os.path.join(buildPath, extensionFile)

B = ExtensionBundle()
B.name = name
B.developer = developer
B.developerURL = developerURL
B.version = version
B.launchAtStartUp = False
B.mainScript = "main.py"
B.html = os.path.exists(os.path.join(sourcePath, "documentation",
                                     "index.html"))
B.requiresVersionMajor = roboFontVersion.split(".")[0]
B.requiresVersionMinor = roboFontVersion.split(".")[1]
B.addToMenu = menuItems
if os.path.exists(licensePath):
    with open(licensePath) as license:
        B.license = license.read()
if os.path.exists(requirementsPath):
    with open(requirementsPath) as requirements:
        B.requirements = requirements.read()

print("building extension...", end=" ")
v = B.save(extensionPath, libPath=libPath, pycOnly=pycOnly)
print("done!")
print()
print(B.validationErrors())

if installAfterBuild:
    print("Installing extension...", end=" ")
extensionPath = os.path.join(basePath, "InterpolationSlider.roboFontExt")
libPath = os.path.join(basePath, "lib")
htmlPath = os.path.join(basePath, "html")
resourcesPath = os.path.join(basePath, "resources")

B = ExtensionBundle()

B.name = "Interpolation Slider"
B.version = "1.1"
B.mainScript = "InterpolationSlider.py"

B.developer = "Andy Clymer"
B.developerURL = 'http://www.andyclymer.com/'

B.launchAtStartUp = False
B.addToMenu = [{
    "path": "InterpolationSlider.py",
    "preferredName": "Interpolation Slider...",
    "shortKey": ""
}]
B.requiresVersionMajor = '1'
B.requiresVersionMinor = '8'
B.infoDictionary["html"] = True

B.save(extensionPath,
       libPath=libPath,
       htmlPath=htmlPath,
       resourcesPath=resourcesPath,
       pycOnly=False)

print("Done")
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 __future__ import print_function
import os
from mojo.extensions import ExtensionBundle

basePath = os.path.dirname(__file__)
extensionPath = os.path.join(basePath, "ImportExportArt.roboFontExt")
libPath = os.path.join(basePath, "lib")
htmlPath = os.path.join(basePath, "html")

B = ExtensionBundle()

B.name = "Import/Export Art"
B.version = "1.2"
B.developer = "Andy Clymer"
B.developerURL = 'http://www.andyclymer.com/'

B.mainScript = "ImportExportWindow.py"
B.launchAtStartUp = False
B.addToMenu = [{
    'path': 'ImportExportWindow.py',
    'preferredName': 'Import/Export Art...',
    'shortKey': '',
}]

B.requiresVersionMajor = '3'
B.requiresVersionMinor = '1'
B.infoDictionary["html"] = True

B.save(extensionPath, libPath=libPath, htmlPath=htmlPath, pycOnly=False)

print("Done")
# 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',
    'shortKey': (NSCommandKeyMask | NSShiftKeyMask, 'b'),
}, {
    'path': 'doSomethingElse.py',
    'preferredName': 'do something else',
    'shortKey': (NSAlternateKeyMask, 'o'),
}]

# license for the extension
with open(licensePath) as license:
    B.license = license.read()

# required extensions
with open(requirementsPath) as requirements:
    B.requirements = requirements.read()

# expiration date for trial extensions
B.expireDate = '2020-12-31'
# script to be executed when RF starts
#B.mainScript = 'startup.py'

# does the extension contain html help files?
B.html = htmlPath is not None

# minimum RoboFont version required for this extension
B.requiresVersionMajor = '3'
B.requiresVersionMinor = '2'

# scripts which should appear in Extensions menu
B.addToMenu = [
    {
        'path': 'threenterpolation.py',
        'preferredName': 'Threenterpolation',
        'shortKey': '',
    },
]

if licensePath:
    # license for the extension
    with open(licensePath) as license:
        B.license = license.read()

# compile and save the extension bundle
print('building extension...', end=' ')
B.save(extensionPath,
       libPath=libPath,
       htmlPath=htmlPath,
       resourcesPath=resourcesPath,