While I have seen several questions similar to the one I am going to ask, for e.g. How can I convert all the html files I get into text files after a wget command?
I also saw a blog post which describes and have seen it works. I tried it even locally and found even that works but in local files i.e. files which are residing say in some /usr/share/doc/$PACKAGENAME/index.html and number of pages linked therein, there should be an easier way to get at least the top page.
I tried doing something like -
html2text file:///usr/share/doc/$PACKAGENAME/html/index.html > packagename-doc.txt
but that didn't work.
I get the output -
Cannot open input file "file:///usr/share/doc/$PACKAGENAME/html/index.html".
I am not giving any package names as it doesn't really matter and there are so many packages which nowadays give documentation in html pages rather than man or info but that's outside the topic altogether.
Can somebody either tell why or give an alternative way of doing it either via html2text or some other tool which does it in a simple way .