diff options
author | Nicolas Dechesne <nicolas.dechesne@linaro.org> | 2020-07-24 16:27:54 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-09-17 10:09:33 +0100 |
commit | c473fa229239752367c5d573160fc8738cf1907e (patch) | |
tree | f8520ba3aa3cf911333dbd31e38e9a52203a0285 /documentation/toaster-manual | |
parent | 4cd953989de42c7a83f666c23e077d53b016a1f1 (diff) | |
download | poky-c473fa229239752367c5d573160fc8738cf1907e.tar.gz |
sphinx: fix internal links
Many of the internal links were not converted probably from DocBook
using pandoc. After looking at the various patterns, the follow series
of 'naive' Python regexp were used to perform some additional
automatic conversion.
Also, since we rely on built-in glossary, all links to terms need to
use the sphinx :term: syntax.
This commit is generated using the following Python series of regexp:
line = re.sub("`+(\w+)`* <(\&YOCTO_DOCS_REF_URL;)?#var-\\1>`__",
":term:`\\1`",
line)
line = re.sub("`+do_([a-z_]+)`* <(\&YOCTO_DOCS_REF_URL;)?#ref-tasks-\\1>`__",
":ref:`ref-tasks-\\1`",
line)
line = re.sub("`+([a-z_\-\*\.]+).bbclass`* <(\&YOCTO_DOCS_REF_URL;)?#ref-classes-\\1>`__",
":ref:`\\1.bbclass <ref-classes-\\1>`",
line)
line = re.sub("`+([a-z_\-\*\.]+)`* <(\&YOCTO_DOCS_REF_URL;)?#ref-classes-\\1>`__",
":ref:`\\1 <ref-classes-\\1>`",
line)
line = re.sub("`Source Directory <(\&YOCTO_DOCS_REF_URL;)?#source-directory>`__",
":term:`Source Directory`",
line)
line = re.sub("`Build Directory <(\&YOCTO_DOCS_REF_URL;)?#build-directory>`__",
":term:`Build Directory`",
line)
line = re.sub("`Metadata <(\&YOCTO_DOCS_REF_URL;)?#metadata>`__",
":term:`Metadata`",
line)
line = re.sub("`BitBake <(\&YOCTO_DOCS_REF_URL;)?#bitbake-term>`__",
":term:`BitBake`",
line)
line = re.sub("`Images <(\&YOCTO_DOCS_REF_URL;)?#ref-images>`__",
":ref:`ref-manual/ref-images:Images`",
line)
line = re.sub("`Classes <(\&YOCTO_DOCS_REF_URL;)?#ref-classes>`__",
":ref:`ref-manual/ref-classes:Classes`",
line)
line = re.sub("`workspace <(\&YOCTO_DOCS_REF_URL;)?#devtool-the-workspace-layer-structure>`__",
":ref:`devtool-the-workspace-layer-structure`",
line)
line = re.sub("`Open-?Embedded b?B?uild s?S?ystem <(\&YOCTO_DOCS_REF_URL;)?#build-system-term>`__",
":term:`OpenEmbedded Build System`",
line)
line = re.sub("`(OpenEmbedded-Core )?(\(?OE-Core\)? )?<(\&YOCTO_DOCS_REF_URL;)?#oe-core>`__",
":term:`OpenEmbedded-Core (OE-Core)`",
line)
It won't catch multiline strings, but it catches a very large number
of occurences!
(From yocto-docs rev: 3f537d17de5b1fb76ba3bee196481984a4826378)
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/toaster-manual')
-rw-r--r-- | documentation/toaster-manual/toaster-manual-reference.rst | 2 | ||||
-rw-r--r-- | documentation/toaster-manual/toaster-manual-setup-and-use.rst | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/documentation/toaster-manual/toaster-manual-reference.rst b/documentation/toaster-manual/toaster-manual-reference.rst index 47d08a157e..c98a27eeb8 100644 --- a/documentation/toaster-manual/toaster-manual-reference.rst +++ b/documentation/toaster-manual/toaster-manual-reference.rst | |||
@@ -244,7 +244,7 @@ Defining the Default Distro and Other Values | |||
244 | This section defines the default distro value for new projects. By | 244 | This section defines the default distro value for new projects. By |
245 | default, it reserves the first Toaster Setting record "1". The following | 245 | default, it reserves the first Toaster Setting record "1". The following |
246 | demonstrates how to set the project default value for | 246 | demonstrates how to set the project default value for |
247 | ```DISTRO`` <&YOCTO_DOCS_REF_URL;#var-DISTRO>`__: <!-- Set the project | 247 | :term:`DISTRO`: <!-- Set the project |
248 | default value for DISTRO --> <object model="orm.toastersetting" pk="1"> | 248 | default value for DISTRO --> <object model="orm.toastersetting" pk="1"> |
249 | <field type="CharField" name="name">DEFCONF_DISTRO</field> <field | 249 | <field type="CharField" name="name">DEFCONF_DISTRO</field> <field |
250 | type="CharField" name="value">poky</field> </object> You can override | 250 | type="CharField" name="value">poky</field> </object> You can override |
diff --git a/documentation/toaster-manual/toaster-manual-setup-and-use.rst b/documentation/toaster-manual/toaster-manual-setup-and-use.rst index d621e241e9..7e715403d0 100644 --- a/documentation/toaster-manual/toaster-manual-setup-and-use.rst +++ b/documentation/toaster-manual/toaster-manual-setup-and-use.rst | |||
@@ -132,7 +132,7 @@ superuser by following these steps: | |||
132 | command: $ export PATH=$PATH:$HOME/.local/bin | 132 | command: $ export PATH=$PATH:$HOME/.local/bin |
133 | 133 | ||
134 | 2. From the directory containing the Toaster database, which by default | 134 | 2. From the directory containing the Toaster database, which by default |
135 | is the `Build Directory <&YOCTO_DOCS_REF_URL;#build-directory>`__, | 135 | is the :term:`Build Directory`, |
136 | invoke the ``createsuperuser`` command from ``manage.py``: $ cd | 136 | invoke the ``createsuperuser`` command from ``manage.py``: $ cd |
137 | ~/poky/build $ ../bitbake/lib/toaster/manage.py createsuperuser | 137 | ~/poky/build $ ../bitbake/lib/toaster/manage.py createsuperuser |
138 | 138 | ||
@@ -482,7 +482,7 @@ For the ``bash`` case, version 4.3.30-r0 is built by default. | |||
482 | Unfortunately, Toaster as it exists, is not able to override the default | 482 | Unfortunately, Toaster as it exists, is not able to override the default |
483 | recipe version. If you would like to build bash 3.2.48, you need to set | 483 | recipe version. If you would like to build bash 3.2.48, you need to set |
484 | the | 484 | the |
485 | ```PREFERRED_VERSION`` <&YOCTO_DOCS_REF_URL;#var-PREFERRED_VERSION>`__ | 485 | :term:`PREFERRED_VERSION` |
486 | variable. You can do so from Toaster, using the "Add variable" form, | 486 | variable. You can do so from Toaster, using the "Add variable" form, |
487 | which is available in the "BitBake variables" page of the project | 487 | which is available in the "BitBake variables" page of the project |
488 | configuration section as shown in the following screen: | 488 | configuration section as shown in the following screen: |