Posted
almost 17 years
ago
by
Georg
Pygments 0.8.1 was released today.
|
Posted
almost 17 years
ago
by
Armin
Jinja 1.1 codenname sinka is out! And with more changes then ever. Here a
small summary of the new features and improvements:
blocks now support {{ super() }} to render the parent output.
the template lexer keeps not track of brace, parenthesis and
... [More]
bracket balance in order to not break variable tags apart if they
are configured to look like this: ${expr}. This also fixes
the problem with nested dicts in variable expressions.
added whitespace management system for the template designer.
many new filters and helpers such as lipsum, batch, slice,
sum, abs, round, striptags and others.
reimplemented Buffet plugin so that you can use Jinja in pylons.
added optional C-implementation of the context baseclass.
it's now possible to stream templates.
reworked loader layer. All the cached loaders now have "private" non cached
baseclasses so that you can easily mix your own caching layers in.
added MemcachedLoaderMixin and MemcachedFileSystemLoader contributed
by Bryan McLemore.
many new unittests, bugfixes and improvements.
The whole list of changes can be found in the changelog. Get it while
it's hot from the cheeseshop. [Less]
|
Posted
almost 17 years
ago
by
Georg
The time is ripe for another Pygments release. I waited a little longer than
the usual two months this time, allowing more new features to accumulate, so
that I don't have to release only trivial updates and bugfixes.
Download it from
... [More]
http://cheeseshop.python.org/pypi/Pygments, or look at the
demonstration at http://pygments.org/demo.
The "new features" changelog for 0.8 is:
Lexers added:
Haskell, thanks to Adam Blinkinsop
Redcode, thanks to Adam Blinkinsop
D, thanks to Kirk McDonald
MuPad, thanks to Christopher Creutzig
MiniD, thanks to Jarrett Billingsley
Vim Script, by Tim Hatch
The CSharpLexer now is Unicode-aware, which means that it has an
option that can be set so that it correctly lexes Unicode identifiers
allowed by the C# specs.
Added a RaiseOnErrorTokenFilter that raises an exception when the
lexer generates an error token, and a VisibleWhitespaceFilter that
converts whitespace (spaces, tabs, newlines) into visible characters.
The ReST lexer now automatically highlights source code blocks in
".. sourcecode:: language" and ".. code:: language" directive blocks.
Improved the default style (thanks to Tiberius Teng). The old default
is still available as the "emacs" style (which was an alias before).
The get_style_defs method of HTML formatters now uses the cssclass
option as the default selector if it was given.
The updated documentation and the full changelog can be found, as always, at
http://pygments.org/docs.
Happy highlighting! [Less]
|
Posted
almost 17 years
ago
by
Georg
Thanks to Tim Freund, a recently joined team member, we have now a buildbot
instance set up at
http://buildbot.pocoo.org/buildbot/
Thanks very much, Tim!
For those of you waiting for the 0.2 release, please hold out a while longer.
We're currently
... [More]
splitting the "core" package into a real "core" package usable
for all kinds of community portals, and a "forum" package that implements the
actual BBS on top of it. This will make it possible to create more Pocoo
driven solutions in the future, allowing for an integrated community site.
Also, features that will be in 0.2 are:
Private Messages
Much improved webadmin
Improved tagging system
[Less]
|
Posted
almost 17 years
ago
by
Georg
The Pocoo team wishes you happy easter. Development is going on at a steady
pace, and we expect to release a 0.2 version sooner than you think ;)
|
Posted
about 17 years
ago
by
Armin
Jinja 1 is now released! You find the release announcement on
the webpage. Have fun :D
|
Posted
about 17 years
ago
by
Armin
Jinja 1 is now in feature freeze. All features we wanted to implement are
now in the engine core. Now all the affort goes into improving the testsuite,
performance and documentation. You can expect an release in about two weeks.
|
Posted
about 17 years
ago
by
Armin
Jinja 1 is going ahead well. In the last weeks we were able to port most of
the django features plus some more. The shipped template loader now write
compiled python code into cache folders, use memory caching and keep track of
changed templates on
... [More]
the disk.
We also managed it to put Jinja template code into tracebacks which makes it
easier to debug. Here an example of a broken template in the colubrid
traceback system. Also if you're using pylons as framework you can easily
use Jinja via the baker plugin interface.
Currently finished features:
loading templates from string / files
django like inheritance (the only thing that doesn't work by now is
block.super)
embedded python expressions (sandboxed)
if/elif/else and for statements
recursive loop statements.
macros and blocks
django like filters with an unlimited number of parameters
filter, cycle and some other tags
support for function calling with parameters
custom filters and tests. (tests are functions that evaluate to
either true of false)
The code was moved into trunk some time ago so if you check it out now
you won't find the documentation since the docs on the jinja webpage
are outdated and cover the jinja < 1 version. If you're looking for a
up to date documentation have a look at this one: jinja documentation
Keep in mind that it's still under development. If you encounter any
bugs feel free to file a ticket or report it on #pocoo on irc.freenode.net. [Less]
|
Posted
about 17 years
ago
by
Armin
Here comes the jinja update. Many things happened since my last jinja blogpost
but I'm sure the changes in the roadmap are a good thing. First of all: That def
system will disappear again. I don't want to introduce too many changes so that
updating
... [More]
templates takes more than five minutes.
For most of the stuff we stay with the current syntax. But we support full (alright,
not full. list comprehensions, generator expressions, imports and while loops are
not supported) python syntax. A lexer tokenizes the sourcecode and tag/block
tokens are forwared to the python compiler package that comes with python2.3 and
higher. The semantics stay mostly the same, what changes is that elif is currently
not supported (we will change that for the release), and the else block of for loops
works different then in python: it's called when the for loop does not iterate.
So how does it look like? Currently just the parser and python translator works,
we are not able to evaluate the templates, thus no performance numbers exist by now.
Still the conversion to python looks cool and here a small example (Note, jinja is
still a sandboxed template engine!):
>>> import test
>>> test.test_parser("""
... {% for user in users %}
... {% if user.user_id == current_user.user_id %}
... yourself
... {% else %}
... {{ user.username|escape }}
... {% endif %}
... {% endfor %}
... """)
from jinja.datastructures import Undefined
def generate(environment, context, write, write_var=None):
"""This function was automatically generated by
the jinja python translator. do not edit."""
if write_var is None:
write_var = write
write(u'\n')
context.push()
parent_loop = context['loop']
loop_data = None
for (loop_data, context['user']) in environment.iterate(context['users']):
loop_data.parent = parent_loop
context['loop'] = loop_data
write(u'\n ')
if environment.get_attribute(context['user'], 'user_id') ==
environment.get_attribute(context['current_user'], 'user_id'):
write(u'\n yourself\n ')
else:
write(u'\n ')
write_var(environment.apply_filters(environment.get_attribute(
context['user'], 'username'), context,
[environment.prepare_filter('escape')]))
write(u'\n ')
write(u'\n')
context.pop()
write(u'\n')
Note that we moved the new code into trunk. So if you are using a jinja svn version
do not update your checkout! The pre 1.0 code moved into the new branch 0.9-maint,
so if you want to track fixes there (though there were none in the last months), do a
svn switch http://trac.pocoo.org/repos/jinja/branches/0.9-maint
PS.: we upgraded the server to Ubuntu Edgy and birkenfeld sat down last
week to convert all services to python 2.5. Yay! Also beewee converted the pocoo webpage
style to blue so that each pocoo service now has the same design but different colors :D [Less]
|
Posted
about 17 years
ago
by
Benjamin
After 2 months of work we've nearly finished the new context sensitive admin
panel (CSA) now. The idea is not to have an admin package that is a seperated
application (like most boards have) but to support many admin actions embedded
in a normal
... [More]
forum page.
You can see it in action at this screencast.
Our plan is to replace the old, dirty webadmin package with the new CSA.
Note: this won't be the only way to administrate a Pocoo board. Administration
will also be possible on the command line (for example if you can only use a
text browser). [Less]
|