Hello community,
here is the log from the commit of package octave-forge-generate_html for
openSUSE:Factory checked in at 2016-06-09 16:15:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/octave-forge-generate_html (Old)
and /work/SRC/openSUSE:Factory/.octave-forge-generate_html.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "octave-forge-generate_html"
Changes:
--------
---
/work/SRC/openSUSE:Factory/octave-forge-generate_html/octave-forge-generate_html.changes
2015-08-31 22:58:47.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.octave-forge-generate_html.new/octave-forge-generate_html.changes
2016-06-09 16:17:39.000000000 +0200
@@ -1,0 +2,6 @@
+Tue Jun 7 20:01:54 UTC 2016 - [email protected]
+
+- Update to version 0.1.11
+ * Bugfix release
+
+-------------------------------------------------------------------
Old:
----
generate_html-0.1.9.tar.gz
New:
----
generate_html-0.1.11.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ octave-forge-generate_html.spec ++++++
--- /var/tmp/diff_new_pack.D6awdD/_old 2016-06-09 16:17:41.000000000 +0200
+++ /var/tmp/diff_new_pack.D6awdD/_new 2016-06-09 16:17:41.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package octave-forge-generate_html
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
%define octpkg generate_html
Name: octave-forge-%{octpkg}
-Version: 0.1.9
+Version: 0.1.11
Release: 0
Summary: Generate HTML web page from help texts
License: GPL-3.0+
++++++ generate_html-0.1.9.tar.gz -> generate_html-0.1.11.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/generate_html-0.1.9/DESCRIPTION
new/generate_html-0.1.11/DESCRIPTION
--- old/generate_html-0.1.9/DESCRIPTION 2015-07-24 08:35:12.000000000 +0200
+++ new/generate_html-0.1.11/DESCRIPTION 2016-05-21 22:32:35.000000000
+0200
@@ -1,6 +1,6 @@
Name: generate_html
-Version: 0.1.9
-Date: 2015-07-24
+Version: 0.1.11
+Date: 2016-05-21
Author: Søren Hauberg <[email protected]> and others
Maintainer: Octave-Forge community <[email protected]>
Title: Generate HTML web page from help texts
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/generate_html-0.1.9/NEWS
new/generate_html-0.1.11/NEWS
--- old/generate_html-0.1.9/NEWS 2015-07-24 08:35:12.000000000 +0200
+++ new/generate_html-0.1.11/NEWS 2016-05-21 22:32:35.000000000 +0200
@@ -1,3 +1,45 @@
+Summary of important user-visible changes for generate_html 0.1.11:
+-------------------------------------------------------------------
+
+ ** Content of autoload field not shown anymore
+
+ o generate_package_html: index.html no longer displays autoload
+ information (and there is no other place in the generated HTML
+ with that information). The main reasons for this change are:
+
+ 1) there are no Octave Forge packages that autoload anymore,
+
+ 2) support for autoload of packages will be completely removed
+ in Octave 4.2.x.
+
+ ** New option for generate_package_html
+
+ o generate_package_html, get_html_options: Add new field
+ 'package_doc_options' to the option structure (patch #9002).
+ This field makes it possible to pass options to makeinfo when
+ building the package documentation.
+
+
+Summary of important user-visible changes for generate_html 0.1.10:
+-------------------------------------------------------------------
+
+ ** Bug fixes
+
+ o generate_package_html: Fixed title of copying and news page.
+
+ o generate_package_html: Support multiple image references per line (to
copy
+ images into the output directory).
+
+ ** Other changes
+
+ o generate_package_html: Short description has been updated for redesign of
+ Octave-Forge package overview page (patch #8787). Short description is
+ made of the first sentence from the full package desription.
+
+ o generate_package_html: Package documentation may use vector graphics (svg
+ images, bug #45628).
+
+
Summary of important user-visible changes for generate_html 0.1.9:
------------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/generate_html-0.1.9/inst/generate_package_html.m
new/generate_html-0.1.11/inst/generate_package_html.m
--- old/generate_html-0.1.9/inst/generate_package_html.m 2015-07-24
08:35:12.000000000 +0200
+++ new/generate_html-0.1.11/inst/generate_package_html.m 2016-05-21
22:32:35.000000000 +0200
@@ -1,6 +1,7 @@
## Copyright (C) 2008 Soren Hauberg <[email protected]>
-## Copyright (C) 2014, 2015 Julien Bect <[email protected]>
+## Copyright (C) 2014-2016 Julien Bect <[email protected]>
## Copyright (C) 2015 Oliver Heimlich <[email protected]>
+## Copyright (C) 2016 Fernando Pujaico Rivera
<[email protected]>
##
## This program is free software; you can redistribute it and/or modify it
## under the terms of the GNU General Public License as published by
@@ -48,10 +49,11 @@
##
## If you want to include prepared package documentation in html format,
## you have to set @var{options}.package_doc manually with the filename
-## of its texinfo source, which must be in the packages "doc" directory.
+## of its texinfo source, which must be in the package "doc" directory.
## Contained images are automatically copied if they are at the paths
-## specified in the texinfo source relative to the packages "doc"
-## directory.
+## specified in the texinfo source relative to the package "doc" directory.
+## Additional arguments can be passed to makeinfo using the optional
+## field @var{options}.package_doc_options.
##
## It should be noted that the function only works for installed packages.
## @seealso{get_html_options}
@@ -180,7 +182,7 @@
#########################
first_sentences = cell (1, num_categories);
if options.include_overview
-
+
## Create filename for the overview page
overview_filename = options.overview_filename;
overview_filename = strrep (overview_filename, "%name", desc.name);
@@ -277,11 +279,13 @@
if options.include_package_list_item
pkg_list_item_filename = options.pkg_list_item_filename;
+ ## Extract first sentence for a short description, remove period at the end
+ shortdescription = regexprep (desc.description, '\.($| .*)', '');
text = strrep (options.package_list_item, "%name", desc.name);
text = strrep (text, "%version", desc.version);
text = strrep (text, "%extension", "tar.gz");
- text = strrep (text, "%shortdescription", desc.description);
+ text = strrep (text, "%shortdescription", shortdescription);
fid = fopen (fullfile (packdir, pkg_list_item_filename), "w");
if (fid > 0)
@@ -329,9 +333,8 @@
error ("Couldn't open NEWS file for writing");
endif
- ## For the NEWS page, use the header and footer of the overview page
[header, title, footer] = get_header_title_and_footer ...
- ("overview", options, desc.name, "../", "", packname);
+ ("news", options, desc.name, "../", "", packname);
## Write output
fprintf (fid, "%s\n", header);
@@ -345,17 +348,64 @@
endif
endif
- #########################################
- ## Should we include the package doc ? ##
- #########################################
+ #################################
+ ## Write package documentation ##
+ #################################
+ # Is there a package documentation to be included ?
write_package_documentation = ~ isempty (options.package_doc);
+
if write_package_documentation
+
[~, doc_fn, doc_ext] = fileparts (options.package_doc);
doc_root_dir = fullfile (list.dir, "doc");
doc_src = fullfile (doc_root_dir, [doc_fn, doc_ext]);
doc_subdir = "package_doc";
doc_out_dir = fullfile (packdir, doc_subdir);
+
+ system (sprintf ('mkdir -p %s', doc_out_dir));
+
+ ## Create makeinfo command
+ makeinfo_cmd = sprintf ("%s --html -o %s %s", makeinfo_program (),
+ doc_out_dir, doc_src);
+ if (! isempty (options.package_doc_options))
+ makeinfo_cmd = [makeinfo_cmd, ' ', options.package_doc_options];
+ endif
+
+ ## Convert texinfo to HTML using makeinfo
+ status = system (makeinfo_cmd);
+ if (status == 127)
+ error ("Program `%s' not found", makeinfo_program ());
+ elseif (status)
+ error ("Program `%s' returned failure code %i",
+ makeinfo_program (), status);
+ endif
+
+ ## Search the name of the main HTML index file.
+ package_doc_index = 'index.html';
+ if (! exist (fullfile (doc_out_dir, package_doc_index), "file"))
+ ## Look for an HTML file with the same name as the texinfo source file
+ [~, doc_fn, doc_ext] = fileparts (doc_src);
+ package_doc_index = [doc_fn, '.html'];
+ if (! exist (fullfile (doc_out_dir, package_doc_index), "file"))
+ ## If there is only one file, no hesitation
+ html_fn_list = glob (fullfile (doc_out_dir, "*.html"));
+ if (length (html_fn_list) == 1)
+ [~, doc_fn, doc_ext] = fileparts (html_filenames_temp{1});
+ package_doc_index = [doc_fn, doc_ext];
+ else
+ error ('Unable to determine the root of the HTML manual.');
+ endif
+ endif
+ endif
+
+ ## Read image and css references from generated files and copy images
+ filelist = glob (fullfile (doc_out_dir, "*.html"));
+ for id = 1 : numel (filelist)
+ copy_images (filelist{id}, doc_root_dir, doc_out_dir);
+ copy_css (filelist{id}, doc_root_dir, doc_out_dir);
+ endfor
+
endif
######################
@@ -448,7 +498,7 @@
fprintf (fid, " <img src=\"../manual.png\" alt=\"Package doc
icon\"/>\n");
fprintf (fid, " </td><td>\n");
fprintf (fid, " <a href=\"%s\" class=\"package_doc\">\n", ...
- fullfile (doc_subdir, "index.html"));
+ fullfile (doc_subdir, package_doc_index));
fprintf (fid, " Package Documentation\n");
fprintf (fid, " </a>\n");
fprintf (fid, " </td></tr>\n");
@@ -457,7 +507,7 @@
fprintf (fid, " <tr><td>\n");
fprintf (fid, " <img src=\"../news.png\" alt=\"Package news
icon\"/>\n");
fprintf (fid, " </td><td>\n");
- fprintf (fid, " <a href=\"NEWS.html\">\n");
+ fprintf (fid, " <a href=\"NEWS.html\" class=\"news_file\">\n");
fprintf (fid, " NEWS\n");
fprintf (fid, " </a>\n");
fprintf (fid, " </td></tr>\n");
@@ -505,16 +555,6 @@
fprintf (fid, " <tr><td>Build dependencies:</td><td>%s</td></tr>\n",
list.buildrequires);
endif
- ## if the package does not specify, then it is not autoloaded. Also,
sometimes
- ## the value is 1 (true) but other times the value is a string
- if (isfield (list, "autoload") && (list.autoload == 1 ||
- any (strcmpi ({"yes", "on", "true"},
list.autoload))))
- a = "Yes";
- else
- a = "No";
- endif
- fprintf (fid, " <tr><td>Autoload:</td><td>%s</td></tr>\n", a);
-
fprintf (fid, " </table>\n\n");
fprintf (fid, "\n%s\n", footer);
@@ -554,9 +594,8 @@
error ("Couldn't open COPYING file for writing");
endif
- ## For the COPYING page, use the header and footer of the overview page
[header, title, footer] = get_header_title_and_footer ...
- ("overview", options, desc.name, "../", "", packname);
+ ("copying", options, desc.name, "../", "", packname);
## Write output
fprintf (fid, "%s\n", header);
@@ -569,30 +608,7 @@
fclose (fid);
endif
- #################################
- ## Write package documentation ##
- #################################
- if (write_package_documentation)
- ## Convert texinfo source
- status = system (sprintf ("%s --html -o %s %s",
- makeinfo_program (),
- doc_out_dir,
- doc_src));
- if (status == 127)
- error ("Program `%s' not found", makeinfo_program ());
- elseif (status)
- error ("Program `%s' returned failure code %i",
- makeinfo_program (), status);
- endif
-
- ## Read image references from generated files and copy images
- filelist = glob (fullfile (doc_out_dir, "*.html"));
- for id = 1 : numel (filelist)
- copy_images (filelist{id}, doc_root_dir, doc_out_dir);
- endfor
-
- endif
endfunction
@@ -602,9 +618,9 @@
error ("Couldn't open %s for reading", file);
endif
while (! isnumeric (l = fgetl (fid)))
- m = regexp (l, "<img.+src=""([^""]+)"".*>", "tokens");
- if (! isempty (m))
- url = m{1}{1};
+ m = regexp (l, "<(?:img.+?src|object.+?data)=""([^""]+)"".*?>", "tokens");
+ for i = 1 : numel (m)
+ url = m{i}{1};
## exclude external links
if (isempty (strfind (url, "//")))
if (! isempty (strfind (url, "..")))
@@ -625,7 +641,43 @@
endif
endif
endif
- endif
+ endfor
+ endwhile
+ fclose (fid);
+
+endfunction
+
+
+function copy_css (file, doc_root_dir, doc_out_dir)
+
+ if ((fid = fopen (file)) < 0)
+ error ("Couldn't open %s for reading", file);
+ endif
+ while (! isnumeric (l = fgetl (fid)))
+ m = regexp (l, "<(?:link
rel=\"stylesheet\".+?href|object.+?data)=""([^""]+)"".*?>", "tokens");
+ for i = 1 : numel (m)
+ url = m{i}{1};
+ ## exclude external links
+ if (isempty (strfind (url, "//")))
+ if (! isempty (strfind (url, "..")))
+ warning ("not copying css %s because path contains '..'",
+ url);
+ else
+ if (! isempty (imgdir = fileparts (url)) &&
+ ! strcmp (imgdir, "./") &&
+ ! exist (imgoutdir = fullfile (doc_out_dir, imgdir), "dir"))
+ [succ, msg] = mkdir (imgoutdir);
+ if (!succ)
+ error ("Unable to create directory %s:\n %s", imgoutdir, msg);
+ endif
+ endif
+ if (! ([status, msg] = copyfile (fullfile (doc_root_dir, url),
+ fullfile (doc_out_dir, url))))
+ warning ("could not copy css file %s: %s", url, msg);
+ endif
+ endif
+ endif
+ endfor
endwhile
fclose (fid);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/generate_html-0.1.9/inst/get_html_options.m
new/generate_html-0.1.11/inst/get_html_options.m
--- old/generate_html-0.1.9/inst/get_html_options.m 2015-07-24
08:35:12.000000000 +0200
+++ new/generate_html-0.1.11/inst/get_html_options.m 2016-05-21
22:32:35.000000000 +0200
@@ -1,5 +1,5 @@
## Copyright (C) 2008 Soren Hauberg <[email protected]>
-## Copyright (C) 2014, 2015 Julien Bect <[email protected]>
+## Copyright (C) 2014-2016 Julien Bect <[email protected]>
##
## This program is free software; you can redistribute it and/or modify it
## under the terms of the GNU General Public License as published by
@@ -78,6 +78,18 @@
default.overview_header = "";
default.overview_footer = "";
+ ## Variable values (%title, %body_command...) for the news page.
+ default.news_title = "Recent changes for the '%name' package";
+ default.news_body_command = "";
+ default.news_header = "";
+ default.news_footer = "";
+
+ ## Variable values (%title, %body_command...) for the copying page.
+ default.copying_title = "Copying conditions for the '%name' package";
+ default.copying_body_command = "";
+ default.copying_header = "";
+ default.copying_footer = "";
+
## Create short_package_description files ? (used by packages.php)
default.include_package_list_item = false;
@@ -138,6 +150,7 @@
## documentation file is to be included. If not empty, the documentation
## file is assumed to be in the 'doc' subdirectory.
default.package_doc = "";
+ default.package_doc_options = "";
## TODO: Warn about unknown options
## (to be done once all known options are present in default)
@@ -231,15 +244,19 @@
## Options for alphabetical lists
options.include_alpha = true;
+ ## SF logo
+ sf_logo = [ ...
+ "<div id=\"sf_logo\">\n" ...
+ " <a href=\"http://sourceforge.net\">\n" ...
+ " <img
src=\"http://sourceforge.net/sflogo.php?group_id=2888&type=1\"\n" ...
+ " width=\"88\" height=\"31\" style=\"border: 0;\"
alt=\"SourceForge.net Logo\" />\n" ...
+ " </a>\n" ...
+ "</div>\n"];
+
## Options for individual function pages
options.body_command = 'onload="javascript:fix_top_menu ();
javascript:show_left_menu ();"';
- options.index_footer = ...
- "<div id=\"sf_logo\">\n\
- <a href=\"http://sourceforge.net\">\
- <img
src=\"http://sourceforge.net/sflogo.php?group_id=2888&type=1\"\
- width=\"88\" height=\"31\" style=\"border: 0;\"
alt=\"SourceForge.net Logo\"/>\
- </a>\n\
- </div>\n</div>\n</body>\n</html>\n";
+ options.index_footer = [sf_logo "</div>\n</body>\n</html>\n"];
+
options.overview_footer = [ ...
"<p>Package: <a href=\"index.html\">%package</a></p>\n" ...
options.index_footer];
@@ -257,15 +274,12 @@
## Options for package list page
options.include_package_list_item = true;
options.package_list_item = ...
-"<div class=\"package\" id=\"%name\">\n\
-<table class=\"package\"><tr>\n\
-<td><b><a href=\"javascript:unfold('%name');\" class=\"package_head_link\">\n\
-<img src=\"show.png\" id=\"%name_im\" alt=\"show/hide\" style=\"padding-right:
0.5em; border: none;\"/> %name </a></b></td>\n\
-<td style=\"text-align: right;\">» <a href=\"./%name/index.html\"
class=\"package_link\">details</a> |\n\
-<a class=\"package_link\"
href=\"http://downloads.sourceforge.net/octave/%name-%version.%extension?download\">download</a></td>\n\
-</tr></table>\n\
-<p id=\"%name_detailed\" style=\"display: none;\"> %shortdescription </p>\n\
-</div>\n";
+"<h3 class=\"package_name\" id=\"%name\"><a class=\"package_name\"
href=\"./%name/index.html\">%name</a></h3>\n\
+<p class=\"package_desc\">%shortdescription</p>\n\
+<p>\n\
+<a class=\"package_link\" href=\"./%name/index.html\">details</a>\n\
+<a class=\"download_link\"
href=\"http://downloads.sourceforge.net/octave/%name-%version.%extension?download\">download</a>\n\
+</p>\n";
## Options for index package
options.index_title = "The '%name' Package";
@@ -275,6 +289,13 @@
options.include_package_news = true;
options.index_body_command = "onload=\"javascript:fix_top_menu ();\"";
+ ## Package doc
+ options.package_doc = "";
+ options.package_doc_options = [ ...
+ "--set-customization-variable 'TOP_NODE_UP_URL ../index.html' " ...
+ "--css-ref=\"../../octave-forge.css\" " ...
+ "--set-customization-variable 'PRE_BODY_CLOSE " sf_logo "'"];
+
case "octave"
options.header = "__HEADER__(`%title')";
options.footer = "__OCTAVE_TRAILER__";