Old doc generator. Old todo list.
git-svn-id: http://svn.robofab.com/branches/ufo3k@434 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
This commit is contained in:
parent
5ac60f8c4e
commit
29e7619f9a
@ -1,94 +0,0 @@
|
||||
RoboFab ToDo List
|
||||
|
||||
A list of things that need to be done before RoboThon. Add things to the list that need to be done. If something is absolutely necessary, add it to the 1.0 list. Otherwise, add it to the 2.0 list.
|
||||
|
||||
############
|
||||
RoboFab 1.0: The Dawn of a New Age
|
||||
############
|
||||
|
||||
BUGS to be fixed before release:
|
||||
- I think we need to have a look at that "scheduledForDeletion" stuff. For example,
|
||||
I think the following scenario may not work: delete "A", add new "A".
|
||||
|
||||
Documentation:
|
||||
---------------
|
||||
- nail down & document the UFO/GLIF formats, at least the basic stuff
|
||||
(This is well underway at the wiki)
|
||||
- write doc strings for all properties
|
||||
- write doc strings for public stuff
|
||||
- comment out doc strings on private stuff
|
||||
|
||||
General Stuff:
|
||||
---------------
|
||||
- write setup.py script.
|
||||
- invent really really easy install script.
|
||||
- include iGlyph (as an app anyway)
|
||||
- remove all deprecated stuff
|
||||
- remove lib magic, replace with less surprising plain dicts.
|
||||
- Write tests.
|
||||
|
||||
The UFO, GLIF and Pens:
|
||||
---------------
|
||||
- Create test glyphs in the demo font that excercise vairous outline
|
||||
features and edge cases.
|
||||
- Write tests.
|
||||
- Attempt to convert all 'fab pens to FontTools pens? We're very close --
|
||||
I think the biggest thing to do is convert all addComponent() calls
|
||||
and implementations. It will be worthwile: it will cause pretty massive
|
||||
code deletion. (Getting closer!!)
|
||||
|
||||
FontLab
|
||||
-------
|
||||
- Write tests.
|
||||
|
||||
Objects:
|
||||
---------------
|
||||
Objects will need a complete inspection. Perhaps sort of "F* Up Everything
|
||||
In The Font For Testing Purposes" script is in order.
|
||||
|
||||
- clean up all the unneeded stuff.
|
||||
|
||||
objectsBase:
|
||||
- work out removeBPoint method (yeah, right)
|
||||
|
||||
objectsFL:
|
||||
- get rid of all the getFoo methods in RGlyph? this should be a 1.1 change as it touches many modules.
|
||||
|
||||
objectsRF:
|
||||
- test various contour methods.
|
||||
- make sure ALL changes are flagging the font and needed objects as changed.
|
||||
|
||||
|
||||
############
|
||||
RoboFab 2.0: Bigger and Badder.
|
||||
############
|
||||
|
||||
- Make RoboFab 1.0 better
|
||||
|
||||
objects:
|
||||
-glyph.contours, glyph.anchors and glyph.components should return a
|
||||
special list. this list would be a new style class subclassed from a dict
|
||||
object. the main avantage of this would be that we could make normal list
|
||||
methods work with the objects, ie glyph.contours.append(...), del
|
||||
glyph.contours[X] instead of the crummy appendFoo and removeFoo
|
||||
stuff that is in there now. This could also apply to contour.segments and
|
||||
segment.points as well.
|
||||
|
||||
objectsFL:
|
||||
- write better algo for writing kerning back into FL font.
|
||||
|
||||
objectsRF:
|
||||
- work out save as. (waiting on new glifLib before proceeding.)
|
||||
- rework NewFont. as it is now, it doesn't really work since a GlyphSet is
|
||||
needed for some special methods, but when a new font is created it doesn't
|
||||
have a path and therefore a GlyphSet. i (tal) have some ideas on how to fix
|
||||
this, but i will wait until version 1.1. this will also need the save as method
|
||||
mentioned above.
|
||||
|
||||
The UFO and GLIF:
|
||||
---------------
|
||||
- new/revised glifLib and glif format that supports more than one glyph in a file.
|
||||
- Factor out format-specific info from font.info/fontinfo.plist into a to be
|
||||
designed "targets" object and file. A "target" is a description for a specific
|
||||
output file, or set of output files. This will need lots of experimentation
|
||||
and careful design. Think of it as a "generate fonts" toolkit.
|
@ -1,114 +0,0 @@
|
||||
#FLM: Generate RoboFab Documentation
|
||||
|
||||
"""This script will generate up to date documentation for RoboFab.
|
||||
Provided you have installed RoboFab correctly and you're using
|
||||
python 2.1 or higher.
|
||||
|
||||
This script will make a bunch of HTML files in robofab/Documentation/robofabDoc/
|
||||
|
||||
It collects all docstrings, shows classes, methods and functions.
|
||||
This script uses pydoc.
|
||||
|
||||
The results of this script depend on the environment you run it in
|
||||
As RoboFab does different things in different places, you can't generate
|
||||
documentation for (for instance) ObjectsFL when you're running
|
||||
this script in the Python IDE: it's impossible to load all the necessary
|
||||
modules.
|
||||
|
||||
Run this script in the Python IDE first, then run it again as a macro in FontLab,
|
||||
that will give you a fairly complete set of descriptions.
|
||||
"""
|
||||
|
||||
print 'Generating RoboFab documentation, just a moment...'
|
||||
|
||||
import robofab
|
||||
import fontTools
|
||||
import os
|
||||
from pydoc import writedocs, ispackage, writedoc, inspect
|
||||
from robofab.world import world
|
||||
|
||||
|
||||
def myWritedocs(dir, pkgpath='', done=None):
|
||||
"""Write out HTML documentation for all modules in a directory tree."""
|
||||
if done is None: done = {}
|
||||
for file in os.listdir(dir):
|
||||
path = os.path.join(dir, file)
|
||||
if ispackage(path):
|
||||
writedocs(path, pkgpath + file + '.', done)
|
||||
elif os.path.isfile(path):
|
||||
modname = inspect.getmodulename(path)
|
||||
if modname:
|
||||
if modname == '__init__':
|
||||
modname = pkgpath[:-1] # remove trailing period
|
||||
else:
|
||||
modname = pkgpath + modname
|
||||
if modname not in done:
|
||||
done[modname] = 1
|
||||
try:
|
||||
writedoc(modname)
|
||||
except:
|
||||
print 'failed to document', modname
|
||||
|
||||
|
||||
robofabDir = os.path.dirname(os.path.dirname(robofab.__file__))
|
||||
fontToolsDir = os.path.dirname(os.path.dirname(fontTools.__file__))
|
||||
roboFabDocoDir = ['Documentation', 'robofabDocs']
|
||||
fontToolsDocoDir = ['Documentation', 'fontToolsDocs']
|
||||
|
||||
currentDir = os.getcwd()
|
||||
|
||||
# robofab
|
||||
bits = robofabDir.split(os.sep)[:-1] + roboFabDocoDir
|
||||
htmlDir = os.sep.join(bits)
|
||||
|
||||
try:
|
||||
os.makedirs(htmlDir)
|
||||
except OSError:
|
||||
pass
|
||||
os.chdir(htmlDir)
|
||||
|
||||
if world.inFontLab:
|
||||
print "- generating documentation for FontLab specific modules"
|
||||
print "- make sure to run this script in the IDE as well!"
|
||||
|
||||
# this is a list of FontLab specific modules that need to be documented
|
||||
import robofab.objects.objectsFL
|
||||
import robofab.tools.toolsFL
|
||||
import robofab.pens.flPen
|
||||
import robofab.tools.otFeatures
|
||||
mods = [ robofab.objects.objectsFL,
|
||||
robofab.tools.toolsFL,
|
||||
robofab.pens.flPen,
|
||||
robofab.tools.otFeatures,
|
||||
]
|
||||
for m in mods:
|
||||
writedoc(m)
|
||||
else:
|
||||
print "- generating documentation for generic modules"
|
||||
print "- make sure to run this script in FontLab as well (if you want that documented)."
|
||||
myWritedocs(robofabDir)
|
||||
|
||||
os.chdir(currentDir)
|
||||
|
||||
# fonttools
|
||||
bits = robofabDir.split(os.sep)[:-1] + fontToolsDocoDir
|
||||
htmlDir = os.sep.join(bits)
|
||||
try:
|
||||
os.makedirs(htmlDir)
|
||||
except OSError:
|
||||
pass
|
||||
os.chdir(htmlDir)
|
||||
|
||||
if world.inFontLab:
|
||||
pass
|
||||
else:
|
||||
print "- generating documentation for generic modules"
|
||||
print "- make sure to run this script in FontLab as well (if you want that documented)."
|
||||
myWritedocs(fontToolsDir)
|
||||
|
||||
os.chdir(currentDir)
|
||||
|
||||
print 'done'
|
||||
print 'The documentation is in', htmlDir
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user