Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt source code to new SBP stylesheets #343

Open
7 tasks
tomschr opened this issue Nov 24, 2022 · 0 comments
Open
7 tasks

Adapt source code to new SBP stylesheets #343

tomschr opened this issue Nov 24, 2022 · 0 comments
Assignees

Comments

@tomschr
Copy link
Contributor

tomschr commented Nov 24, 2022

Situation

To make issue #342 a success, we need to adapt the source code as well. For example, we miss the correct markup for authors, meta information etc.

Proposed solution

The following information needs to be added into <info>:

  • Correct the list of authors. If you have more than one author, put them all into an <authorgroup> element. The order matters. For example:

    <authorgroup>
       <author>
          <personname>
             <firstname>Tux</firstname>
             <surname>Penguin</surname>
          </personname>
          <affiliation>
             <jobtitle>Chief Cuteness Officer</jobtitle>
             <orgname>SUSE</orgname>
          </affiliation>
       </author>
      <!-- ... add more ... -->
    </authorgroup>
  • Correct the width of your logos (in <cover>): <imagedata fileref="..." width="4em"/>:

    $ NS="http://docbook.org/ns/docbook"
    $ xmlstarlet ed --inplace -N d="$NS" --insert '/d:*/d:info/d:cover/d:mediaobject/d:imageobject/d:imagedata' -t attr -n width -v "4em"  <XML_FILES>
    
  • Add one or more platform meta information: <meta name="platform">...</meta>:

    $ NS="http://docbook.org/ns/docbook"
    $ xmlstarlet ed --inplace -N d="$NS" --subnode '/d:*/d:info' -t elem -n _meta -v "Platform 1" XML_FILES
    $ xmlstarlet ed --inplace -N d="$NS" --insert '/d:*/d:info/d:_meta' -t attr -n name -v platform XML_FILES
    $ xmlstarlet ed --inplace -N d="$NS" --rename '/d:*/d:info/d:_meta' -v meta XML_FILES
    
  • Add series meta information: <meta name="series">...</meta>:

    $ NS="http://docbook.org/ns/docbook"
    $ xmlstarlet ed --inplace -N d="$NS" --subnode '/d:*/d:info' -t elem -n _meta -v "[[sbp]]" XML_FILES
    $ xmlstarlet ed --inplace -N d="$NS" --insert '/d:*/d:info/d:_meta' -t attr -n name -v series XML_FILES
    $ xmlstarlet ed --inplace -N d="$NS" --rename '/d:*/d:info/d:_meta' -v meta XML_FILES
    
  • Add category meta information: <meta name="category">...</meta>

    $ NS="http://docbook.org/ns/docbook"
    $ xmlstarlet ed --inplace -N d="$NS" --subnode '/d:*/d:info' -t elem -n _meta -v "CATEGORY" XML_FILES
    $ xmlstarlet ed --inplace -N d="$NS" --insert '/d:*/d:info/d:_meta' -t attr -n name -v category XML_FILES
    $ xmlstarlet ed --inplace -N d="$NS" --rename '/d:*/d:info/d:_meta' -v meta XML_FILES
    
  • Remove any pagebreaks PIs <?pdfpagebreak ...?>; they might be not needed anymore.

  • Shorten titles, add possible subtitles (this might be not important now or even feasible. This could be done later too. However, it would improve our SEO so we should at least try).

  • Keep your fingers crossed. 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants