Commit 5910e359 authored by charlie's avatar charlie
Browse files

Merge branch 'master' into 'master'

Added list handling sheets

See merge request !3
parents 7a7786c0 3424942c
......@@ -11,7 +11,7 @@ module InkStep::Coko
end
def remote_xsl_location
"https://gitlab.coko.foundation/wendell/XSweet/raw/ink-api-publish/applications/docx-extract/collapse-paragraphs.xsl"
"https://gitlab.coko.foundation/XSweet/XSweet/raw/ink-api-publish/applications/docx-extract/collapse-paragraphs.xsl"
end
def self.description
......@@ -24,4 +24,4 @@ module InkStep::Coko
end
end
end
end
\ No newline at end of file
end
......@@ -19,9 +19,9 @@ module InkStep::Coko
end
def remote_xsl_location
"https://gitlab.coko.foundation/wendell/XSweet/raw/ink-api-publish/applications/docx-extract/docx-html-extract.xsl"
"https://gitlab.coko.foundation/XSweet/XSweet/raw/ink-api-publish/applications/docx-extract/docx-html-extract.xsl"
end
end
end
end
end
\ No newline at end of file
end
......@@ -11,7 +11,7 @@ module InkStep::Coko
end
def remote_xsl_location
"https://gitlab.coko.foundation/wendell/XSweet/raw/ink-api-publish/applications/docx-extract/handle-notes.xsl"
"https://gitlab.coko.foundation/XSweet/XSweet/raw/ink-api-publish/applications/docx-extract/handle-notes.xsl"
end
def self.description
......@@ -24,4 +24,4 @@ module InkStep::Coko
end
end
end
end
\ No newline at end of file
end
......@@ -11,7 +11,7 @@ module InkStep::Coko
end
def remote_xsl_location
"https://gitlab.coko.foundation/wendell/XSweet/raw/ink-api-publish/applications/docx-extract/join-elements.xsl"
"https://gitlab.coko.foundation/XSweet/XSweet/raw/ink-api-publish/applications/docx-extract/join-elements.xsl"
end
def self.description
......@@ -24,4 +24,4 @@ module InkStep::Coko
end
end
end
end
\ No newline at end of file
end
......@@ -19,9 +19,9 @@ module InkStep::Coko
end
def remote_xsl_location
"https://gitlab.coko.foundation/wendell/XSweet/raw/ink-api-publish/applications/docx-extract/scrub.xsl"
"https://gitlab.coko.foundation/XSweet/XSweet/raw/ink-api-publish/applications/docx-extract/scrub.xsl"
end
end
end
end
end
\ No newline at end of file
end
......@@ -19,9 +19,9 @@ module InkStep::Coko
end
def remote_xsl_location
"https://gitlab.coko.foundation/wendell/XSweet/raw/ink-api-publish/applications/html-polish/final-rinse.xsl"
"https://gitlab.coko.foundation/XSweet/XSweet/raw/ink-api-publish/applications/html-polish/final-rinse.xsl"
end
end
end
end
end
\ No newline at end of file
end
require 'coko_conversion/ink_step/coko/xsweet_pipeline/download_and_execute_xsl_via_saxon'
module InkStep::Coko
module XsweetPipeline
module HandleList
class HandleListStep < XsweetPipeline::DownloadAndExecuteXslViaSaxon
def perform_step
source_file_relative_path = find_source_file(regex: parameter(:regex))
source_file_path = File.join(working_directory, source_file_relative_path)
log_as_step "marking lists from #{source_file_relative_path}"
download_file(parameter(:mark_lists_xsl_uri))
apply_xslt_transformation(input_file_path: source_file_path,
output_file_path: lists_marked_path,
xsl_file_path: xsl_file_path,
provided_saxon_jar_path: nil)
log_as_step "itemizing lists"
download_file(parameter(:itemize_lists_xsl_uri))
apply_xslt_transformation(input_file_path: lists_marked_path,
output_file_path: source_file_path,
xsl_file_path: xsl_file_path,
provided_saxon_jar_path: nil)
# cleanup
delete_file(lists_marked_path)
success!
end
def self.description
"Handles lists"
end
def self.human_readable_name
"XSweet List Handlign"
end
def required_parameters
[:itemize_lists_xslt_uri, :mark_lists_xsl_uri]
end
def accepted_parameters
{
itemize_lists_xslt_uri: "Location of raw XSL file to download - header escalator",
mark_lists_xsl_uri: "Location of raw XSL file to download - list marker",
regex: "Regular expression for input file"
}
end
def default_parameter_values
{
itemize_lists_xslt_uri: "https://gitlab.coko.foundation/wendell/XSweet/raw/ink-api-publish/applications/list-promote/itemize-lists.xsl",
mark_lists_xsl_uri: "https://gitlab.coko.foundation/wendell/XSweet/raw/ink-api-publish/applications/list-promote/mark-lists.xsl",
regex: [/\.html$/, /\.htm$/]
}
end
def lists_marked_path
File.join(working_directory, "lists_marked.html")
end
end
end
end
end
......@@ -58,8 +58,8 @@ module InkStep::Coko
def default_parameter_values
{
make_header_excalator_xslt_uri: "https://gitlab.coko.foundation/wendell/XSweet/raw/ink-api-publish/applications/header-promote/make-header-escalator-xslt.xsl",
digest_paragraphs_xsl_uri: "https://gitlab.coko.foundation/wendell/XSweet/raw/ink-api-publish/applications/header-promote/digest-paragraphs.xsl",
make_header_excalator_xslt_uri: "https://gitlab.coko.foundation/XSweet/XSweet/raw/ink-api-publish/applications/header-promote/make-header-escalator-xslt.xsl",
digest_paragraphs_xsl_uri: "https://gitlab.coko.foundation/XSweet/XSweet/raw/ink-api-publish/applications/header-promote/digest-paragraphs.xsl",
regex: [/\.html$/, /\.htm$/]
}
end
......@@ -74,4 +74,4 @@ module InkStep::Coko
end
end
end
end
\ No newline at end of file
end
......@@ -77,10 +77,10 @@ module InkStep::Coko
def default_parameter_values
# e.g. {foo: 1, bar: nil}
{
p_split_on_br_uri: "https://gitlab.coko.foundation/wendell/editoria_typescript/raw/ink-api-publish/p-split-around-br.xsl",
editoria_notes_xsl_uri: "https://gitlab.coko.foundation/wendell/editoria_typescript/raw/ink-api-publish/editoria-notes.xsl",
editoria_basic_xsl_uri: "https://gitlab.coko.foundation/wendell/editoria_typescript/raw/ink-api-publish/editoria-basic.xsl",
editoria_reduce_xsl_uri: "https://gitlab.coko.foundation/wendell/editoria_typescript/raw/ink-api-publish/editoria-reduce.xsl",
p_split_on_br_uri: "https://gitlab.coko.foundation/XSweet/editoria_typescript/raw/ink-api-publish/p-split-around-br.xsl",
editoria_notes_xsl_uri: "https://gitlab.coko.foundation/XSweet/editoria_typescript/raw/ink-api-publish/editoria-notes.xsl",
editoria_basic_xsl_uri: "https://gitlab.coko.foundation/XSweet/editoria_typescript/raw/ink-api-publish/editoria-basic.xsl",
editoria_reduce_xsl_uri: "https://gitlab.coko.foundation/XSweet/editoria_typescript/raw/ink-api-publish/editoria-reduce.xsl",
regex: [/\.html$/, /\.htm$/]
}
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment