File: macros.py

package info (click to toggle)
rest2web 0.5.2~alpha%2Bsvn-r248-2.3
  • links: PTS
  • area: main
  • in suites: buster
  • size: 5,256 kB
  • ctags: 870
  • sloc: python: 6,285; makefile: 64
file content (44 lines) | stat: -rw-r--r-- 1,200 bytes parent folder | download | duplicates (4)
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
# macros.py

# Subversion Details
# $LastChangedDate: 2006-08-14 00:53:30 +0200 (Mon, 14 Aug 2006) $
# $LastChangedBy: fuzzyman $
# $HeadURL: https://svn.rest2web.python-hosting.com/trunk/macros.py $
# $LastChangedRevision: 202 $

# User macros for rest2web 
# http://www.voidspace.org.uk/python/rest2web

# Copyright Michael Foord 2006.
# Released subject to the BSD License
# Please see http://www.voidspace.org.uk/python/license.shtml

# For information about bugfixes, updates and support, please join the
# rest2web mailing list.
# http://lists.sourceforge.net/lists/listinfo/rest2web-develop
# Comments, suggestions and bug reports welcome.
# Scripts maintained at http://www.voidspace.org.uk/python/index.shtml
# E-mail fuzzyman@voidspace.org.uk


uservalues = {}
namespace = {}

def set_uservalues(n, u):
    """
    Set the namespace and uservalues for the page.
    
    This means that macros can use 'uservalues' and 'namespace'.
    """
    global namespace
    global uservalues
    uservalues = u
    namespace = n

# add to this dictionary to add extra acronyms
# keys should be lowercase
acronyms = {
    'usb': 'Universal Serial Bus', 
    'YAGNI': 'You Aint Gonna Need It',
    
}