diff options
-rw-r--r-- | .pinerc | 4 | ||||
-rw-r--r-- | .profile | 2 | ||||
-rw-r--r-- | .ssh/config | 11 | ||||
-rw-r--r-- | .vimrc | 4 | ||||
-rwxr-xr-x | bin/rst2html.py | 23 | ||||
-rwxr-xr-x | bin/rst2latex.py | 26 | ||||
-rwxr-xr-x | bin/rst2man.py | 26 | ||||
-rwxr-xr-x | bin/rst2newlatex.py | 25 | ||||
-rwxr-xr-x | bin/rst2odt.py | 30 | ||||
-rwxr-xr-x | bin/rst2odt_prepstyles.py | 67 | ||||
-rwxr-xr-x | bin/rst2pseudoxml.py | 23 | ||||
-rwxr-xr-x | bin/rst2s5.py | 24 | ||||
-rwxr-xr-x | bin/rst2xml.py | 23 | ||||
-rw-r--r-- | todo | 65 |
14 files changed, 287 insertions, 66 deletions
@@ -81,7 +81,11 @@ initial-keystroke-list= default-composer-hdrs= # Add these customized headers (and possible default values) when composing +<<<<<<< HEAD:.pinerc customized-hdrs=Reply-To: +======= +customized-hdrs=Reply-To +>>>>>>> ff11cadeffc57a92ae16e460188e579d03de1753:.pinerc # When viewing messages, include this list of headers viewer-hdrs= @@ -32,4 +32,4 @@ esac alias ls="ls -G" alias xterm_="xterm -rv +sb -ls" -alias scipy = "ipython -pylab" +#alias scipy = "ipython -pylab" diff --git a/.ssh/config b/.ssh/config index 722ef6d..f88aca4 100644 --- a/.ssh/config +++ b/.ssh/config @@ -1,6 +1,9 @@ Host sicm HostName planet024.ai.mit.edu User bnewbold +Host daemon + HostName daemon.robocracy.org + User bnewbold Host animus HostName animus.robocracy.org User bnewbold @@ -19,3 +22,11 @@ Host athena #GSSAPIAuthentication yes #GSSAPIDelegateCredentials yes #PreferredAuthentications publickey,gssapi,password +Host spt + HostName spt.uchicago.edu +Host fajitta + HostName 128.32.117.23 + User mux +Host flauta + HostName flauta.berkeley.edu + User polarbear @@ -20,3 +20,7 @@ autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,while,try,except, " for Project Fortress au BufNewFile,BufRead *.fsi,*.fss set ft=fortress + +" for previewing reStructured text (.rst) in firefox +:command Rst :!rst2html.py "%" > /tmp/rstprev.html && firefox file:///tmp/rstprev.html +:nnoremap <C-p><C-r> :Rst<CR> diff --git a/bin/rst2html.py b/bin/rst2html.py new file mode 100755 index 0000000..f187118 --- /dev/null +++ b/bin/rst2html.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python + +# $Id: rst2html.py 4564 2006-05-21 20:44:42Z wiemann $ +# Author: David Goodger <goodger@python.org> +# Copyright: This module has been placed in the public domain. + +""" +A minimal front end to the Docutils Publisher, producing HTML. +""" + +try: + import locale + locale.setlocale(locale.LC_ALL, '') +except: + pass + +from docutils.core import publish_cmdline, default_description + + +description = ('Generates (X)HTML documents from standalone reStructuredText ' + 'sources. ' + default_description) + +publish_cmdline(writer_name='html', description=description) diff --git a/bin/rst2latex.py b/bin/rst2latex.py new file mode 100755 index 0000000..3fb71e0 --- /dev/null +++ b/bin/rst2latex.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python + +# $Id: rst2latex.py 5905 2009-04-16 12:04:49Z milde $ +# Author: David Goodger <goodger@python.org> +# Copyright: This module has been placed in the public domain. + +""" +A minimal front end to the Docutils Publisher, producing LaTeX. +""" + +try: + import locale + locale.setlocale(locale.LC_ALL, '') +except: + pass + +from docutils.core import publish_cmdline + +description = ('Generates LaTeX documents from standalone reStructuredText ' + 'sources. ' + 'Reads from <source> (default is stdin) and writes to ' + '<destination> (default is stdout). See ' + '<http://docutils.sourceforge.net/docs/user/latex.html> for ' + 'the full reference.') + +publish_cmdline(writer_name='latex', description=description) diff --git a/bin/rst2man.py b/bin/rst2man.py new file mode 100755 index 0000000..230d39b --- /dev/null +++ b/bin/rst2man.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python + +# Author: +# Contact: grubert@users.sf.net +# Copyright: This module has been placed in the public domain. + +""" +man.py +====== + +This module provides a simple command line interface that uses the +man page writer to output from ReStructuredText source. +""" + +import locale +try: + locale.setlocale(locale.LC_ALL, '') +except: + pass + +from docutils.core import publish_cmdline, default_description +from docutils.writers import manpage + +description = ("Generates plain unix manual documents. " + default_description) + +publish_cmdline(writer=manpage.Writer(), description=description) diff --git a/bin/rst2newlatex.py b/bin/rst2newlatex.py new file mode 100755 index 0000000..031ca45 --- /dev/null +++ b/bin/rst2newlatex.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python + +# $Id: rst2newlatex.py 4564 2006-05-21 20:44:42Z wiemann $ +# Author: David Goodger <goodger@python.org> +# Copyright: This module has been placed in the public domain. + +""" +A minimal front end to the Docutils Publisher, producing LaTeX using +the new LaTeX writer. +""" + +try: + import locale + locale.setlocale(locale.LC_ALL, '') +except: + pass + +from docutils.core import publish_cmdline, default_description + + +description = ('Generates LaTeX documents from standalone reStructuredText ' + 'sources. This writer is EXPERIMENTAL and should not be used ' + 'in a production environment. ' + default_description) + +publish_cmdline(writer_name='newlatex2e', description=description) diff --git a/bin/rst2odt.py b/bin/rst2odt.py new file mode 100755 index 0000000..5d8971f --- /dev/null +++ b/bin/rst2odt.py @@ -0,0 +1,30 @@ +#!/usr/bin/env python + +# $Id: rst2odt.py 5839 2009-01-07 19:09:28Z dkuhlman $ +# Author: Dave Kuhlman <dkuhlman@rexx.com> +# Copyright: This module has been placed in the public domain. + +""" +A front end to the Docutils Publisher, producing OpenOffice documents. +""" + +import sys +try: + import locale + locale.setlocale(locale.LC_ALL, '') +except: + pass + +from docutils.core import publish_cmdline_to_binary, default_description +from docutils.writers.odf_odt import Writer, Reader + + +description = ('Generates OpenDocument/OpenOffice/ODF documents from ' + 'standalone reStructuredText sources. ' + default_description) + + +writer = Writer() +reader = Reader() +output = publish_cmdline_to_binary(reader=reader, writer=writer, + description=description) + diff --git a/bin/rst2odt_prepstyles.py b/bin/rst2odt_prepstyles.py new file mode 100755 index 0000000..b0b7dcc --- /dev/null +++ b/bin/rst2odt_prepstyles.py @@ -0,0 +1,67 @@ +#!/usr/bin/env python + +# $Id: rst2odt_prepstyles.py 5839 2009-01-07 19:09:28Z dkuhlman $ +# Author: Dave Kuhlman <dkuhlman@rexx.com> +# Copyright: This module has been placed in the public domain. + +""" +Fix a word-processor-generated styles.odt for odtwriter use: Drop page size +specifications from styles.xml in STYLE_FILE.odt. +""" + +# +# Author: Michael Schutte <michi@uiae.at> + +from lxml import etree +import sys +import zipfile +from tempfile import mkstemp +import shutil +import os + +NAMESPACES = { + "style": "urn:oasis:names:tc:opendocument:xmlns:style:1.0", + "fo": "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" +} + +def prepstyle(filename): + + zin = zipfile.ZipFile(filename) + styles = zin.read("styles.xml") + + root = etree.fromstring(styles) + for el in root.xpath("//style:page-layout-properties", + namespaces=NAMESPACES): + for attr in el.attrib: + if attr.startswith("{%s}" % NAMESPACES["fo"]): + del el.attrib[attr] + + tempname = mkstemp() + zout = zipfile.ZipFile(os.fdopen(tempname[0], "w"), "w", + zipfile.ZIP_DEFLATED) + + for item in zin.infolist(): + if item.filename == "styles.xml": + zout.writestr(item, etree.tostring(root)) + else: + zout.writestr(item, zin.read(item.filename)) + + zout.close() + zin.close() + shutil.move(tempname[1], filename) + + +def main(): + args = sys.argv[1:] + if len(args) != 1: + print >> sys.stderr, __doc__ + print >> sys.stderr, "Usage: %s STYLE_FILE.odt\n" % sys.argv[0] + sys.exit(1) + filename = args[0] + prepstyle(filename) + +if __name__ == '__main__': + main() + + +# vim:tw=78:sw=4:sts=4:et: diff --git a/bin/rst2pseudoxml.py b/bin/rst2pseudoxml.py new file mode 100755 index 0000000..980ff22 --- /dev/null +++ b/bin/rst2pseudoxml.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python + +# $Id: rst2pseudoxml.py 4564 2006-05-21 20:44:42Z wiemann $ +# Author: David Goodger <goodger@python.org> +# Copyright: This module has been placed in the public domain. + +""" +A minimal front end to the Docutils Publisher, producing pseudo-XML. +""" + +try: + import locale + locale.setlocale(locale.LC_ALL, '') +except: + pass + +from docutils.core import publish_cmdline, default_description + + +description = ('Generates pseudo-XML from standalone reStructuredText ' + 'sources (for testing purposes). ' + default_description) + +publish_cmdline(description=description) diff --git a/bin/rst2s5.py b/bin/rst2s5.py new file mode 100755 index 0000000..17157a8 --- /dev/null +++ b/bin/rst2s5.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python + +# $Id: rst2s5.py 4564 2006-05-21 20:44:42Z wiemann $ +# Author: Chris Liechti <cliechti@gmx.net> +# Copyright: This module has been placed in the public domain. + +""" +A minimal front end to the Docutils Publisher, producing HTML slides using +the S5 template system. +""" + +try: + import locale + locale.setlocale(locale.LC_ALL, '') +except: + pass + +from docutils.core import publish_cmdline, default_description + + +description = ('Generates S5 (X)HTML slideshow documents from standalone ' + 'reStructuredText sources. ' + default_description) + +publish_cmdline(writer_name='s5', description=description) diff --git a/bin/rst2xml.py b/bin/rst2xml.py new file mode 100755 index 0000000..b8f0379 --- /dev/null +++ b/bin/rst2xml.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python + +# $Id: rst2xml.py 4564 2006-05-21 20:44:42Z wiemann $ +# Author: David Goodger <goodger@python.org> +# Copyright: This module has been placed in the public domain. + +""" +A minimal front end to the Docutils Publisher, producing Docutils XML. +""" + +try: + import locale + locale.setlocale(locale.LC_ALL, '') +except: + pass + +from docutils.core import publish_cmdline, default_description + + +description = ('Generates Docutils-native XML from standalone ' + 'reStructuredText sources. ' + default_description) + +publish_cmdline(writer_name='xml', description=description) @@ -1,65 +0,0 @@ -http://dsc.discovery.com/videos/prototype-this-couch-mobile-ride.html -http://dsc.discovery.com/videos/prototype-this-six-legged-atv.html -http://dsc.discovery.com/videos/prototype-this-traffic-busting-truck.html - - -projections: - color photo finder - fix natural unit number finder - real time photo of visitor -> database photo? style? - -solid state density? -email sahughes - -SICP readings for 6.945: get from okie? - -i no longer hear the music (the kinks?) - -notes from 4.602 on 2/9/9: -development of urban grids from roman garrison towns (paris, britain) ------------------- -only show appropriate entries/artifacts on journal (eg authentication) - -hole up somewhere plan: -$$$ flights to morocco, iceland, paris, zurick, sf, seattle, etc? -christine, seo, lily, mike, - -install docutils - -look up ref 11: -Foundations of Applied Superconductivity (1991, Orlando and Delin) -50 nH vs 1 nH - -Reduced Complexity Decoding of Coded Pulse-Position Modulation Using Partial Statistics -The Interplanetary Network Progress Report (2005) - ---------------------------------------- - -sage math olpc - -blog concept: write emails to dead or fictional figures in character, eg - asking questions, and see if the account owner responds - -need tools to tinker with human brain, nervous system - -video-pedia: allow collaborative editing of informative video. multiple - lengths, versions for each topic? what would everything2 version - look like? - -------- - -last tango in paris, bande a part, showgirls, the lovers, day for night - -check on CMU transfer credit status - -freebsd docs to read: -http://www.freebsd.org/doc/en/articles/linux-comparison/ -http://www.freebsd.org/doc/en/articles/vinum/ -http://www.freebsd.org/doc/en/articles/version-guide/ -http://www.freebsd.org/doc/en/articles/solid-state/ -http://www.freebsd.org/doc/en/articles/rc-scripting/ -http://www.freebsd.org/doc/en/articles/nanobsd/ -http://www.freebsd.org/doc/en/articles/p4-primer/ -http://www.freebsd.org/doc/en/articles/multi-os/ -http://www.freebsd.org/doc/en/articles/laptop/article.html -http://www.freebsd.org/doc/en/articles/bsdl-gpl/article.html |