|
|
|
<table class="table">
|
|
|
|
<tbody>
|
|
|
|
{%- set prev_year = 1900 %}
|
|
|
|
{%- for entry in entries %}
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<span class="date">
|
|
|
|
{% if entry.fields['year'] != prev_year %}
|
|
|
|
<big><strong>{{ entry.fields['year'] }}</strong></big><br />
|
|
|
|
{% endif %}
|
|
|
|
{%- set prev_year = entry.fields['year'] %}
|
|
|
|
{{ entry.fields['month']|monthname }}
|
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
<td class="publication">
|
|
|
|
<span class="pubtitle">
|
|
|
|
{%- set url = entry|main_url %}
|
|
|
|
{%- if url %}
|
|
|
|
<img src="img/pdficon_small.png" width="16"
|
|
|
|
height="16" alt="PDF" />
|
|
|
|
<a href="{{ url|escape }}">{{ entry|title }}</a>.
|
|
|
|
{%- else %}
|
|
|
|
{{ entry|title }}.
|
|
|
|
{%- endif %}
|
|
|
|
</span><br />
|
|
|
|
<span class="authors">
|
|
|
|
{{ entry.persons['author']|author_list }}.
|
|
|
|
</span><br />
|
|
|
|
<span class="venuetype">{{ entry|venue_type -}}</span><span class="venue">{{ entry|venue -}}</span>.
|
|
|
|
{%- if entry.fields['note'] %}
|
|
|
|
<span class="note">
|
|
|
|
{{ entry.fields['note']|escape }}.
|
|
|
|
</span>
|
|
|
|
{%- endif %}
|
|
|
|
<br />
|
|
|
|
<span class="links">
|
Update publications template for Python 3
Without this change, the Makefile fails when using Python 3.
```
mkdir -p _includes
bibble bib/pubs.bib bib/publications.tmpl > _includes/pubs.html
Traceback (most recent call last):
File "/usr/local/bin/bibble", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/bibble/main.py", line 183, in main
out = tmpl.render(entries=bib_sorted)
File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 1090, in render
self.environment.handle_exception()
File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception
reraise(*rewrite_traceback_stack(source=source))
File "/usr/local/lib/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise
raise value.with_traceback(tb)
File "<template>", line 37, in top-level template code
File "/usr/local/lib/python3.8/site-packages/jinja2/sandbox.py", line 460, in call
if not __self.is_safe_callable(__obj):
File "/usr/local/lib/python3.8/site-packages/jinja2/sandbox.py", line 360, in is_safe_callable
getattr(obj, "unsafe_callable", False) or getattr(obj, "alters_data", False)
jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'iteritems'
make: *** [_includes/pubs.html] Error 1
```
4 years ago
|
|
|
{%- for type, url in (entry|extra_urls).items() %}
|
|
|
|
[<a href="{{ url|escape }}">{{ type|escape }}</a>]
|
|
|
|
{%- endfor %}
|
|
|
|
{%- if entry.fields['abstract'] %}
|
|
|
|
[<a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0);" onclick="$('#abstract_{{entry.fields['key']}}').slideToggle('fast');return false;">abstract</a>]
|
|
|
|
{%- endif %}
|
|
|
|
</span>
|
|
|
|
{%- if entry.fields['abstract'] %}
|
|
|
|
<div id="abstract_{{entry.fields['key']}}" class="abstract">
|
|
|
|
{{ entry.fields['abstract'] |escape }}
|
|
|
|
</div>
|
|
|
|
{%- endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{%- endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|