patchGNU Octave - Patches: patch #8520, Overhaul private functions in...

 
 

patch #8520: Overhaul private functions in generate_html package

Submitter:  Julien Bect <jbect>
Submitted:  Wed 20 Aug 2014 06:10:52 PM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  None Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sat 11 Jul 2015 06:26:50 PM UTC, comment #9: 

This patch has been pushed a long time ago, could someone please close it ?

Julien Bect <jbect>
Tue 02 Sep 2014 01:51:19 PM UTC, comment #8: 

I have pushed your changes and made a commit on top of it. On future changes, could you please indent the function blocks?

Also, all your new files list you as author and note your hostname for email.


## Author: Julien Bect <bect@bect-laptop>
## Created: 2014-08-20


It's fine to have the author line but could you fix the email? Also, can you remove the created line? That's what mercurial does, there's no need to repeat that information on the source.

Carnë Draug <carandraug>
Group Member
Mon 01 Sep 2014 05:18:28 PM UTC, comment #7: 

Carnë,

There are now three new commits on my repo:

https://sourceforge.net/u/jbect/generate_html

The list of changesets to be reviewed for possible inclusion is 51--62.

The most recents fixes could actually be considered as small bug fixes, but I don't think that it is useful to create an independent bug report for each one of them, since we have already this thread going on. (Unless you really want me to.)

Actually, I already made one bug report: https://savannah.gnu.org/bugs/?43116, which is addressed by changeset 59.

Please review these changes whenever you have time.

@++
Julien

Julien Bect <jbect>
Fri 29 Aug 2014 05:57:04 AM UTC, comment #6: 

For the record: concerning the texi2html function, my question below has been answered by Søren in this thread:

http://octave.1599824.n4.nabble.com/generate-html-package-texi2html-and-generate-html-manual-functions-td4666245.html

Julien Bect <jbect>
Thu 28 Aug 2014 09:29:40 PM UTC, comment #5: 

Carnë,

I made a new series of commits on my repository:

https://sourceforge.net/u/jbect/generate_html

(see revisions 51 to 58).

Most of them are dedicated to cleaning the private function get_txi_files.m (and fixing warnings related to macros.texi and version.texi which have no corresponding .txi file).

Please review these changes whenever you have time. If you want me to send patch files instead, I can do that of course.

@++
Julien

Julien Bect <jbect>
Wed 27 Aug 2014 08:23:04 AM UTC, comment #4: 

Could anybody please explain to me the purpose of the texi2html function ?

There is no documentation for it. (Actually there is one, but it is a simple copy-paste of the documentation of html_help_text.)

Even the code is very similar to a subset of html_help_text.

Julien Bect <jbect>
Tue 26 Aug 2014 08:46:17 PM UTC, comment #3: 

Thanks a lot for going through this. I have pushed your changes to the Octave Forge package.

I'm barely familiar with this package to have an opinion about changeing %name, but from your description it sounds a reasonable change. But I wouldn't worry too much about backwards compatibility, I don't think this package is used anywhere else other than our Octave Forge site.

I'm leaving this ticket open since it seems you're planning to make more changes.

Carnë Draug <carandraug>
Group Member
Tue 26 Aug 2014 08:24:54 PM UTC, comment #2: 

I have forked generate_html's repo and added my patches on it:

https://sourceforge.net/u/jbect/generate_html

As a next step, I would like to remove the current confusion related to the %name variable in HTML templates, which can be either the function name or the package name, dependending on the type of page. This prevents from creating headers or footers where both the function name and the package name are used.

I suggest using new variables names: %pkgname and %fname, while keeping %name with its current page-dependent meanign for backward compatibility. Any thoughts on this ?

Julien Bect <jbect>
Mon 25 Aug 2014 09:23:24 PM UTC, comment #1: 

Update:

overhaul_private_49_v2.patch is a new version of the previously submitted patch (with some additional cleanup).

overhaul_private_50_v1.patch is a new patch that simplifies the way %title is handled. Currently, the %title variable is in fact ignored as soon as a <title> </title> pair is present.


(file #31959, file #31960)

Julien Bect <jbect>
Wed 20 Aug 2014 06:10:52 PM UTC, original submission:  

The attached patch is for the generate_html package. It contains a significant overhaul of the private functions related to headers, footers, etc.

Essentially, it reduces code replication by merging three functions into one (get_header_title_and_footer, get_index_header_title_and_footer and get_overview_header_title_and_footer).

-----

  • inst/private/get_header_title_and_footer.m: Make it a "generic"

  function that can handle all page types (index, overview,
  functions).

  • inst/private/get_index_header_title_and_footer.m: Not needed

  anymore, use get_header_title_and_footer instead.

  • inst/private/get_overview_header_title_and_footer.m: Not needed

  anymore, use get_header_title_and_footer instead.

  • inst/generate_alphabet.m: Use get_header_title_and_footer.
  • inst/generate_operators.m: Use get_header_title_and_footer.
  • inst/generate_package_html.m: Use get_header_title_and_footer.

  Rename pack_body_cmd to overview_body_command.

  • inst/get_html_options.m: Rename pack_body_cmd to

  overview_body_command.

  • inst/html_help_text.m: Adapt to the new syntax for

  get_header_title_and_footer.m (additional input argument).

  • inst/texi2html.m: Adapt to the new syntax for

  get_header_title_and_footer.m (additional input argument).

  • inst/private/get_default_body_command.m: New function that

  provides a default "body_command" value.

  • inst/private/get_default_footer.m: New function that

  provides a default "footer" value.

  • inst/private/get_default_header.m: New function that

  provides a default "header" value.

  • inst/private/get_default_title.m: New function that

  provides a default "title" value.

  • inst/private/get_feature.m: New function that returns the value

  of a given feature (header, footer, etc.) for a given page_type.

Julien Bect <jbect>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #31959:  overhaul_private_49_v2.patch added by jbect (22KiB - text/x-patch)
file #31960:  overhaul_private_50_v1.patch added by jbect (2KiB - text/x-patch)
file #31926:  overhaul_private.patch added by jbect (21KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Updated the item)
  • -email is unavailable- added by jbect
  • -email is unavailable- added by jbect (Submitted the item)
  • -email is unavailable- added by jbect
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-07-11 mtmiller StatusNone Done
        Open/ClosedOpen Closed
    2014-08-27 jbect Carbon-Copy- Added -email is unavailable-
    2014-08-25 jbect Attached File- Added overhaul_private_49_v2.patch, #31959
        Attached File- Added overhaul_private_50_v1.patch, #31960
    2014-08-20 jbect Attached File- Added overhaul_private.patch, #31926
        Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code