thttpd-index-parser
Parse thttpd index pages
Overview
There's really not much to say. thttpd provides a stable, if ugly, autoindex page. I have reason to parse this page. The rest is history.
Installation
$ npm install thttpd-index-parser
OR
$ git clone git://github.com/deoxxa/thttpd-index-parser.git node_modules/thttpd-index-parser
Usage
This is about it. There's not much to know.
#!/usr/bin/env node var parser = request = ; ;
parser.parse returns an array of objects, one for each entry in the list. The structure of those objects is as follows.
A file:
"url": "http://a.fully.qualified.domain/and/the/whole/path" "time": "Sun Sep 16 2012 00:33:35 GMT+1000 (EST)" "size": 12345
A directory:
"url": "http://same.as.above/but/the/path/ends/in/a/slash/" "time": "Sun Sep 16 2012 00:33:35 GMT+1000 (EST)" "size": null
License
3-clause BSD. A copy is included with the source.
Contact
- GitHub (deoxxa)
- Twitter (@deoxxa)
- ADN (@deoxxa)
- Email (deoxxa@fknsrs.biz)