A script which gives the most minimal css file depending on html document.

Aditya Sukhlecha 77cda21522 css generated 3 سال پیش
LICENSE.md 040aa965f2 added pre version 3 سال پیش
README 5b648731ab changed to selectors, added to do comments 3 سال پیش
cirrus.css 96674dc53f added parsing for separating css classes, tags and blocks 3 سال پیش
essays.html 5b648731ab changed to selectors, added to do comments 3 سال پیش
essays_cirrus.css 77cda21522 css generated 3 سال پیش
kamitkami.py 22caa6b7af scrapy code added 3 سال پیش

README

KamitKami is a python script which takes as input 2 files of foo.css and bar.html and outputs
a smaller bar_foo.css file to be included in bar.html . bar_foo.css has only the elements used in bar.html
and no more. This helps the site to load faster.

python kamitkami.py foo bar

YET TO DO
1. Find list of css format to be kept according to https://www.w3schools.com/cssref/css_selectors.asp from the html included tags, classes and keep only those.
2. Create loop over folder for multiple css file generation.
3. Minify generated css optionally by keeping a keyword.
4. Remove dependency of bs4 and use html.parser already in python.

Defer
Find id tags which exist in html