Metadata-Version: 2.1
Name: redundantcss
Version: 0.0.2
Summary: Identifies redundant CSS classes not used by the templates provided.
Author: Josh Hofer
Author-email: <josh@securesap.com>
Keywords: python,css,html,redundantcss,remove unused css
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: Unix
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: beautifulsoup4


# RedundantCSS



### **Contents:**

- [Description](#description)

- [Installation](#installation)

- [Usage](#usage)



## **Description:**

This script analyzes a stylesheet and identifies redundant CSS classes not used by the templates provided. The script prints the names of all unused classes to the terminal, at which point you can go to the stylesheet and delete unused classes.

<br>



**COMING IN V2:** Remove the manual aspect of removing the CSS and give user the option for this process to be done automatically.

<hr>



## **Installation:**

    pip install redundantcss



<hr>



## **Usage:**

    redundantcss 'stylesheet_path' 'template_path_or_template_paths'



or



    redundantcss 'stylesheet_path' 'template_path_or_template_paths'



Arguments:

  - 'stylesheet_path': Path to the CSS stylesheet to be analyzed.

  - 'template_path_or_template_paths': Path to a folder containing HTML templates or paths to individual template files.



Examples:

  1. Analyze a single template:

     python redundantcss.py 'styles.css' 'template.html'



  2. Analyze multiple templates in a folder:

     python redundantcss.py 'styles.css' 'templates/'



  3. Analyze multiple templates provided as separate arguments:

     python redundantcss.py 'styles.css' 'template1.html' 'template2.html' 'template3.html'
