common-workflow-language / user_guide

The CWL v1.0 - v1.2 user guide
http://www.commonwl.org/user_guide/
Other
42 stars 67 forks source link

Convert Md to ReST to work around issue with translations #368

Closed swzCuroverse closed 1 year ago

swzCuroverse commented 1 year ago

The following files also have internal links that need converting to ReST.

Conversion process:

(1) Convert markdown to rst

pandoc --from markdown --to rst --reference-links src/topics/additional-arguments-and-parameters.md \
    > src/topics/additional-arguments-and-parameters.rst

(2) Change links to be named links (see description below)

vim src/topics/additional-arguments-and-parameters.rst # edit to change the links to be named links
git add src/topics/additional-arguments-and-parameters.rst
git rm src/topics/additional-arguments-and-parameters.md

Note: the links in the output from pandoc need to be adjusted, even with --reference-links. This is the vim step above, and can be done with any editor.

Change the links from this style:

All Common Workflow Language project instructional material and changes
to the structure are also made available under the `Creative Commons
Attribution license`_. The following is a human-readable summary of (and
not a substitute for) the `full legal text of the CC BY 4.0 license`_.

.. _Creative Commons Attribution license: https://creativecommons.org/licenses/by/4.0/
.. _full legal text of the CC BY 4.0 license: https://creativecommons.org/licenses/by/4.0/legalcode

to

All Common Workflow Language project instructional material and changes
to the structure are also made available under the `Creative Commons
Attribution license <cc-by-human_>`_. The following is a human-readable summary of (and
not a substitute for) the `full legal text of the CC BY 4.0 license <cc-by-legal_>`_.

.. _cc-by-human: https://creativecommons.org/licenses/by/4.0/
.. _cc-by-legal: https://creativecommons.org/licenses/by/4.0/legalcode

That way the links have a target (cc-by-human) independent of the link text, which will need to change in the translations.

(3) Edit any references to additional-arguments-and-parameters.md to refer to additional-arguments-and-parameters.rst git grep -l additional-arguments-and-parameters.md -- src | xargs sed -i 's/additional-arguments-and-parameters.md/additional-arguments-and-parameters.rst (if the file name is index.md then be careful, as there are many index.md files)

mr-c commented 1 year ago

With @kinow 's patch, this is no longer needed

kinow commented 1 year ago

Glad it worked! Thanks @mr-c