Python 3 script to find A HREF attributes that do not match their corresponding link text if it's an URL.
Find a file
2023-11-11 12:08:31 +01:00
feed-check.py Provides initial feed-check script 2023-11-11 12:08:31 +01:00
LICENSE Provides initial feed-check script 2023-11-11 12:08:31 +01:00
README.md Provides initial feed-check script 2023-11-11 12:08:31 +01:00

atom-feed-link-check

This Python script checks an XML file for mismatches between link text and href attributes in the 'content.encoded' nodes of an ATOM feed.

Prerequisites

  • Python 3.x
  • xml.etree.ElementTree library (usually included in Python standard library)

Usage

  1. Clone this repository or download the feed-check.py script.

  2. Open a terminal and navigate to the directory containing the script.

  3. Run the script by providing the path to your XML file:

    python feed-check.py path/to/your/xml/file.xml
    
    

Example:

python feed-check.py example.xml

View the file feed-check-result.txt for any detected mismatches.

Output

The script will print information about any mismatches found, including the title of the item, link text, and href value.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Code assistance provided by ChatGPT.