]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix trailing spaces and split long Python lines origin/dev/texi2html
authorJohn Mandereau <john.mandereau@gmail.com>
Tue, 2 Sep 2008 11:14:20 +0000 (13:14 +0200)
committerJohn Mandereau <john.mandereau@gmail.com>
Tue, 2 Sep 2008 11:14:20 +0000 (13:14 +0200)
Also remove commented out duplicate makeinfo configure check,
and remove duplicate stalled Texinfo macros.

All these nitpicks have been caught by checking output from
git diff master dev/texi2html

Documentation/lilypond-ie-fixes.css
Documentation/user/macros.itexi
buildscripts/extract_texi_filenames.py
buildscripts/postprocess_html.py
configure.in
lilypond-texi2html.init
stepmake/stepmake/texinfo-rules.make
stepmake/stepmake/texinfo-vars.make

index 8a068900f0750f82f267d540d7576e91d8416444..6587e18eaddaa4222a14971366afda8ad6436fe7 100644 (file)
@@ -25,4 +25,4 @@ div#main {
 div#tocframe {
   height: 100%;
   width: 27%;
-}  
+}
index 6801ff4f340e70543408206944b9c2c95680e163..a00f9c07ffb9f0760351871c17a90b4c36852798 100644 (file)
 @ref{\TEXT\,,\DISPLAY\,lilypond-learning,Learning Manual}
 @end macro
 
-@macro rlearningnamed{TEXT,DISPLAY}
-learning manual, @ref{\TEXT\,,\DISPLAY\,lilypond-learning,Learning Manual}
-@end macro
-
 @macro ruser{TEXT}
 @ref{\TEXT\,,,lilypond,Notation Reference}
 @end macro
 
-@macro rusernamed{TEXT,DISPLAY,DISPLAY}
+@macro rusernamed{TEXT,DISPLAY}
 @ref{\TEXT\,,\DISPLAY\,lilypond,Notation Reference}
 @end macro
 
-@macro rusernamed{TEXT,DISPLAY,DISPLAY}
-notation reference, @ref{\TEXT\,,\DISPLAY\,lilypond,Notation Reference}
-@end macro
-
 @macro rprogram{TEXT}
 @ref{\TEXT\,,,lilypond-program,Application Usage}
 @end macro
@@ -312,10 +304,6 @@ notation reference, @ref{\TEXT\,,\DISPLAY\,lilypond,Notation Reference}
 @ref{\TEXT\,,\DISPLAY\,lilypond-program,Application Usage}
 @end macro
 
-@macro rprogramnamed{TEXT,DISPLAY}
-program usage manual, @ref{\TEXT\,,\DISPLAY\,lilypond-program,Application Usage}
-@end macro
-
 @macro rlsr{TEXT}
 @ref{\TEXT\,,,lilypond-snippets,Snippets}
 @end macro
index c85a18fb22a06eac284dc2bc3f545f9f313e7616..5798d5dab26878889869a5a3e1b49cab264519e8 100755 (executable)
@@ -18,7 +18,7 @@
 #        NODE\tFILENAME\tANCHOR
 # LANG is the document language in case it's not 'en'
 # Note: The filename does not have any extension appended!
-# This file can then be used by our texi2html init script to determine 
+# This file can then be used by our texi2html init script to determine
 # the correct file name and anchor for external refs
 
 import sys
@@ -41,7 +41,9 @@ if not os.path.isdir (outdir):
 
 include_re = re.compile (r'@include ((?!../lily-).*?)\.texi$', re.M)
 whitespaces = re.compile (r'\s+')
-section_translation_re = re.compile (r'^@(node|(?:unnumbered|appendix)(?:(?:sub){0,2}sec)?|top|chapter|(?:sub){0,2}section|(?:major|chap|(?:sub){0,2})heading|translationof) (.*?)\s*$', re.MULTILINE)
+section_translation_re = re.compile ('^@(node|(?:unnumbered|appendix)\
+(?:(?:sub){0,2}sec)?|top|chapter|(?:sub){0,2}section|\
+(?:major|chap|(?:sub){0,2})heading|translationof) (.*?)\\s*$', re.MULTILINE)
 
 def expand_includes (m, filename):
     filepath = os.path.join (os.path.dirname (filename), m.group(1)) + '.texi'
index 6ebe31a8e0619669b788adadd3a280a8fddf4cf0..98d49612247f4e52784efc1ac8b75ea0be77b6e3 100644 (file)
@@ -94,10 +94,13 @@ def build_pages_dict (filelist):
 def source_links_replace (m, source_val):
     return 'href="' + os.path.join (source_val, m.group (1)) + '"'
 
-splitted_docs_re = re.compile ('(input/lsr/out-www/lilypond-snippets|Documentation/user/out-www/(lilypond|music-glossary|lilypond-program|lilypond-learning))/')
+splitted_docs_re = re.compile ('(input/lsr/out-www/lilypond-snippets|\
+Documentation/user/out-www/(lilypond|music-glossary|lilypond-program|\
+lilypond-learning))/')
 
 snippets_ref_re = re.compile (r'href="(\.\./)?lilypond-snippets')
-user_ref_re = re.compile (r'href="(?:\.\./)?lilypond(-internals|-learning|-program|(?!-snippets))')
+user_ref_re = re.compile ('href="(?:[.][.])?lilypond\
+(-internals|-learning|-program|(?!-snippets))')
 
 ## Windows does not support symlinks.
 # This function avoids creating symlinks for splitted HTML manuals
@@ -177,12 +180,15 @@ def find_translations (prefix, lang_ext):
         if lang_ext != e:
             if e in pages_dict[prefix]:
                 available.append (l)
-            elif lang_ext == '' and l.enabled and reduce (operator.and_, [not prefix.startswith (s) for s in non_copied_pages]):
+            elif lang_ext == '' and l.enabled and reduce (operator.and_,
+                                                          [not prefix.startswith (s)
+                                                           for s in non_copied_pages]):
                 # English version of missing translated pages will be written
                 missing.append (e)
     return available, missing
 
-online_links_re = re.compile ('''(href|src)=['"]([^/][.]*[^.:'"]*)([.]html|[.]png)(#[^"']*|)['"]''')
+online_links_re = re.compile ('''(href|src)=['"]([^/][.]*[^.:'"]*)\
+([.]html|[.]png)(#[^"']*|)['"]''')
 offline_links_re = re.compile ('''href=['"]([^/][.]*[^.:'"]*)([.]html)(#[^"']*|)['"]''')
 big_page_name_re = re.compile ('''(.+?)-big-page''')
 
@@ -313,7 +319,7 @@ def process_html_files (package_name = '',
             ### add footer
             if footer_tag_re.search (s) == None:
                 s = add_footer (s, footer_tag + footer)
-                
+
                 available, missing = find_translations (prefix, lang_ext)
                 page_flavors = process_links (s, prefix, lang_ext, file_name, missing, target)
                 # Add menu after stripping: must not have autoselection for language menu.
index be353c500e6095c1f822c861cee5159cdb0a8188..ffd787f4c969ff412eca125682fa489b774b7356 100644 (file)
@@ -126,8 +126,6 @@ AC_MSG_RESULT(Must have patched GUILE rational support. See INSTALL.txt))
 CPPFLAGS="$save_CPPFLAGS"
 
 
-# We check for makeinfo below, too. Really duplicate that check?
-## STEPMAKE_MAKEINFO(REQUIRED, 4.11)
 STEPMAKE_PYTHON_DEVEL(REQUIRED)
 
 STEPMAKE_PATH_PROG(GHOSTSCRIPT, gs, OPTIONAL, 8.15)
index 66c269b36fb940fc33c024f40aa8e0b710027a4e..e208e5933b70cbd01dc2dde7aa873cb94e1e06a7 100644 (file)
@@ -350,7 +350,7 @@ sub lilypond_element_target_name($$$)
   }
 
   # If we have an entry in the section<=>filename map, use that one, otherwise
-  # generate the anchor here. 
+  # generate the anchor here.
   if (exists ($node_to_filename_map->{$node_name})) {
     (my $filename, $target) = @{$node_to_filename_map->{$node_name}};
   } else {
@@ -884,7 +884,7 @@ sub lilypond_print_navigation
 # before the fn text.
 
 
-# The following code is copied from texi2html's examples/makeinfo.init and 
+# The following code is copied from texi2html's examples/makeinfo.init and
 # should be updated when texi2html makes some changes there!
 
 my $makekinfo_like_footnote_absolute_number = 0;
@@ -899,7 +899,7 @@ sub makeinfo_like_foot_line_and_ref($$$$$$$$)
     my $footnote_file = shift;
     my $lines = shift;
     my $state = shift;
-    
+
     $makekinfo_like_footnote_absolute_number++;
 
     # this is a bit obscure, this allows to add an anchor only if formatted
@@ -907,7 +907,7 @@ sub makeinfo_like_foot_line_and_ref($$$$$$$$)
     $docid = '' if ($state->{'outside_document'} or $state->{'multiple_pass'});
 
     if ($from_file eq $footnote_file)
-    { 
+    {
         $from_file = $footnote_file = '';
     }
 
@@ -985,8 +985,8 @@ sub makeinfo_like_paragraph ($$$$$$$$$$$$$)
            my $docid = $state->{'footnote_place_id'};
            my $doc_state = $state->{'footnote_document_state'};
            $docid = '' if ($doc_state->{'outside_document'} or $doc_state->{'multiple_pass'});
-           my $foot_label = &$anchor($state->{'footnote_footnote_id'}, 
-                 $document_file . "#$state->{'footnote_place_id'}", 
+           my $foot_label = &$anchor($state->{'footnote_footnote_id'},
+                 $document_file . "#$state->{'footnote_place_id'}",
                  "$state->{'footnote_number_in_page'}");
            $footnote_text = "<small>[${foot_label}]</small> ";
         }
index 00435f2f2c4948b7d8d48f4f23fc5b368d2e40a4..4d1f06283f7f5b799aa4d2d4bdc3a582d1321bb5 100644 (file)
@@ -28,7 +28,7 @@ $(outdir)/%.info: $(outdir)/%.texi $(outdir)/$(INFO_IMAGES_DIR).info-images-dir-
 
 ifeq (,$(findstring texi2html,$(MISSING_OPTIONAL)))
 $(outdir)/%-big-page.html: $(outdir)/%.texi $(XREF_MAPS_DIR)/%.xref-map $(outdir)/version.itexi
-       $(TEXI2HTML) --I=$(outdir) -D bigpage --output=$@ $(TEXI2HTML_INIT) $< 
+       $(TEXI2HTML) --I=$(outdir) -D bigpage --output=$@ $(TEXI2HTML_INIT) $<
        cp $(top-src-dir)/Documentation/lilypond*.css $(dir $@)
 
 $(outdir)/%.html: $(outdir)/%.texi $(XREF_MAPS_DIR)/%.xref-map $(outdir)/version.itexi
index dcfa5e63b947758070ce6ffdf9959fe8575464ac..726273c55fb1e934b21e26ed8cb064e2773b44ab 100644 (file)
@@ -18,7 +18,7 @@ XREF_MAPS_DIR=$(top-build-dir)/out/xref-maps
 XREF_MAPS_FILES=$(INFO_DOCS:%=$(XREF_MAPS_DIR)/%.xref-map)
 
 # texi2html flags
-ifneq ($(ISOLANG),) 
+ifneq ($(ISOLANG),)
 TEXI2HTML_LANG = --lang=$(ISOLANG)
 endif
 TEXI2HTML_FLAGS += --css-ref=lilypond.css $(DOCUMENTATION_INCLUDES) \