# HG changeset patch # User cmlenz # Date 1157987227 0 # Node ID 84168828b074a9c56c13ecf52233098f5888b768 # Parent 58d974683419a27bad2097c19af66f1e7bdc8d96 Renamed Markup to Genshi in repository. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,5 @@ Version 0.3 -http://svn.edgewall.org/repos/markup/tags/0.3.0/ +http://svn.edgewall.org/repos/genshi/tags/0.3.0/ (?, from branches/stable/0.3.x) * Expression evaluation now differentiates between undefined variables and @@ -37,7 +37,7 @@ Version 0.2 -http://svn.edgewall.org/repos/markup/tags/0.2.0/ +http://svn.edgewall.org/repos/genshi/tags/0.2.0/ (Aug 22 2006, from branches/stable/0.2.x) * XPath syntax errors now contain position info (ticket #20). @@ -76,7 +76,7 @@ Version 0.1 -http://svn.edgewall.org/repos/markup/tags/0.1.0/ +http://svn.edgewall.org/repos/genshi/tags/0.1.0/ (Aug 3 2006, from branches/stable/0.1.x) * First public release diff --git a/INSTALL.txt b/INSTALL.txt --- a/INSTALL.txt +++ b/INSTALL.txt @@ -1,4 +1,4 @@ -Installing Markup +Installing Genshi ================= Prerequisites @@ -11,13 +11,13 @@ Installation ------------ -Once you've downloaded and unpacked a Markup source release, enter the +Once you've downloaded and unpacked a Genshi source release, enter the directory where the archive was unpacked, and run: $ python setup.py install Note that you may need administrator/root privileges for this step, as -this command will by default attempt to install Markup to the Python +this command will by default attempt to install Genshi to the Python site-packages directory on your system. For advanced options, please refer to the easy_install and/or the distutils @@ -30,8 +30,8 @@ Support ------- -If you encounter any problems with Markup, please don't hesitate to ask -questions on the Markup mailing list or IRC channel: +If you encounter any problems with Genshi, please don't hesitate to ask +questions on the Genshi mailing list or IRC channel: - http://markup.edgewall.org/wiki/MailingList - http://markup.edgewall.org/wiki/IrcChannel + http://genshi.edgewall.org/wiki/MailingList + http://genshi.edgewall.org/wiki/IrcChannel diff --git a/README.txt b/README.txt --- a/README.txt +++ b/README.txt @@ -1,11 +1,11 @@ -About Markup +About Genshi ============ -Markup is a Python library that provides an integrated set of components -for parsing, generating, and processing HTML or XML content in a uniform -manner. The major feature is a template language that is heavily inspired -by Kid. +Genshi is a Python library that provides an integrated set of components +for parsing, generating, and processing HTML, XML or other textual +content for output generation on the web. The major feature is a +template language, which is heavily inspired by Kid. -For more information please visit the Markup web site: +For more information please visit the Genshi web site: - + diff --git a/doc/builder.txt b/doc/builder.txt --- a/doc/builder.txt +++ b/doc/builder.txt @@ -4,7 +4,7 @@ Generating Markup Programmatically ================================== -Markup provides a ``builder`` module which lets you generate markup from Python +Genshi provides a ``builder`` module which lets you generate markup from Python code using a very simple syntax. The main entry point to the ``builder`` module is the ``tag`` object (which is actually an instance of the ``ElementFactory`` class). You should rarely (if ever) need to directly import and use any of the @@ -22,7 +22,7 @@ Elements can be created through the `tag` object using attribute access, for example:: - >>> from markup.builder import tag + >>> from genshi.builder import tag >>> doc = tag.p('Some text and ', tag.a('a link', href='http://example.org/'), '.') >>> doc @@ -52,7 +52,7 @@ >>> stream = doc.generate() >>> stream - + >>> print stream

Some text and a link.

diff --git a/doc/index.txt b/doc/index.txt --- a/doc/index.txt +++ b/doc/index.txt @@ -1,23 +1,24 @@ .. -*- mode: rst; encoding: utf-8 -*- ====== -Markup +Genshi ====== ---------------------------------------------------------- -Toolkit for stream-based generation of markup for the web ---------------------------------------------------------- +----------------------------------------------------------- +A toolkit for stream-based generation of output for the web +----------------------------------------------------------- -Markup is a Python library that provides an integrated set of components for -parsing, generating, and processing HTML or XML content in a uniform manner. -The major feature is a template language that is heavily inspired by Kid. +Genshi is a Python library that provides an integrated set of components +for parsing, generating, and processing HTML, XML or other textual content +for output generation on the web. The major feature is a template language, +which is heavily inspired by Kid. * `Markup Streams`_ * `Generating Markup Programmatically`_ -* `Markup XML Template Language`_ -* `Using XPath in Markup`_ +* `Genshi XML Template Language`_ +* `Using XPath in Genshi`_ .. _`Markup Streams`: streams.html .. _`Generating Markup Programmatically`: builder.html -.. _`Markup XML Template Language`: xml-templates.html -.. _`Using XPath in Markup`: xpath.html +.. _`Genshi XML Template Language`: xml-templates.html +.. _`Using XPath in Genshi`: xpath.html diff --git a/doc/logo.gif b/doc/logo.gif index dcbd1d5e9c45187d866f3cf02fdeb94c5b5ebcef..05edacd14f1ae6f2cdf29559104655b815fba1bd GIT binary patch literal 5268 zc$^iKd00$~AI8sqru{UfO*GS{L`}I#3r@vt5;d)oWQtbF8PTFHM@^{|6QLxgn&_fT z3l+r_5rs)Al1$dP7gM<5a{Kvx|9{`-eV)(f`FeT(zQj3l9PkHT1OLCVv9XMd3>O!d zix)2%8XA_HxGAUqxe~Lh5Mal|#FUklbsj$4*VlK>BkZqte+2{te3_YHFc^y#EgEjT zbSWVtEG(>aj&osQ;kE4Ieu<=hef+cTzH0l`Zxt_-lap&|YP!3-*=+WzRjaOM77_$8 zQ1R!)qtT(Eq49yC8b?3nvlks59S`d2>sN33I`z3?zWYD#-rvbTRv#536bkF=>W15| zdw6(QTU*PIN}gQrIZW8KCkubAy2Ka!nkPGWu=e-hxAzC-ryE{99XsyeGWGJ!$oWe% zGc$c zmmE2Itn_GD*$Gj3g}Ab+IzLm(H&Y@x?Q55L>a3*h&xVTye66-K&6i4jFSq&f>!lq> zubrvwz9|XokzMI436slxo7x{7yx)0eq%w1Ku=d$OyTOUh`d5X|FAqQd`|z8$Lz7d& zhhM&Qeckur#fNV`FB45%=JoyU+fJ^ zBQuSc{g`Nw^d9@S{`Lv)rq|ZR3*YAlA%bT%3(0KNIjfqjc!w73G1_pad4iN+o*#k` z$BM(j78iVrjsyj?u6=NJuK8fo$%l1~24{nUIFG}4Q8WEDj$ifaYFcG7^BpgJL!bJj zRTe#XGhkbNEtg@k;)k83!Oddm+H4EM%JG%x?X69!k9ofQCfUjbgXwaQ9kJGRHfLUS zkFAK_*>*|S)%4NoL)jMJXBjccyCq$JZqf&?@6%!#NuXs`^zSSI-wsb zjWlF+W3a$pwPaqUP?ZIaIJSvz+>TdYQ?hEewIJYWrY{0y0eYhx8KR>OfE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^z=t>kb()Bg$2IVkocx$fC}26@aDECts(9 z%LC&9Oq&mLlt7vY&y!+%h;k1(sB#=xrUd4QFmovwMI!eVNT3X9H~OU&J~11u>xCz5 z&^;n?GKtBZGv3NJ^?%#l-lMgTk4nm~3it?XHXJBoX7E5iAIzl};}J8kJ%uGH@$7S` zO*yJb)CRUZ-!I14RM zTfK*WA&$i6(ughv+LO3PCS!{nthD(hC&ZNj%M^&M0$wLVZ&(``N#VFFt>f=dTUi&| z9iKzqGEhHd;a_3eE1Y_zy?5AT6NMU)ActrS=L5ksmi=#+pBlW4!d8i)I1)0ZE(VCM zrV|)P0cG;>L{0;b#6k#6$0yZSdj8Az^KaVF2A3;bqP4BJ&P@cb=d?QW0frdI=(7=G z$OTB&5=#@_LbJu-TB6Zec5xqn2AMCyZFtyb@|L<3j8$SmJTOk&F-jwTH0m)M4<#-~ z%fWOKuS&pw9*5`4uL?NF2Ev0 zpf!MdQc#u>6;MbrzoyCtX7^*kJk)ArlOKZZW??=FCtYN48V}p3iVBpFmmEyvp)m=N zfQ4+4wFJu00EK3P3|#gJG9qxlFs!zK;lV>aWcV79>RdkTO975|VNa=$soT5b$FCsb zK;YR|pcFnH%xlj&qc_y%TC-MTTwvtTiEE3P+M+Bj0n!?|ZSq@u&Z$S>nofgB^-qSC z**}l%qkA6ZXyUx1rqf~~VfZ~GVh-kt)T!|vx+ES=V62T?5~MZw4gG4pctZKOj3s9o z8+N|V7*E~(xOlZ!!@}w{BS+-SlBdRa|C9Z!%F?B|r(04&;~7ic{fy=LwvIMcX!S3Cii|(~@Y9D@ zEfciK&M(#fmp}Hi&&oXG!LTr3$!|{QO=^w^jqcr-^nd l>h5ZdH0az@DsFPdUnyq=78`DFO+N;Xt85-GCK!P0{{Y_Bpql^y diff --git a/doc/logo.lineform/data b/doc/logo.lineform/data index c206a90bed5034ddb1e23820377548d525cce187..f836e7144ec22c73b80c41d7a346dae4d66307e9 GIT binary patch literal 8990 zc$~Fa30zah);}}3xk z-$cNrty>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w={d1f2?>gg_VCP# zyst1*Y(il>%h*)qJ#S9;&(9}LNDR{d>Qi?_EC0P*A89_8HIk#3el5WhxqbjlDfqtB z965Y$3currdYNvWm(&r@A2eUE^v)#<`iNCVdiziC?~hX%Det^)>6-10_D6XxVjc16 zeu?z-PVv}AuZ&80*qIWk(0ECush%yM0=c5jJH5!N>e%+3}&SEtCv&g;7o zkU>_}l~>;FtJTghYxzQ(wD#LV+3h$E*8oXd$yU+ZyR~7Z8%ziKj>iHaAilqt{3Iiz+(RTde!W4Ehe~EE7d6x6`40iB`iLoBD6IYL+nV&Nr8vjP3=?T=TDdm$StW zXfK`E9XMkN9vh;}CumF6X9ZkfDlYAR8#UoRS zD|BFas<`)Z!4m?n6WMed0B``u-d+0-lw5@iVS#Rypv>po3HkHsv-seyuAlBIn3Mra zEVZ~xvd^#4)4rssNiqesL|mD$le#}$j-xzAt)liCFY$b8ZzvENnj;lBa&5xPTX8c+ wrx*&vhW>puj!tn{U)_y1pRygpss!ksfEr^iwN+g93g-bI-YZL&!i@s|2l3!S)Bpeg diff --git a/doc/streams.txt b/doc/streams.txt --- a/doc/streams.txt +++ b/doc/streams.txt @@ -25,12 +25,12 @@ For example, the functions ``XML()`` and ``HTML()`` can be used to convert literal XML or HTML text to a markup stream:: - >>> from markup import XML + >>> from genshi import XML >>> stream = XML('

Some text and ' ... 'a link.' ... '

') >>> stream - + The stream is the result of parsing the text into events. Each event is a tuple of the form ``(kind, data, pos)``, where: @@ -62,7 +62,7 @@ ========= One important feature of markup streams is that you can apply *filters* to the -stream, either filters that come with Markup, or your own custom filters. +stream, either filters that come with Genshi, or your own custom filters. A filter is simply a callable that accepts the stream as parameter, and returns the filtered stream:: @@ -87,8 +87,8 @@ stream = stream | noop -One example of a filter included with Markup is the ``HTMLSanitizer`` in -``markup.filters``. It processes a stream of HTML markup, and strips out any +One example of a filter included with Genshi is the ``HTMLSanitizer`` in +``genshi.filters``. It processes a stream of HTML markup, and strips out any potentially dangerous constructs, such as Javascript event handlers. ``HTMLSanitizer`` is not a function, but rather a class that implements ``__call__``, which means instances of the class are callable. @@ -96,7 +96,7 @@ Both the ``filter()`` method and the pipe operator allow easy chaining of filters:: - from markup.filters import HTMLSanitizer + from genshi.filters import HTMLSanitizer stream = stream.filter(noop, HTMLSanitizer()) That is equivalent to:: @@ -109,8 +109,9 @@ The ``Stream`` class provides two methods for serializing this list of events: ``serialize()`` and ``render()``. The former is a generator that yields chunks -of ``Markup`` objects (which are basically unicode strings). The latter returns -a single string, by default UTF-8 encoded. +of ``Markup`` objects (which are basically unicode strings that are considered +safe for output on the web). The latter returns a single string, by default +UTF-8 encoded. Here's the output from ``serialize()``:: @@ -144,11 +145,11 @@ In addition, the ``render()`` method takes an ``encoding`` parameter, which defaults to “UTF-8”. If set to ``None``, the result will be a unicode string. -The different serializer classes in ``markup.output`` can also be used +The different serializer classes in ``genshi.output`` can also be used directly:: - >>> from markup.filters import HTMLSanitizer - >>> from markup.output import TextSerializer + >>> from genshi.filters import HTMLSanitizer + >>> from genshi.output import TextSerializer >>> print TextSerializer()(HTMLSanitizer()(stream)) Some text and a link. @@ -165,7 +166,7 @@ >>> substream = stream.select('a') >>> substream - + >>> print substream a link @@ -174,10 +175,10 @@ and cannot be rendered again. To work around this, you can wrap such a stream in a ``list``:: - >>> from markup import Stream + >>> from genshi import Stream >>> substream = Stream(list(stream.select('a'))) >>> substream - + >>> print substream a link >>> print substream.select('@href') diff --git a/doc/xml-templates.txt b/doc/xml-templates.txt --- a/doc/xml-templates.txt +++ b/doc/xml-templates.txt @@ -1,10 +1,10 @@ .. -*- mode: rst; encoding: utf-8 -*- ============================ -Markup XML Template Language +Genshi XML Template Language ============================ -Markup provides a simple XML-based template language that is heavily inspired +Genshi provides a simple XML-based template language that is heavily inspired by Kid_, which in turn was inspired by a number of existing template languages, namely XSLT_, TAL_, and PHP_. @@ -15,7 +15,7 @@ .. _php: http://www.php.net/ This document describes the template language and will be most useful as -reference to those developing Markup templates. Templates are XML files of some +reference to those developing Genshi templates. Templates are XML files of some kind (such as XHTML) that include processing directives_ (elements or attributes identified by a separate namespace) that affect how the template is rendered, and template expressions_ that are dynamically substituted by @@ -30,7 +30,7 @@ Python API ---------- -The Python code required for templating with Markup is generally based on the +The Python code required for templating with Genshi is generally based on the following pattern: * Attain a ``Template`` object from a string or file object containing the @@ -42,7 +42,7 @@ For example:: - from markup.template import Template + from genshi.template import Template tmpl = Template('

$title

') stream = tmpl.generate(title='Hello, world!') @@ -55,7 +55,7 @@ However, if you want includes_ to work, you should attain the template instance through a ``TemplateLoader``, and load the template from a file:: - from markup.template import TemplateLoader + from genshi.template import TemplateLoader loader = TemplateLoader([templates_dir]) tmpl = loader.load('test.html') @@ -78,7 +78,7 @@ the curly braces may be omitted. In all other cases, the braces are required so that the template processors knows where the expression ends:: - >>> from markup.template import Context, Template + >>> from genshi.template import Context, Template >>> tmpl = Template('${items[0].capitalize()} item') >>> print tmpl.generate(Context(items=['first', 'second'])) First item @@ -88,7 +88,7 @@ attributes), and vice-versa (i.e. access attributes as if they were items in a dictionary):: - >>> from markup.template import Context, Template + >>> from genshi.template import Context, Template >>> tmpl = Template('${dict.foo}') >>> print tmpl.generate(Context(dict={'foo': 'bar'})) bar @@ -101,28 +101,28 @@ ------------------- Directives are elements and/or attributes in the template that are identified -by the namespace ``http://markup.edgewall.org/``. They can affect how the -template is rendered in a number of ways: Markup provides directives for +by the namespace ``http://genshi.edgewall.org/``. They can affect how the +template is rendered in a number of ways: Genshi provides directives for conditionals and looping, among others. To use directives in a template, the namespace should be declared, which is usually done on the root element:: ... In this example, the default namespace is set to the XHTML namespace, and the -namespace for Markup directives is bound to the prefix “py”. +namespace for Genshi directives is bound to the prefix “py”. All directives can be applied as attributes, and some can also be used as elements. The ``if`` directives for conditionals, for example, can be used in both ways:: ...
@@ -134,7 +134,7 @@ This is basically equivalent to the following:: ... @@ -385,7 +385,7 @@ Inside the body of a ``py:match`` directive, the ``select(path)`` function is made available so that parts or all of the original element can be incorporated -in the output of the match template. See [wiki:MarkupStream#UsingXPath] for +in the output of the match template. See [wiki:GenshiStream#UsingXPath] for more information about this function. This directive can also be used as an element:: @@ -474,7 +474,7 @@ Note that if a variable of the same name already existed outside of the scope of the ``py:with`` directive, it will **not** be overwritten. Instead, it will have the same value it had prior to the ``py:with`` assignment. -Effectively, this means that variables are immutable in Markup. +Effectively, this means that variables are immutable in Genshi. .. _order: @@ -516,7 +516,7 @@ file to be pulled in:: ... @@ -540,10 +540,10 @@ -See the XInclude_ for more about fallback content. Note though that Markup +See the XInclude_ for more about fallback content. Note though that Genshi currently only supports a small subset of XInclude. -Incudes in Markup are fully dynamic: Just like normal attributes, the `href` +Incudes in Genshi are fully dynamic: Just like normal attributes, the `href` attribute accepts expressions_, and directives_ can be used on the ```` element just as on any other element, meaning you can do things like conditional includes:: diff --git a/doc/xpath.txt b/doc/xpath.txt --- a/doc/xpath.txt +++ b/doc/xpath.txt @@ -1,10 +1,10 @@ .. -*- mode: rst; encoding: utf-8 -*- ===================== -Using XPath in Markup +Using XPath in Genshi ===================== -Markup provides basic XPath_ support for matching and querying event streams. +Genshi provides basic XPath_ support for matching and querying event streams. .. _xpath: http://www.w3.org/TR/xpath @@ -18,7 +18,7 @@ Limitations ----------- -Due to the streaming nature of the processing model, Markup uses only a subset +Due to the streaming nature of the processing model, Genshi uses only a subset of the `XPath 1.0`_ language. .. _`XPath 1.0`: http://www.w3.org/TR/xpath @@ -31,7 +31,7 @@ * ``descendant-or-self`` * ``self`` -This means you can't use the ``parent``, ancestor, or sibling axes in Markup +This means you can't use the ``parent``, ancestor, or sibling axes in Genshi (the ``namespace`` axis isn't supported either, but what you'd ever need that for I don't know). Basically, any path expression that would require buffering of the stream is not supported. @@ -64,7 +64,7 @@ :: - from markup.input import XML + from genshi.input import XML doc = XML(''' diff --git a/examples/basic/layout.html b/examples/basic/layout.html --- a/examples/basic/layout.html +++ b/examples/basic/layout.html @@ -1,4 +1,4 @@ -
+
Hello ${hello} diff --git a/examples/basic/run.py b/examples/basic/run.py --- a/examples/basic/run.py +++ b/examples/basic/run.py @@ -5,7 +5,7 @@ import sys import time -from markup.template import TemplateLoader +from genshi.template import TemplateLoader def test(): base_path = os.path.dirname(os.path.abspath(__file__)) diff --git a/examples/basic/test.html b/examples/basic/test.html --- a/examples/basic/test.html +++ b/examples/basic/test.html @@ -2,7 +2,7 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> diff --git a/examples/bench/basic.py b/examples/bench/basic.py --- a/examples/bench/basic.py +++ b/examples/bench/basic.py @@ -4,10 +4,10 @@ import sys import timeit -__all__ = ['clearsilver', 'django', 'kid', 'markup', 'simpletal'] +__all__ = ['clearsilver', 'django', 'kid', 'genshi', 'simpletal'] -def markup(dirname, verbose=False): - from markup.template import TemplateLoader +def genshi(dirname, verbose=False): + from genshi.template import TemplateLoader loader = TemplateLoader([dirname], auto_reload=False) template = loader.load('template.html') def render(): diff --git a/examples/bench/bigtable.py b/examples/bench/bigtable.py --- a/examples/bench/bigtable.py +++ b/examples/bench/bigtable.py @@ -11,8 +11,8 @@ import cElementTree as cet from elementtree import ElementTree as et -from markup.builder import tag -from markup.template import Template +from genshi.builder import tag +from genshi.template import Template import neo_cgi import neo_cs import neo_util @@ -38,16 +38,16 @@ table = [dict(a=1,b=2,c=3,d=4,e=5,f=6,g=7,h=8,i=9,j=10) for x in range(1000)] -markup_tmpl = Template(""" - +genshi_tmpl = Template(""" +
""") -markup_tmpl2 = Template(""" -$table
+genshi_tmpl2 = Template(""" +$table
""") if DjangoTemplate: @@ -64,22 +64,22 @@ context = DjangoContext({'table': table}) django_tmpl.render(context) -def test_markup(): - """Markup template""" - stream = markup_tmpl.generate(table=table) +def test_genshi(): + """Genshi template""" + stream = genshi_tmpl.generate(table=table) stream.render('html', strip_whitespace=False) -def test_markup_builder(): - """Markup template + tag builder""" +def test_genshi_builder(): + """Genshi template + tag builder""" stream = tag.TABLE([ tag.tr([tag.td(c) for c in row.values()]) for row in table ]).generate() - stream = markup_tmpl2.generate(table=stream) + stream = genshi_tmpl2.generate(table=stream) stream.render('html', strip_whitespace=False) def test_builder(): - """Markup tag builder""" + """Genshi tag builder""" stream = tag.TABLE([ tag.tr([ tag.td(c) for c in row.values() @@ -154,7 +154,7 @@ def run(which=None, number=10): - tests = ['test_builder', 'test_markup', 'test_markup_builder', 'test_kid', + tests = ['test_builder', 'test_genshi', 'test_genshi_builder', 'test_kid', 'test_kid_et', 'test_et', 'test_cet', 'test_clearsilver', 'test_django'] if which: diff --git a/examples/bench/markup/base.html b/examples/bench/genshi/base.html rename from examples/bench/markup/base.html rename to examples/bench/genshi/base.html --- a/examples/bench/markup/base.html +++ b/examples/bench/genshi/base.html @@ -1,5 +1,5 @@

diff --git a/examples/bench/markup/template.html b/examples/bench/genshi/template.html rename from examples/bench/markup/template.html rename to examples/bench/genshi/template.html --- a/examples/bench/markup/template.html +++ b/examples/bench/genshi/template.html @@ -2,7 +2,7 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> diff --git a/examples/includes/common/macros.html b/examples/includes/common/macros.html --- a/examples/includes/common/macros.html +++ b/examples/includes/common/macros.html @@ -1,4 +1,4 @@ -

reference me, please
diff --git a/examples/includes/module/test.html b/examples/includes/module/test.html --- a/examples/includes/module/test.html +++ b/examples/includes/module/test.html @@ -2,7 +2,7 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> diff --git a/examples/includes/run.py b/examples/includes/run.py --- a/examples/includes/run.py +++ b/examples/includes/run.py @@ -5,7 +5,7 @@ import sys import timing -from markup.template import Context, TemplateLoader +from genshi.template import Context, TemplateLoader def test(): base_path = os.path.dirname(os.path.abspath(__file__)) diff --git a/examples/includes/skins/default/layout.html b/examples/includes/skins/default/layout.html --- a/examples/includes/skins/default/layout.html +++ b/examples/includes/skins/default/layout.html @@ -1,5 +1,5 @@ diff --git a/examples/transform/run.py b/examples/transform/run.py --- a/examples/transform/run.py +++ b/examples/transform/run.py @@ -4,8 +4,8 @@ import os import sys -from markup.input import HTMLParser -from markup.template import Context, Template +from genshi.input import HTMLParser +from genshi.template import Context, Template def transform(html_filename, tmpl_filename): tmpl_fileobj = open(tmpl_filename) diff --git a/examples/transform/template.xml b/examples/transform/template.xml --- a/examples/transform/template.xml +++ b/examples/transform/template.xml @@ -1,7 +1,7 @@ - + diff --git a/examples/turbogears/README.txt b/examples/turbogears/README.txt --- a/examples/turbogears/README.txt +++ b/examples/turbogears/README.txt @@ -1,4 +1,4 @@ -MarkupTest +GenshiTest This is a TurboGears (http://www.turbogears.org) project. It can be started by running the start-markuptest.py script. diff --git a/examples/turbogears/dev.cfg b/examples/turbogears/dev.cfg --- a/examples/turbogears/dev.cfg +++ b/examples/turbogears/dev.cfg @@ -2,7 +2,7 @@ # This is where all of your settings go for your development environment # Settings that are the same for both development and production # (such as template engine, encodings, etc.) all go in -# markuptest/config/app.cfg +# genshitest/config/app.cfg # DATABASE @@ -33,7 +33,7 @@ # log_debug_info_filter.on = False server.environment="development" -autoreload.package="markuptest" +autoreload.package="genshitest" # Set to True if you'd like to abort execution if a controller gets an # unexpected parameter. False by default @@ -43,13 +43,13 @@ # Logging configuration generally follows the style of the standard # Python logging module configuration. Note that when specifying # log format messages, you need to use *() for formatting variables. -# Deployment independent log configuration is in markuptest/config/log.cfg +# Deployment independent log configuration is in genshitest/config/log.cfg [logging] [[loggers]] -[[[markuptest]]] +[[[gehsnitest]]] level='DEBUG' -qualname='markuptest' +qualname='genshitest' handlers=['debug_out'] [[[allinfo]]] diff --git a/examples/turbogears/markuptest/__init__.py b/examples/turbogears/genshitest/__init__.py rename from examples/turbogears/markuptest/__init__.py rename to examples/turbogears/genshitest/__init__.py diff --git a/examples/turbogears/markuptest/config/__init__.py b/examples/turbogears/genshitest/config/__init__.py rename from examples/turbogears/markuptest/config/__init__.py rename to examples/turbogears/genshitest/config/__init__.py diff --git a/examples/turbogears/markuptest/config/app.cfg b/examples/turbogears/genshitest/config/app.cfg rename from examples/turbogears/markuptest/config/app.cfg rename to examples/turbogears/genshitest/config/app.cfg --- a/examples/turbogears/markuptest/config/app.cfg +++ b/examples/turbogears/genshitest/config/app.cfg @@ -10,7 +10,7 @@ # which view (template engine) to use if one is not specified in the # template name -tg.defaultview = "markup" +tg.defaultview = "genshi" # The following kid settings determine the settings used by the kid serializer. @@ -60,7 +60,7 @@ visit.manager="sqlobject" # Database class to use for visit tracking -visit.soprovider.model = "markuptest.model.Visit" +visit.soprovider.model = "genshitest.model.Visit" # IDENTITY # General configuration of the TurboGears Identity management module @@ -96,9 +96,9 @@ # The classes you wish to use for your Identity model. Remember to not use reserved # SQL keywords for class names (at least unless you specify a different table # name using sqlmeta). -identity.soprovider.model.user="markuptest.model.User" -identity.soprovider.model.group="markuptest.model.Group" -identity.soprovider.model.permission="markuptest.model.Permission" +identity.soprovider.model.user="genshitest.model.User" +identity.soprovider.model.group="genshitest.model.Group" +identity.soprovider.model.permission="genshitest.model.Permission" # The password encryption algorithm used when comparing passwords against what's # stored in the database. Valid values are 'md5' or 'sha1'. If you do not diff --git a/examples/turbogears/markuptest/config/log.cfg b/examples/turbogears/genshitest/config/log.cfg rename from examples/turbogears/markuptest/config/log.cfg rename to examples/turbogears/genshitest/config/log.cfg diff --git a/examples/turbogears/markuptest/controllers.py b/examples/turbogears/genshitest/controllers.py rename from examples/turbogears/markuptest/controllers.py rename to examples/turbogears/genshitest/controllers.py --- a/examples/turbogears/markuptest/controllers.py +++ b/examples/turbogears/genshitest/controllers.py @@ -6,12 +6,12 @@ from turbogears import controllers, expose, validate, redirect, widgets from turbogears import identity -from markuptest import json +from genshitest import json -log = logging.getLogger("markuptest.controllers") +log = logging.getLogger("genshitest.controllers") class Root(controllers.RootController): - @expose(template="markuptest.templates.welcome") + @expose(template="genshitest.templates.welcome") def index(self): import time log.debug("Happy TurboGears Controller Responding For Duty") @@ -19,11 +19,11 @@ widget=widgets.TextArea(name="widget_test", default="This is a test of using " "TurboGears widgets with " - "Markup", + "Genshi", rows=5, cols=40)) - @expose(template="markuptest.templates.login") + @expose(template="genshitest.templates.login") def login(self, forward_url=None, previous_url=None, *args, **kw): if not identity.current.anonymous \ diff --git a/examples/turbogears/markuptest/json.py b/examples/turbogears/genshitest/json.py rename from examples/turbogears/markuptest/json.py rename to examples/turbogears/genshitest/json.py diff --git a/examples/turbogears/markuptest/model.py b/examples/turbogears/genshitest/model.py rename from examples/turbogears/markuptest/model.py rename to examples/turbogears/genshitest/model.py --- a/examples/turbogears/markuptest/model.py +++ b/examples/turbogears/genshitest/model.py @@ -5,7 +5,7 @@ from turbogears import identity from turbogears.database import PackageHub -hub = PackageHub("markuptest") +hub = PackageHub("genshitest") __connection__ = hub # class YourDataClass(SQLObject): diff --git a/examples/turbogears/markuptest/release.py b/examples/turbogears/genshitest/release.py rename from examples/turbogears/markuptest/release.py rename to examples/turbogears/genshitest/release.py --- a/examples/turbogears/markuptest/release.py +++ b/examples/turbogears/genshitest/release.py @@ -1,4 +1,4 @@ -# Release information about MarkupTest +# Release information about GenshiTest version = "1.0" diff --git a/examples/turbogears/markuptest/static/images/favicon.ico b/examples/turbogears/genshitest/static/images/favicon.ico rename from examples/turbogears/markuptest/static/images/favicon.ico rename to examples/turbogears/genshitest/static/images/favicon.ico diff --git a/examples/turbogears/markuptest/static/images/tg_under_the_hood.png b/examples/turbogears/genshitest/static/images/tg_under_the_hood.png rename from examples/turbogears/markuptest/static/images/tg_under_the_hood.png rename to examples/turbogears/genshitest/static/images/tg_under_the_hood.png diff --git a/examples/turbogears/markuptest/templates/__init__.py b/examples/turbogears/genshitest/templates/__init__.py rename from examples/turbogears/markuptest/templates/__init__.py rename to examples/turbogears/genshitest/templates/__init__.py diff --git a/examples/turbogears/markuptest/templates/login.html b/examples/turbogears/genshitest/templates/login.html rename from examples/turbogears/markuptest/templates/login.html rename to examples/turbogears/genshitest/templates/login.html --- a/examples/turbogears/markuptest/templates/login.html +++ b/examples/turbogears/genshitest/templates/login.html @@ -1,7 +1,7 @@ diff --git a/examples/turbogears/markuptest/templates/master.html b/examples/turbogears/genshitest/templates/master.html rename from examples/turbogears/markuptest/templates/master.html rename to examples/turbogears/genshitest/templates/master.html --- a/examples/turbogears/markuptest/templates/master.html +++ b/examples/turbogears/genshitest/templates/master.html @@ -1,6 +1,6 @@ diff --git a/examples/turbogears/markuptest/templates/sitetemplate.html b/examples/turbogears/genshitest/templates/sitetemplate.html rename from examples/turbogears/markuptest/templates/sitetemplate.html rename to examples/turbogears/genshitest/templates/sitetemplate.html --- a/examples/turbogears/markuptest/templates/sitetemplate.html +++ b/examples/turbogears/genshitest/templates/sitetemplate.html @@ -1,6 +1,6 @@ diff --git a/examples/turbogears/markuptest/templates/welcome.html b/examples/turbogears/genshitest/templates/welcome.html rename from examples/turbogears/markuptest/templates/welcome.html rename to examples/turbogears/genshitest/templates/welcome.html --- a/examples/turbogears/markuptest/templates/welcome.html +++ b/examples/turbogears/genshitest/templates/welcome.html @@ -1,6 +1,6 @@ diff --git a/examples/turbogears/markuptest/tests/__init__.py b/examples/turbogears/genshitest/tests/__init__.py rename from examples/turbogears/markuptest/tests/__init__.py rename to examples/turbogears/genshitest/tests/__init__.py diff --git a/examples/turbogears/markuptest/tests/test_controllers.py b/examples/turbogears/genshitest/tests/test_controllers.py rename from examples/turbogears/markuptest/tests/test_controllers.py rename to examples/turbogears/genshitest/tests/test_controllers.py --- a/examples/turbogears/markuptest/tests/test_controllers.py +++ b/examples/turbogears/genshitest/tests/test_controllers.py @@ -1,5 +1,5 @@ from turbogears import testutil -from markuptest.controllers import Root +from genshitest.controllers import Root import cherrypy cherrypy.root = Root() diff --git a/examples/turbogears/markuptest/tests/test_model.py b/examples/turbogears/genshitest/tests/test_model.py rename from examples/turbogears/markuptest/tests/test_model.py rename to examples/turbogears/genshitest/tests/test_model.py --- a/examples/turbogears/markuptest/tests/test_model.py +++ b/examples/turbogears/genshitest/tests/test_model.py @@ -5,7 +5,7 @@ # which is very fast. from turbogears import testutil -# from markuptest.model import YourDataClass, User +# from genshitest.model import YourDataClass, User # database.set_db_uri("sqlite:///:memory:") diff --git a/examples/turbogears/sample-prod.cfg b/examples/turbogears/sample-prod.cfg --- a/examples/turbogears/sample-prod.cfg +++ b/examples/turbogears/sample-prod.cfg @@ -4,7 +4,7 @@ # as a command-line option to your start script. # Settings that are the same for both development and production # (such as template engine, encodings, etc.) all go in -# markuptest/config/app.cfg +# genshitest/config/app.cfg # pick the form for your database # sqlobject.dburi="postgres://username@hostname/databasename" @@ -44,7 +44,7 @@ # Logging configuration generally follows the style of the standard # Python logging module configuration. Note that when specifying # log format messages, you need to use *() for formatting variables. -# Deployment independent log configuration is in markuptest/config/log.cfg +# Deployment independent log configuration is in genshitest/config/log.cfg [logging] [[handlers]] @@ -57,9 +57,9 @@ formatter='message_only' [[loggers]] -[[[markuptest]]] +[[[genshitest]]] level='ERROR' -qualname='markuptest' +qualname='genshitest' handlers=['error_out'] [[[access]]] diff --git a/examples/turbogears/setup.py b/examples/turbogears/setup.py --- a/examples/turbogears/setup.py +++ b/examples/turbogears/setup.py @@ -2,10 +2,10 @@ from turbogears.finddata import find_package_data import os -execfile(os.path.join("markuptest", "release.py")) +execfile(os.path.join("genshitest", "release.py")) setup( - name="MarkupTest", + name="GenshiTest", version=version, # uncomment the following lines if you fill them out in release.py @@ -19,11 +19,11 @@ install_requires = [ "TurboGears >= 0.9a9dev-r1686", ], - scripts = ["start-markuptest.py"], + scripts = ["start-genshitest.py"], zip_safe=False, packages=find_packages(), - package_data = find_package_data(where='markuptest', - package='markuptest'), + package_data = find_package_data(where='genshitest', + package='genshitest'), keywords = [ # Use keywords if you'll be adding your package to the # Python Cheeseshop diff --git a/examples/turbogears/start-markuptest.py b/examples/turbogears/start-genshitest.py rename from examples/turbogears/start-markuptest.py rename to examples/turbogears/start-genshitest.py --- a/examples/turbogears/start-markuptest.py +++ b/examples/turbogears/start-genshitest.py @@ -15,14 +15,14 @@ # probably installed if len(sys.argv) > 1: turbogears.update_config(configfile=sys.argv[1], - modulename="markuptest.config") + modulename="genshitest.config") elif exists(join(dirname(__file__), "setup.py")): turbogears.update_config(configfile="dev.cfg", - modulename="markuptest.config") + modulename="genshitest.config") else: turbogears.update_config(configfile="prod.cfg", - modulename="markuptest.config") + modulename="genshitest.config") -from markuptest.controllers import Root +from genshitest.controllers import Root turbogears.start_server(Root()) diff --git a/markup/__init__.py b/genshi/__init__.py rename from markup/__init__.py rename to genshi/__init__.py --- a/markup/__init__.py +++ b/genshi/__init__.py @@ -5,11 +5,11 @@ # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms -# are also available at http://markup.edgewall.org/wiki/License. +# are also available at http://genshi.edgewall.org/wiki/License. # # This software consists of voluntary contributions made by many # individuals. For the exact contribution history, see the revision -# history and logs, available at http://markup.edgewall.org/log/. +# history and logs, available at http://genshi.edgewall.org/log/. """This package provides various means for generating and processing web markup (XML or HTML). @@ -23,9 +23,9 @@ ------------------ Literal XML and HTML text can be used to easily produce markup streams -via helper functions in the `markup.input` module: +via helper functions in the `genshi.input` module: ->>> from markup.input import XML +>>> from genshi.input import XML >>> doc = XML('My document') This results in a `Stream` object that can be used in a number of way. @@ -33,7 +33,7 @@ >>> doc.render(method='html', encoding='utf-8') 'My document' ->>> from markup.input import HTML +>>> from genshi.input import HTML >>> doc = HTML('My document</HTML>') >>> doc.render(method='html', encoding='utf-8') '<html lang="en"><head><title>My document' @@ -44,13 +44,13 @@ Markup streams can also be generated programmatically using the -`markup.builder` module: +`genshi.builder` module: ->>> from markup.builder import tag +>>> from genshi.builder import tag >>> doc = tag.doc(tag.title('My document'), lang='en') >>> doc.generate().render(method='html') 'My document' """ -from markup.core import * -from markup.input import ParseError, XML, HTML +from genshi.core import * +from genshi.input import ParseError, XML, HTML diff --git a/markup/builder.py b/genshi/builder.py rename from markup/builder.py rename to genshi/builder.py --- a/markup/builder.py +++ b/genshi/builder.py @@ -5,13 +5,13 @@ # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms -# are also available at http://markup.edgewall.org/wiki/License. +# are also available at http://genshi.edgewall.org/wiki/License. # # This software consists of voluntary contributions made by many # individuals. For the exact contribution history, see the revision -# history and logs, available at http://markup.edgewall.org/log/. +# history and logs, available at http://genshi.edgewall.org/log/. -from markup.core import Attrs, Namespace, QName, Stream, START, END, TEXT +from genshi.core import Attrs, Namespace, QName, Stream, START, END, TEXT __all__ = ['Fragment', 'Element', 'tag'] @@ -147,7 +147,7 @@ Elements with a namespace can be generated using the `Namespace` and/or `QName` classes: - >>> from markup.core import Namespace + >>> from genshi.core import Namespace >>> xhtml = Namespace('http://www.w3.org/1999/xhtml') >>> print Element(xhtml.html, lang='en') diff --git a/markup/core.py b/genshi/core.py rename from markup/core.py rename to genshi/core.py --- a/markup/core.py +++ b/genshi/core.py @@ -5,11 +5,11 @@ # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms -# are also available at http://markup.edgewall.org/wiki/License. +# are also available at http://genshi.edgewall.org/wiki/License. # # This software consists of voluntary contributions made by many # individuals. For the exact contribution history, see the revision -# history and logs, available at http://markup.edgewall.org/log/. +# history and logs, available at http://genshi.edgewall.org/log/. """Core classes for markup processing.""" @@ -72,7 +72,7 @@ Assume the following stream produced by the `HTML` function: - >>> from markup.input import HTML + >>> from genshi.input import HTML >>> html = HTML('''

Hello, world!

''') >>> print html

Hello, world!

@@ -80,7 +80,7 @@ A filter such as the HTML sanitizer can be applied to that stream using the pipe notation as follows: - >>> from markup.filters import HTMLSanitizer + >>> from genshi.filters import HTMLSanitizer >>> sanitizer = HTMLSanitizer() >>> print html | sanitizer

Hello, world!

@@ -98,7 +98,7 @@ Serializers can also be used with this notation: - >>> from markup.output import TextSerializer + >>> from genshi.output import TextSerializer >>> output = TextSerializer() >>> print html | sanitizer | uppercase | output HELLO, WORLD! @@ -152,7 +152,7 @@ @param path: a string containing the XPath expression """ - from markup.path import Path + from genshi.path import Path return Path(path).select(self) def serialize(self, method='xml', **kwargs): @@ -170,7 +170,7 @@ Any additional keyword arguments are passed to the serializer, and thus depend on the `method` parameter value. """ - from markup import output + from genshi import output cls = method if isinstance(method, basestring): cls = {'xml': output.XMLSerializer, diff --git a/markup/eval.py b/genshi/eval.py rename from markup/eval.py rename to genshi/eval.py --- a/markup/eval.py +++ b/genshi/eval.py @@ -5,11 +5,11 @@ # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms -# are also available at http://markup.edgewall.org/wiki/License. +# are also available at http://genshi.edgewall.org/wiki/License. # # This software consists of voluntary contributions made by many # individuals. For the exact contribution history, see the revision -# history and logs, available at http://markup.edgewall.org/log/. +# history and logs, available at http://genshi.edgewall.org/log/. """Support for "safe" evaluation of Python expressions.""" diff --git a/markup/filters.py b/genshi/filters.py rename from markup/filters.py rename to genshi/filters.py --- a/markup/filters.py +++ b/genshi/filters.py @@ -5,11 +5,11 @@ # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms -# are also available at http://markup.edgewall.org/wiki/License. +# are also available at http://genshi.edgewall.org/wiki/License. # # This software consists of voluntary contributions made by many # individuals. For the exact contribution history, see the revision -# history and logs, available at http://markup.edgewall.org/log/. +# history and logs, available at http://genshi.edgewall.org/log/. """Implementation of a number of stream filters.""" @@ -19,8 +19,8 @@ from sets import ImmutableSet as frozenset import re -from markup.core import Attrs, Namespace, stripentities -from markup.core import END, END_NS, START, START_NS +from genshi.core import Attrs, Namespace, stripentities +from genshi.core import END, END_NS, START, START_NS __all__ = ['HTMLSanitizer', 'IncludeFilter'] @@ -137,7 +137,7 @@ @param stream: the markup event stream to filter @param ctxt: the template context """ - from markup.template import TemplateError, TemplateNotFound + from genshi.template import TemplateError, TemplateNotFound ns_prefixes = [] in_fallback = False diff --git a/markup/input.py b/genshi/input.py rename from markup/input.py rename to genshi/input.py --- a/markup/input.py +++ b/genshi/input.py @@ -5,11 +5,11 @@ # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms -# are also available at http://markup.edgewall.org/wiki/License. +# are also available at http://genshi.edgewall.org/wiki/License. # # This software consists of voluntary contributions made by many # individuals. For the exact contribution history, see the revision -# history and logs, available at http://markup.edgewall.org/log/. +# history and logs, available at http://genshi.edgewall.org/log/. from itertools import chain from xml.parsers import expat @@ -21,8 +21,8 @@ import htmlentitydefs from StringIO import StringIO -from markup.core import Attrs, QName, Stream -from markup.core import DOCTYPE, START, END, START_NS, END_NS, TEXT, \ +from genshi.core import Attrs, QName, Stream +from genshi.core import DOCTYPE, START, END, START_NS, END_NS, TEXT, \ START_CDATA, END_CDATA, PI, COMMENT __all__ = ['ParseError', 'XMLParser', 'XML', 'HTMLParser', 'HTML'] diff --git a/markup/output.py b/genshi/output.py rename from markup/output.py rename to genshi/output.py --- a/markup/output.py +++ b/genshi/output.py @@ -5,11 +5,11 @@ # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms -# are also available at http://markup.edgewall.org/wiki/License. +# are also available at http://genshi.edgewall.org/wiki/License. # # This software consists of voluntary contributions made by many # individuals. For the exact contribution history, see the revision -# history and logs, available at http://markup.edgewall.org/log/. +# history and logs, available at http://genshi.edgewall.org/log/. """This module provides different kinds of serialization methods for XML event streams. @@ -22,8 +22,8 @@ from sets import ImmutableSet as frozenset import re -from markup.core import escape, Markup, Namespace, QName, StreamEventKind -from markup.core import DOCTYPE, START, END, START_NS, TEXT, START_CDATA, \ +from genshi.core import escape, Markup, Namespace, QName, StreamEventKind +from genshi.core import DOCTYPE, START, END, START_NS, TEXT, START_CDATA, \ END_CDATA, PI, COMMENT, XML_NAMESPACE __all__ = ['DocType', 'XMLSerializer', 'XHTMLSerializer', 'HTMLSerializer', @@ -49,7 +49,7 @@ class XMLSerializer(object): """Produces XML text from an event stream. - >>> from markup.builder import tag + >>> from genshi.builder import tag >>> elem = tag.div(tag.a(href='foo'), tag.br, tag.hr(noshade=True)) >>> print ''.join(XMLSerializer()(elem.generate()))


@@ -169,7 +169,7 @@ class XHTMLSerializer(XMLSerializer): """Produces XHTML text from an event stream. - >>> from markup.builder import tag + >>> from genshi.builder import tag >>> elem = tag.div(tag.a(href='foo'), tag.br, tag.hr(noshade=True)) >>> print ''.join(XHTMLSerializer()(elem.generate()))


@@ -292,7 +292,7 @@ class HTMLSerializer(XHTMLSerializer): """Produces HTML text from an event stream. - >>> from markup.builder import tag + >>> from genshi.builder import tag >>> elem = tag.div(tag.a(href='foo'), tag.br, tag.hr(noshade=True)) >>> print ''.join(HTMLSerializer()(elem.generate()))


@@ -396,7 +396,7 @@ Only text events are included in the output. Unlike the other serializer, special XML characters are not escaped: - >>> from markup.builder import tag + >>> from genshi.builder import tag >>> elem = tag.div(tag.a('', href='foo'), tag.br) >>> print elem diff --git a/markup/path.py b/genshi/path.py rename from markup/path.py rename to genshi/path.py --- a/markup/path.py +++ b/genshi/path.py @@ -5,15 +5,15 @@ # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms -# are also available at http://markup.edgewall.org/wiki/License. +# are also available at http://genshi.edgewall.org/wiki/License. # # This software consists of voluntary contributions made by many # individuals. For the exact contribution history, see the revision -# history and logs, available at http://markup.edgewall.org/log/. +# history and logs, available at http://genshi.edgewall.org/log/. """Basic support for evaluating XPath expressions against streams. ->>> from markup.input import XML +>>> from genshi.input import XML >>> doc = XML(''' ... ... @@ -34,8 +34,8 @@ from math import ceil, floor import re -from markup.core import Stream, Attrs, Namespace, QName -from markup.core import START, END, TEXT, COMMENT, PI +from genshi.core import Stream, Attrs, Namespace, QName +from genshi.core import START, END, TEXT, COMMENT, PI __all__ = ['Path', 'PathSyntaxError'] @@ -96,7 +96,7 @@ If there are no matches, this method returns an empty stream. - >>> from markup.input import XML + >>> from genshi.input import XML >>> xml = XML('Text') >>> print Path('.//child').select(xml) @@ -146,7 +146,7 @@ If the path matches the event, the function returns the match (for example, a `START` or `TEXT` event.) Otherwise, it returns `None`. - >>> from markup.input import XML + >>> from genshi.input import XML >>> xml = XML('') >>> test = Path('child').test() >>> for kind, data, pos in xml: diff --git a/markup/plugin.py b/genshi/plugin.py rename from markup/plugin.py rename to genshi/plugin.py --- a/markup/plugin.py +++ b/genshi/plugin.py @@ -6,11 +6,11 @@ # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms -# are also available at http://markup.edgewall.org/wiki/License. +# are also available at http://genshi.edgewall.org/wiki/License. # # This software consists of voluntary contributions made by many # individuals. For the exact contribution history, see the revision -# history and logs, available at http://markup.edgewall.org/log/. +# history and logs, available at http://genshi.edgewall.org/log/. """Basic support for the template engine plugin API used by TurboGears and CherryPy/Buffet. @@ -18,10 +18,10 @@ from pkg_resources import resource_filename -from markup.core import Attrs, Stream, QName -from markup.eval import Undefined -from markup.input import HTML, XML -from markup.template import Context, Template, TemplateLoader +from genshi.core import Attrs, Stream, QName +from genshi.eval import Undefined +from genshi.input import HTML, XML +from genshi.template import Context, Template, TemplateLoader def ET(element): """Converts the given ElementTree element to a markup stream.""" diff --git a/markup/template.py b/genshi/template.py rename from markup/template.py rename to genshi/template.py --- a/markup/template.py +++ b/genshi/template.py @@ -5,11 +5,11 @@ # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms -# are also available at http://markup.edgewall.org/wiki/License. +# are also available at http://genshi.edgewall.org/wiki/License. # # This software consists of voluntary contributions made by many # individuals. For the exact contribution history, see the revision -# history and logs, available at http://markup.edgewall.org/log/. +# history and logs, available at http://genshi.edgewall.org/log/. """Implementation of the template engine.""" @@ -24,11 +24,11 @@ import re from StringIO import StringIO -from markup.core import Attrs, Namespace, Stream, StreamEventKind, _ensure -from markup.core import START, END, START_NS, END_NS, TEXT, COMMENT -from markup.eval import Expression -from markup.input import XMLParser -from markup.path import Path +from genshi.core import Attrs, Namespace, Stream, StreamEventKind, _ensure +from genshi.core import START, END, START_NS, END_NS, TEXT, COMMENT +from genshi.eval import Expression +from genshi.input import XMLParser +from genshi.path import Path __all__ = ['BadDirectiveError', 'TemplateError', 'TemplateSyntaxError', 'TemplateNotFound', 'Template', 'TemplateLoader'] @@ -216,7 +216,7 @@ of `(name, value)` tuples. The items in that dictionary or sequence are added as attributes to the element: - >>> tmpl = Template('''
    + >>> tmpl = Template('''
      ...
    • Bar
    • ...
    ''') >>> print tmpl.generate(foo={'class': 'collapse'}) @@ -269,7 +269,7 @@ This directive replaces the content of the element with the result of evaluating the value of the `py:content` attribute: - >>> tmpl = Template('''
      + >>> tmpl = Template('''
        ...
      • Hello
      • ...
      ''') >>> print tmpl.generate(bar='Bye') @@ -305,7 +305,7 @@ A named template function can be used just like a normal Python function from template expressions: - >>> tmpl = Template('''
      + >>> tmpl = Template('''
      ...

      ... ${greeting}, ${name}! ...

      @@ -321,7 +321,7 @@ If a function does not require parameters, the parenthesis can be omitted both when defining and when calling it: - >>> tmpl = Template('''
      + >>> tmpl = Template('''
      ...

      ... Hello, world! ...

      @@ -394,7 +394,7 @@ """Implementation of the `py:for` template directive for repeating an element based on an iterable in the context data. - >>> tmpl = Template('''
        + >>> tmpl = Template('''
          ...
        • ${item}
        • ...
        ''') >>> print tmpl.generate(items=[1, 2, 3]) @@ -439,7 +439,7 @@ """Implementation of the `py:if` template directive for conditionally excluding elements from being output. - >>> tmpl = Template('''
        + >>> tmpl = Template('''
        ... ${bar} ...
        ''') >>> print tmpl.generate(foo=True, bar='Hello') @@ -460,7 +460,7 @@ class MatchDirective(Directive): """Implementation of the `py:match` template directive. - >>> tmpl = Template('''
        + >>> tmpl = Template('''
        ... ... Hello ${select('@name')} ... @@ -496,7 +496,7 @@ This directive replaces the element with the result of evaluating the value of the `py:replace` attribute: - >>> tmpl = Template('''
        + >>> tmpl = Template('''
        ... Hello ...
        ''') >>> print tmpl.generate(bar='Bye') @@ -507,7 +507,7 @@ This directive is equivalent to `py:content` combined with `py:strip`, providing a less verbose way to achieve the same effect: - >>> tmpl = Template('''
        + >>> tmpl = Template('''
        ... Hello ...
        ''') >>> print tmpl.generate(bar='Bye') @@ -528,7 +528,7 @@ When the value of the `py:strip` attribute evaluates to `True`, the element is stripped from the output - >>> tmpl = Template('''
        + >>> tmpl = Template('''
        ...
        foo
        ...
        ''') >>> print tmpl.generate() @@ -541,7 +541,7 @@ This directive is particulary interesting for named template functions or match templates that do not generate a top-level element: - >>> tmpl = Template('''
        + >>> tmpl = Template('''
        ...
        ... ${what} ...
        @@ -582,7 +582,7 @@ If no `py:when` directive is matched then the fallback directive `py:otherwise` will be used. - >>> tmpl = Template('''
        >> tmpl = Template('''
        ... 0 ... 1 @@ -596,7 +596,7 @@ If the `py:choose` directive contains an expression, the nested `py:when` directives are tested for equality to the `py:choose` expression: - >>> tmpl = Template('''
        >> tmpl = Template('''
        ... 1 ... 2 @@ -679,7 +679,7 @@ """Implementation of the `py:with` template directive, which allows shorthand access to variables and expressions. - >>> tmpl = Template('''
        + >>> tmpl = Template('''
        ... $x $y $z ...
        ''') >>> print tmpl.generate(x=42) @@ -733,7 +733,7 @@ """Can parse a template and transform it into the corresponding output based on context data. """ - NAMESPACE = Namespace('http://markup.edgewall.org/') + NAMESPACE = Namespace('http://genshi.edgewall.org/') EXPR = StreamEventKind('EXPR') # an expression SUB = StreamEventKind('SUB') # a "subprogram" @@ -1151,7 +1151,7 @@ template is being loaded, or `None` if the template is being loaded directly """ - from markup.filters import IncludeFilter + from genshi.filters import IncludeFilter if relative_to: filename = os.path.join(os.path.dirname(relative_to), filename) diff --git a/markup/tests/__init__.py b/genshi/tests/__init__.py rename from markup/tests/__init__.py rename to genshi/tests/__init__.py --- a/markup/tests/__init__.py +++ b/genshi/tests/__init__.py @@ -5,21 +5,21 @@ # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms -# are also available at http://markup.edgewall.org/wiki/License. +# are also available at http://genshi.edgewall.org/wiki/License. # # This software consists of voluntary contributions made by many # individuals. For the exact contribution history, see the revision -# history and logs, available at http://markup.edgewall.org/log/. +# history and logs, available at http://genshi.edgewall.org/log/. import doctest import unittest def suite(): - import markup - from markup.tests import builder, core, eval, filters, input, output, \ + import genshi + from genshi.tests import builder, core, eval, filters, input, output, \ path, template suite = unittest.TestSuite() - suite.addTest(doctest.DocTestSuite(markup)) + suite.addTest(doctest.DocTestSuite(genshi)) suite.addTest(builder.suite()) suite.addTest(core.suite()) suite.addTest(eval.suite()) diff --git a/markup/tests/builder.py b/genshi/tests/builder.py rename from markup/tests/builder.py rename to genshi/tests/builder.py --- a/markup/tests/builder.py +++ b/genshi/tests/builder.py @@ -5,18 +5,18 @@ # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms -# are also available at http://markup.edgewall.org/wiki/License. +# are also available at http://genshi.edgewall.org/wiki/License. # # This software consists of voluntary contributions made by many # individuals. For the exact contribution history, see the revision -# history and logs, available at http://markup.edgewall.org/log/. +# history and logs, available at http://genshi.edgewall.org/log/. import doctest from HTMLParser import HTMLParseError import unittest -from markup.builder import Element, tag -from markup.core import Stream +from genshi.builder import Element, tag +from genshi.core import Stream class ElementFactoryTestCase(unittest.TestCase): diff --git a/markup/tests/core.py b/genshi/tests/core.py rename from markup/tests/core.py rename to genshi/tests/core.py --- a/markup/tests/core.py +++ b/genshi/tests/core.py @@ -5,17 +5,17 @@ # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms -# are also available at http://markup.edgewall.org/wiki/License. +# are also available at http://genshi.edgewall.org/wiki/License. # # This software consists of voluntary contributions made by many # individuals. For the exact contribution history, see the revision -# history and logs, available at http://markup.edgewall.org/log/. +# history and logs, available at http://genshi.edgewall.org/log/. import doctest import unittest -from markup.core import * -from markup.input import XML, ParseError +from genshi.core import * +from genshi.input import XML, ParseError class StreamTestCase(unittest.TestCase): diff --git a/markup/tests/eval.py b/genshi/tests/eval.py rename from markup/tests/eval.py rename to genshi/tests/eval.py --- a/markup/tests/eval.py +++ b/genshi/tests/eval.py @@ -5,17 +5,17 @@ # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms -# are also available at http://markup.edgewall.org/wiki/License. +# are also available at http://genshi.edgewall.org/wiki/License. # # This software consists of voluntary contributions made by many # individuals. For the exact contribution history, see the revision -# history and logs, available at hhttp://markup.edgewall.org/log/. +# history and logs, available at hhttp://genshi.edgewall.org/log/. import doctest import sys import unittest -from markup.eval import Expression, Undefined +from genshi.eval import Expression, Undefined class ExpressionTestCase(unittest.TestCase): diff --git a/markup/tests/filters.py b/genshi/tests/filters.py rename from markup/tests/filters.py rename to genshi/tests/filters.py --- a/markup/tests/filters.py +++ b/genshi/tests/filters.py @@ -5,18 +5,18 @@ # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms -# are also available at http://markup.edgewall.org/wiki/License. +# are also available at http://genshi.edgewall.org/wiki/License. # # This software consists of voluntary contributions made by many # individuals. For the exact contribution history, see the revision -# history and logs, available at http://markup.edgewall.org/log/. +# history and logs, available at http://genshi.edgewall.org/log/. import doctest import unittest -from markup.core import Stream -from markup.input import HTML, ParseError -from markup.filters import HTMLSanitizer +from genshi.core import Stream +from genshi.input import HTML, ParseError +from genshi.filters import HTMLSanitizer class HTMLSanitizerTestCase(unittest.TestCase): diff --git a/markup/tests/input.py b/genshi/tests/input.py rename from markup/tests/input.py rename to genshi/tests/input.py --- a/markup/tests/input.py +++ b/genshi/tests/input.py @@ -5,19 +5,19 @@ # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms -# are also available at http://markup.edgewall.org/wiki/License. +# are also available at http://genshi.edgewall.org/wiki/License. # # This software consists of voluntary contributions made by many # individuals. For the exact contribution history, see the revision -# history and logs, available at http://markup.edgewall.org/log/. +# history and logs, available at http://genshi.edgewall.org/log/. import doctest from StringIO import StringIO import sys import unittest -from markup.core import Stream -from markup.input import XMLParser, HTMLParser, ParseError +from genshi.core import Stream +from genshi.input import XMLParser, HTMLParser, ParseError class XMLParserTestCase(unittest.TestCase): diff --git a/markup/tests/output.py b/genshi/tests/output.py rename from markup/tests/output.py rename to genshi/tests/output.py --- a/markup/tests/output.py +++ b/genshi/tests/output.py @@ -5,19 +5,19 @@ # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms -# are also available at http://markup.edgewall.org/wiki/License. +# are also available at http://genshi.edgewall.org/wiki/License. # # This software consists of voluntary contributions made by many # individuals. For the exact contribution history, see the revision -# history and logs, available at http://markup.edgewall.org/log/. +# history and logs, available at http://genshi.edgewall.org/log/. import doctest import unittest import sys -from markup.core import Stream -from markup.input import HTML, XML -from markup.output import DocType, XMLSerializer, XHTMLSerializer, \ +from genshi.core import Stream +from genshi.input import HTML, XML +from genshi.output import DocType, XMLSerializer, XHTMLSerializer, \ HTMLSerializer, EmptyTagFilter diff --git a/markup/tests/path.py b/genshi/tests/path.py rename from markup/tests/path.py rename to genshi/tests/path.py --- a/markup/tests/path.py +++ b/genshi/tests/path.py @@ -5,17 +5,17 @@ # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms -# are also available at http://markup.edgewall.org/wiki/License. +# are also available at http://genshi.edgewall.org/wiki/License. # # This software consists of voluntary contributions made by many # individuals. For the exact contribution history, see the revision -# history and logs, available at http://markup.edgewall.org/log/. +# history and logs, available at http://genshi.edgewall.org/log/. import doctest import unittest -from markup.input import XML -from markup.path import Path, PathSyntaxError +from genshi.input import XML +from genshi.path import Path, PathSyntaxError class PathTestCase(unittest.TestCase): diff --git a/markup/tests/template.py b/genshi/tests/template.py rename from markup/tests/template.py rename to genshi/tests/template.py --- a/markup/tests/template.py +++ b/genshi/tests/template.py @@ -5,11 +5,11 @@ # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms -# are also available at http://markup.edgewall.org/wiki/License. +# are also available at http://genshi.edgewall.org/wiki/License. # # This software consists of voluntary contributions made by many # individuals. For the exact contribution history, see the revision -# history and logs, available at http://markup.edgewall.org/log/. +# history and logs, available at http://genshi.edgewall.org/log/. import doctest import os @@ -18,8 +18,8 @@ import sys import tempfile -from markup.core import Markup, Stream -from markup.template import BadDirectiveError, Template, TemplateLoader, \ +from genshi.core import Markup, Stream +from genshi.template import BadDirectiveError, Template, TemplateLoader, \ TemplateSyntaxError @@ -30,7 +30,7 @@ """ Verify that the directive has access to the loop variables. """ - tmpl = Template(""" + tmpl = Template(""" """) items = [{'id': 1, 'class': 'foo'}, {'id': 2, 'class': 'bar'}] @@ -43,7 +43,7 @@ Verify that an attribute value that evaluates to `None` removes an existing attribute of that name. """ - tmpl = Template(""" + tmpl = Template(""" """) self.assertEqual(""" @@ -55,7 +55,7 @@ Verify that an attribute value that evaluates to `None` removes an existing attribute of that name. """ - tmpl = Template(""" + tmpl = Template(""" """) self.assertEqual(""" @@ -72,7 +72,7 @@ Verify that, if multiple `py:when` bodies match, only the first is output. """ - tmpl = Template("""
        + tmpl = Template("""
        1 2 3 @@ -82,7 +82,7 @@
        """, str(tmpl.generate())) def test_otherwise(self): - tmpl = Template("""
        + tmpl = Template("""
        hidden hello
        """) @@ -94,7 +94,7 @@ """ Verify that `py:choose` blocks can be nested: """ - tmpl = Template(""" + tmpl = Template("""
        2 @@ -114,7 +114,7 @@ """ Verify more complex nesting. """ - tmpl = Template(""" + tmpl = Template("""
        OK @@ -134,7 +134,7 @@ """ Verify more complex nesting using otherwise. """ - tmpl = Template(""" + tmpl = Template("""
        FAIL @@ -155,7 +155,7 @@ Verify that a when directive with a strip directive actually strips of the outer element. """ - tmpl = Template(""" + tmpl = Template("""
        foo
        @@ -169,7 +169,7 @@ Verify that a `when` directive outside of a `choose` directive is reported as an error. """ - tmpl = Template(""" + tmpl = Template("""
        """) self.assertRaises(TemplateSyntaxError, str, tmpl.generate()) @@ -179,7 +179,7 @@ Verify that an `otherwise` directive outside of a `choose` directive is reported as an error. """ - tmpl = Template(""" + tmpl = Template("""
        """) self.assertRaises(TemplateSyntaxError, str, tmpl.generate()) @@ -189,7 +189,7 @@ Verify that an `when` directive that doesn't have a `test` attribute is reported as an error. """ - tmpl = Template(""" + tmpl = Template("""
        foo
        @@ -201,7 +201,7 @@ Verify that an `otherwise` directive can be used without a `test` attribute. """ - tmpl = Template(""" + tmpl = Template("""
        foo
        @@ -214,7 +214,7 @@ """ Verify that the directive can also be used as an element. """ - tmpl = Template(""" + tmpl = Template(""" 1 2 @@ -234,7 +234,7 @@ Verify that a named template function with a strip directive actually strips of the outer element. """ - tmpl = Template(""" + tmpl = Template("""
        ${what}
        @@ -245,7 +245,7 @@
        """, str(tmpl.generate())) def test_exec_in_replace(self): - tmpl = Template("""
        + tmpl = Template("""

        ${greeting}, ${name}!

        @@ -261,7 +261,7 @@ """ Verify that the directive can also be used as an element. """ - tmpl = Template(""" + tmpl = Template(""" ${what} @@ -276,7 +276,7 @@ Verify that a template function defined inside a conditional block can be called from outside that block. """ - tmpl = Template(""" + tmpl = Template(""" ${what} @@ -293,7 +293,7 @@ """ Verify that keyword arguments work with `py:def` directives. """ - tmpl = Template(""" + tmpl = Template(""" ${what} ${echo('foo')} """) @@ -302,7 +302,7 @@ """, str(tmpl.generate())) def test_invocation_in_attribute(self): - tmpl = Template(""" + tmpl = Template(""" ${what or 'something'}

        bar

        """) @@ -311,7 +311,7 @@
        """, str(tmpl.generate())) def test_invocation_in_attribute_none(self): - tmpl = Template(""" + tmpl = Template(""" ${None}

        bar

        """) @@ -322,7 +322,7 @@ def test_function_raising_typeerror(self): def badfunc(): raise TypeError - tmpl = Template(""" + tmpl = Template("""
        ${badfunc()}
        @@ -331,7 +331,7 @@ self.assertRaises(TypeError, list, tmpl.generate(badfunc=badfunc)) def test_def_in_matched(self): - tmpl = Template(""" + tmpl = Template(""" ${select('*')} @@ -351,7 +351,7 @@ Verify that the combining the `py:for` directive with `py:strip` works correctly. """ - tmpl = Template(""" + tmpl = Template("""
        ${item}
        @@ -368,7 +368,7 @@ """ Verify that the directive can also be used as an element. """ - tmpl = Template(""" + tmpl = Template(""" ${item} @@ -385,7 +385,7 @@ """ Verify that assignment to tuples works correctly. """ - tmpl = Template(""" + tmpl = Template("""

        key=$k, value=$v

        @@ -399,7 +399,7 @@ """ Verify that assignment to nested tuples works correctly. """ - tmpl = Template(""" + tmpl = Template("""

        $idx: key=$k, value=$v

        @@ -418,7 +418,7 @@ Verify that the combining the `py:if` directive with `py:strip` works correctly. """ - tmpl = Template(""" + tmpl = Template(""" ${bar} """) self.assertEqual(""" @@ -429,7 +429,7 @@ """ Verify that the directive can also be used as an element. """ - tmpl = Template(""" + tmpl = Template(""" ${bar} """) self.assertEqual(""" @@ -445,7 +445,7 @@ Verify that a match template can produce the same kind of element that it matched without entering an infinite recursion. """ - tmpl = Template(""" + tmpl = Template("""
        ${select('text()')}
        @@ -460,7 +460,7 @@ Verify that a match template can produce the same kind of element that it matched without entering an infinite recursion. """ - tmpl = Template(""" + tmpl = Template("""
        ${select('text()')}
        @@ -476,7 +476,7 @@ """ Verify that the directive can also be used as an element. """ - tmpl = Template(""" + tmpl = Template("""
        ${select('text()')}
        @@ -491,7 +491,7 @@ Match directives are applied recursively, meaning that they are also applied to any content they may have produced themselves: """ - tmpl = Template(""" + tmpl = Template("""
        ${select('*')} @@ -522,7 +522,7 @@ themselves output the element they match, avoiding recursion is even more complex, but should work. """ - tmpl = Template(""" + tmpl = Template("""