pelican-loadcsv
CSV loader in Python Pelican's templates.
Usage
Within a pelican template:
{% csv 'data-sbp.csv' %}
or
{% csv '''
a,b,c,d,e
1,1,1,1,1
2,2,2,2,2
3,3,3,3,3
4,4,4,4,4
5,5,5,5,5
'''%}
CSV loader in Python Pelican's templates.
CSV loader in Python Pelican's templates.
Within a pelican template:
{% csv 'data-sbp.csv' %}
or
{% csv '''
a,b,c,d,e
1,1,1,1,1
2,2,2,2,2
3,3,3,3,3
4,4,4,4,4
5,5,5,5,5
'''%}
I can't begin to use Pelican-loadcsv.
See simple configuration in SashaLoadCSV
branch of my demo repository:
Sasha__LoadCSV--debugging.md
:
Title: Sasha__LoadCSV--debugging.md
Date: 2018-05-19 11:15:49
Modified: 2018-06-03 20:40:54
Sasha Goddess!
{% csv '''
a,b,c,d,e
1,1,1,1,1
2,2,2,2,2
3,3,3,3,3
4,4,4,4,4
5,5,5,5,5
'''%}
Part of pelicanconf.py
:
PLUGINS = [
'loadcsv'
]
pelican content -s pelicanconf.py --verbose
Generating tables from CSV in articles.
Support different tables for different articles.
<p>{% csv '''
a,b,c,d,e
1,1,1,1,1
2,2,2,2,2
3,3,3,3,3
4,4,4,4,4
5,5,5,5,5
'''%}</p>
Try in Sasha__LoadCSV--debugging.md
:
```
{% csv '''
a,b,c,d,e
1,1,1,1,1
2,2,2,2,2
3,3,3,3,3
4,4,4,4,4
5,5,5,5,5
'''%}
```
Result:
<div class="highlight"><pre><span></span>{% csv '''
a,b,c,d,e
1,1,1,1,1
2,2,2,2,2
3,3,3,3,3
4,4,4,4,4
5,5,5,5,5
'''%}
</pre></div>
If I add to base.html
:
{% csv '''
a,b,c,d,e
1,1,1,1,1
2,2,2,2,2
3,3,3,3,3
4,4,4,4,4
5,5,5,5,5
'''%}
I get an error in console:
CRITICAL: TemplateSyntaxError: Encountered unknown tag 'csv'.
Else as in this answer:
{{ csv '''
a,b,c,d,e
1,1,1,1,1
2,2,2,2,2
3,3,3,3,3
4,4,4,4,4
5,5,5,5,5
'''}}
I get another error:
CRITICAL: TemplateSyntaxError: expected token 'end of print statement', got 'string'
I try enable jinja2content
plugin:
PLUGINS = [
'jinja2content',
'loadcsv'
]
No effect.
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.