Skip to main content

LocalSiteMap is an open-source Python library designed to make dataset analysis much easier by generating helpful detailed plots using matplotlib based on your dataset.

Project description

LocalSiteMap

Python Version Code Size Downloads License Compliance PyPI Version

LocalSiteMap is an open-source Python package designed for generating sitemaps from local files. It tracks HTML and HTM files, and generates complete sitemaps for the root website, including directories.

Changes in version 1.0.0:

  • Added initial package code, with automatic directory crawling to generate the sitemap.xml file.

[!IMPORTANT] LocalSiteMap crawls any directory found in the root folder, be sure to add exclusions for important directories, or hidden/resource/file directories.

Installation

You can install LocalSiteMap using pip:

pip install localsitemap

Supported Python Versions

LocalSiteMap supports the following Python versions:

  • Python 3.6
  • Python 3.7
  • Python 3.8
  • Python 3.9
  • Python 3.10
  • Python 3.11/Later (Preferred)

Please ensure that you have one of these Python versions installed before using LocalSiteMap. LocalSiteMap may not work as expected on lower versions of Python than the supported.

Features

  • Directory Crawling: LocalSiteMap automatically crawls all subdirectories and files under the root directory, recursively adding them to your sitemap.
  • Automatic Last Modified Checks: The package also automatically checks when the file has last been modified when adding it to the sitemap.
    • Customizable: You can customize the sitemap generation process by excluding specific directories or files.
  • Easy to Use: With just a few lines of code, you can generate a complete sitemap for your local website.
  • Open Source: LocalSiteMap is open source, allowing you to inspect, modify, and contribute to the code.

Usage

Generating a sitemap

from localsitemap import generate_sitemap

# Root site directory
root_directory = r"path/to/your/website/directory"

# Domain of your website (where it is hosted)
base_url_of_your_website = "https://example.com"

# List of file paths or directories to exclude from the sitemap
excluded = ["auth", "forms", "template.html", "media", ".git", ".vscode", "node_modules"]  # Example exclusions

# Generate the sitemap
generate_sitemap(root_directory, base_url_of_your_website, "sitemap.xml", excluded)
print("Sitemap generated in sitemap.xml")

Contributing

Contributions are welcome! If you encounter any issues, have suggestions, or want to contribute to LocalSiteMap, please open an issue or submit a pull request on GitHub.

License

LocalSiteMap is released under the terms of the MIT License (Modified). Please see the LICENSE file for the full text.

Modified License Clause

The modified license clause grants users the permission to make derivative works based on the LocalSiteMap software. However, it requires any substantial changes to the software to be clearly distinguished from the original work and distributed under a different name.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

localsitemap-1.0.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

localsitemap-1.0.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file localsitemap-1.0.0.tar.gz.

File metadata

  • Download URL: localsitemap-1.0.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for localsitemap-1.0.0.tar.gz
Algorithm Hash digest
SHA256 b76a83dc2defb13e860b11561d813156bfeca79c8db4c9b59d1120e4c4d9727a
MD5 fd7141a46886ebb0d4406616a9645e5e
BLAKE2b-256 cecff57c75e6b48943c1f4aac9aa0885b4bc7e6e8ddcc4e514c47f9b2733fec5

See more details on using hashes here.

File details

Details for the file localsitemap-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: localsitemap-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for localsitemap-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 39b2365c506bcbd4a27273d9b12f5018ae87f6362bbc1491d9b84e8ee4ea61f2
MD5 88532406c5c6ae4d56baec25bd982c64
BLAKE2b-256 cea41dfc1df5e0a0886203adb5a1974c69315608dd23c7239d004b52c06160d7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page