Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
b1823ad8
Kaydet (Commit)
b1823ad8
authored
Ara 09, 1997
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
v 0.8.3 -- add an option to suppress URL processing inside <PRE>,
by Scott <scott@chronis.icgroup.com>
üst
fc5d8b19
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
9 deletions
+15
-9
README
Tools/faqwiz/README
+3
-3
faqconf.py
Tools/faqwiz/faqconf.py
+4
-1
faqwiz.py
Tools/faqwiz/faqwiz.py
+8
-5
No files found.
Tools/faqwiz/README
Dosyayı görüntüle @
b1823ad8
...
...
@@ -2,8 +2,8 @@ FAQ Wizard
----------
Author: Guido van Rossum <guido@python.org>
Version: 0.8
Date:
27 August
1997
Version: 0.8
.3
Date:
8 December
1997
This is a CGI program that maintains a user-editable FAQ. It uses RCS
...
...
@@ -18,7 +18,7 @@ importable module. The actual script in cgi-bin is minimal.
Files:
faqw.py executable script to be edited and installed in cgi-bin
faqwi
n
.py main module, lives in same directory as FAQ entry files
faqwi
z
.py main module, lives in same directory as FAQ entry files
faqconf.py main configuration module
faqcust.py additional local customization module (optional)
...
...
Tools/faqwiz/faqconf.py
Dosyayı görüntüle @
b1823ad8
...
...
@@ -29,6 +29,9 @@ RCSBINDIR = "/depot/gnu/plat/bin/" # Directory containing RCS commands
MAXHITS
=
10
# Max #hits to be shown directly
COOKIE_LIFETIME
=
28
*
24
*
3600
# Cookie expiration in seconds
# (28*24*3600 = 28 days = 4 weeks)
PROCESS_PREFORMAT
=
1
# toggle whether preformatted text
# will replace urls and emails with
# HTML links
# Markers appended to title to indicate recently change
# (may contain HTML, e.g. <IMG>); and corresponding
...
...
@@ -46,7 +49,7 @@ entries marked with * were changed within the last 7 days.)
# Version -- don't change unless you edit faqwiz.py
WIZVERSION
=
"0.8.
2
"
# FAQ Wizard version
WIZVERSION
=
"0.8.
3
"
# FAQ Wizard version
# This parameter is normally overwritten with a dynamic value
...
...
Tools/faqwiz/faqwiz.py
Dosyayı görüntüle @
b1823ad8
...
...
@@ -70,7 +70,7 @@ def emit(format, *args, **kw):
translate_prog
=
None
def
translate
(
text
):
def
translate
(
text
,
pre
=
0
):
global
translate_prog
if
not
translate_prog
:
url
=
'
\
(http
\
|ftp
\
|https
\
)://[^
\t\r\n
]*'
...
...
@@ -90,10 +90,13 @@ def translate(text):
while
url
[
-
1
]
in
');:,.?
\'
"'
:
url
=
url
[:
-
1
]
url
=
escape
(
url
)
if
':'
in
url
:
repl
=
'<A HREF="
%
s">
%
s</A>'
%
(
url
,
url
)
if
not
pre
or
(
pre
and
PROCESS_PREFORMAT
):
if
':'
in
url
:
repl
=
'<A HREF="
%
s">
%
s</A>'
%
(
url
,
url
)
else
:
repl
=
'<A HREF="mailto:
%
s"><
%
s></A>'
%
(
url
,
url
)
else
:
repl
=
'<A HREF="mailto:
%
s"><
%
s></A>'
%
(
url
,
url
)
repl
=
url
list
.
append
(
repl
)
i
=
i
+
len
(
url
)
j
=
len
(
text
)
...
...
@@ -292,7 +295,7 @@ class FaqEntry:
print
'<PRE>'
pre
=
1
if
'/'
in
line
or
'@'
in
line
:
line
=
translate
(
line
)
line
=
translate
(
line
,
pre
)
elif
'<'
in
line
or
'&'
in
line
:
line
=
escape
(
line
)
if
not
pre
and
'*'
in
line
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment