06ab0f Update centos-art.sh scripts.

Authored and Committed by Alain Reguera Delgado 11 years ago
53 files changed. 2307 lines added. 1362 lines removed.
Automation/Locales/centos-art.sh.pot
file modified
+510 -493
Automation/Locales/es_ES/LC_MESSAGES/centos-art.sh.mo
file modified
+0 -0
Automation/Locales/es_ES/centos-art.sh.po
file modified
+550 -504
Automation/Manuals/centos-art.sh.asciidoc.pot
file added
+410
Automation/Manuals/render.conf
file modified
+8 -0
Automation/Manuals/tcar_setModuleEnvironment.sh.asciidoc
file added
+143
Automation/Manuals/tcar_setModuleEnvironment.sh.asciidoc.pot
file added
+199
Automation/Modules/Locale/Manuals/es_ES/locale.asciidoc.poAutomation/Modules/Locale/Manuals/es_ES/centos-art.sh-locale.po
file renamed
+0 -0
Automation/Modules/Locale/Manuals/locale.asciidocAutomation/Modules/Locale/Manuals/centos-art.sh-locale.asciidoc
file renamed
+4 -4
Automation/Modules/Locale/Manuals/locale.asciidoc.potAutomation/Modules/Locale/Manuals/centos-art.sh-locale.pot
file renamed
+0 -0
Automation/Modules/Locale/Manuals/render.conf
file modified
+3 -3
Automation/Modules/Locale/Modules/Actions/Modules/Update/update.sh
file modified
+1 -1
Automation/Modules/Locale/Modules/Actions/actions.sh
file modified
+4 -2
Automation/Modules/Locale/Modules/Directory/directory.sh
file modified
+1 -1
Automation/Modules/Locale/Modules/Directory/directory_getConfiguration.sh
file modified
+19 -18
Automation/Modules/Locale/Modules/File/file.sh
file modified
+1 -1
Automation/Modules/Locale/locale.sh
file modified
+5 -11
Automation/Modules/Locale/locale_getOptions.sh
file modified
+14 -15
Automation/Modules/Prepare/Manuals/prepare.asciidocAutomation/Modules/Prepare/Manuals/centos-art.sh-prepare.asciidoc
file renamed
+3 -3
Automation/Modules/Prepare/Manuals/render.conf
file modified
+2 -2
Automation/Modules/Prepare/prepare.sh
file modified
+7 -9
Automation/Modules/Prepare/prepare_getOptions.sh
file modified
+12 -12
Automation/Modules/Prepare/prepare_setRenderEnvironment.sh
file modified
+4 -5
Automation/Modules/Render/Manuals/es_ES/render.asciidoc.poAutomation/Modules/Render/Manuals/es_ES/centos-art.sh-render.po
file renamed
+0 -0
Automation/Modules/Render/Manuals/render.asciidocAutomation/Modules/Render/Manuals/centos-art.sh-render.asciidoc
file renamed
+3 -4
Automation/Modules/Render/Manuals/render.asciidoc.potAutomation/Modules/Render/Manuals/centos-art.sh-render.asciidoc.pot
file renamed
+0 -0
Automation/Modules/Render/Manuals/render.conf
file modified
+3 -3
Automation/Modules/Render/Modules/Asciidoc/asciidoc_setBaseRendition.sh
file modified
+1 -1
Automation/Modules/Render/Modules/Svg/svg.sh
file modified
+1 -1
Automation/Modules/Render/render.sh
file modified
+5 -11
Automation/Modules/Render/render_getOptions.sh
file modified
+15 -13
Automation/Modules/Render/render_setRenderType.sh
file modified
+9 -6
Automation/Modules/Tuneup/Modules/Sh/sh_setTopComment.sh
file modified
+1 -1
Automation/Modules/Tuneup/Modules/Svg/svg_setMetadata.sh
file modified
+1 -1
Automation/Modules/Tuneup/Modules/Xhtml/xhtml_setToc.sh
file modified
+1 -1
Automation/Modules/Tuneup/tuneup.sh
file modified
+10 -11
Automation/Modules/Tuneup/tuneup_getOptions.sh
file modified
+9 -9
Automation/Scripts/tcar_checkFiles.sh
file modified
+2 -2
Automation/Scripts/tcar_checkModuleName.sh
file added
+38
Automation/Scripts/tcar_getFilesList.sh
file modified
+4 -4
Automation/Scripts/tcar_getPathComponent.sh
file modified
+4 -4
Automation/Scripts/tcar_printHelp.sh
file modified
+9 -2
Automation/Scripts/tcar_printMailingList.sh
file modified
+4 -4
Automation/Scripts/tcar_printMessage.sh
file modified
+10 -3
Automation/Scripts/tcar_printUrl.sh
file modified
+4 -4
Automation/Scripts/tcar_printVersion.sh
file modified
+12 -1
Automation/Scripts/tcar_setModuleArguments.shAutomation/Scripts/tcar_setArguments.sh
file renamed
+12 -12
Automation/Scripts/tcar_setModuleEnvironment.sh
file modified
+115 -31
Automation/Scripts/tcar_setModuleEnvironmentScripts.sh
file modified
+5 -9
Automation/Scripts/tcar_setSubModuleEnvironment.sh
file removed
-83
Automation/Scripts/tcar_unsetModuleEnvironment.sh
file modified
+8 -13
Automation/centos-art.conf.sh
file modified
+16 -11
Automation/centos-art.sh
file modified
+105 -33
    Update centos-art.sh scripts.
    
    - Previously, when you executed the centos-art.sh script, it used to
      pass all the arguments it received through the command-line to
      modules directly, without any modification. Such behavior, required
      immediate modules to duplicate common option definitions like
      --quiet and --yes. This update changes the centos-art.sh script to
      separate both common and specific argument interpretation. Common
      arguments are interpreted inside the centos-art.sh file itself while
      module-specific arguments are interpreted inside module-specific
      environments.
    
      As restriction to this design, arguments considered common cannot
      accept arguments (e.g., --option="value", or any variant known by
      getopt) are not possible. Consider that two getopt calls inside
      different levels of the same script may burst into naming collisions
      most of times, though it can be used just once.  So, when we parse
      common arguments we use a tough way inside centos-art.sh file to do
      it. This is by defining a list of all possible arguments that can be
      considered common and storing all that are not common for processing
      by module-specific environments. Inside module-specific environments
      we parse arguments using getopt instead, which is much more
      confident about option parsing than our tough implementation.  It
      would be very nice if we find a way to use getopt in the same script
      at different levels without any option naming collision.
    
            TIP: Probably you want to convert all that first-level modules
            you have into one-purpose independent scripts that load common
            functionalities from external files. More or less as you are
            doing already. Consider the render first-level module, for
            example, you would have centos-art-render.sh instead. So, when
            you need to produce content, you will call
            centos-art-render.sh file instead of centos-art.sh render.
            This way you can have one getopt for each script file and you
            can play with symbolic inks to make shorter commands.
    
      When you execute centos-art.sh script, it processes common option
      and non-option arguments. Common option arguments are used to set
      flags while common non-option arguments contain path information.
      Once centos-art.sh script has collected common arguments, it passed
      to store module-specific arguments. For this journey, it uses a
      variable named TCAR_SCRIPT_ARGUMENT to store non-option arguments
      and TCAR_MODULE_ARGUMENT variable to store option arguments (Notice
      that these variables are written in singlar but they store
      arguments, in plural. They may store one ore more arguments in
      them).  Later, it passes these values to tcar_setModuleEnvironment
      function which initiates the module environment with this
      information.
    
    - Previously, centos-art.sh had not a way to debug the script's
      execution. This made difficult to see how modules worked exactly
      (e.g., known the index position, the order in which they were
      executed). This update changes the tcar_setModuleEnvironment
      function to print this information when the --debug option is passed
      to centos-art.sh script. In order for this debugging information to
      be printed, the TCAR_FLAG_DEBUGGER environment variable was added to
      centos-art.conf.sh. It is initially set to false (no debug
      information is printed out). The debugging information must be
      configured by a set of calls to tcar_printMessage function using the
      --as-debugger-line option.
    
    - Previously, documentation was set using the form
      centos-art.sh-${MODULE_NAME} name (I've gone back an forth in this
      at least twice). This update changes the tcar_printHelp function to
      remove the "centos-art.sh" string from documentation names leaving
      just ${MODULE_NAME} (default). If the first argument is provided to
      tcar_printHelp function it must be in the form ${FILE}.sh and
      tcar_printHelp will look for documentation for that file inside
      module's manuals directory structure. It is important that you don't
      duplicate names inside different levels of sub-modules of one single
      first-level module. This way you can document all module's files the
      first-level module is made of. The first-level module is the only
      one which has access to interpret the arguments passed to
      centos-art.sh command-line, so it is the only one you can pass the
      --help option to.
    
    - Previously, the tcar_setModuleEnvironment only required you to pass
      the "${@}" variable as argument. This variable passed all the
      command-line arguments directly from the command-line to the
      tcar_setModuleEnvironment function which in turn passed them to
      module-specific environments for processing through getopt.  Because
      common-arguments and specific arguments have been separated one
      another, and different modules may require different arguments, this
      update changes the tcar_setModuleEnvironment to use the -m, -t, and
      -g options which specify the module name, the module type and the
      module options, respectively.
    
    - Previously, the tcar_printMessage function was using 15 spaces and
      one tabular space from left to right to leave space for action
      messages and also retain the vertical view of right content. This
      amount of space isn't enough for debugging information printed out
      on the left side. This update changes the tcar_printMessage function
      to increase the available space in the left side from 15 to 25.
    
    - Previously, the --as-response-line, from tcar_printMessage, was
      redirecting content to standard output. This update changes
      tcar_printMessage to make --as-response-line to redirect output to
      standard error.
    
    - The --as-debugger-line was added to tcar_printMessage. This option
      prints information to standard output, based on whether --debug
      option was provided to centos-art.sh script or not.
    
    - The tcar_printVersion function was updated to use the GNU version's
      style. This is, one line for the program and its version.  Another
      line for the copyright note, and one or more line for the program's
      legal status.
    
    - Previously, we were using the tcar_setArguments function to parse
      both common and specific module's options. Because parsing common
      options is already done at centos-art.sh file, this update changes
      the function name from tcar_setArguments to tcar_setModuleArguments
      to reflect the fact that it takes care of module-specific arguments
      only.
    
    - Previously, the tcar_setModuleEnvironment function was using regular
      variables to store module information. This made the function to
      load incorrect modules in situations where the new module to load
      was at the same level of the previous one. This update changes the
      tcar_setModuleEnvironment variable to use array variables instead of
      regular variables so it be possible to access the information of
      modules already loaded and adjust the module's base directory of
      those who share a same parent.
    
    - Previously, the tcar_setModuleEnvironmentScripts,
      tcar_unsetModuleEnvironment and tcar_checkModuleName were using
      positional parameters to retrieve module information from
      tcar_setModuleEnvironment function. These three functions are called
      only from tcar_setModuleEnvironment. This update changes these three
      functions to retrieve module information from global variables set
      in tcar_setModuleEnvironment instead of positional parameters.
    
    - Update Spanish translations for centos-art.sh script.
    
    - Add entry to produce documentation related to
      tcar_setModuleEnvironment.sh file. I need to work more in this
      documentation, it is very important to understand how the modular
      design implemented by centos-art.sh script works. It is also a
      source of new ideas for refactoring.
    
    - Previously, the configuration variables related to script identity
      were not read-only. This update changes centos-art.conf.sh file to
      make configuration variables related to script identity read-only.
    
    - Remove the TCAR_ARGUMENTS variable definition from centos-art.conf.sh
      file. The TCAR_ARGUMENTS variable is no longer used inside
      centos-art.sh script. See TCAR_SCRIPT_ARGUMENT and
      TCAR_MODULE_ARGUMENT instead.
    
    - Remove the tcar_setSubModuleEnvironment function. It is no longer
      needed since tcar_setModuleEnvironment is using array variables to
      store module information.
    
        
Automation/Modules/Locale/Manuals/es_ES/locale.asciidoc.po Automation/Modules/Locale/Manuals/es_ES/centos-art.sh-locale.po
file renamed
file was renamed with no change to the file
Automation/Modules/Locale/Manuals/locale.asciidoc Automation/Modules/Locale/Manuals/centos-art.sh-locale.asciidoc
file renamed
+4 -4
Automation/Modules/Locale/Manuals/locale.asciidoc.pot Automation/Modules/Locale/Manuals/centos-art.sh-locale.pot
file renamed
file was renamed with no change to the file
Automation/Modules/Prepare/Manuals/prepare.asciidoc Automation/Modules/Prepare/Manuals/centos-art.sh-prepare.asciidoc
file renamed
+3 -3
Automation/Modules/Render/Manuals/es_ES/render.asciidoc.po Automation/Modules/Render/Manuals/es_ES/centos-art.sh-render.po
file renamed
file was renamed with no change to the file
Automation/Modules/Render/Manuals/render.asciidoc Automation/Modules/Render/Manuals/centos-art.sh-render.asciidoc
file renamed
+3 -4
Automation/Modules/Render/Manuals/render.asciidoc.pot Automation/Modules/Render/Manuals/centos-art.sh-render.asciidoc.pot
file renamed
file was renamed with no change to the file
Automation/Scripts/tcar_setModuleArguments.sh Automation/Scripts/tcar_setArguments.sh
file renamed
+12 -12
file modified
+16 -11
file modified
+105 -33