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
4a473492
Commit
4a473492
authored
Oct 30, 2002
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More <link> support for generated pages.
parent
8687609a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
3 deletions
+24
-3
Doc/tools/mkmodindex
Doc/tools/mkmodindex
+17
-0
Doc/tools/support.py
Doc/tools/support.py
+7
-3
No files found.
Doc/tools/mkmodindex
View file @
4a473492
...
@@ -29,6 +29,8 @@ import os
...
@@ -29,6 +29,8 @@ import os
import
re
import
re
import
sys
import
sys
from
xml.sax.saxutils
import
quoteattr
import
buildindex
import
buildindex
import
support
import
support
...
@@ -49,6 +51,21 @@ class IndexOptions(support.Options):
...
@@ -49,6 +51,21 @@ class IndexOptions(support.Options):
program
=
os
.
path
.
basename
(
sys
.
argv
[
0
])
program
=
os
.
path
.
basename
(
sys
.
argv
[
0
])
print
__doc__
%
{
"program"
:
program
}
print
__doc__
%
{
"program"
:
program
}
links
=
[
(
'author'
,
'acks.html'
,
'Acknowledgements'
),
(
'help'
,
'about.html'
,
'About the Python Documentation'
),
]
def
get_header
(
self
):
header
=
support
.
Options
.
get_header
(
self
)
s
=
''
for
rel
,
href
,
title
in
self
.
links
:
s
+=
'<link rel="%s" href="%s"'
%
(
rel
,
href
)
if
title
:
s
+=
' title='
+
quoteattr
(
title
)
s
+=
'>
\
n
'
return
header
.
replace
(
"<link "
,
s
+
"<link "
,
1
)
class
Node
(
buildindex
.
Node
):
class
Node
(
buildindex
.
Node
):
def
__init__
(
self
,
link
,
str
,
seqno
,
platinfo
):
def
__init__
(
self
,
link
,
str
,
seqno
,
platinfo
):
...
...
Doc/tools/support.py
View file @
4a473492
...
@@ -111,10 +111,14 @@ class Options:
...
@@ -111,10 +111,14 @@ class Options:
s
=
HEAD
%
self
.
variables
s
=
HEAD
%
self
.
variables
if
self
.
uplink
:
if
self
.
uplink
:
if
self
.
uptitle
:
if
self
.
uptitle
:
link
=
(
'<link rel="up" href="%s" title="%s">'
link
=
(
'<link rel="up" href="%s" title="%s">
\
n
'
%
(
self
.
uplink
,
self
.
uptitle
))
'<link rel="start" href="%s" title="%s">'
%
(
self
.
uplink
,
self
.
uptitle
,
self
.
uplink
,
self
.
uptitle
))
else
:
else
:
link
=
'<link rel="up" href="%s">'
%
self
.
uplink
link
=
(
'<link rel="up" href="%s">
\
n
'
'<link rel="start" href="%s">'
%
(
self
.
uplink
,
self
.
uplink
))
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
:
...
...
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