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>
b65bb1
        <command>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
b65bb1
        and maintain documentation structures inside &TCAR;. The
b65bb1
        documentation structure and documentation format implemented
b65bb1
        by this functionality is described in  
b65bb1
        linkend="manuals-production-identifying-structure" /> and
b65bb1
        <xref linkend="manuals-format-texinfo" />, respectively.
e68d9f
    </para>
e68d9f
b65bb1
    <refsection id="scripts-bash-help-description-docentry">
b65bb1
    <title>Documentation Entry Format</title>
b65bb1
    <para>
b65bb1
        ...
b65bb1
    </para>
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
    <note>
b65bb1
    <para>
b65bb1
        This last format assummes you are using the
b65bb1
        <quote>trunk</quote> chapter inside <quote>tcar-fs</quote>
b65bb1
        documentation manual as parent documentation structure. The
b65bb1
        field related to the part sectioning structure in the
b65bb1
        documentatin entry (second field) is assumed empty, as well.
b65bb1
    </para>
b65bb1
    </note>
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>