Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fd67f73

Browse files
committed
Added marks for very recently (24 hours) and recently (7 days)
modified files. Throw things around a bit.
1 parent 8bc49c8 commit fd67f73

1 file changed

Lines changed: 41 additions & 15 deletions

File tree

Tools/faqwiz/faqconf.py

Lines changed: 41 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,43 @@
3030
COOKIE_LIFETIME = 28*24*3600 # Cookie expiration in seconds
3131
# (28*24*3600 = 28 days = 4 weeks)
3232

33+
# Markers appended to title to indicate recently change
34+
# (may contain HTML, e.g. <IMG>); and corresponding
35+
36+
MARK_VERY_RECENT = " **" # Changed very recently
37+
MARK_RECENT = " *" # Changed recently
38+
DT_VERY_RECENT = 24*3600 # 24 hours
39+
DT_RECENT = 7*24*3600 # 7 days
40+
41+
EXPLAIN_MARKS = """
42+
<P>
43+
(Entries marked with ** were changed within the last 24 hours;
44+
entries marked with * were changed within the last 7 days.)
45+
<P>
46+
"""
47+
48+
# Version -- don't change unless you edit faqwiz.py
49+
50+
WIZVERSION = "0.3 (alpha)" # FAQ Wizard version
51+
3352
# This parameter is normally overwritten with a dynamic value
3453

3554
FAQCGI = 'faqw.py' # Relative URL of the FAQ cgi script
3655
import os, sys
3756
FAQCGI = os.path.basename(sys.argv[0]) or FAQCGI
3857
del os, sys
3958

59+
# Regular expression to recognize FAQ entry files: group(1) should be
60+
# the section number, group(2) should be the question number. Both
61+
# should be fixed width so simple-minded sorting yields the right
62+
# order.
63+
64+
OKFILENAME = "^faq\([0-9][0-9]\)\.\([0-9][0-9][0-9]\)\.htp$"
65+
66+
# Format to construct a FAQ entry file name
67+
68+
NEWFILENAME = "faq%02d.%03d.htp"
69+
4070
# Load local customizations on top of the previous parameters
4171

4272
try:
@@ -49,20 +79,12 @@
4979
COOKIE_NAME = SHORTNAME + "-FAQ-Wizard" # Name used for Netscape cookie
5080
FAQNAME = SHORTNAME + " FAQ" # Name of the FAQ
5181

52-
# Regular expression to recognize FAQ entry files: group(1) should be
53-
# the section number, group(2) should be the question number. Both
54-
# should be fixed width so simple-minded sorting yields the right
55-
# order.
56-
57-
OKFILENAME = "^faq\([0-9][0-9]\)\.\([0-9][0-9][0-9]\)\.htp$"
58-
59-
# Format to construct a FAQ entry file name
60-
61-
NEWFILENAME = "faq%02d.%03d.htp"
62-
63-
# Version -- don't change unless you edit faqwiz.py
82+
# Load local customizations again, in case they set COOKIE_NAME or FAQNAME
6483

65-
WIZVERSION = "0.3 (alpha)" # FAQ Wizard version
84+
try:
85+
from faqcust import *
86+
except ImporError:
87+
pass
6688

6789
# ----------------------------------------------------------------------
6890

@@ -205,9 +227,13 @@
205227

206228
# Entry formatting
207229

208-
ENTRY_HEADER = """
230+
ENTRY_HEADER1 = """
209231
<HR>
210-
<H2><A NAME="%(sec)s.%(num)s">%(title)s</A></H2>
232+
<H2><A NAME="%(sec)s.%(num)s">%(title)s</A>\
233+
"""
234+
235+
ENTRY_HEADER2 = """\
236+
</H2>
211237
"""
212238

213239
ENTRY_FOOTER = """

0 commit comments

Comments
 (0)