Kajiki-0.8.2/ 0000755 0000765 0000024 00000000000 13567202501 012777 5 ustar amol staff 0000000 0000000 Kajiki-0.8.2/PKG-INFO 0000644 0000765 0000024 00000026206 13567202501 014102 0 ustar amol staff 0000000 0000000 Metadata-Version: 1.1
Name: Kajiki
Version: 0.8.2
Summary: Fast XML-based template engine with Genshi syntax and Jinja blocks
Home-page: https://github.com/nandoflorestan/kajiki
Author: Nando Florestan
Author-email: nandoflorestan@gmail.com
License: MIT
Description-Content-Type: UNKNOWN
Description: Kajiki provides fast well-formed XML templates
==============================================
Because Kajiki's input is XML, it can ensure that your HTML/XML output is
well-formed. The Genshi-like syntax, based on XML attributes or tags, is simply
beautiful and easily understood (or ignored) by web designers.
But instead of the slow performance of Genshi_, Kajiki compiles
templates to Python code that renders with blazing-fast speed, so Kajiki can
compete with the speed of Jinja_, Mako_, Chameleon_ and others.
Also, one of Genshi's misfeatures -- py:match -- is replaced with blocks which
work like Jinja's blocks.
By combining the best ideas out there -- XML input,
Genshi's syntax and features, Jinja's template inheritance and final
compilation to Python --, Kajiki is ready to become
the most widely used templating engine for web development in Python.
And more features are coming soon; stay tuned!
Example
=======
.. code:: python
>>> import kajiki
>>> Template = kajiki.XMLTemplate('''
...
$title
...
... $title
...
...
... ''')
>>> print(Template(dict(title='Kajiki is teh awesome!', repetitions=3)).render())
Kajiki is teh awesome!
Kajiki is teh awesome!
- Kajiki is teh awesome!
- Kajiki is teh awesome!
- Kajiki is teh awesome!
Links
=====
Documentation_
Kajiki is licensed under an MIT-style license_.
The git repository and `issue tracker`_ are at GitHub_. Previously the project
used SourceForge_ for the hg repository, issue tracker and forums.
We use Travis_ for continuous integration.
.. _Documentation: http://kajiki.readthedocs.org/
.. _license: https://github.com/nandoflorestan/kajiki/blob/master/LICENSE.rst
.. _`issue tracker`: https://github.com/nandoflorestan/kajiki/issues
.. _GitHub: https://github.com/nandoflorestan/kajiki
.. _SourceForge: http://sourceforge.net/p/kajiki/
.. _Travis: https://travis-ci.org/nandoflorestan/kajiki
.. _Genshi: https://pypi.python.org/pypi/Genshi
.. _Jinja: https://pypi.python.org/pypi/Jinja2
.. _Mako: https://pypi.python.org/pypi/Mako
.. _Chameleon: https://pypi.python.org/pypi/Chameleon
CHANGES
=======
0.8.2 (2019-11-26)
------------------
* Fixed some HTML entities not being properly recognised
0.8.1 (2019-10-20)
------------------
* Fixed unexpected when including templates
0.8.0 (2019-06-03)
------------------
* Fixed support for Python 3.8
* Dropped support for Python 2.6 and 3.3
0.7.2 (2018-04-16)
------------------
* Improve parsing of ``${}`` expressions and fix syntax errors reporting in braced expressions.
* Improve parsing of documents with comments before the root element
0.7.1 (2017-09-11)
------------------
* Allow to replace ``gettext`` function by providing it in the template context or through ``base_globals`` in Loader
0.7.0 (2017-06-27)
------------------
* Text for i18n is now extracted ignoring the empty spaces surrounding the text itself. Empty text will always be treated as non translatable nodes for performance reasons.
* ``extract_python`` option will now report syntax errors when extracting text for translation.
0.6.3 (2017-05-25)
------------------
* Added ``extract_python`` option to babel message extractor, this allows extracting gettext calls in ``${}`` expressions
0.6.1 (2016-11-28)
------------------
* Actually report 0.6 in kajiki/version.py
* Expose ``strip_text`` option in loader
0.6.0 (2016-11-27)
------------------
* Fixed ``py:switch`` error message wrongly mentioning ``py:with``
* Support for multiline ``${}`` expressions
* Subsequent text nodes are now squashed into a single text node. This allows translating whole paragraphs instead of single sentences.
* Allow code and function calls inside tag attributes
* Added ``strip_text`` option to XMLTemplate and i18n collector to ensure leading and trailing spaces are stipped by text nodes (also leads to minified HTML)
* Some HTML nodes that do not require being closed but is commonly considered best practice to close them are now emitted with ending tag (IE: )
* Generally improved code documentation to lower entry barrier for contributors
0.5.5 (2016-06-08)
------------------
* ``py:attrs`` will now emit the attribute name itself or will omit the attribute at all in case of
``bool`` values for 'checked', 'disabled', 'readonly', 'multiple', 'selected', 'nohref',
'ismap', 'declare' and 'defer',
0.5.4 (2016-06-04)
------------------
* ``py:switch`` now correctly supports multiple ``py:case`` statements.
* text inside ``