# comment
whitespace has no meaning except single spaces used to separate important things
@ is an identifier
() means button of some sort
[__] means text entry of some sort (except checkbox)
{} means image
- means line
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
#!/usr/bin/env python3 | |
from math import hypot | |
from mojo.subscriber import Subscriber, WindowController | |
from mojo.subscriber import registerGlyphEditorSubscriber, unregisterGlyphEditorSubscriber | |
from mojo.roboFont import OpenWindow | |
from vanilla import FloatingWindow, CheckBox |
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
#!/usr/bin/env python3 | |
""" | |
One dimensional cellular automata with three states | |
If you want to know more about CAs check "A New Kind of Science" by Stephen Wolfram | |
https://www.wolframscience.com/nks/ | |
""" | |
### Modules |
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
#!/usr/bin/env python3 | |
# coding: utf-8 | |
# -------------- # | |
# impose booklet # | |
# -------------- # | |
### Modules | |
from os import mkdir | |
from os.path import basename, join, exists |
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
from vanilla import Window, RadioGroup, SquareButton | |
class ExampleCtrl(object): | |
ledsAmount = 6 | |
index = 0 | |
def __init__(self): | |
self.w = Window((150, 150), '% modulo') | |
self.w.someLeds = RadioGroup((20, 20, -20, -20), | |
[""]*self.ledsAmount, |
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
import fontParts.world as fp | |
from fontTools.pens.cocoaPen import CocoaPen | |
def drawGlyph(glyph): | |
pen = CocoaPen(glyph.getParent()) | |
glyph.draw(pen) | |
path = pen.path | |
glyphPath = BezierPath(path=path) | |
drawPath(glyphPath) | |
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
############################## | |
# Draw Wiggles using Drawbot # | |
############################## | |
""" | |
Script by Roberto Arista, you can find the related tutorial here: https://medium.com/@roberto_arista/how-to-draw-a-wiggle-between-two-points-with-python-and-drawbot-788006c18fb0 | |
You can find drawbot here: http://www.drawbot.com/ | |
Code distributed with no guarantee, use at your own risk | |
""" |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
##################### | |
# Adding smart sets # | |
##################### | |
### Modules | |
import os | |
from mojo.UI import SmartSet, addSmartSet |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
################# | |
# Color manager # | |
################# | |
### Modules | |
from vanilla import Window, Group, ColorWell, TextBox, HorizontalLine | |
from AppKit import NSColor |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
############# | |
# Zip ufos! # | |
############# | |
### Modules | |
import zipfile | |
import os |
NewerOlder