NAME

qsgen2 - a shell script

SYNOPSIS

Documentation automatically generated with ‘zsdoc’

FUNCTIONS

_add_blog_list_to_index
_blog_cache
_blog_idx_for_index
_blog_index
_blogs
_cleanup
_file_to_lower
_f_last_updated
_help
_image
_last_updated
_link
_list_blogs
_list_pages
_msg
_pages
_pages_cache
_p_qstags
_qstags
_run_engine
_sitemap
_version
_youtube

DETAILS

Script Body

Has 101 line(s). Calls functions:

Script-Body
|-- _blogs
|   |-- _blog_cache
|   |   `-- _list_blogs
|   |       `-- _msg
|   |-- _blog_idx_for_index
|   |   `-- _msg
|   |-- _blog_index
|   |   |-- _f_last_updated
|   |   |   `-- _msg
|   |   `-- _msg
|   |-- _list_blogs
|   |   `-- _msg
|   `-- _msg
|-- _help
|-- _msg
|-- _pages
|   |-- _add_blog_list_to_index
|   |-- _msg
|   `-- _pages_cache
|       `-- _list_pages
|           `-- _msg
|-- _sitemap
|   `-- _msg
`-- _version
    `-- _msg

Uses feature(s): autoload, export, source, zmodload

Exports (environment): blogdate // file_ext // sitemap_force // today

_add_blog_list_to_index

##
# @brief Add the blog list to the index file if blog_in_index is true.

Has 9 line(s). Doesn’t call other functions.

Called by:

_pages

_blog_cache

##
# @brief Cache the state of blog files and identify changes.

Has 31 line(s). Calls functions:

_blog_cache
`-- _list_blogs
    `-- _msg

Called by:

_blogs

_blog_idx_for_index

##
# @brief Generate the file blog/index.tmp.html.

Has 59 line(s). Calls functions:

_blog_idx_for_index
`-- _msg

Called by:

_blogs

Environment variables used: BLOG_META_STR_ARRAY

_blog_index

##
# @brief Generate the www_root/blog/index.html file.

Has 30 line(s). Calls functions:

_blog_index
|-- _f_last_updated
|   `-- _msg
`-- _msg

Called by:

_blogs

Environment variables used: new_updated_blogs

_blogs

##
# @brief Generate or update blog files or export metadata based on argument.

Has 155 line(s). Calls functions:

_blogs
|-- _blog_cache
|   `-- _list_blogs
|       `-- _msg
|-- _blog_idx_for_index
|   `-- _msg
|-- _blog_index
|   |-- _f_last_updated
|   |   `-- _msg
|   `-- _msg
|-- _list_blogs
|   `-- _msg
`-- _msg

Uses feature(s): export

Called by:

Script-Body

List of exports (to environment): BLOG_META_STR_ARRAY // new_updated_blogs

Environment variables used: new_updated_blogs // no_blogs_found

_cleanup

##
# @brief Remove leftover tags from the content.
# @param content The content to be cleaned.
# @return The cleaned content.

Has 16 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

_file_to_lower

##
# @brief Convert the filename to lowercase and replace spaces with dashes.
# @param filename The original filename.
# @return The modified filename.

Has 5 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

_f_last_updated

##
# @brief Update #updated and #version tags in the provided file.
# @param file_path The path to the file to be updated.

Has 19 line(s). Calls functions:

_f_last_updated
`-- _msg

Called by:

_blog_index

Environment variables used: today

_help

##
# @brief Display help information for the script.
# @param ... Additional arguments (unused in this function).

Has 2 line(s). Doesn’t call other functions.

Called by:

Script-Body

_image

##
# @brief Convert #showimg tags to HTML img tags.
# @param content The content containing #showimg tags.
# @return The content with #showimg tags replaced by HTML img tags.

Has 28 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

_last_updated

##
# @brief Update #updated and #version tags in the provided content.
# @param content The content to be updated.
# @return The updated content.

Has 15 line(s). Calls functions:

_last_updated
`-- _msg

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

Environment variables used: today

##
# @brief Convert #link tags to clickable HTML links.
# @param content The content containing #link tags.
# @return The content with #link tags replaced by HTML links.

Has 27 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

_list_blogs

##
# @brief List all blog files and store them in an array.

Has 22 line(s). Calls functions:

_list_blogs
`-- _msg

Uses feature(s): export, setopt

Called by:

_blog_cache
_blogs

List of exports (to environment): no_blogs_found

_list_pages

##
# @brief List all page files and store them in an array.

Has 21 line(s). Calls functions:

_list_pages
`-- _msg

Uses feature(s): export, setopt

Called by:

_pages_cache

List of exports (to environment): no_pages_found

Environment variables used: file_ext

_msg

##
# @brief Display a message with specific formatting based on message type.
# @param type The type of message (e.g., std, info, debug, etc.)
# @param ... The keys or additional strings to be formatted and displayed.

Has 21 line(s). Doesn’t call other functions.

Called by:

_blog_idx_for_index
_blog_index
_blogs
_f_last_updated
_last_updated
_list_blogs
_list_pages
_pages
_p_qstags
_qstags
_run_engine
Script-Body
_sitemap
_version

_pages

##
# @brief Generate all new and updated pages.

Has 108 line(s). Calls functions:

_pages
|-- _add_blog_list_to_index
|-- _msg
`-- _pages_cache
    `-- _list_pages
        `-- _msg

Uses feature(s): export, read

Called by:

Script-Body

List of exports (to environment): new_updated_pages

Environment variables used: no_pages_found // file_ext

_pages_cache

##
# @brief Cache the state of page files and identify changes.
# @return Array of pages to be processed.

Has 31 line(s). Calls functions:

_pages_cache
`-- _list_pages
    `-- _msg

Called by:

_pages

_p_qstags

##
# @brief Convert QStags to HTML using Perl.
# @param content The content containing QStags.
# @return The content with QStags converted to HTML.

Has 55 line(s). Calls functions:

_p_qstags
`-- _msg

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

_qstags

##
# @brief Convert QStags to HTML using Zsh regex module.
# @param content The content containing QStags.
# @return The content with QStags converted to HTML.

Has 50 line(s). Calls functions:

_qstags
`-- _msg

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

_run_engine

##
# @brief Run the configured engine to process the input file.
# @param input The input file to be processed.

Has 11 line(s). Calls functions:

_run_engine
`-- _msg

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

_sitemap

##
# @brief Generate the sitemap files if conditions are met.

Has 92 line(s). Calls functions:

_sitemap
`-- _msg

Uses feature(s): setopt

Called by:

Script-Body

Environment variables used: new_updated_blogs // new_updated_pages // sitemap_force

_version

##
# @brief Display the version information of the script.
# @param ... Additional arguments (unused in this function).

Has 4 line(s). Calls functions:

_version
`-- _msg

Called by:

Script-Body

_youtube

##
# @brief Embed a YouTube video in the provided content.
# @param content The content containing #ytvideo tags.
# @return The content with #ytvideo tags replaced by YouTube iframe embeds.

Has 18 line(s). Doesn’t call other functions.

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).