summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorLibravatarDererk <dererk@debian.org>2015-11-11 16:34:34 -0300
committerLibravatarDererk <dererk@debian.org>2015-11-11 16:34:34 -0300
commit4e3224c012df9f74f010eb92203520515e8537b9 (patch)
tree19322dc0c595268cb6864f21d7e92fd93cb826e9 /scripts
parent787b97a4cb24330b36f11297c6d3a7a473a907d0 (diff)
Imported Upstream version 7.7.3upstream/7.7.3
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/document_path_handlers.py22
-rwxr-xr-xscripts/getbaseline.sh4
-rwxr-xr-xscripts/import_po.py1
-rwxr-xr-xscripts/jinjify.py1
4 files changed, 26 insertions, 2 deletions
diff --git a/scripts/document_path_handlers.py b/scripts/document_path_handlers.py
new file mode 100755
index 0000000..692c8e0
--- /dev/null
+++ b/scripts/document_path_handlers.py
@@ -0,0 +1,22 @@
+#!/usr/bin/env python
+
+from __future__ import print_function, unicode_literals
+from nikola import nikola
+n = nikola.Nikola()
+n.init_plugins()
+
+print(""".. title: Path Handlers for Nikola
+.. slug: path-handlers
+.. author: The Nikola Team
+
+Nikola supports special links with the syntax ``link://kind/name``. Here is
+the description for all the supported kinds.
+
+.. class:: dl-horizontal
+""")
+
+for k in sorted(n.path_handlers.keys()):
+ v = n.path_handlers[k]
+ print(k)
+ print('\n'.join(' '+l.strip() for l in v.__doc__.splitlines()))
+ print()
diff --git a/scripts/getbaseline.sh b/scripts/getbaseline.sh
index 719fbe5..9006579 100755
--- a/scripts/getbaseline.sh
+++ b/scripts/getbaseline.sh
@@ -1,8 +1,8 @@
#!/bin/bash
cd tests/data
for i in $@; do
- if [[ $i == '2.7' ]]; then
- # we only support 2.7 now
+ if [[ $i == '3.5' || $i == '2.7' ]]; then
+ # we only support 2.7 and 3.5
wget https://github.com/getnikola/invariant-builds/archive/v$i'.zip'
unzip 'v'$i'.zip'
rm -rf baseline$i
diff --git a/scripts/import_po.py b/scripts/import_po.py
index 0429b42..2f887c5 100755
--- a/scripts/import_po.py
+++ b/scripts/import_po.py
@@ -15,6 +15,7 @@ if 'nopull' not in sys.argv:
trans_files = glob(os.path.join('translations', 'nikola.messages', '*.po'))
for fname in trans_files:
lang = os.path.splitext(os.path.basename(fname))[0].lower()
+ lang = lang.replace('@', '_')
outf = os.path.join('nikola', 'data', 'themes', 'base',
'messages', 'messages_{0}.py'.format(lang))
po = polib.pofile(fname)
diff --git a/scripts/jinjify.py b/scripts/jinjify.py
index abd18e9..3a3a9d8 100755
--- a/scripts/jinjify.py
+++ b/scripts/jinjify.py
@@ -14,6 +14,7 @@ dumb_replacements = [
["{% if any(post.is_mathjax for post in posts) %}", '{% if posts|selectattr("is_mathjax")|list %}'],
["json.dumps(title)", "title|tojson"],
["{{ parent.extra_head() }}", "{{ super() }}"],
+ ["{{ parent.content() }}", "{{ super() }}"],
["prefix='\\", "prefix='"],
["og: http://ogp.me/ns# \\", "og: http://ogp.me/ns#"],
["article: http://ogp.me/ns/article# \\", "article: http://ogp.me/ns/article#"],