Skip to main content

Module utils

Module utils 

Source
Expand description

Utility functions and helper methods for sitemap operations.

Constants§

DEFAULT_CHANGE_FREQ
Default change frequency for URLs.
MAX_URLS
Maximum number of URLs allowed in a single sitemap.

Functions§

create_cli
Creates the command-line interface for the application.
format_date
Formats a DateTime object into a string suitable for sitemap use.
generate_sitemap
Generates a sitemap based on the provided command-line arguments.
is_valid_url
Checks if a URL is valid for inclusion in the sitemap.
normalize_urls
Normalizes a list of URLs to avoid duplicates.
read_urls_from_file
Reads URLs from a file, one URL per line.
write_output
Writes the sitemap XML to an output file.