[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fixes missing images in web-big-page (issue 4922046)
From: |
PhilEHolmes |
Subject: |
Fixes missing images in web-big-page (issue 4922046) |
Date: |
Mon, 22 Aug 2011 16:53:22 +0000 |
Reviewers: Graham Percival,
Message:
Patch fixes the missing images in web-big-page.html. Please review.
Description:
This patch works by adding an extra part (web/) to the path to the css
link and the example images links, and then using postprocess_html.py to
get rid of this for the split files. postprocess_html.py already makes
this sort of change for a number of other aspects of split files. I
have tested it on my local system and shown it working. Please note
that there is an additional file in this patch -
input/regression/musicxml/GNUmakefile - current master will not compile
docs on my system without this change - Reinhold has debug information
from me.
Please review this at http://codereview.appspot.com/4922046/
Affected files:
M Documentation/lilypond-texi2html.init
M Documentation/macros.itexi
M input/regression/musicxml/GNUmakefile
M python/auxiliar/postprocess_html.py
Index: Documentation/lilypond-texi2html.init
diff --git a/Documentation/lilypond-texi2html.init
b/Documentation/lilypond-texi2html.init
index
3585a9e8ede21472bd4c36d9ad08b2f6ad2105d6..621a17b775fcbaf21679b877a9653bfe7e4b93a8
100644
--- a/Documentation/lilypond-texi2html.init
+++ b/Documentation/lilypond-texi2html.init
@@ -852,7 +852,7 @@ sub web_settings() {
print STDERR "Processing web site:
[$Texi2HTML::THISDOC{current_lang}]\n";
$Texi2HTML::Config::BODYTEXT = "";
@Texi2HTML::Config::CSS_REFS = (
- {FILENAME => "lilypond-website.css", TITLE => "Default style"}
+ {FILENAME => "web/lilypond-website.css", TITLE => "Default style"}
);
@Texi2HTML::Config::ALT_CSS_REFS = (
);
Index: Documentation/macros.itexi
diff --git a/Documentation/macros.itexi b/Documentation/macros.itexi
index
6e567a56d555a52f71e94cfac997ba50c2dd07fb..31f5c59a8cf33af8a99169a58cb500937ce01cd9
100644
--- a/Documentation/macros.itexi
+++ b/Documentation/macros.itexi
@@ -730,8 +730,8 @@ For LilyPond version @version{}
@macro exampleImage{IMAGE-FILE}
@html
<div class="float-center">
- <a class="clickable" href="ly-examples/\IMAGE-FILE\.png">
- <img src="ly-examples/\IMAGE-FILE\-small.png" alt="\IMAGE-FILE\">
+ <a class="clickable" href="web/ly-examples/\IMAGE-FILE\.png">
+ <img src="web/ly-examples/\IMAGE-FILE\-small.png" alt="\IMAGE-FILE\">
</a>
<p style="text-align: center">
(click to enlarge)
Index: input/regression/musicxml/GNUmakefile
diff --git a/input/regression/musicxml/GNUmakefile
b/input/regression/musicxml/GNUmakefile
index
101abd10c444149e7f05891ec006d54f459be951..c84c053f5a3b6a5918ed6789271e4adcd05875b5
100644
--- a/input/regression/musicxml/GNUmakefile
+++ b/input/regression/musicxml/GNUmakefile
@@ -16,7 +16,8 @@ include $(depth)/make/stepmake.make
TITLE=Unofficial MusicXML test suite
AUTHOR=Reinhold Kainhofer
TEST_SUITE_VERSION=0.1
-LILYPOND_BOOK_FLAGS += --load-custom-package=book-musicxml-testsuite.py
+# Commented out by PH
+# LILYPOND_BOOK_FLAGS += --load-custom-package=book-musicxml-testsuite.py
# This breaks since *.tex and *.texi still contains ac/lily-xxxxxx
references!
#LILYPOND_BOOK_FLAGS += --use-source-file-names
Index: python/auxiliar/postprocess_html.py
diff --git a/python/auxiliar/postprocess_html.py
b/python/auxiliar/postprocess_html.py
index
de3848537cb2f466fd8816414bc6519147c30ea9..f92ee3d60e4d0aa95114e7963e8949a34791da50
100644
--- a/python/auxiliar/postprocess_html.py
+++ b/python/auxiliar/postprocess_html.py
@@ -105,6 +105,8 @@ def source_links_replace (m, source_val):
split_docs_re = re.compile('(Documentation/out-www/(automated-engraving|
essay|notation|changes|extending|music-glossary|usage|web|learning|snippets|
contributor))/')
lily_snippets_re = re.compile ('(href|src)="([0-9a-f]{2}/lily-.*?)"')
pictures_re = re.compile ('src="(pictures/.*?)"')
+webcss_re = re.compile ('href="web/lilypond-website')
+lyexamples_re = re.compile ('src="web/(ly-examples/.*?)"')
docindex_link_re = re.compile (r'href="index.html"')
manuals_page_link_re = re.compile
(r'href="((?:\.\./)+)Documentation/web/manuals')
@@ -117,6 +119,8 @@ def hack_urls (s, prefix, target,
is_development_branch):
if split_docs_re.match (prefix):
s = lily_snippets_re.sub ('\\1="../\\2"', s)
s = pictures_re.sub ('src="../\\1"', s)
+ s = webcss_re.sub ('href="lilypond-website', s)
+ s = lyexamples_re.sub ('src="\\1"', s)
# we also need to replace in the lsr, which is already processed above!
if 'input/' in prefix or 'Documentation/topdocs' in prefix or \
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Fixes missing images in web-big-page (issue 4922046),
PhilEHolmes <=