This repository was archived by the owner on Feb 14, 2023. It is now read-only.
Repository navigation
Expand file tree
/
Copy pathconfig.py
More file actions
155 lines (120 loc) · 4.98 KB
/
Copy pathconfig.py
File metadata and controls
155 lines (120 loc) · 4.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
import os
blogdir = os.path.dirname(__file__)
py = {}
###############
# Start Below #
###############
# If your Pyblosxom installation is in a funky place, uncomment
# this next line and point it to your Pyblosxom installation
# directory.
# What's this blog's title?
py['blog_title'] = "Pyblosxom - main site"
# What's this blog's description (for outgoing RSS feed)?
py['blog_description'] = "Pyblosxom project web-site"
# What's this blog's author name and email?
py['blog_author'] = "Pyblosxom Development Team"
# blog email address
py['blog_email'] = "pyblosxom-users@lists.sourceforge.net"
# What's this blog's primary language (for outgoing RSS feed)?
py['blog_language'] = "en"
# Encoding for output. Default is iso-8859-1.
py['blog_encoding'] = "utf-8"
# Where are this blog's entries kept?
py['datadir'] = os.path.join(blogdir, "entries")
py['flavourdir'] = os.path.join(blogdir, "flavours")
# Where should Pyblosxom log files be kept?
py['log_file'] = os.path.join(blogdir, "logs")
py['log_level'] = "debug"
# List of strings with directories that should be ignored (e.g. "CVS")
# ex: py['ignore_directories'] = ["CVS", "temp"]
py['ignore_directories'] = []
# Should I stick only to the datadir for items or travel down the directory
# hierarchy looking for items? If so, to what depth?
# 0 = infinite depth (aka grab everything), 1 = datadir only, n = n levels down
py['depth'] = 0
# How many entries should I show on the home page?
py['num_entries'] = 10
#############################
# pylist options #
#############################
py["lists"] = ["users"]
py["list-users-file"] = "pyblosxom_users.dat"
py["list-users-format"] = [[], []]
py["list-users-output"] = '<a href="%(1)s">%(0)s</a> [ %(1)s ]<br />'
###########################
# Optional Configurations #
###########################
# What should this blog use as its base url?
# py['base_url'] = "http://pyblosxom.sourceforge.net/blog"
# Default parser/preformatter. Defaults to plain (does nothing)
#py['parser'] = 'plain'
# Plugin directories:
# You can now specify where you plugins all lives, there are two types
# of plugindirectories, the standard pyblosxom plugins, and the xmlrpc
# plugins. You can list out as many directories you want, but they
# should only contain the related plugins.
# Example: py['plugin_dirs'] = ['/opt', '/usr/bin']
py['plugin_dirs'] = [ os.path.join(blogdir, "plugins") ]
# There are two ways for Pyblosxom to load plugins. The first is the
# default way which involves loading all the plugins in the lib/plugins
# directory in alphanumeric order. The second is by specifying a
# "load_plugins" key here. Doing so will cause us to load only the
# plugins you name and we will load them in the order you name them.
# The "load_plugins" key is a list of strings where each string is
# the name of a plugin module (i.e. the filename without the .py at
# the end).
# ex: py['load_plugins'] = ["pycalendar", "pyfortune", "pyarchives"]
py['load_plugins'] = [
"Pyblosxom.plugins.pages",
"Pyblosxom.plugins.yeararchives",
"Pyblosxom.plugins.rst_parser",
"pyinclude",
"registry",
"pylist",
"published_date",
]
py["pagesdir"] = os.path.join(blogdir, "static")
py["pages_trigger"] = "static"
py["pages_frontpage"] = True
py["registry_dir"] = os.path.join(blogdir, "registry")
py["registry_edit"] = 0
py["mediadir"] = "/images/"
py["reST_initial_header_level"] = 3
# Doing static rendering? Static rendering essentially "compiles" your
# blog into a series of static html pages. For more details, read:
# http://wiki.subtlehints.net/moin/Pyblosxom_2fStaticRendering
#
# What directory do you want your static html pages to go into?
py["static_dir"] = os.path.join(blogdir, "compiled_site")
# What flavours shouldt get generated?
py["static_flavours"] = ["html"]
# What other paths should we statically render?
# This is for additional urls handled by other plugins like the booklist
# and plugin_info plugins. If there are multiple flavours you want
# to capture, specify each:
# ex: py["static_urls"] = ["/booklist.rss", "/booklist.html"]
# index
static_urls = [
"/news/index.xml",
"/pyblosxom_users.html"
]
# add static files
for mem in os.listdir(os.path.join(blogdir, "static")):
if mem.endswith(".txt"):
static_urls.append( "/static/%s.html" % os.path.splitext(mem)[0] )
# add registry files
for root, dirs, files in os.walk(os.path.join(blogdir, "registry")):
if ".svn" in root:
continue
root = root[len(blogdir) + 9:]
static_urls.append("/registry%s/index.html?sortby=path" % root)
for mem in files:
if mem.endswith((".txt", ".rst")):
static_urls.append( "/registry%s/%s.html" % (root, os.path.splitext(mem)[0]))
py["static_urls"] = static_urls
# Whether (1) or not (0) you want to create date indexes using month
# names? (ex. /2004/Apr/01) Defaults to 1 (yes).
py["static_monthnames"] = 0
# Whether (1) or not (0) you want to create date indexes using month
# numbers? (ex. /2004/04/01) Defaults to 0 (no).
py["static_monthnumbers"] = 1