Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
b07216b4
Commit
b07216b4
authored
Oct 30, 2002
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for --favicon.
Fix support for the Aesop Meta Type.
parent
56c8c27b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
Doc/tools/support.py
Doc/tools/support.py
+15
-2
No files found.
Doc/tools/support.py
View file @
b07216b4
...
@@ -8,6 +8,7 @@ __version__ = '$Revision$'
...
@@ -8,6 +8,7 @@ __version__ = '$Revision$'
import
getopt
import
getopt
import
os.path
import
sys
import
sys
...
@@ -18,7 +19,7 @@ class Options:
...
@@ -18,7 +19,7 @@ class Options:
"columns="
,
"help"
,
"output="
,
"columns="
,
"help"
,
"output="
,
# content components
# content components
"address="
,
"iconserver="
,
"address="
,
"iconserver="
,
"favicon="
,
"title="
,
"uplink="
,
"uptitle="
]
"title="
,
"uplink="
,
"uptitle="
]
outputfile
=
"-"
outputfile
=
"-"
...
@@ -26,6 +27,7 @@ class Options:
...
@@ -26,6 +27,7 @@ class Options:
letters
=
0
letters
=
0
uplink
=
"index.html"
uplink
=
"index.html"
uptitle
=
"Python Documentation Index"
uptitle
=
"Python Documentation Index"
favicon
=
None
# The "Aesop Meta Tag" is poorly described, and may only be used
# The "Aesop Meta Tag" is poorly described, and may only be used
# by the Aesop search engine (www.aesop.com), but doesn't hurt.
# by the Aesop search engine (www.aesop.com), but doesn't hurt.
...
@@ -89,6 +91,8 @@ class Options:
...
@@ -89,6 +91,8 @@ class Options:
self
.
uptitle
=
val
.
strip
()
self
.
uptitle
=
val
.
strip
()
elif
opt
==
"--iconserver"
:
elif
opt
==
"--iconserver"
:
self
.
variables
[
"iconserver"
]
=
val
.
strip
()
or
"."
self
.
variables
[
"iconserver"
]
=
val
.
strip
()
or
"."
elif
opt
==
"--favicon"
:
self
.
favicon
=
val
.
strip
()
else
:
else
:
self
.
handle_option
(
opt
,
val
)
self
.
handle_option
(
opt
,
val
)
if
self
.
uplink
and
self
.
uptitle
:
if
self
.
uplink
and
self
.
uptitle
:
...
@@ -114,11 +118,20 @@ class Options:
...
@@ -114,11 +118,20 @@ class Options:
repl
=
" %s
\
n
</head>"
%
link
repl
=
" %s
\
n
</head>"
%
link
s
=
s
.
replace
(
"</head>"
,
repl
,
1
)
s
=
s
.
replace
(
"</head>"
,
repl
,
1
)
if
self
.
aesop_type
:
if
self
.
aesop_type
:
meta
=
'
\
n
<meta name="aesop" content="%s">'
meta
=
'
<meta name="aesop" content="%s">
\
n
'
%
self
.
aesop_type
# Insert this in the middle of the head that's been
# Insert this in the middle of the head that's been
# generated so far, keeping <meta> and <link> elements in
# generated so far, keeping <meta> and <link> elements in
# neat groups:
# neat groups:
s
=
s
.
replace
(
"<link "
,
meta
+
"<link "
,
1
)
s
=
s
.
replace
(
"<link "
,
meta
+
"<link "
,
1
)
if
self
.
favicon
:
ext
=
os
.
path
.
splitext
(
self
.
favicon
)[
1
]
if
ext
in
(
".gif"
,
".png"
):
type
=
' type="image/%s"'
%
ext
[
1
:]
else
:
type
=
''
link
=
(
'<link rel="SHORTCUT ICON" href="%s"%s>
\
n
'
%
(
self
.
favicon
,
type
))
s
=
s
.
replace
(
"<link "
,
link
+
"<link "
,
1
)
return
s
return
s
def
get_footer
(
self
):
def
get_footer
(
self
):
...
...
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