help
Standardize constructions tasks inside &TCAR;
help
Standardize documentation tasks inside &TCAR;.
centos-art help
--help
--quiet
--answer-yes
--sync-changes
--format="KEYWORD "
--search="KEYWORD "
--edit
--read
--update-output
--update-structure
--copy
--delete
--rename
MANUAL :PART :CHAPTER :SECTION
LOCATION
Description
The help functionality exists to create
and maintain documentation manuals inside &TCAR;.
Documentation Entries
The documentation entry identifies the specific file you want
to work with inside a documentation manual. The help
functionality recognizes documentation entries in the
following formats:
Path style
This format uses paths to represent the documentation entries
you want to work with. This format assumes you are using the
first path component as chapter and the rest of the path as
section identifier both inside tcar-fs
documentation manual as parent documentation structure. The
field related to the part sectioning structure in the
documentation entry (the second field) is assumed empty, as
well. For example, if you want to document the directory
trunk/Scripts/Bash/Functions/Help
,
then you can do it with the following command:
centos-art help --edit trunk/Scripts/Bash/Functions/Help
Colon style
This format uses colons to represent the documentation entries
you want to work with. In this format, the whole documentation
entry is divided in fields using colon as separator character.
Documentation entries written this way use each field to
specify manual, part, chapter and section identifiers (in this
order). The section identifier can use a path style or hyphen
style to separate
components. For example, if you want to document the directory
trunk/Scripts/Bash/Functions/Help
,
then you can do it with any of the following commands:
centos-art help --edit tcar-fs::trunk:Scripts/Bash/Functions/Help
centos-art help --edit tcar-fs::trunk:scripts-bash-functions-help
The documentation manual name specified in the first field of
a colon style documentation entry, must match the name the
name of the directory where the documentation manual is stored
in. By default documentation manuals are written in
trunk/Documentation/Models/Texinfo or
trunk/Documentation/Models/Docbook directories, based on
whether they are written in Texinfo or Docbook documentation
format.
The match relation between the manual name you provide in the
documentation entry and the related directory name inside
&TCAR; is case insensitive. The same is true for all other
documentation entry fields.
From these documentation entry formats, the colon style
provides more flexibility than path style does. You can use
documentation entries written in colon style to create and
maintain different documentation manuals, including the
tcar-fs
documentation manual. This is something
you cannot do with documentation entries written in path style
because they confine all documentation actions to
tcar-fs
documentation manual.
Options
The centos-art help command accepts common
options described in and the following
specific options:
--answer-yes
Assume yes to all confirmation requests.
--sync-changes
Synchronizes available changes between the working copy and
the central repository.
--format="KEYWORD "
Specifies the format of documentation entry source file. This
information is used as reference to build the absolute path of
documentation entry, so you always have to provide it in order
to reach the documentation entry you want to work with.
Possible values for this option are shown in .
--search="KEYWORD "
Looks for documentation entries that match the
KEYWORD specified as value and
display them one by one in the order they were found. The way
each documentation entry is presented to you depends on the
documentation format the related documentation manual was
written on.
--edit
Edit the documentation entry provided as argument. The
edition itself takes place through your default text editor
(e.g., the one you specified in the EDITOR
environment variable) one file at a time (i.e., the queue of
files to edit is not loaded in the text editor.).
When parent components inside documentation entries doesn't
exist (e.g., you try to create a section for a documentation
manual that doesn't exist), the help
functionality will create all documentation parent structures
considering the documentation format constraints and the
following document structure hierarchy order: documentation
manual
first, parts
second,
chapters
third and sections
lastly.
--read
Read the documentation entry provided as argument. This
option is used internally by centos-art.sh
script to refer documentation based on errors, so you can know
more about them and the causes that could have provoked them.
--update-output
Update output files rexporting them from the specified backend
source files.
--update-structure
Update document structure (e.g., cross references, menus,
nodes, etc.). This option should be used whenever a document
structure changes (e.g., when documentation entries are added,
copied, renamed, deleted, etc.). This option grantees the
document integrity and should be run before the
--update-output option.
--copy
Duplicate documentation entries inside the working copy using
version control.
When you duplicate documentation entries through this option,
you should pass only two documentation entries in the command
line. The first one is considered the source location and
should point to a file under version control inside the
working copy. The second one is considered the target location
and should point either to the same structural level the
source points to or a direct parent level based on source
location, as described below.
"manual:part:chapter:section-1 " "manual:part:chapter:section-2 "
Duplicates section-1 as
section-2 inside the same
chapter ,
part and
manual .
"manual:part:chapter-1: " "manual:part:chapter-2: "
Duplicates chapter-1 as
chapter-2 inside the same
part and
manual .
"manual:part-1:: " "manual:part-2:: "
Duplicates part-1 as
part-2 inside the same
manual .
"manual-1::: " "manual-2::: "
Duplicates manual-1 as
manual-2 inside trunk/Documentation/Models/${FLAG_FORMAT}/
directory, where ${FLAG_FORMAT} is the name of the format
passed as option with the first letter in uppercase and the
rest in lowercase.
When you copy documentation entries through this option, all
structuring sections inside the one copied will be also
copied. For example, if you copy a documentation manual that
is made of parts, chapters and sections, the duplicated manual
will contain all those parts, chapters and sections, as well.
The same is true for lower sectioning structures. Thus, you
can be more specific in the documentation entry by reducing
the amount of content to duplicate.
When you copy documentation entries through this option, you
do it using documentation entries in the same structural level
only. This option doesn't support copying documentation
entries from differnet structural levels. For example, you
cannot copy one section to a chapter different from that the
source section belongs to. The same applies to chapters, and
parts.
--delete
Delete documentation entries. It is possible to delete more
than one documentation entry by specifying several
documentation entries in the command line.
--rename
Rename documentation entries inside the working copy.
When documentation entries are renamed, it is required to pass
only two non-option parameters to the command-line. The first
non-option parameter is considered the source location and the
second one the target location. Both source location and
target location must point to a directory under the working
copy.
When documentation entries are removed (e.g., through
--delete or --rename
options), the help functionality takes
care of updating nodes, menus and cross refentrys related to
documentation entries in order to keep the manual structure in
a consistent state.
Examples
This section describes, using examples, the procedure you
should follow to manage documentation manuals through
help functionality inside &TCAR;. To
better understand the procedure to follow, it describes a
hypothetical documentation scenario and the related commands
and outputs you may go through in order to complete specific
documentation tasks successfully.
Creating Document Structures
To create new documentation manuals inside &TCAR; you need to
provide the --edit option and a documentation
entry in the form manual:::
to the help functionality.
For example, consider a scenario where you need to create a
documentation manual in texinfo format to describe different
maintenance tasks you need to realized in order to keep your
pets happy. We'll name such manual My Zoo
. It
will use chapters to organize each different kind of pets you
have. Inside chapters, sections will have the pet's name as
their own name to describe each pet's requirements, schedules,
and so on. To create such documentation manual, run the
following command:
centos-art help --edit --format="texinfo" "myzoo:::"
In case such documentation manual doesn't exist in the
trunk/Docuementation/Models/Texinfo/
directory, this command will produce the following output:
The following documentation manual doesn't exist:
--> trunk/Documentation/Models/Texinfo/MyZoo/en_US/myzoo.texinfo
Do you want to create it now? [yes/no]: yes
Enter manual's title: My Zoo
Enter manual's subtitle: Maintenance reference
Enter manual's abstract: This manual relates pets' maintenance tasks.
Creating trunk/Documentation/Models/Texinfo/MyZoo
Creating trunk/Documentation/Models/Texinfo/MyZoo/en_US
Creating trunk/Documentation/Models/Texinfo/MyZoo/en_US/myzoo.conf
Creating trunk/Documentation/Models/Texinfo/MyZoo/en_US/myzoo-index.texinfo
Creating trunk/Documentation/Models/Texinfo/MyZoo/en_US/myzoo-menu.texinfo
Creating trunk/Documentation/Models/Texinfo/MyZoo/en_US/myzoo-nodes.texinfo
Creating trunk/Documentation/Models/Texinfo/MyZoo/en_US/myzoo.texinfo
Creating trunk/Documentation/Models/Texinfo/MyZoo/en_US/Licenses/chapter-menu.texinfo
Creating trunk/Documentation/Models/Texinfo/MyZoo/en_US/Licenses/chapter-nodes.texinfo
Creating trunk/Documentation/Models/Texinfo/MyZoo/en_US/Licenses/chapter.texinfo
Updating trunk/Documentation/Models/Texinfo/MyZoo/en_US/myzoo.texinfo
Updating trunk/Documentation/Manuals/Texinfo/MyZoo/en_US/myzoo.info.bz2
Updating trunk/Documentation/Manuals/Texinfo/MyZoo/en_US/myzoo.xhtml.tar.bz2
Updating trunk/Documentation/Manuals/Texinfo/MyZoo/en_US/myzoo.xml
Updating trunk/Documentation/Manuals/Texinfo/MyZoo/en_US/myzoo.docbook
Updating trunk/Documentation/Manuals/Texinfo/MyZoo/en_US/myzoo.pdf
Updating trunk/Documentation/Manuals/Texinfo/MyZoo/en_US/myzoo.txt.bz2
Once the documentation structure has been created this way,
the recently created documentation manual is ready to receive
new sectioning levels (e.g., parts, chapters, sections, etc.).
For example, to create a new chapter named
Turtles
inside My Zoo
documentation manual, run the following command:
centos-art help --edit --format="texinfo" "myzoo::turtles:"
The following documentation chapter doesn't exist:
--> trunk/Documentation/Models/Texinfo/MyZoo/en_US/Turtles
Do you want to create it now? [yes/no]: yes
Enter chapter's title: Turtles
Creating trunk/Documentation/Models/Texinfo/MyZoo/en_US/Turtles
Creating trunk/Documentation/Models/Texinfo/MyZoo/en_US/Turtles/chapter-menu.texinfo
Creating trunk/Documentation/Models/Texinfo/MyZoo/en_US/Turtles/chapter-nodes.texinfo
Creating trunk/Documentation/Models/Texinfo/MyZoo/en_US/Turtles/chapter.texinfo
Updating trunk/Documentation/Models/Texinfo/MyZoo/en_US/myzoo-menu.texinfo
Updating trunk/Documentation/Models/Texinfo/MyZoo/en_US/myzoo-nodes.texinfo
Updating trunk/Documentation/Models/Texinfo/MyZoo/en_US/Turtles/chapter.texinfo
Updating trunk/Documentation/Manuals/Texinfo/MyZoo/en_US/myzoo.info.bz2
Updating trunk/Documentation/Manuals/Texinfo/MyZoo/en_US/myzoo.xhtml.tar.bz2
Updating trunk/Documentation/Manuals/Texinfo/MyZoo/en_US/myzoo.xml
Updating trunk/Documentation/Manuals/Texinfo/MyZoo/en_US/myzoo.docbook
Updating trunk/Documentation/Manuals/Texinfo/MyZoo/en_US/myzoo.pdf
Updating trunk/Documentation/Manuals/Texinfo/MyZoo/en_US/myzoo.txt.bz2
Once chapters have been created it is possible to create
sections inside them. For example, if you want to create a
section for describing the life of a turtle named Longneck,
run the following command:
centos-art help --edit --format="texinfo" "myzoo::turtles:longneck"
The following documentation section doesn't exist:
--> trunk/Documentation/Models/Texinfo/MyZoo/en_US/Turtles/longneck.texinfo
Do you want to create it now? [yes/no]: yes
Creating trunk/Documentation/Models/Texinfo/MyZoo/en_US/Turtles/longneck.texinfo
Updating trunk/Documentation/Manuals/Texinfo/MyZoo/en_US/myzoo.info.bz2
Updating trunk/Documentation/Manuals/Texinfo/MyZoo/en_US/myzoo.xhtml.tar.bz2
Updating trunk/Documentation/Manuals/Texinfo/MyZoo/en_US/myzoo.xml
Updating trunk/Documentation/Manuals/Texinfo/MyZoo/en_US/myzoo.docbook
Updating trunk/Documentation/Manuals/Texinfo/MyZoo/en_US/myzoo.pdf
Updating trunk/Documentation/Manuals/Texinfo/MyZoo/en_US/myzoo.txt.bz2
Editing Document Structures
To edit documentation entries you can follow the same
procedure described above. Just keep in mind the following
rules:
When the entry you want to edit already exist it will be
edited.
When the entry you want to edit doesn't exist it will be created
first and edited later.
Copying Document Structures
Consider a new turtle named Slowfeet has arrived to your home
and you want to duplicate Longneck's section for it (they both
are turtles and have similar requirements, squedules, etc.).
To copy documentation entries you use the
--copy option with two documentation entries,
where the first one is the source location and the second one
the target location. This need can be covered with the
following command:
centos-art help --copy --format="texinfo" "myzoo::turtles:longneck" "myzoo::turtles:slowfeet"
Creating trunk/Documentation/Models/Texinfo/Myzoo/en_US/Turtles/slowfeet.texinfo
Updating trunk/Documentation/Models/Texinfo/Myzoo/en_US/Turtles/slowfeet.texinfo
Updating trunk/Documentation/Manuals/Texinfo/Myzoo/en_US/myzoo.info.bz2
Updating trunk/Documentation/Manuals/Texinfo/Myzoo/en_US/myzoo.xhtml.tar.bz2
Updating trunk/Documentation/Manuals/Texinfo/Myzoo/en_US/myzoo.xml
Updating trunk/Documentation/Manuals/Texinfo/Myzoo/en_US/myzoo.docbook
Updating trunk/Documentation/Manuals/Texinfo/Myzoo/en_US/myzoo.pdf
Updating trunk/Documentation/Manuals/Texinfo/Myzoo/en_US/myzoo.txt.bz2
In order to copy documentation entries successfully, the
source documentation entry must not contain any pending
change. Otherwise, the target section won't be created and the
script will immediatly stop its execution with a The
source location has pending changes.
error message.
Deleting Document Structures
To delete one documentation entry, use the following command:
centos-art help --delete --format="texinfo" "manual:part:chapter:section "
...
Renaming Document Structures
To rename one documentation entry, use the following command:
centos-art help --copy --format="texinfo" "manual:part:chapter:section " "manual:part:chapter:section "
...
Bugs
...
Authors
The following people have worked in this functionality:
Alain Reguera Delgado <alain.reguera@gmail.com >, =COPYRIGHT_YEAR_LIST=
License
Copyright © =COPYRIGHT_YEAR_LIST= The CentOS Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
USA.