Closed gobelinus closed 6 years ago
Thanks. That's a good start but I think it needs some thought.
You can already supply multiple URLs but you do it from the outside. I.e. you can write a script that does the spidering and then calling mincss from there. Would you consider making it some sort of plugin? Perhaps a repo called recursive-mincss
.
you can write a script that does the spidering and then calling mincss from there.
That was the purpose of writing recursive thing to avoid usage of external script. It can always be converted to a plugin but any outside script/plugin will result in duplication specially wrt fetching urls, and parsing html.
Alternatively, I think we can have a new param which can determine recursive nature.
e.g.
if self.recursive \
and url not in self.url_queue:
self.url_queue.append(url)
Too old now.
Given a url, tries to find urls from a['href'] and parses them if links are from same host, basically to handle use case when same css file is used across multiple pages and instead of passing multiple urls, single url will do.
Also ignores, urls like 'javascript:', 'mailto:'.
Ignores query string and fragments from url while comparing urls.