From 7111abb6d4771310ed23b62d0bed7cfd8b0560e8 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Sat, 12 Sep 2009 22:21:53 -0400 Subject: tweaks, removed todo from control --- .pinerc | 2 +- .profile | 2 +- .vimrc | 4 ++++ todo | 65 ---------------------------------------------------------------- 4 files changed, 6 insertions(+), 67 deletions(-) delete mode 100644 todo diff --git a/.pinerc b/.pinerc index f521376..228c87a 100644 --- a/.pinerc +++ b/.pinerc @@ -81,7 +81,7 @@ initial-keystroke-list= default-composer-hdrs= # Add these customized headers (and possible default values) when composing -customized-hdrs= +customized-hdrs=Reply-To # When viewing messages, include this list of headers viewer-hdrs= diff --git a/.profile b/.profile index 0aaa8df..4e5c8c4 100644 --- a/.profile +++ b/.profile @@ -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/.vimrc b/.vimrc index a87b141..c407cbd 100644 --- a/.vimrc +++ b/.vimrc @@ -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 :Rst diff --git a/todo b/todo deleted file mode 100644 index 2c19785..0000000 --- a/todo +++ /dev/null @@ -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 -- cgit v1.2.3 From 041b28c90a4f0b2993d423e0b82343a7ae2e0428 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Sat, 12 Sep 2009 22:22:29 -0400 Subject: i use these a lot --- bin/rst2html.py | 23 ++++++++++++++++ bin/rst2latex.py | 26 ++++++++++++++++++ bin/rst2man.py | 26 ++++++++++++++++++ bin/rst2newlatex.py | 25 ++++++++++++++++++ bin/rst2odt.py | 30 +++++++++++++++++++++ bin/rst2odt_prepstyles.py | 67 +++++++++++++++++++++++++++++++++++++++++++++++ bin/rst2pseudoxml.py | 23 ++++++++++++++++ bin/rst2s5.py | 24 +++++++++++++++++ bin/rst2xml.py | 23 ++++++++++++++++ 9 files changed, 267 insertions(+) create mode 100755 bin/rst2html.py create mode 100755 bin/rst2latex.py create mode 100755 bin/rst2man.py create mode 100755 bin/rst2newlatex.py create mode 100755 bin/rst2odt.py create mode 100755 bin/rst2odt_prepstyles.py create mode 100755 bin/rst2pseudoxml.py create mode 100755 bin/rst2s5.py create mode 100755 bin/rst2xml.py 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 +# 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 +# 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 (default is stdin) and writes to ' + ' (default is stdout). See ' + ' 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 +# 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 +# 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 +# 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 + +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 +# 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 +# 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 +# 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) -- cgit v1.2.3 From 2d34f88395dc04f40769aa4c24728573c8b8b682 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Sat, 26 Sep 2009 10:33:19 -0400 Subject: new server, rst editing --- .ssh/config | 3 +++ .vimrc | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.ssh/config b/.ssh/config index 722ef6d..61e5187 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 diff --git a/.vimrc b/.vimrc index c407cbd..1d359cc 100644 --- a/.vimrc +++ b/.vimrc @@ -22,5 +22,5 @@ autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,while,try,except, 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 +:command Rst :!rst2html.py "%" > /tmp/rstprev.html && firefox file:///tmp/rstprev.html :nnoremap :Rst -- cgit v1.2.3 From ff11cadeffc57a92ae16e460188e579d03de1753 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Fri, 30 Oct 2009 17:49:53 -0700 Subject: added berkeley hosts --- .ssh/config | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.ssh/config b/.ssh/config index 61e5187..f88aca4 100644 --- a/.ssh/config +++ b/.ssh/config @@ -22,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 -- cgit v1.2.3