[pypy-svn] rev 1452 - pypy/trunk/doc/funding/makedoc

tismer at codespeak.net tismer at codespeak.net
Mon Sep 29 20:04:33 CEST 2003


Author: tismer
Date: Mon Sep 29 20:04:30 2003
New Revision: 1452

Added:
   pypy/trunk/doc/funding/makedoc/
   pypy/trunk/doc/funding/makedoc/crossreferences.asc
   pypy/trunk/doc/funding/makedoc/doclist.asc
   pypy/trunk/doc/funding/makedoc/mkdoclist.py
   pypy/trunk/doc/funding/makedoc/mkxref2.py
   pypy/trunk/doc/funding/makedoc/part_b.pdf   (contents, props changed)
   pypy/trunk/doc/funding/makedoc/part_b.sxw   (contents, props changed)
   pypy/trunk/doc/funding/makedoc/wp-tablebegin.asc
   pypy/trunk/doc/funding/makedoc/wp-tableend.asc
   pypy/trunk/doc/funding/makedoc/wp-toptable.asc
Log:
first ugly generated PDF document :-)

Added: pypy/trunk/doc/funding/makedoc/crossreferences.asc
==============================================================================
--- (empty file)
+++ pypy/trunk/doc/funding/makedoc/crossreferences.asc	Mon Sep 29 20:04:30 2003
@@ -0,0 +1,25 @@
+.. _WP10: #wp10
+.. _WP20: #wp20
+.. _WP21: #wp21
+.. _WP22: #wp22
+.. _WP30: #wp30
+.. _WP31: #wp31
+.. _WP32: #wp32
+.. _WP33: #wp33
+.. _WP40: #wp40
+.. _WP41: #wp41
+.. _WP42: #wp42
+.. _WP43: #wp43
+.. _WP44: #wp44
+.. _WP50: #wp50
+.. _WP51: #wp51
+.. _WP52: #wp52
+.. _WP53: #wp53
+.. _WP54: #wp54
+.. _WP55: #wp55
+.. _WP56: #wp56
+.. _WP60: #wp60
+.. _WP70: #wp70
+.. _WP80: #wp80
+
+.. |e| unicode:: 0x20 .. doesn't work with plain spaces
\ No newline at end of file

Added: pypy/trunk/doc/funding/makedoc/doclist.asc
==============================================================================
--- (empty file)
+++ pypy/trunk/doc/funding/makedoc/doclist.asc	Mon Sep 29 20:04:30 2003
@@ -0,0 +1,37 @@
+B0.0_preamble.html
+B1.0_objectives.html
+B2.0.0_new_relevance.html
+B3.0_impact.html
+B3.1_standards.html
+B4.0_resources.html
+B4.1_subcontracting.html
+B4.2_other_countries.html
+B5.0_management.html
+B6.0_detailed_implementation.html
+B6.1_plan_introduction.html
+B6.4_workpackage_list.html
+B6.7.wp10_management.html
+B6.7.wp20_interpreter.html
+B6.7.wp21_interpreter_completion.html
+B6.7.wp22_cpython_to_python.html
+B6.7.wp30_compiler.html
+B6.7.wp31_translation_of_rpython.html
+B6.7.wp32_bootstrap_redesign.html
+B6.7.wp33_bootstrap_runtime.html
+B6.7.wp40_high_performance.html
+B6.7.wp41_integrate_stackless.html
+B6.7.wp42_several_obj_impl.html
+B6.7.wp43_translator_optimisations.html
+B6.7.wp44_integrate_psyco.html
+B6.7.wp50_validations.html
+B6.7.wp51_embedded_device.html
+B6.7.wp52_small_os_pre.html
+B6.7.wp53_small_os.html
+B6.7.wp54_simd_architecture.html
+B6.7.wp55_numerical_package.html
+B6.7.wp56_load_balancing.html
+B6.7.wp60_documentation.html
+B6.7.wp70_maintenance.html
+B6.7.wp80_synchronisation.html
+B7.0_gender_ethical.html
+B7.2_other_issues.html

Added: pypy/trunk/doc/funding/makedoc/mkdoclist.py
==============================================================================
--- (empty file)
+++ pypy/trunk/doc/funding/makedoc/mkdoclist.py	Mon Sep 29 20:04:30 2003
@@ -0,0 +1,67 @@
+import os, sys, re
+
+def get_file_list():
+    flis = os.listdir("..")
+    pat = "[bB][0-9].[0-9]"
+    lis = []
+    for name in flis:
+        if re.match(pat, name):
+            pre, post = os.path.splitext(name)
+            if post.lower() == ".txt":
+                lis.append(pre)
+    lis.sort()
+    return lis
+
+def mangle_wp_file(txt):
+    lines = txt.split("\n")
+    for line in lines:
+        if line.startswith(".. |wp|"):
+            break
+    else:
+        # no WP file
+        return txt
+    #.. |wp|    replace:: WP21
+    wp = line.split()[-1]
+    # make a local target
+    lines[:0] =[
+        ".. _%s:" % wp.lower(),
+        "",
+        ":DELETE:BEGIN",
+        "",
+        "This is the anchor %s_" % wp,
+        "",
+        ":DELETE:END",
+        ""]
+    # merge the crossref file in, with modifications
+    for line in lines:
+        if line.startswith(".. include:: crossreferences.asc"):
+            break
+    inset = []
+    matchline = line
+    for line in file("crossreferences.asc"):
+        parts = line.split()
+        if len(parts)>=2 and parts[1] == "_%s:" % wp:
+            continue
+        inset.append(line.rstrip())
+    p = lines.index(matchline)
+    lines[p:p+1] = inset
+    txt = "\n".join(lines)
+    return txt
+
+def make_new_files(names):
+    for name in names:
+        txt = file(os.path.join("..", name+".txt")).read()
+        txt = mangle_wp_file(txt)
+        file(name+".txt", "w").write(txt)
+
+def make_doc_list(names):
+    f = file("doclist.asc", "w")
+    for name in names:
+        print>>f, "%s.html" % name
+
+def make_doc():
+    names = get_file_list()
+    make_new_files(names)
+    make_doc_list(names)
+
+    
\ No newline at end of file

Added: pypy/trunk/doc/funding/makedoc/mkxref2.py
==============================================================================
--- (empty file)
+++ pypy/trunk/doc/funding/makedoc/mkxref2.py	Mon Sep 29 20:04:30 2003
@@ -0,0 +1,21 @@
+# mkxref2.py
+#
+# Generate crossreferences.asc
+# this is generated from the upper directory,
+# creating local references into
+# the local document.
+
+import os, sys, re
+
+def build_xref_file():
+    lines = file("../crossreferences.asc").readlines()
+    for i in range(len(lines)):
+        parts = lines[i].split()
+        if len(parts) >= 2:
+            if parts[0] == ".." and parts[1].startswith("_") and parts[1].endswith(":"):
+                txt = parts[1][1:-1]
+                lines[i] = "%s %s %s\n" % (parts[0], parts[1], "#"+txt.lower())
+    file("crossreferences.asc", "w").writelines(lines)
+
+if __name__ == "__main__":
+    build_xref_file()
\ No newline at end of file

Added: pypy/trunk/doc/funding/makedoc/part_b.pdf
==============================================================================
Binary file. No diff available.

Added: pypy/trunk/doc/funding/makedoc/part_b.sxw
==============================================================================
Binary file. No diff available.

Added: pypy/trunk/doc/funding/makedoc/wp-tablebegin.asc
==============================================================================
--- (empty file)
+++ pypy/trunk/doc/funding/makedoc/wp-tablebegin.asc	Mon Sep 29 20:04:30 2003
@@ -0,0 +1,11 @@
+
+.. start a surounding single table cell with a minimum height.
+
+.. raw:: html
+
+    <P ALIGN=JUSTIFY STYLE="margin-top: 0.11cm; margin-bottom: 0.11cm"><BR><BR>
+    </P>
+    <TABLE WIDTH=658 BORDER=1 BORDERCOLOR="#000000" CELLPADDING=7 CELLSPACING=0>
+        <COL WIDTH=642>
+            <TR>
+                <TD WIDTH=642 HEIGHT=154 VALIGN=TOP>

Added: pypy/trunk/doc/funding/makedoc/wp-tableend.asc
==============================================================================
--- (empty file)
+++ pypy/trunk/doc/funding/makedoc/wp-tableend.asc	Mon Sep 29 20:04:30 2003
@@ -0,0 +1,8 @@
+
+.. end a single surrounding table.
+
+.. raw:: html
+
+            </TD>
+        </TR>
+    </TABLE>

Added: pypy/trunk/doc/funding/makedoc/wp-toptable.asc
==============================================================================
--- (empty file)
+++ pypy/trunk/doc/funding/makedoc/wp-toptable.asc	Mon Sep 29 20:04:30 2003
@@ -0,0 +1,185 @@
+
+.. create a nearly exact table for the WPs
+.. note that you must define *all* the |xxx| references.
+
+.. raw:: html
+
+    <P ALIGN=JUSTIFY STYLE="margin-top: 0.11cm; margin-bottom: 0.11cm; page-break-before: always">
+    <FONT COLOR="#000000">
+    </P>
+
+:DELETE:BEGIN
+
+toplevel
++++++++++++
+
+sublevel1
+..................
+
+sublevel2
+##########
+
+:DELETE:END
+
+|title|
+==============
+
+.. raw:: html
+
+
+    <TABLE WIDTH=658 BORDER=1 BORDERCOLOR="#000000" CELLPADDING=7 CELLSPACING=0 RULES=NONE>
+        <COL WIDTH=222>
+        <COL WIDTH=56>
+        <COL WIDTH=56>
+        <COL WIDTH=56>
+        <COL WIDTH=56>
+        <COL WIDTH=56>
+        <COL WIDTH=55>
+        <TR VALIGN=TOP>
+            <TD WIDTH=222>
+                <P ALIGN=JUSTIFY><FONT COLOR="#000000"><B>Workpackage number </B></FONT>
+                </P>
+            </TD>
+            <TD WIDTH=56>
+                
+
+|wp|
+
+.. raw:: html
+
+
+            </TD>
+            <TD COLSPAN=3 WIDTH=197>
+                <P ALIGN=JUSTIFY><FONT COLOR="#000000"><B>Start date or starting
+                event:</B></FONT></P>
+            </TD>
+            <TD COLSPAN=2 WIDTH=126>
+                
+
+|start|
+
+.. raw:: html
+
+
+            </TD>
+        </TR>
+        <TR VALIGN=TOP>
+            <TD WIDTH=222>
+                <P ALIGN=JUSTIFY><FONT COLOR="#000000"><B>Participant id</B></FONT></P>
+            </TD>
+            <TD WIDTH=56>
+                
+
+|p1|
+
+.. raw:: html
+
+
+            </TD>
+            <TD WIDTH=56>
+                
+
+|p2|
+
+.. raw:: html
+
+
+            </TD>
+            <TD WIDTH=56>
+                
+
+|p3|
+
+.. raw:: html
+
+
+            </TD>
+            <TD WIDTH=56>
+                
+
+|p4|
+
+.. raw:: html
+
+
+            </TD>
+            <TD WIDTH=56>
+                
+
+|p5|
+
+.. raw:: html
+
+
+            </TD>
+            <TD WIDTH=55>
+                
+
+|p6|
+
+.. raw:: html
+
+
+            </TD>
+        </TR>
+        <TR VALIGN=TOP>
+            <TD WIDTH=222 HEIGHT=3>
+                <P ALIGN=JUSTIFY><FONT COLOR="#000000"><B>Person-months per
+                participant:</B></FONT></P>
+            </TD>
+            <TD WIDTH=56>
+                
+
+|m1|
+
+.. raw:: html
+
+
+            </TD>
+            <TD WIDTH=56>
+                
+
+|m2|
+
+.. raw:: html
+
+
+            </TD>
+            <TD WIDTH=56>
+                
+
+|m3|
+
+.. raw:: html
+
+
+            </TD>
+            <TD WIDTH=56>
+                
+
+|m4|
+
+.. raw:: html
+
+
+            </TD>
+            <TD WIDTH=56>
+                
+
+|m5|
+
+.. raw:: html
+
+
+            </TD>
+            <TD WIDTH=55>
+                
+
+|m6|
+
+.. raw:: html
+
+
+            </TD>
+        </TR>
+    </TABLE>


More information about the Pypy-commit mailing list