1.1 --- a/.hgtags Fri May 16 01:01:08 2008 +0200
1.2 +++ b/.hgtags Sat Nov 01 03:33:02 2008 +0100
1.3 @@ -3,3 +3,4 @@
1.4 d6c55ab07502cbd9f0f39b57dfe99a8ea6f8dcdd update-1
1.5 2505e64ef1da8325c1dea90e7d9ecff8a7ef3c69 update-2
1.6 88d97586bc310a2751cb47277abf1e954f9a5aee update-3
1.7 +0fa03d82b23d1f436edcef6a43b4f9cbd2ec18aa final-2008
2.1 --- a/COPYING.txt Fri May 16 01:01:08 2008 +0200
2.2 +++ b/COPYING.txt Sat Nov 01 03:33:02 2008 +0100
2.3 @@ -17,3 +17,12 @@
2.4 License along with this library; see the file LICENCE.txt
2.5 If not, write to the Free Software Foundation, Inc.,
2.6 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
2.7 +
2.8 +Licence for the EuroPython Banner and Badge Logos
2.9 +-------------------------------------------------
2.10 +
2.11 +EuroPython logo by Zachary Voase, licensed under the Creative Commons
2.12 +Attribution-Share Alike 3.0 Unported License, the details of which can be
2.13 +found at the following location:
2.14 +
2.15 +http://creativecommons.org/licenses/by-sa/3.0/legalcode
3.1 --- a/README.txt Fri May 16 01:01:08 2008 +0200
3.2 +++ b/README.txt Sat Nov 01 03:33:02 2008 +0100
3.3 @@ -18,19 +18,25 @@
3.4
3.5 To set up the Wiki in the main MoinMoin configuration, examine farmconfig.py, then:
3.6
3.7 -sudo ./instwiki
3.8 +sudo ./instwiki /etc/moin
3.9
3.10 (This copies the ep2008.py and farmconfig.py files; if either change
3.11 subsequently, it will be necessary to copy them again.)
3.12
3.13 To set up an Apache site for the Wiki, examine site-ep2008, then:
3.14
3.15 -sudo ./instsite
3.16 +sudo ./instsite /etc/apache2/sites-available
3.17
3.18 Macros (if used) can be installed as follows:
3.19
3.20 sudo ./instmacros .../ep2008
3.21
3.22 +The path details employed by the moin.cgi file in the installed Wiki must
3.23 +correspond to the paths employed by the installation process above; this file
3.24 +can be found in a location of the following form:
3.25 +
3.26 +.../ep2008/www/moin.cgi
3.27 +
3.28 The FeedReader macro is used to fetch RSS 2.0 feeds and is preferable to the
3.29 RSSReader macro available elsewhere since it parses the titles of feed entries
3.30 correctly.
3.31 @@ -60,3 +66,9 @@
3.32 Be sure to only add existing users - there exists a possibility of people
3.33 otherwise creating accounts which would then have undeserved administrative
3.34 privileges.
3.35 +
3.36 +Notes on Translations
3.37 +---------------------
3.38 +
3.39 +http://lists.centos.org/pipermail/centos-docs/2007-October/000690.html
3.40 +http://moinmo.in/MoinMoinBugs/LanguageDictTranslationsNotFoundForLanguageNamesHavingSpaces
4.1 --- a/ep2008.py Fri May 16 01:01:08 2008 +0200
4.2 +++ b/ep2008.py Sat Nov 01 03:33:02 2008 +0100
4.3 @@ -28,7 +28,7 @@
4.4 #page_front_page = u"MyStartingPage"
4.5
4.6 # b) if wiki content is maintained in many languages
4.7 - page_front_page = u"FrontPage"
4.8 + page_front_page = u"EuroPython"
4.9
4.10 # PB: Specific EP2008 settings.
4.11
4.12 @@ -76,4 +76,7 @@
4.13 title="EuroPython Conference RSS Feed" href="http://europython.wordpress.com/feed/" />
4.14 <link rel="pingback" href="http://europython.wordpress.com/xmlrpc.php" />'''
4.15
4.16 + # If mail is disabled, don't permit subscriptions.
4.17 + actions_excluded = ['SubscribeUser']
4.18 +
4.19 # vim: tabstop=4 expandtab shiftwidth=4
5.1 --- a/initwiki Fri May 16 01:01:08 2008 +0200
5.2 +++ b/initwiki Sat Nov 01 03:33:02 2008 +0100
5.3 @@ -1,7 +1,7 @@
5.4 #!/bin/bash
5.5 # Based on the documentation: /usr/share/doc/python-moinmoin/README.Debian.gz
5.6
5.7 -if [ ! $1 ] ; then
5.8 +if [[ ! $1 ]] ; then
5.9 echo "Please specify a directory such as ../ep2008 or /tmp/ep2008."
5.10 exit
5.11 fi
6.1 --- a/instmacros Fri May 16 01:01:08 2008 +0200
6.2 +++ b/instmacros Sat Nov 01 03:33:02 2008 +0100
6.3 @@ -1,6 +1,6 @@
6.4 #!/bin/bash
6.5
6.6 -if [ ! $1 ] ; then
6.7 +if [[ ! $1 ]] ; then
6.8 echo "Please specify a directory such as ../ep2008 or /tmp/ep2008."
6.9 exit
6.10 fi
7.1 --- a/instsite Fri May 16 01:01:08 2008 +0200
7.2 +++ b/instsite Sat Nov 01 03:33:02 2008 +0100
7.3 @@ -1,5 +1,11 @@
7.4 #!/bin/bash
7.5 # Based on the documentation: /usr/share/doc/python-moinmoin/README.Debian.gz
7.6
7.7 -cp site-ep2008 /etc/apache2/sites-available/ep2008
7.8 +if [[ ! $1 ]] ; then
7.9 + echo "Please specify a directory containing Apache site definitions such as"
7.10 + echo "/etc/apache2/sites-available (used by Debian and Ubuntu)."
7.11 + exit
7.12 +fi
7.13 +
7.14 +cp site-ep2008 $1/ep2008
7.15 a2ensite ep2008
8.1 --- a/insttheme Fri May 16 01:01:08 2008 +0200
8.2 +++ b/insttheme Sat Nov 01 03:33:02 2008 +0100
8.3 @@ -1,6 +1,6 @@
8.4 #!/bin/bash
8.5
8.6 -if [ ! $1 ] ; then
8.7 +if [[ ! $1 ]] ; then
8.8 echo "Please specify a directory such as ../ep2008 or /tmp/ep2008."
8.9 exit
8.10 fi
9.1 --- a/instwiki Fri May 16 01:01:08 2008 +0200
9.2 +++ b/instwiki Sat Nov 01 03:33:02 2008 +0100
9.3 @@ -1,5 +1,11 @@
9.4 #!/bin/bash
9.5 # Based on the documentation: /usr/share/doc/python-moinmoin/README.Debian.gz
9.6
9.7 -mv /etc/moin/farmconfig.py /etc/moin/farmconfig.py.old
9.8 -cp ep2008.py farmconfig.py /etc/moin
9.9 +if [[ ! $1 ]] ; then
9.10 + echo "Please specify the directory containing farmconfig.py, such as"
9.11 + echo "/etc/moin (used by Debian and Ubuntu)."
9.12 + exit
9.13 +fi
9.14 +
9.15 +mv $1/farmconfig.py $1/farmconfig.py.old
9.16 +cp ep2008.py farmconfig.py $1
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
10.2 +++ b/macros/CategoryMenu.py Sat Nov 01 03:33:02 2008 +0100
10.3 @@ -0,0 +1,181 @@
10.4 +# -*- coding: iso-8859-1 -*-
10.5 +"""
10.6 + MoinMoin - CategoryMenu Macro
10.7 +
10.8 + @copyright: 2008 by Paul Boddie <paul@boddie.org.uk>
10.9 + @copyright: 2000-2004 Juergen Hermann <jh@web.de>,
10.10 + 2005-2008 MoinMoin:ThomasWaldmann.
10.11 + @license: GNU GPL (v2 or later), see COPYING.txt for details.
10.12 +"""
10.13 +
10.14 +from MoinMoin.Page import Page
10.15 +from MoinMoin import wikiutil, search, version
10.16 +import re
10.17 +
10.18 +category_regexp = None
10.19 +
10.20 +Dependencies = ['pages']
10.21 +
10.22 +def isMoin15():
10.23 + return version.release.startswith("1.5.")
10.24 +
10.25 +def getCategoryPattern(request):
10.26 + global category_regexp
10.27 +
10.28 + try:
10.29 + return request.cfg.cache.page_category_regexact
10.30 + except AttributeError:
10.31 +
10.32 + # Use regular expression from MoinMoin 1.7.1 otherwise.
10.33 +
10.34 + if category_regexp is None:
10.35 + category_regexp = re.compile(u'^%s$' % ur'(?P<all>Category(?P<key>(?!Template)\S+))', re.UNICODE)
10.36 + return category_regexp
10.37 +
10.38 +def getCategories(request):
10.39 +
10.40 + """
10.41 + From the AdvancedSearch macro, return a list of category page names using
10.42 + the given 'request'.
10.43 + """
10.44 +
10.45 + # This will return all pages with "Category" in the title.
10.46 +
10.47 + cat_filter = getCategoryPattern(request).search
10.48 + pagenames = request.rootpage.getPageList(filter=cat_filter)
10.49 + pagenames.sort()
10.50 + return pagenames
10.51 +
10.52 +def getCategoryMapping(category_pagenames, request):
10.53 +
10.54 + """
10.55 + For the given 'category_pagenames' return a list of tuples of the form
10.56 + (category name, category page name) using the given 'request'.
10.57 + """
10.58 +
10.59 + cat_pattern = getCategoryPattern(request)
10.60 + mapping = []
10.61 + for pagename in category_pagenames:
10.62 + name = cat_pattern.match(pagename).group("key")
10.63 + if name != "Category":
10.64 + mapping.append((name, pagename))
10.65 + mapping.sort()
10.66 + return mapping
10.67 +
10.68 +def getPages(pagename, request):
10.69 +
10.70 + "Return the links minus category links for 'pagename' using the 'request'."
10.71 +
10.72 + query = search.QueryParser().parse_query('"%s"' % pagename)
10.73 + if isMoin15():
10.74 + results = search.searchPages(request, query)
10.75 + results.sortByPagename()
10.76 + else:
10.77 + results = search.searchPages(request, query, "page_name")
10.78 +
10.79 + cat_pattern = getCategoryPattern(request)
10.80 + pages = []
10.81 + for page in results.hits:
10.82 + if not cat_pattern.match(page.page_name):
10.83 + pages.append(page)
10.84 + return pages
10.85 +
10.86 +def execute(macro, args):
10.87 + request = macro.request
10.88 + fmt = macro.formatter
10.89 + page = fmt.page
10.90 +
10.91 + # Interpret the arguments.
10.92 +
10.93 + try:
10.94 + selected_category_names = wikiutil.parse_quoted_separated(args, name_value=False)
10.95 + except AttributeError:
10.96 + selected_category_names = args.split(",")
10.97 +
10.98 + selected_category_names = [arg for arg in selected_category_names if arg]
10.99 +
10.100 + # Get the categories.
10.101 +
10.102 + categories = getCategoryMapping(getCategories(request), request)
10.103 +
10.104 + # Generate a menu with the categories, together with expanded submenus for
10.105 + # the categories employed by the current page, the category represented by
10.106 + # the current page, or for those categories specified in the macro
10.107 + # arguments.
10.108 +
10.109 + output = []
10.110 + output.append(fmt.bullet_list(on=1, attr={"class" : "category-menu"}))
10.111 +
10.112 + for category in categories:
10.113 + category_name, category_pagename = category
10.114 +
10.115 + pages_in_category = getPages(category_pagename, request)
10.116 + pagenames_in_category = [p.page_name for p in pages_in_category]
10.117 + page_is_category = page.page_name == category_pagename
10.118 +
10.119 + # Generate the submenu where appropriate.
10.120 +
10.121 + if selected_category_names and category_name in selected_category_names or \
10.122 + not selected_category_names and (
10.123 + page_is_category or page.page_name in pagenames_in_category):
10.124 +
10.125 + if page_is_category:
10.126 + output.append(fmt.listitem(on=1, attr={"class" : "selected current"}))
10.127 + output.append(fmt.text(category_name))
10.128 + else:
10.129 + output.append(fmt.listitem(on=1, attr={"class" : "selected"}))
10.130 + output.append(fmt.pagelink(on=1, pagename=category_pagename))
10.131 + output.append(fmt.text(category_name))
10.132 + output.append(fmt.pagelink(on=0, pagename=category_pagename))
10.133 +
10.134 + output.append(fmt.bullet_list(on=1, attr={"class" : "category-submenu"}))
10.135 +
10.136 + # Visit each page in the category.
10.137 +
10.138 + last_parts = []
10.139 +
10.140 + for page_in_category in pages_in_category:
10.141 + pagename = page_in_category.page_name
10.142 +
10.143 + if page.page_name == pagename:
10.144 + output.append(fmt.listitem(on=1, attr={"class" : "selected"}))
10.145 + else:
10.146 + output.append(fmt.listitem(on=1))
10.147 + output.append(fmt.pagelink(on=1, pagename=pagename))
10.148 +
10.149 + # Abbreviate long hierarchical names.
10.150 +
10.151 + parts = pagename.split("/")
10.152 + common = 0
10.153 + for last, current in map(None, last_parts, parts):
10.154 + if last == current:
10.155 + common += 1
10.156 + else:
10.157 + break
10.158 +
10.159 + prefix = u"\u2014" * common
10.160 + suffix = "/".join(parts[common:])
10.161 +
10.162 + output.append(fmt.text("%s %s" % (prefix, suffix)))
10.163 + output.append(fmt.pagelink(on=0, pagename=pagename))
10.164 + output.append(fmt.listitem(on=0))
10.165 +
10.166 + last_parts = parts
10.167 +
10.168 + output.append(fmt.bullet_list(on=0))
10.169 + output.append(fmt.listitem(on=0))
10.170 +
10.171 + # Otherwise generate a simple link.
10.172 +
10.173 + else:
10.174 + output.append(fmt.listitem(on=1))
10.175 + output.append(fmt.pagelink(on=1, pagename=category_pagename))
10.176 + output.append(fmt.text(category_name))
10.177 + output.append(fmt.pagelink(on=0, pagename=category_pagename))
10.178 + output.append(fmt.listitem(on=0))
10.179 +
10.180 + output.append(fmt.bullet_list(on=0))
10.181 +
10.182 + return ''.join(output)
10.183 +
10.184 +# vim: tabstop=4 expandtab shiftwidth=4
11.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
11.2 +++ b/themes/ep2008/css/category.css Sat Nov 01 03:33:02 2008 +0100
11.3 @@ -0,0 +1,69 @@
11.4 +/* category.css - some additional styles for the CategoryMenu macro
11.5 + which can be included in screen.css using...
11.6 +
11.7 + @import "category.css";
11.8 +
11.9 + ...before any rules.
11.10 +
11.11 +Copyright (c) 2008 by Paul Boddie
11.12 +Licensed under the GNU GPL (v2 or later), see COPYING.txt for details.
11.13 +*/
11.14 +
11.15 +/* Category menus... */
11.16 +
11.17 +ul.category-menu {
11.18 + list-style: none;
11.19 + margin-left: 0;
11.20 + padding-left: 0;
11.21 + width: 20em;
11.22 + float: left;
11.23 + margin-right: 2em;
11.24 +}
11.25 +
11.26 +/* Prevent issues with the above float. */
11.27 +
11.28 +hr {
11.29 + clear: left;
11.30 +}
11.31 +
11.32 +ul.category-submenu {
11.33 + list-style: none;
11.34 + margin-left: 0;
11.35 + padding-left: 0;
11.36 + padding-top: 0.25em;
11.37 +}
11.38 +
11.39 +ul.category-menu li {
11.40 + list-style: none;
11.41 + padding: 0.25em;
11.42 + background-color: #073683;
11.43 + color: white;
11.44 +}
11.45 +
11.46 +ul.category-menu a,
11.47 +ul.category-menu a:visited,
11.48 +ul.category-menu a:hover {
11.49 + text-decoration: none;
11.50 + color: white;
11.51 +}
11.52 +
11.53 +ul.category-menu li.selected,
11.54 +ul.category-menu li:hover {
11.55 + background-color: #10adf7;
11.56 +}
11.57 +
11.58 +ul.category-submenu li.selected {
11.59 + background-color: #073683;
11.60 +}
11.61 +
11.62 +ul.category-menu li.current,
11.63 +ul.category-submenu li.selected {
11.64 + font-weight: bold;
11.65 +}
11.66 +
11.67 +ul.category-submenu li {
11.68 + font-weight: normal;
11.69 +}
11.70 +
11.71 +/* vim: tabstop=4 expandtab shiftwidth=4
11.72 + */
12.1 --- a/themes/ep2008/css/screen.css Fri May 16 01:01:08 2008 +0200
12.2 +++ b/themes/ep2008/css/screen.css Sat Nov 01 03:33:02 2008 +0100
12.3 @@ -1,9 +1,13 @@
12.4 /* screen.css - MoinMoin Default Styles
12.5
12.6 Copyright (c) 2001, 2002, 2003 by Juergen Hermann
12.7 -Copyright (c) 2007 by Paul Boddie
12.8 +Copyright (c) 2007, 2008 by Paul Boddie
12.9 */
12.10
12.11 +/* Category menus... */
12.12 +
12.13 +@import "category.css";
12.14 +
12.15 /* content styles */
12.16
12.17 /* debug
12.18 @@ -570,7 +574,7 @@
12.19
12.20 /* Special rules for EuroPython content */
12.21
12.22 -.page-FrontPage #page {
12.23 +.page-EuroPython #page {
12.24 background-color: #ccc9e2;
12.25 padding: 0;
12.26 }
13.1 --- a/themes/ep2008/ep2008.py Fri May 16 01:01:08 2008 +0200
13.2 +++ b/themes/ep2008/ep2008.py Sat Nov 01 03:33:02 2008 +0100
13.3 @@ -14,7 +14,7 @@
13.4
13.5 name = "ep2008"
13.6
13.7 - def rsslink(self):
13.8 + def rsslink(self, d=None):
13.9 """ Create rss link in head, used by FireFox
13.10
13.11 RSS link for FireFox. This shows an rss link in the bottom of
13.12 @@ -24,12 +24,11 @@
13.13 @return: html head
13.14 """
13.15
13.16 - if self.shouldUseRSS():
13.17 - extra_rss = self.cfg.extra_rss
13.18 + extra_rss = self.cfg.extra_rss
13.19 + if d is not None:
13.20 + return ThemeBase.rsslink(self, d) + u'\n' + extra_rss
13.21 else:
13.22 - extra_rss = u''
13.23 -
13.24 - return ThemeBase.rsslink(self) + u'\n' + extra_rss
13.25 + return ThemeBase.rsslink(self) + u'\n' + extra_rss
13.26
13.27 def header(self, d, **kw):
13.28 """ Assemble wiki header
14.1 Binary file themes/ep2008/img/moin-conflict.png has changed
15.1 Binary file themes/ep2008/img/moin-renamed.png has changed