diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/doc_reform/io_in/read_config_files.d | 2 | ||||
| -rw-r--r-- | src/doc_reform/io_out/odt.d | 366 | ||||
| -rwxr-xr-x | src/doc_reform/spine.d | 2 | 
3 files changed, 185 insertions, 185 deletions
| diff --git a/src/doc_reform/io_in/read_config_files.d b/src/doc_reform/io_in/read_config_files.d index 8813e16..64d548b 100644 --- a/src/doc_reform/io_in/read_config_files.d +++ b/src/doc_reform/io_in/read_config_files.d @@ -166,7 +166,7 @@ webserv:        }      }      if (config_file_str.length == 0) { /+ use dummy default config file +/ -      writeln("WARNING config file NOT found, default provided"); +      // writeln("WARNING config file NOT found, default provided");        conf_filename = "VIRTUAL";        config_file_str = default_config_file_str;      } diff --git a/src/doc_reform/io_out/odt.d b/src/doc_reform/io_out/odt.d index 68be605..c5fb469 100644 --- a/src/doc_reform/io_out/odt.d +++ b/src/doc_reform/io_out/odt.d @@ -658,78 +658,78 @@ template outputODT() {    // mixin outputXmlODT;    @safe string odt_head(I)(I doc_matters) {      string _has_tables = format(q"┃ -  <style:style style:name="Table1" style:family="table"> -    <style:table-properties style:width="16.999cm" table:align="margins"/> -  </style:style> -  <style:style style:name="Table1.A" style:family="table-column"> -    <style:table-column-properties style:column-width="16.999cm" style:rel-column-width="65535*"/> -  </style:style> -  <style:style style:name="Table1.B" style:family="table-column"> -    <style:table-column-properties style:column-width="8.499cm" style:rel-column-width="32767*"/> -  </style:style> -  <style:style style:name="Table1.C" style:family="table-column"> -    <style:table-column-properties style:column-width="5.666cm" style:rel-column-width="21845*"/> -  </style:style> -  <style:style style:name="Table1.D" style:family="table-column"> -    <style:table-column-properties style:column-width="4.349cm" style:rel-column-width="16383*"/> -  </style:style> -  <style:style style:name="Table1.E" style:family="table-column"> -    <style:table-column-properties style:column-width="3.399cm" style:rel-column-width="13107*"/> -  </style:style> -  <style:style style:name="Table1.F" style:family="table-column"> -    <style:table-column-properties style:column-width="2.833cm" style:rel-column-width="10922*"/> -  </style:style> -  <style:style style:name="Table1.G" style:family="table-column"> -    <style:table-column-properties style:column-width="2.428cm" style:rel-column-width="9362*"/> -  </style:style> -  <style:style style:name="Table1.H" style:family="table-column"> -    <style:table-column-properties style:column-width="2.124cm" style:rel-column-width="8191*"/> -  </style:style> -  <style:style style:name="Table2" style:family="table"> -    <style:table-properties style:width="16.999cm" table:align="margins"/> -  </style:style> -  <style:style style:name="Table2.A" style:family="table-column"> -    <style:table-column-properties style:column-width="16.999cm" style:rel-column-width="65535*"/> -  </style:style> -  <style:style style:name="Table2.B" style:family="table-column"> -    <style:table-column-properties style:column-width="8.499cm" style:rel-column-width="32767*"/> -  </style:style> -  <style:style style:name="Table2.C" style:family="table-column"> -    <style:table-column-properties style:column-width="5.666cm" style:rel-column-width="21845*"/> -  </style:style> -  <style:style style:name="Table2.D" style:family="table-column"> -    <style:table-column-properties style:column-width="4.349cm" style:rel-column-width="16383*"/> -  </style:style> -  <style:style style:name="Table2.E" style:family="table-column"> -    <style:table-column-properties style:column-width="3.999cm" style:rel-column-width="13107*"/> -  </style:style> -  <style:style style:name="Table2.F" style:family="table-column"> -    <style:table-column-properties style:column-width="2.833cm" style:rel-column-width="10922*"/> -  </style:style> -  <style:style style:name="Table2.G" style:family="table-column"> -    <style:table-column-properties style:column-width="2.428cm" style:rel-column-width="9362*"/> -  </style:style> -  <style:style style:name="Table2.H" style:family="table-column"> -    <style:table-column-properties style:column-width="2.124cm" style:rel-column-width="8191*"/> -  </style:style> -  <style:style style:name="Table2.I" style:family="table-column"> -    <style:table-column-properties style:column-width="1.8887cm" style:rel-column-width="7281*"/> -  </style:style> -  <style:style style:name="Table2.J" style:family="table-column"> -    <style:table-column-properties style:column-width="1.6999cm" style:rel-column-width="6553*"/> -  </style:style> -  <style:style style:name="Table2.K" style:family="table-column"> -    <style:table-column-properties style:column-width="1.5453cm" style:rel-column-width="5957*"/> -  </style:style> -  <style:style style:name="Table2.L" style:family="table-column"> -    <style:table-column-properties style:column-width="1.416cm" style:rel-column-width="5461*"/> -  </style:style> -  <style:style style:name="Table2.M" style:family="table-column"> -    <style:table-column-properties style:column-width="1.307" style:rel-column-width="5041*"/> -  </style:style> -  <style:style style:name="Table2.N" style:family="table-column"> -    <style:table-column-properties style:column-width="1.214cm" style:rel-column-width="4681*"/> -  </style:style> +    <style:style style:name="Table1" style:family="table"> +      <style:table-properties style:width="16.999cm" table:align="margins"/> +    </style:style> +    <style:style style:name="Table1.A" style:family="table-column"> +      <style:table-column-properties style:column-width="16.999cm" style:rel-column-width="65535*"/> +    </style:style> +    <style:style style:name="Table1.B" style:family="table-column"> +      <style:table-column-properties style:column-width="8.499cm" style:rel-column-width="32767*"/> +    </style:style> +    <style:style style:name="Table1.C" style:family="table-column"> +      <style:table-column-properties style:column-width="5.666cm" style:rel-column-width="21845*"/> +    </style:style> +    <style:style style:name="Table1.D" style:family="table-column"> +      <style:table-column-properties style:column-width="4.349cm" style:rel-column-width="16383*"/> +    </style:style> +    <style:style style:name="Table1.E" style:family="table-column"> +      <style:table-column-properties style:column-width="3.399cm" style:rel-column-width="13107*"/> +    </style:style> +    <style:style style:name="Table1.F" style:family="table-column"> +      <style:table-column-properties style:column-width="2.833cm" style:rel-column-width="10922*"/> +    </style:style> +    <style:style style:name="Table1.G" style:family="table-column"> +      <style:table-column-properties style:column-width="2.428cm" style:rel-column-width="9362*"/> +    </style:style> +    <style:style style:name="Table1.H" style:family="table-column"> +      <style:table-column-properties style:column-width="2.124cm" style:rel-column-width="8191*"/> +    </style:style> +    <style:style style:name="Table2" style:family="table"> +      <style:table-properties style:width="16.999cm" table:align="margins"/> +    </style:style> +    <style:style style:name="Table2.A" style:family="table-column"> +      <style:table-column-properties style:column-width="16.999cm" style:rel-column-width="65535*"/> +    </style:style> +    <style:style style:name="Table2.B" style:family="table-column"> +      <style:table-column-properties style:column-width="8.499cm" style:rel-column-width="32767*"/> +    </style:style> +    <style:style style:name="Table2.C" style:family="table-column"> +      <style:table-column-properties style:column-width="5.666cm" style:rel-column-width="21845*"/> +    </style:style> +    <style:style style:name="Table2.D" style:family="table-column"> +      <style:table-column-properties style:column-width="4.349cm" style:rel-column-width="16383*"/> +    </style:style> +    <style:style style:name="Table2.E" style:family="table-column"> +      <style:table-column-properties style:column-width="3.999cm" style:rel-column-width="13107*"/> +    </style:style> +    <style:style style:name="Table2.F" style:family="table-column"> +      <style:table-column-properties style:column-width="2.833cm" style:rel-column-width="10922*"/> +    </style:style> +    <style:style style:name="Table2.G" style:family="table-column"> +      <style:table-column-properties style:column-width="2.428cm" style:rel-column-width="9362*"/> +    </style:style> +    <style:style style:name="Table2.H" style:family="table-column"> +      <style:table-column-properties style:column-width="2.124cm" style:rel-column-width="8191*"/> +    </style:style> +    <style:style style:name="Table2.I" style:family="table-column"> +      <style:table-column-properties style:column-width="1.8887cm" style:rel-column-width="7281*"/> +    </style:style> +    <style:style style:name="Table2.J" style:family="table-column"> +      <style:table-column-properties style:column-width="1.6999cm" style:rel-column-width="6553*"/> +    </style:style> +    <style:style style:name="Table2.K" style:family="table-column"> +      <style:table-column-properties style:column-width="1.5453cm" style:rel-column-width="5957*"/> +    </style:style> +    <style:style style:name="Table2.L" style:family="table-column"> +      <style:table-column-properties style:column-width="1.416cm" style:rel-column-width="5461*"/> +    </style:style> +    <style:style style:name="Table2.M" style:family="table-column"> +      <style:table-column-properties style:column-width="1.307" style:rel-column-width="5041*"/> +    </style:style> +    <style:style style:name="Table2.N" style:family="table-column"> +      <style:table-column-properties style:column-width="1.214cm" style:rel-column-width="4681*"/> +    </style:style>    ┃",);      string _odt_head = format(q"┃<?xml version="1.0" encoding="UTF-8"?>    <office:document-content xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xl="https://www.w3.org/1999/xlink" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="https://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:ooo="https://openoffice.org/2004/office" xmlns:ooow="https://openoffice.org/2004/writer" xmlns:oooc="https://openoffice.org/2004/calc" xmlns:dom="https://www.w3.org/2001/xml-events" xmlns:xforms="https://www.w3.org/2002/xforms" xmlns:xsd="https://www.w3.org/2001/XMLSchema" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="https://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="https://www.w3.org/1999/xhtml" xmlns:grddl="https://www.w3.org/2003/g/data-view#" xmlns:tableooo="https://openoffice.org/2009/table" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="https://www.w3.org/TR/css3-text/" office:version="1.2"> @@ -773,117 +773,117 @@ template outputODT() {      string delimit = "";      string doc_odt = "";      string _txt = ""; -  foreach (part; doc_matters.has.keys_seq.scroll) { -    foreach (obj; doc_abstraction[part]) { -      switch (obj.metainfo.is_of_part) { -  case "frontmatter":              assert(part == "head" || "toc"); -    switch (obj.metainfo.is_of_type) { -    case "para": -      switch (obj.metainfo.is_a) { -      case "heading": -        _txt = delimit ~ odt_format.heading(obj, doc_matters); -        goto default; -      case "toc": -        _txt = odt_format.para(obj, doc_matters); -        goto default; -      default: -        doc_odt ~= _txt; -        _txt = ""; -        break; -      } -      break; -    default: break; -    } -    break; -  case "body":                     assert(part == "body" || "head"); // surprise -    switch (obj.metainfo.is_of_type) { -    case "para": -      switch (obj.metainfo.is_a) { -      case "heading": -        _txt = delimit ~ odt_format.heading(obj, doc_matters); -        goto default; -      case "para": -        _txt = odt_format.para(obj, doc_matters); -        goto default; -      default: -        doc_odt ~= _txt; -        _txt = ""; -        break; -      } -      break; -    case "block": -      switch (obj.metainfo.is_a) { -      case "quote": -        _txt = odt_format.quote(obj, doc_matters); -        goto default; -      case "group": -        _txt = odt_format.group(obj, doc_matters); -        goto default; -      case "block": -        _txt = odt_format.block(obj, doc_matters); -        goto default; -      case "verse": -        _txt = odt_format.verse(obj, doc_matters); -        goto default; -      case "code": -        _txt = odt_format.code(obj, doc_matters); -        goto default; -      case "table": -        _txt = odt_format.table(obj, doc_matters); -        goto default; -      default: -        doc_odt ~= _txt; -        _txt = ""; -        break; -      } -      break; -    default: break; -    } -    break; -  case "backmatter": -    assert(part == "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb" || "tail"); -    switch (obj.metainfo.is_of_type) { -    case "para": -      switch (obj.metainfo.is_a) { -      case "heading": -        _txt = delimit ~ odt_format.heading(obj, doc_matters); -        goto default; -      case "endnote":              assert(part == "endnotes"); -        _txt = odt_format.para(obj, doc_matters); -        goto default; -      case "glossary":             assert(part == "glossary"); -        _txt = odt_format.para(obj, doc_matters); -        goto default; -      case "bibliography":         assert(part == "bibliography"); -        _txt = odt_format.para(obj, doc_matters); -        goto default; -      case "bookindex":            assert(part == "bookindex"); -        _txt = odt_format.para(obj, doc_matters); -        goto default; -      case "blurb":                assert(part == "blurb"); -        _txt = odt_format.para(obj, doc_matters); -        goto default; -      default: -        doc_odt ~= _txt; -        _txt = ""; -        break; -      } -      break; -    default: break; -    } -    break; -  case "comment": -    break; -  default: -    { /+ debug +/ -      if (doc_matters.opt.action.debug_do -      && doc_matters.opt.action.vox_gt1) { -        writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); -        writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); -        writeln(__FILE__, ":", __LINE__, ": ", obj.text); -      } -    } -    break; +    foreach (part; doc_matters.has.keys_seq.scroll) { +      foreach (obj; doc_abstraction[part]) { +        switch (obj.metainfo.is_of_part) { +        case "frontmatter":              assert(part == "head" || "toc"); +          switch (obj.metainfo.is_of_type) { +          case "para": +            switch (obj.metainfo.is_a) { +            case "heading": +              _txt = delimit ~ odt_format.heading(obj, doc_matters); +              goto default; +            case "toc": +              _txt = odt_format.para(obj, doc_matters); +              goto default; +            default: +              doc_odt ~= _txt; +              _txt = ""; +              break; +            } +            break; +          default: break; +          } +          break; +        case "body":                     assert(part == "body" || "head"); // surprise +          switch (obj.metainfo.is_of_type) { +          case "para": +            switch (obj.metainfo.is_a) { +            case "heading": +              _txt = delimit ~ odt_format.heading(obj, doc_matters); +              goto default; +            case "para": +              _txt = odt_format.para(obj, doc_matters); +              goto default; +            default: +              doc_odt ~= _txt; +              _txt = ""; +              break; +            } +            break; +          case "block": +            switch (obj.metainfo.is_a) { +            case "quote": +              _txt = odt_format.quote(obj, doc_matters); +              goto default; +            case "group": +              _txt = odt_format.group(obj, doc_matters); +              goto default; +            case "block": +              _txt = odt_format.block(obj, doc_matters); +              goto default; +            case "verse": +              _txt = odt_format.verse(obj, doc_matters); +              goto default; +            case "code": +              _txt = odt_format.code(obj, doc_matters); +              goto default; +            case "table": +              _txt = odt_format.table(obj, doc_matters); +              goto default; +            default: +              doc_odt ~= _txt; +              _txt = ""; +              break; +            } +            break; +          default: break; +          } +          break; +        case "backmatter": +          assert(part == "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb" || "tail"); +          switch (obj.metainfo.is_of_type) { +          case "para": +            switch (obj.metainfo.is_a) { +            case "heading": +              _txt = delimit ~ odt_format.heading(obj, doc_matters); +              goto default; +            case "endnote":              assert(part == "endnotes"); +              _txt = odt_format.para(obj, doc_matters); +              goto default; +            case "glossary":             assert(part == "glossary"); +              _txt = odt_format.para(obj, doc_matters); +              goto default; +            case "bibliography":         assert(part == "bibliography"); +              _txt = odt_format.para(obj, doc_matters); +              goto default; +            case "bookindex":            assert(part == "bookindex"); +              _txt = odt_format.para(obj, doc_matters); +              goto default; +            case "blurb":                assert(part == "blurb"); +              _txt = odt_format.para(obj, doc_matters); +              goto default; +            default: +              doc_odt ~= _txt; +              _txt = ""; +              break; +            } +            break; +          default: break; +          } +          break; +        case "comment": +          break; +        default: +          { /+ debug +/ +            if (doc_matters.opt.action.debug_do +            && doc_matters.opt.action.vox_gt1) { +              writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); +              writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); +              writeln(__FILE__, ":", __LINE__, ": ", obj.text); +            } +          } +          break;          }        }      } diff --git a/src/doc_reform/spine.d b/src/doc_reform/spine.d index 1cd811e..cd780c6 100755 --- a/src/doc_reform/spine.d +++ b/src/doc_reform/spine.d @@ -1262,5 +1262,5 @@ string program_name = "spine";          writeln("- ", out_pth.curate("topics.html"));        }      } -  } else { writeln("NO METADATA CURATED"); } +  } // else { writeln("NO METADATA CURATED"); }  } | 
