[Cryptech-Commits] [user/sra/pelican] 31/68: Another reorg, and pelican samples

git at cryptech.is git at cryptech.is
Mon Jul 19 22:25:10 UTC 2021


This is an automated email from the git hooks/post-receive script.

sra at hactrn.net pushed a commit to branch pelican
in repository user/sra/pelican.

commit 68e18ad1f44e9a6fab66adc38e97d027a58de8a4
Author: Rob Austein <sra at hactrn.net>
AuthorDate: Sun Feb 14 16:56:57 2021 +0000

    Another reorg, and pelican samples
---
 .gitignore                                         |  6 ++--
 GNUmakefile                                        |  2 +-
 tools/extract.py => extract.py                     |  0
 .../convert-and-slurp-attachments.sh               |  0
 .../extract-wiki-content.xsl                       |  0
 {tools/references => references}/generate-json.py  |  0
 references/pelicanconf.py                          | 42 ++++++++++++++++++++++
 references/publishconf.py                          | 19 ++++++++++
 .../rpki-wiki-to-markdown.py                       |  0
 {tools/references => references}/schema.sql        |  0
 .../trac-wiki-to-markdown.rb                       |  0
 {tools/references => references}/trac2down.py      |  0
 tools/trac2md.py => trac2md.py                     |  0
 13 files changed, 65 insertions(+), 4 deletions(-)

diff --git a/.gitignore b/.gitignore
index fdd24ca..02eff3e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,6 @@
+#pelican
+#wiki
 TAGS
+__pycache__
 attachments
 trac.db
-tools/__pycache__
-#pelican
-#wiki
diff --git a/GNUmakefile b/GNUmakefile
index ade39b2..2136f0b 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -1,5 +1,5 @@
 all:
-	tools/extract.py
+	./extract.py
 
 fetch:
 	rsync -aP --delete bikeshed.cryptech.is:/home/trac/db/trac.db bikeshed.cryptech.is:/home/trac/files/attachments .
diff --git a/tools/extract.py b/extract.py
similarity index 100%
rename from tools/extract.py
rename to extract.py
diff --git a/tools/references/convert-and-slurp-attachments.sh b/references/convert-and-slurp-attachments.sh
similarity index 100%
rename from tools/references/convert-and-slurp-attachments.sh
rename to references/convert-and-slurp-attachments.sh
diff --git a/tools/references/extract-wiki-content.xsl b/references/extract-wiki-content.xsl
similarity index 100%
rename from tools/references/extract-wiki-content.xsl
rename to references/extract-wiki-content.xsl
diff --git a/tools/references/generate-json.py b/references/generate-json.py
similarity index 100%
rename from tools/references/generate-json.py
rename to references/generate-json.py
diff --git a/references/pelicanconf.py b/references/pelicanconf.py
new file mode 100644
index 0000000..a28721d
--- /dev/null
+++ b/references/pelicanconf.py
@@ -0,0 +1,42 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*- #
+from __future__ import unicode_literals
+
+AUTHOR = u'Rob Austein'
+SITENAME = u'Your Bug Report Will Be Graded'
+
+# Apparently this is much longer than theme designer expected.  Skip it for now.
+SITESUBTITLE = u'"I\'m not proud of being a congenital pain in the ass.  But I will take money for it."'
+
+PATH = 'content'
+TIMEZONE = 'UTC'
+DEFAULT_LANG = u'English'
+
+# Hack article URLs to match what Blogofile did, to avoid breaking links.
+
+ARTICLE_URL = '{date:%Y}/{date:%m}/{date:%d}/{slug}/'
+ARTICLE_SAVE_AS = '{date:%Y}/{date:%m}/{date:%d}/{slug}/index.html'
+
+# Feed generation is usually not desired when developing
+SITEURL = ''
+RELATIVE_URLS = True
+FEED_ALL_ATOM = None
+CATEGORY_FEED_ATOM = None
+TRANSLATION_FEED_ATOM = None
+AUTHOR_FEED_ATOM = None
+AUTHOR_FEED_RSS = None
+
+# Blogroll
+LINKS = (('Pelican', 'http://getpelican.com/'),
+         ('Python.org', 'http://python.org/'),
+         ('Jinja2', 'http://jinja.pocoo.org/'))
+LINKS_WIDGET_NAME = "Links"
+
+# Social widget.  Can't get rid of this with default theme, only change its name.
+# Fiddle with themes later
+SOCIAL = ()
+SOCIAL_WIDGET_NAME = "Subscribe"
+
+DEFAULT_PAGINATION = 10
+
+THEME = "/home/blog/pelican-themes/sundown"
diff --git a/references/publishconf.py b/references/publishconf.py
new file mode 100644
index 0000000..f0fb21d
--- /dev/null
+++ b/references/publishconf.py
@@ -0,0 +1,19 @@
+#!/usr/local/bin/python2.7
+# -*- coding: utf-8 -*- #
+from __future__ import unicode_literals
+
+# This file is only used if you use `make publish` or
+# explicitly specify it as your config file.
+
+import os
+import sys
+sys.path.append(os.curdir)
+from pelicanconf import *
+
+SITEURL = 'https://www.hactrn.net/blog'
+RELATIVE_URLS = False
+
+FEED_ALL_ATOM = 'feeds/all.atom.xml'
+CATEGORY_FEED_ATOM = 'feeds/{slug}.atom.xml'
+
+DELETE_OUTPUT_DIRECTORY = True
diff --git a/tools/references/rpki-wiki-to-markdown.py b/references/rpki-wiki-to-markdown.py
similarity index 100%
rename from tools/references/rpki-wiki-to-markdown.py
rename to references/rpki-wiki-to-markdown.py
diff --git a/tools/references/schema.sql b/references/schema.sql
similarity index 100%
rename from tools/references/schema.sql
rename to references/schema.sql
diff --git a/tools/references/trac-wiki-to-markdown.rb b/references/trac-wiki-to-markdown.rb
similarity index 100%
rename from tools/references/trac-wiki-to-markdown.rb
rename to references/trac-wiki-to-markdown.rb
diff --git a/tools/references/trac2down.py b/references/trac2down.py
similarity index 100%
rename from tools/references/trac2down.py
rename to references/trac2down.py
diff --git a/tools/trac2md.py b/trac2md.py
similarity index 100%
rename from tools/trac2md.py
rename to trac2md.py



More information about the Commits mailing list