Blame Documentation/Models/Docbook/Tcar-ug/Scripts/Bash/help.docbook

b65bb1
<refentry id="scripts-bash-help">
e68d9f
b65bb1
    <refmeta>
b65bb1
        <refentrytitle>help</refentrytitle>
b65bb1
        <indexterm type="common-function">
b65bb1
            <primary>Standardize constructions tasks inside &TCAR;</primary>
b65bb1
        </indexterm>
b65bb1
    </refmeta>
b65bb1
b65bb1
    <refnamediv>
b65bb1
        <refname>help</refname>
b65bb1
        <refpurpose>Standardize documentation tasks inside &TCAR;.</refpurpose>
b65bb1
    </refnamediv>
b65bb1
b65bb1
    <refsynopsisdiv>
b65bb1
    <cmdsynopsis>
16c0de
        <command>centos-art help</command> 
b65bb1
        <arg choice="opt">
b65bb1
            <arg>--help</arg>
b65bb1
            <arg>--quiet</arg>
b65bb1
            <arg>--answer-yes</arg>
b65bb1
            <arg>--sync-changes</arg>
b65bb1
            <arg>--search="<replaceable>KEYWORD</replaceable>"</arg>
b65bb1
            <arg>--edit</arg>
b65bb1
            <arg>--read</arg>
b65bb1
            <arg>--update</arg>
b65bb1
            <arg>--copy</arg>
b65bb1
            <arg>--delete</arg>
b65bb1
            <arg>--rename</arg>
b65bb1
        </arg>
b65bb1
        <group choice="req">
b65bb1
        <arg rep="repeat"><replaceable>MANUAL</replaceable>:<replaceable>PART</replaceable>:<replaceable>CHAPTER</replaceable>:<replaceable>SECTION</replaceable></arg>
b65bb1
        <arg rep="repeat"><replaceable>LOCATION</replaceable></arg>
b65bb1
        </group>
b65bb1
    </cmdsynopsis>
b65bb1
b65bb1
    </refsynopsisdiv>
b65bb1
b65bb1
    <refsection id="scripts-bash-help-description">
b65bb1
    <title>Description</title>
e68d9f
e68d9f
    <para>
b65bb1
        The <function>help</function> functionality exists to create
16c0de
        and maintain documentation manuals inside &TCAR;. The
16c0de
        documentation structure and format implemented by
16c0de
        <function>help</function> functionality are described in
16c0de
        <xref linkend="manuals-production-identifying-structure" />
16c0de
        and <xref linkend="manuals-format-texinfo" />, respectively.
e68d9f
    </para>
e68d9f
b65bb1
    <refsection id="scripts-bash-help-description-docentry">
16c0de
    <title>Documentation Entries</title>
b65bb1
    <para>
16c0de
        The documentation entry identifies the specific file you want
16c0de
        to work with inside a documentation manual. The help
16c0de
        functionality recognizes documentation entries in the
16c0de
        following two formats:
16c0de
    </para>
16c0de
    <variablelist>
16c0de
    <varlistentry>
16c0de
    <term>Path style</term>
16c0de
    <listitem>
16c0de
    <para>
16c0de
        This format uses paths to represent the documentation entries
16c0de
        you want to work with.  This format assumes you are using the
16c0de
        first path component as chapter and the rest of the path as
16c0de
        section identifier both inside <quote>tcar-fs</quote>
16c0de
        documentation manual as parent documentation structure. The
16c0de
        field related to the part sectioning structure in the
16c0de
        documentation entry (the second field) is assumed empty, as
16c0de
        well. For example, if you want to document the directory
16c0de
        <quote>
16c0de
        class="directory">trunk/Scripts/Bash/Functions/Help</filename></quote>,
16c0de
        then you can do it with the following command:
16c0de
    </para>
16c0de
16c0de
    <cmdsynopsis>
16c0de
    <command>centos-art help --edit trunk/Scripts/Bash/Functions/Help</command>
16c0de
    </cmdsynopsis>
16c0de
    </listitem>
16c0de
    </varlistentry>
16c0de
16c0de
    <varlistentry>
16c0de
    <term>Colon style</term>
16c0de
    <listitem>
16c0de
    <para>
16c0de
        This format uses colons to represent the documentation entries
16c0de
        you want to work with. In this format, the whole documentation
16c0de
        entry is divided in fields using colon as separator character.
16c0de
        Documentation entries written this way use each field to
16c0de
        specify manual, part, chapter and section identifiers (in this
16c0de
        order). The section identifier can use a path style or hyphen
16c0de
        style to separate
16c0de
        components. For example, if you want to document the directory
16c0de
        <quote>
16c0de
        class="directory">trunk/Scripts/Bash/Functions/Help</filename></quote>,
16c0de
        then you can do it with any of the following commands:
16c0de
    </para>
16c0de
16c0de
    <cmdsynopsis>
16c0de
    <command>centos-art help --edit tcar-fs::trunk:Scripts/Bash/Functions/Help</command>
16c0de
    <command>centos-art help --edit tcar-fs::trunk:scripts-bash-functions-help</command>
16c0de
    </cmdsynopsis>
16c0de
16c0de
    <para>
16c0de
        The documentation manual name specified in the first field of
16c0de
        a colon style documentation entry, must match the name the
16c0de
        name of the directory where the documentation manual is stored
16c0de
        in. By default documentation manuals are written in
16c0de
        trunk/Documentation/Models/Texinfo or
16c0de
        trunk/Documentation/Models/Docbook directories, based on
16c0de
        whether they are written in Texinfo or Docbook documentation
16c0de
        format. 
16c0de
    </para>
16c0de
    <para>
16c0de
        The match relation between the manual name you provide in the
16c0de
        documentation entry and the related directory name inside
16c0de
        &TCAR; is case insensitive. The same is true for all other
16c0de
        documentation entry fields.
b65bb1
    </para>
16c0de
16c0de
    </listitem>
16c0de
    </varlistentry>
16c0de
    </variablelist>
16c0de
16c0de
    <para>
16c0de
        From these documentation entry formats, the colon style
16c0de
        provides more flexibility than path style does. You can use
16c0de
        documentation entries written in colon style to create and
16c0de
        maintain different documentation manuals, including the
16c0de
        <quote>tcar-fs</quote> documentation manual. This is something
16c0de
        you cannot do with documentation entries written in path style
16c0de
        because they confine all documentation actions to
16c0de
        <quote>tcar-fs</quote> documentation manual.
16c0de
    </para>
16c0de
    </refsection>
16c0de
16c0de
    <refsection id="scripts-bash-help-description-formats">
16c0de
    <title>Supported Documentation Formats</title>
16c0de
16c0de
    <para>
16c0de
        The <function>help</function> functionality provides support
16c0de
        for the following documentation formats:
16c0de
    </para>
16c0de
16c0de
    <itemizedlist>
16c0de
    <listitem>
16c0de
    <para>
16c0de
        Texinfo (See <xref linkend="manuals-format-texinfo"/>)
16c0de
    </para>
16c0de
    </listitem>
16c0de
    </itemizedlist>
16c0de
b65bb1
    </refsection>
2b4826
b65bb1
    <refsection id="scripts-bash-help-description-create">
b65bb1
    <title>New Document Structures</title>
b65bb1
    <para>
b65bb1
        To create new documentation manuals inside &TCAR; use the
b65bb1
        following command: 
b65bb1
    </para>
b65bb1
b65bb1
    <cmdsynopsis>
b65bb1
    <command>centos-art help --edit "<replaceable>manual-name</replaceable>"</command>
b65bb1
    </cmdsynopsis>
89114c
d2638e
    <para>
b65bb1
        The first time you execute this command, you will be prompted
b65bb1
        to enter manual specific information like document format,
b65bb1
        document title, document subtitle, document author, etc.  Once
b65bb1
        this information has been collected the
b65bb1
        <function>help</function> functionality performs some
b65bb1
        repository verifications and creates the manual source files
b65bb1
        inside the manual's directory name you specified as
b65bb1
        <replaceable>manual-name</replaceable>.
d2638e
    </para>
e68d9f
d2638e
    <para>
b65bb1
        When you create new documentation manuals, take care of the
b65bb1
        locale information you are currently using. This information
b65bb1
        is generally set in the <envar>LANG</envar> environment
b65bb1
        variable and is used by the <function>help</function>
b65bb1
        functionality of <command>centos-art.sh</command> script to
b65bb1
        define the language of new documentation manual and the
b65bb1
        document template used to build it, as well.
541cb9
    </para>
541cb9
541cb9
    <para>
b65bb1
        Once the documentation structure has been created this way,
b65bb1
        the recently created documentation manual is ready to receive
b65bb1
        new chapters and sections.
d2638e
    </para>
b65bb1
    </refsection>
e68d9f
b65bb1
    <refsection id="scripts-bash-help-description-edit">
b65bb1
    <title>Editing Document Structures</title>
b65bb1
b65bb1
    <cmdsynopsis>
b65bb1
    <command>centos-art help --edit "tcar-fs::trunk"</command>
b65bb1
    </cmdsynopsis>
b65bb1
b65bb1
    <para>
b65bb1
        This command edits the <quote>trunk</quote> chapter
b65bb1
        documentation entry. Here is where you can define the chapter
b65bb1
        introduction. This very same procedure is used to create
b65bb1
        <quote>branches</quote> and <quote>tags</quote> chapters, just
b65bb1
        be sure to change the chapter field accordingly.
b65bb1
    </para>
b65bb1
b65bb1
    <para>
b65bb1
        If the related manual or chapter itself don't exist in the
b65bb1
        documentation structure, centos-art.sh script creates them in
b65bb1
        their respective hierarchical order (i.e., the manual
b65bb1
        structure first, and the chapter structure later).
b65bb1
    </para>
b65bb1
b65bb1
    <cmdsynopsis>
b65bb1
    <command>centos-art help --edit "tcar-fs::trunk:Identity"</command>
b65bb1
    </cmdsynopsis>
b65bb1
b65bb1
    <para>
b65bb1
        This command edits the <quote>trunk/Identity</quote>
b65bb1
        documentation entry inside <quote>The CentOS Artwork
b65bb1
        Repository File System</quote> documentation manual.
b65bb1
    </para>
b65bb1
b65bb1
    <para>
b65bb1
        When you edit documentation for a directory which related
b65bb1
        chapter doesn't exist, centos-art.sh script creates the
b65bb1
        related chapter first and then proceed to create the related
b65bb1
        documentaiton entry.
b65bb1
    </para>
b65bb1
    
b65bb1
    <para>
b65bb1
        In order to document deeper directory levels, you need to
b65bb1
        refer the directory you want to document by using a path-style
b65bb1
        or a hyphen-style format as documentation entry.  For example,
b65bb1
        to edit the documentation related to the <quote>
b65bb1
        class="directory">trunk/Identity/Models/Themes</filename></quote>
b65bb1
        directory, you can use any of the following documentation
b65bb1
        entries:
b65bb1
    </para>
b65bb1
    <itemizedlist>
d2638e
    <listitem>
d2638e
    <para>
b65bb1
        <literal>tcar-fs::trunk:identity-models-themes</literal>
d2638e
    </para>
d2638e
    </listitem>
b65bb1
    <listitem>
b65bb1
    <para>
b65bb1
        <literal>tcar-fs::trunk:Identity/Models/Themes</literal>
b65bb1
    </para>
b65bb1
    </listitem>
b65bb1
    <listitem>
b65bb1
    <para>
b65bb1
        <literal>trunk/Identity/Models/Themes</literal>
b65bb1
    </para>
b65bb1
    </listitem>
b65bb1
    </itemizedlist>
b65bb1
b65bb1
    </refsection>
b65bb1
b65bb1
    <refsection id="scripts-bash-help-description-copy">
b65bb1
    <title>Copying Document Structure</title>
b65bb1
    <para>
b65bb1
        ...
b65bb1
    </para>
b65bb1
    </refsection>
b65bb1
b65bb1
    <refsection id="scripts-bash-help-description-delete">
b65bb1
    <title>Deleting Document Structure</title>
b65bb1
    <para>
b65bb1
        ...
b65bb1
    </para>
b65bb1
    </refsection>
b65bb1
b65bb1
    <refsection id="scripts-bash-help-description-rename">
b65bb1
    <title>Renaming Document Structure</title>
b65bb1
    <para>
b65bb1
        ...
b65bb1
    </para>
b65bb1
    </refsection>
b65bb1
b65bb1
    <refsection id="scripts-bash-help-description-update">
b65bb1
    <title>Updating Document Structure</title>
b65bb1
    <para>
b65bb1
        ...
b65bb1
    </para>
b65bb1
    </refsection>
e68d9f
b65bb1
    </refsection>
b65bb1
b65bb1
    <refsection id="scripts-bash-help-options">
b65bb1
    <title>Options</title>
b65bb1
    <para>
b65bb1
        The <command>centos-art help</command> command accepts common
b65bb1
        options described in 
b65bb1
        linkend="scripts-bash-cli-commonoptions" /> and the following
b65bb1
        specific options:
b65bb1
    </para>
b65bb1
b65bb1
    <variablelist>
d2638e
    <varlistentry>
d2638e
    <term><option>--answer-yes</option></term>
d2638e
    <listitem>
d2638e
    <para>
d2638e
        Assume <emphasis>yes</emphasis> to all confirmation requests.
d2638e
    </para>
d2638e
    </listitem>
d2638e
    </varlistentry>
e68d9f
d2638e
    <varlistentry>
7f526e
    <term><option>--sync-changes</option></term>
d2638e
    <listitem>
d2638e
    <para>
7f526e
        Synchronizes available changes between the working copy and
7f526e
        the central repository.
d2638e
    </para>
d2638e
    </listitem>
d2638e
    </varlistentry>
e68d9f
d2638e
    <varlistentry>
ba86a3
    <term><option>--search="KEYWORD"</option></term>
d2638e
    <listitem>
d2638e
    <para>
ba86a3
        This option looks for <varname>KEYWORD</varname> inside the
ba86a3
        manual specified in the documentation entry and display
ba86a3
        related information you to read.
d2638e
    </para>
d2638e
    </listitem>
d2638e
    </varlistentry>
e68d9f
d2638e
    <varlistentry>
d2638e
    <term><option>--edit</option></term>
d2638e
    <listitem>
d2638e
    <para>
d2638e
        Edit documentation entry related to path specified by
ba86a3
        <varname>DOCENTRY</varname> parameter.
d2638e
    </para>
d2638e
    <para>
ba86a3
        The <varname>DOCENTRY</varname> parameter must point to any
89114c
        directory inside the working copy.  When more than one
ba86a3
        <varname>DOCENTRY</varname> are passed as non-option
d2638e
        arguments to the <command>centos-art.sh</command> script
d2638e
        command-line, they are queued for further edition.  The
d2638e
        edition itself takes place through your default text editor
d2638e
        (e.g., the one you specified in the <envar>EDITOR</envar>
d2638e
        environment variable) and the text editor opens one file at
d2638e
        time (i.e., the queue of files to edit is not loaded in the
d2638e
        text editor.).
d2638e
    </para>
d2638e
    </listitem>
d2638e
    </varlistentry>
e68d9f
d2638e
    <varlistentry>
d2638e
    <term><option>--read</option></term>
d2638e
    <listitem>
d2638e
    <para>
d2638e
        Read documentation entry specified by
ba86a3
        <varname>DOCENTRY</varname> path.  This option is used
541cb9
        internally by <command>centos-art.sh</command> script to refer
541cb9
        documentation based on errors, so you can know more about them
541cb9
        and the causes that could have provoked them.
d2638e
    </para>
d2638e
    </listitem>
d2638e
    </varlistentry>
e68d9f
d2638e
    <varlistentry>
d2638e
    <term><option>--update</option></term>
d2638e
    <listitem>
d2638e
    <para>
d2638e
        Update output files rexporting them from the specified backend
d2638e
        source files.
d2638e
    </para>
d2638e
    </listitem>
d2638e
    </varlistentry>
e68d9f
d2638e
    <varlistentry>
d2638e
    <term><option>--copy</option></term>
d2638e
    <listitem>
d2638e
    <para>
89114c
        Duplicate documentation entries inside the working copy.
d2638e
    </para>
d2638e
    <para>
d2638e
        When documentation entries are copied, it is required to pass
d2638e
        two non-option parameters in the command-line.  The first
d2638e
        non-option parameter is considered the source location and the
d2638e
        second one the target location.  Both source location and
d2638e
        target location must point to a directory under the working
d2638e
        copy.
d2638e
    </para>
d2638e
    </listitem>
d2638e
    </varlistentry>
e68d9f
d2638e
    <varlistentry>
d2638e
    <term><option>--delete</option></term>
d2638e
    <listitem>
d2638e
    <para>
d2638e
        Delete documentation entries specified by
ba86a3
        <varname>DOCENTRY</varname> inside the working copy. It is
89114c
        possible to delete more than one documentation entry by
ba86a3
        specifying more <varname>DOCENTRY</varname> parameters in the
89114c
        command-line.
d2638e
    </para>
d2638e
    </listitem>
d2638e
    </varlistentry>
e68d9f
d2638e
    <varlistentry>
d2638e
    <term><option>--rename</option></term>
d2638e
    <listitem>
d2638e
    <para>
d2638e
        Rename documentation entries inside the working copy.  
d2638e
    </para>
d2638e
    <para>
d2638e
        When documentation entries are renamed, it is required to pass
d2638e
        only two non-option parameters to the command-line. The first
d2638e
        non-option parameter is considered the source location and the
d2638e
        second one the target location.  Both source location and
d2638e
        target location must point to a directory under the working
d2638e
        copy.
d2638e
    </para>
d2638e
    </listitem>
d2638e
    </varlistentry>
d2638e
    </variablelist>
e68d9f
d2638e
    <para>
d2638e
        When documentation entries are removed (e.g., through
d2638e
        <option>--delete</option> or <option>--rename</option>
d2638e
        options), the <function>help</function> functionality takes
b65bb1
        care of updating nodes, menus and cross refentrys related to
d2638e
        documentation entries in order to keep the manual structure in
89114c
        a consistent state.
d2638e
    </para>
b65bb1
    </refsection>
2b4826
b65bb1
    <refsection id="scripts-bash-help-examples">
b65bb1
    <title>Examples</title>
2b4826
    <para>
b65bb1
        None.
2b4826
    </para>
b65bb1
    </refsection>
2b4826
b65bb1
    <refsection id="scripts-bash-help-bugs">
b65bb1
    <title>Bugs</title>
2b4826
    <para>
2b4826
        ...
2b4826
    </para>
b65bb1
    </refsection>
2b4826
b65bb1
    <refsection id="scripts-bash-help-authors">
2b4826
    <title>Authors</title>
2b4826
    <para>
b65bb1
        The following people have worked in this functionality:
2b4826
    </para>
2b4826
    <itemizedlist>
2b4826
    <listitem>
2b4826
    <para>
1542c4
        Alain Reguera Delgado <<ulink url="mailto:alain.reguera@gmail.com">alain.reguera@gmail.com</ulink>>, =COPYRIGHT_YEAR_LIST=
2b4826
    </para>
2b4826
    </listitem>
2b4826
    </itemizedlist>
b65bb1
    </refsection>
2b4826
b65bb1
    <refsection id="scripts-bash-help-licence">
2b4826
    <title>License</title>
1542c4
2b4826
    <para>
1542c4
        Copyright © =COPYRIGHT_YEAR_LIST= The CentOS Project
1542c4
    </para>
2b4826
 
1542c4
    <para>
1542c4
        This program is free software; you can redistribute it and/or
1542c4
        modify it under the terms of the GNU General Public License as
1542c4
        published by the Free Software Foundation; either version 2 of
1542c4
        the License, or (at your option) any later version.
1542c4
    </para>
2b4826
 
1542c4
    <para>
1542c4
        This program is distributed in the hope that it will be
1542c4
        useful, but WITHOUT ANY WARRANTY; without even the implied
1542c4
        warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
1542c4
        PURPOSE.  See the GNU General Public License for more details.
1542c4
    </para>
2b4826
 
1542c4
    <para>
1542c4
        You should have received a copy of the GNU General Public
1542c4
        License along with this program; if not, write to the Free
1542c4
        Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
1542c4
        USA.
2b4826
    </para>
b65bb1
    </refsection>
e68d9f
b65bb1
</refentry>