forked from HPR/hpr_generator
		
	Fixing issue #140
site-generator:
    Cosmetic adjustments. Additions to the POD documentation.
    Additions to module list.
    Additions to work better with UTF-8.
    Addition of functions 'parse_csv' and 'xml_entity'
templates/queries-episodes-sqlite.tpl.html:
templates/shared-utils.tpl.html:
    Cosmetic changes
templates/rss-query-hpr-mysql.tpl.xml:
templates/rss-query-hpr-sqlite.tpl.xml:
templates/rss-query-hpr_total-mysql.tpl.xml:
templates/rss-query-hpr_total-sqlite.tpl.xml:
    Enhancements to allow the query to collect the audio length from the
    'assets' table. The audio file extension is passed as an argument to
    the 'execute' statement.
templates/rss.tpl.xml:
    Cosmetic changes
    Changed one 'php' URL to 'html'.
templates/shared-episode-summary.tpl.html:
    Change to 'display_tags' macro to turn the 'eps.tags' field into
    a list of links. This works, but needs further development because
    using the tag strings as anchor ids is not reliable.
templates/shared-item.tpl.xml:
    Cosmetic changes.
    Addition of filter 'HTML.strip' which is used as a means of removing
    HTML tags from '<itunes:summary>' strings.
    Using new filter 'xml_entity' which converts all non-ASCII
    characters in the notes to numeric hexadecimal entities for
    '<itunes:summary>'.
    The '<enclosure>' tag now uses 'episode.length' rather than
    'episode.duration' which has been extracted from the 'assets' table.
			
			
This commit is contained in:
		| @@ -1,11 +1,11 @@ | ||||
| <!--% MACRO zero_pad_left(word, pad_length) BLOCK %--> | ||||
| 	<!--% IF pad_length %--> | ||||
| 		<!--% zero_pad_format = "%0${pad_length}s" %--> | ||||
| 	<!--% ELSE %--> | ||||
| 		<!--% zero_pad_format = "%04s" %--> | ||||
| 	<!--% END %--> | ||||
| 	<!--% USE String(word) %--> | ||||
| 	<!--% String.format(zero_pad_format) %--> | ||||
|         <!--% IF pad_length %--> | ||||
|                 <!--% zero_pad_format = "%0${pad_length}s" %--> | ||||
|         <!--% ELSE %--> | ||||
|                 <!--% zero_pad_format = "%04s" %--> | ||||
|         <!--% END %--> | ||||
|         <!--% USE String(word) %--> | ||||
|         <!--% String.format(zero_pad_format) %--> | ||||
| <!--% END %--> | ||||
|  | ||||
| <!--% MACRO display_choice(choice, display_when_true, display_when_false) BLOCK %--> | ||||
| @@ -17,7 +17,7 @@ | ||||
| <!--% seconds = duration_sec % 60 %--> | ||||
| <!--% USE format %--> | ||||
| <!--% minutes_only = format("%d") %--> | ||||
| <!--% minutes =	minutes_only(duration_sec / 60) %--> | ||||
| <!--% minutes = minutes_only(duration_sec / 60) %--> | ||||
| <!--% hours_only = format("%d") %--> | ||||
| <!--% hours = hours_only(minutes / 60) %--> | ||||
| <!--% IF hours >= 1 %--> | ||||
| @@ -57,23 +57,23 @@ | ||||
| <!--% END %--> | ||||
|  | ||||
| <!--% MACRO media_path(episode_id, episode_type, media_type, baseurl, media_baseurl) BLOCK %--> | ||||
| 	<!--% IF episode_type == "twat" %--> | ||||
| 		<!--% padding = 3 %--> | ||||
| 		<!--% media_folder = "eps/"; padding = 3 %--> | ||||
| 	<!--% ELSE %--> | ||||
| 		<!--% media_folder = "local/" %--> | ||||
| 	<!--% END %--> | ||||
| 	<!--% IF media_baseurl %--> | ||||
| 		<!--% transcription_types = "txt srt vtt" %--> | ||||
| 		<!--% USE String(transcription_types) %--> | ||||
| 		<!--% USE String(media_baseurl) %--> | ||||
| 			<!--% IF transcription_types.search(media_type) && media_baseurl.search('archive.org') %--> | ||||
| 			<!--% media_baseurl = "${media_baseurl}hpr\$eps_id/" %--> | ||||
| 		<!--% END %--> | ||||
| 		<!--% media_folder = "" %--> | ||||
| 		<!--% media_baseurl = media_baseurl.replace('\$eps_id', zero_pad_left(episode_id)) %--> | ||||
| 	<!--% END %--> | ||||
| 	<!--% media_basepath(baseurl, media_baseurl) %--><!--% media_folder %--><!--% episode_type %--><!--% zero_pad_left(episode_id, padding) %-->.<!--% media_type %--> | ||||
|         <!--% IF episode_type == "twat" %--> | ||||
|                 <!--% padding = 3 %--> | ||||
|                 <!--% media_folder = "eps/"; padding = 3 %--> | ||||
|         <!--% ELSE %--> | ||||
|                 <!--% media_folder = "local/" %--> | ||||
|         <!--% END %--> | ||||
|         <!--% IF media_baseurl %--> | ||||
|                 <!--% transcription_types = "txt srt vtt" %--> | ||||
|                 <!--% USE String(transcription_types) %--> | ||||
|                 <!--% USE String(media_baseurl) %--> | ||||
|                         <!--% IF transcription_types.search(media_type) && media_baseurl.search('archive.org') %--> | ||||
|                         <!--% media_baseurl = "${media_baseurl}hpr\$eps_id/" %--> | ||||
|                 <!--% END %--> | ||||
|                 <!--% media_folder = "" %--> | ||||
|                 <!--% media_baseurl = media_baseurl.replace('\$eps_id', zero_pad_left(episode_id)) %--> | ||||
|         <!--% END %--> | ||||
|         <!--% media_basepath(baseurl, media_baseurl) %--><!--% media_folder %--><!--% episode_type %--><!--% zero_pad_left(episode_id, padding) %-->.<!--% media_type %--> | ||||
| <!--% END %--> | ||||
|  | ||||
| <!--% MACRO step_navigation(baseurl, links, folder) BLOCK %--> | ||||
| @@ -93,7 +93,3 @@ | ||||
|     <!--% END %--> | ||||
|     <a href="<!--% absolute_path(baseurl) %-->eps/<!--% folder %--><!--% zero_pad_left(links.latest) %-->/index.html" rel="last">Latest >></a></small> | ||||
| <!--% END %--> | ||||
|  | ||||
| <!-- | ||||
|     vim: syntax=html:ts=8:sw=4:tw=78:et:ai: | ||||
| --> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user