diff --git a/README.rst b/README.rst index 08eeec5fe..120c97c1e 100644 --- a/README.rst +++ b/README.rst @@ -13,7 +13,7 @@ Support the project ------------------- Most people who use lxml do so because they like using it. -If you like it, send us a flattr. +If you want to show us that you like it, send us a flattr. .. class:: center @@ -23,7 +23,8 @@ If you like it, send us a flattr. However, if you are using lxml for your work and feel like you should give a bit of your own benefit back to support the project, consider -sending us money through PayPal. Please read the Legal Notice below. +sending us money through PayPal. Please read the `Legal Notice`_ below. +Thank you for your support. .. class:: center @@ -33,8 +34,9 @@ sending us money through PayPal. Please read the Legal Notice below. Note that Flattr keeps 10% of the money for itself, so do not send any larger amounts through Flattr. Use PayPal for donations instead, -or contact `Stefan Behnel`_ for other ways to support the lxml project, -as well as commercial support, customisations and trainings. +or `contact Stefan Behnel`_ for other ways to support the lxml project, +as well as commercial consulting, customisations and trainings on lxml +and fast Python XML processing. .. |Donate| image:: https://github.com/lxml/lxml/raw/master/doc/html/paypal_btn_donateCC_LG.gif @@ -47,9 +49,10 @@ as well as commercial support, customisations and trainings. :height: 20 :alt: Flattr the lxml project -.. _`Stefan Behnel`: http://consulting.behnel.de/ +.. _`contact Stefan Behnel`: http://consulting.behnel.de/ .. _`doc/main.txt`: http://lxml.de/ .. _`INSTALL.txt`: http://lxml.de/installation.html +.. _`Legal Notice`: #legal-notice-for-donations Legal Notice for Donations @@ -61,8 +64,8 @@ a donation to the lxml project, you acknowledge that we have the right to use the money you donate in any lawful way and for any lawful purpose we see fit and we are not obligated to disclose the way and purpose to any party unless required by applicable -law. Although lxml is free software, to our best knowledge the -lxml project does not have any tax exempt status. The lxml +law. Although lxml is free software, to the best of our knowledge +the lxml project does not have any tax exempt status. The lxml project is neither a registered non-profit corporation nor a registered charity in any country. Your donation may or may not be tax-deductible; please consult your tax advisor in this matter. diff --git a/doc/html/style.css b/doc/html/style.css index 89dd10f64..0a13203dd 100644 --- a/doc/html/style.css +++ b/doc/html/style.css @@ -39,10 +39,14 @@ div.footer { font-size: 70%; } +.center { + text-align: center; +} + /*** TOC ***/ div.contents.topic ul { - margin-top: 0px; + margin-top: 0; } div.contents.topic ul > li { @@ -58,8 +62,8 @@ div.contents.topic > p > a { div.sidemenu { position: absolute; - top: 0px; - left: 0px; + top: 0; + left: 0; width: 26em; font-size: 10px; text-align: left; @@ -102,7 +106,7 @@ div.sidemenu ul.menu.foreign li.menu:hover ul.submenu { position: absolute; border: groove #990000; padding: 1ex 1ex 1ex 3ex; - margin-top: 0px; + margin-top: 0; margin-left: 4em; margin-right: -20em; color: #990000; @@ -175,7 +179,7 @@ p { /*margin: 0.5em 0em 1em 0em;*/ text-align: justify; line-height: 1.5em; - margin: 0.5em 0em 0em 0em; + margin: 0.5em 0 0 0; } th.docinfo-name { @@ -207,7 +211,7 @@ ul { ol { line-height: 1.5em; - margin-left: 0em; + margin-left: 0; } blockquote { @@ -226,8 +230,8 @@ div.eyecatcher, p.eyecatcher { div.pagequote { position: absolute; - top: 0px; - right: 0px; + top: 0; + right: 0; padding: 10px 10px 0 0; text-align: right; font-size: 80%; diff --git a/doc/main.txt b/doc/main.txt index ee059eb3c..4567d5569 100644 --- a/doc/main.txt +++ b/doc/main.txt @@ -39,9 +39,6 @@ from 2.4 to 3.2. See the introduction_ for more information about background and goals of the lxml project. Some common questions are answered in the FAQ_. -For commercial consulting, trainings and customisations, please -`contact Stefan Behnel `_. - .. _libxml2: http://xmlsoft.org/ .. _libxslt: http://xmlsoft.org/XSLT/ diff --git a/doc/mkhtml.py b/doc/mkhtml.py index c00abfdda..9f7fbd229 100644 --- a/doc/mkhtml.py +++ b/doc/mkhtml.py @@ -106,11 +106,29 @@ def inject_flatter_button(tree): '

' )) +def inject_donate_buttons(lxml_path, rst2html_script, tree): + command = ([sys.executable, rst2html_script] + + RST2HTML_OPTIONS.split() + [os.path.join(lxml_path, 'README.rst')]) + rst2html = subprocess.Popen(command, stdout=subprocess.PIPE) + stdout, _ = rst2html.communicate() + readme = fromstring(stdout) + + intro_div = tree.xpath('h:body//h:div[@id = "introduction"][1]', + namespaces=htmlnsmap)[0] + support_div = readme.xpath('h:body//h:div[@id = "support-the-project"][1]', + namespaces=htmlnsmap)[0] + intro_div.append(support_div) + + legal = readme.xpath('h:body//h:div[@id = "legal-notice-for-donations"][1]', + namespaces=htmlnsmap)[0] + last_div = tree.xpath('h:body//h:div//h:div', namespaces=htmlnsmap)[-1] + last_div.addnext(legal) + def rest2html(script, source_path, dest_path, stylesheet_url): command = ('%s %s %s --stylesheet=%s --link-stylesheet %s > %s' % (sys.executable, script, RST2HTML_OPTIONS, stylesheet_url, source_path, dest_path)) - os.system(command) + subprocess.call(command, shell=True) def publish(dirname, lxml_path, release): if not os.path.exists(dirname): @@ -184,7 +202,8 @@ def publish(dirname, lxml_path, release): SubElement(SubElement(menu[-1], 'li'), 'a', href='http://lxml.de/sitemap.html').text = 'Sitemap' # inject flattr button - inject_flatter_button(trees['main.txt'][0]) + #inject_flatter_button(trees['main.txt'][0]) + inject_donate_buttons(lxml_path, script, trees['main.txt'][0]) # integrate menu into web pages for tree, basename, outpath in trees.itervalues():