archive
/
md-pdf
Archived
1
Fork 0

Add wordcount

This commit is contained in:
Jake Howard 2017-05-25 17:42:36 +01:00
parent 70351adae6
commit 805ddbcadb
2 changed files with 4 additions and 1 deletions

View File

@ -1,4 +1,5 @@
from md_pdf.consts import TEMPLATES_DIR, STATIC_DIR
from word_count import word_count
EXTRA_CONTEXT = {
@ -11,4 +12,5 @@ def get_context(config, content):
context = config['context'].copy()
context['title'] = config['title']
context = dict(context, **EXTRA_CONTEXT)
context['word_count'] = word_count(content)
return context

View File

@ -12,7 +12,8 @@ setup(
"progressbar2==3.16.0",
"pypandoc==1.3.3",
"pyscss==1.3.5",
"PyYAML==3.12"
"PyYAML==3.12",
"word-count==0.1.0"
],
setup_requires=['setuptools_scm'],
packages=find_packages(),