Permalink
Browse files

resume

  • Loading branch information...
1 parent 776b20d commit a256724ad55e3759bc3145797b999e1554e85d20 unknown committed May 9, 2010
Showing 924 changed files with 68,972 additions and 1 deletion.
View
@@ -0,0 +1,2 @@
+python %~dp0rst2pdf.py %~dp0..\jimmy_schementi.txt -o %~dp0..\jimmy_schementi.pdf
+python c:\Python26\Scripts\rst2html.py %~dp0..\jimmy_schementi.txt > %~dp0..\jimmy_schementi.html
View
@@ -0,0 +1,5 @@
+import sys, os
+__thisfile__ = os.path.abspath(os.path.dirname(__file__))
+sys.path.insert(0, os.path.join(__thisfile__, "vendor/rst2pdf-0.14.2"))
+import rst2pdf.createpdf
+rst2pdf.createpdf.main(sys.argv[1:])
Oops, something went wrong.
@@ -0,0 +1,10 @@
+* Roberto Alsina <ralsina at netmanagers dot com dot ar>
+* Nicolas Laurance <nlaurance at zindep dot com>
+* Christoph Zwerschke
+* Yasushi Masuda
+* Josh VanderLinden
+* Runar Tenfjord
+* Patrick Maupin
+* Joshua J. Kugler
+* Patrick Maupin
+* anatoly techtonik
@@ -0,0 +1,21 @@
+Copyright (c) 2007,2008,2009 Roberto Alsina
+Nicolas Laurance, Christoph Zwerschke, Yasushi Masuda, Josh VanderLinden.
+
+
+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.
@@ -0,0 +1,39 @@
+Intro
+=====
+
+The usual way of creating PDF from reStructuredText is by going through LaTeX.
+This tool provides an alternative by producing PDF directly using the ReportLab
+library.
+
+Installing
+==========
+
+python setup.py install
+
+should do the trick.
+
+Features
+========
+
+* User-defined page layout. Multiple frames per page, multiple layouts per
+ document.
+
+* Page transitions
+
+* Cascading stylesheet mechanism, define only what you want changed.
+
+* Supports TTF and Type1 font embedding.
+
+* Any number of paragraph styles using the class directive.
+
+* Any number of character styles using text roles.
+
+* Custom page sizes and margins.
+
+* Syntax highlighter for many languages, using Pygments.
+
+* Supports embedding almost any kind of raster or vector images.
+
+* Supports hyphenation and kerning (using wordaxe).
+
+* Full user's manual
@@ -0,0 +1,113 @@
+##############################################################################
+#
+# Copyright (c) 2006 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Bootstrap a buildout-based project
+
+Simply run this script in a directory containing a buildout.cfg.
+The script accepts buildout command-line options, so you can
+use the -c option to specify an alternate configuration file.
+
+$Id: bootstrap.py 1458 2009-11-07 14:38:02Z roberto.alsina $
+"""
+
+import os, shutil, sys, tempfile, urllib2
+from optparse import OptionParser
+
+tmpeggs = tempfile.mkdtemp()
+
+is_jython = sys.platform.startswith('java')
+
+# parsing arguments
+parser = OptionParser()
+parser.add_option("-v", "--version", dest="version",
+ help="use a specific zc.buildout version")
+parser.add_option("-d", "--distribute",
+ action="store_true", dest="distribute", default=False,
+ help="Use Disribute rather than Setuptools.")
+
+options, args = parser.parse_args()
+
+if options.version is not None:
+ VERSION = '==%s' % options.version
+else:
+ VERSION = ''
+
+USE_DISTRIBUTE = options.distribute
+args = args + ['bootstrap']
+
+to_reload = False
+try:
+ import pkg_resources
+ if not hasattr(pkg_resources, '_distribute'):
+ to_reload = True
+ raise ImportError
+except ImportError:
+ ez = {}
+ if USE_DISTRIBUTE:
+ exec urllib2.urlopen('http://python-distribute.org/distribute_setup.py'
+ ).read() in ez
+ ez['use_setuptools'](to_dir=tmpeggs, download_delay=0, no_fake=True)
+ else:
+ exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
+ ).read() in ez
+ ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
+
+ if to_reload:
+ reload(pkg_resources)
+ else:
+ import pkg_resources
+
+if sys.platform == 'win32':
+ def quote(c):
+ if ' ' in c:
+ return '"%s"' % c # work around spawn lamosity on windows
+ else:
+ return c
+else:
+ def quote (c):
+ return c
+
+cmd = 'from setuptools.command.easy_install import main; main()'
+ws = pkg_resources.working_set
+
+if USE_DISTRIBUTE:
+ requirement = 'distribute'
+else:
+ requirement = 'setuptools'
+
+if is_jython:
+ import subprocess
+
+ assert subprocess.Popen([sys.executable] + ['-c', quote(cmd), '-mqNxd',
+ quote(tmpeggs), 'zc.buildout' + VERSION],
+ env=dict(os.environ,
+ PYTHONPATH=
+ ws.find(pkg_resources.Requirement.parse(requirement)).location
+ ),
+ ).wait() == 0
+
+else:
+ assert os.spawnle(
+ os.P_WAIT, sys.executable, quote (sys.executable),
+ '-c', quote (cmd), '-mqNxd', quote (tmpeggs), 'zc.buildout' + VERSION,
+ dict(os.environ,
+ PYTHONPATH=
+ ws.find(pkg_resources.Requirement.parse(requirement)).location
+ ),
+ ) == 0
+
+ws.add_entry(tmpeggs)
+ws.require('zc.buildout' + VERSION)
+import zc.buildout.buildout
+zc.buildout.buildout.main(args)
+shutil.rmtree(tmpeggs)
@@ -0,0 +1,9 @@
+# See LICENSE.txt for licensing terms
+try:
+ import pkg_resources
+ try:
+ version = pkg_resources.get_distribution('rst2pdf').version
+ except pkg_resources.ResolutionError:
+ version = None
+except ImportError:
+ version = None
@@ -0,0 +1,96 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2009 by Leandro Lucarella, Roberto Alsina
+# All rights reserved.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+from docutils import nodes
+from docutils.nodes import General, Inline, Element, literal_block
+from docutils.parsers.rst import directives
+from docutils.parsers.rst import nodes
+from reportlab.graphics import renderPDF
+from docutils.parsers import rst
+from opt_imports import aafigure
+from log import log
+
+WARNED=False
+
+class Aanode(Element):
+ children = ()
+
+ def __init__(self, content, options, rawsource='', *children, **attributes):
+ self.content = content
+ self.options = options
+ Element.__init__(self, rawsource, *children, **attributes)
+
+ def copy(self, **attributes):
+ return Aanode(self.content, self.options, **self.attributes)
+
+ def gen_flowable(self, style_options):
+ options = dict(style_options)
+ # explicit :option: always precedes
+ options.update(self.options)
+ visitor = aafigure.process(
+ '\n'.join(self.content),
+ aafigure.pdf.PDFOutputVisitor,
+ options=options)
+ return renderPDF.GraphicsFlowable(visitor.drawing)
+
+
+class Aafig(rst.Directive):
+ """
+ Directive to insert an ASCII art figure to be rendered by aafigure.
+ """
+ has_content = True
+ required_arguments = 0
+ optional_arguments = 0
+ final_argument_whitespace = False
+ option_spec = dict(
+ scale = float,
+ line_width = float,
+ background = str,
+ foreground = str,
+ fill = str,
+ name = str,
+ aspect = float,
+ textual = directives.flag,
+ proportional = directives.flag,
+ )
+
+ def run(self):
+ global WARNED
+ if 'textual' in self.options:
+ self.options['textual'] = True
+ if 'proportional' in self.options:
+ self.options['proportional'] = True
+ if aafigure is not None:
+ return [Aanode(self.content, self.options)]
+ if not WARNED:
+ log.error('To render the aafigure directive correctly, please install aafigure')
+ WARNED=True
+ return [literal_block(text='\n'.join(self.content))]
+
+
+directives.register_directive('aafig', Aafig)
+directives.register_directive('aafigure', Aafig)
Oops, something went wrong.

0 comments on commit a256724

Please sign in to comment.