autoindex

parse an autoindex page into JSON (client or server-side)

Ever wanted to take an autoindex page use that data programmatically? Now you can.

View the Project on GitHub weisjohn/autoindex

adaptive-backgrounds demo

example (refresh for different):

$(function() {
    var $wrap = $(".wrap");
    autoindex("http://i.johnweis.com/instagram/", function(e, imgs) {
        imgs.files.forEach(function(f) {
            $("<img />").attr('src', f.url).appendTo($wrap);
        });
    });
});

server-side

npm install autoindex then:

var autoindex = require('autoindex');

client-side

bower install autoindex or download the index.js file

autoindex works with or without jQuery. If you need legacy browser support, make sure to add jQuery to your page. To use autoindex, simply add it to your page via a <script> tag or use RequireJS.

NOTE: If you wish to use this in the browser, enable CORS on that site.

do no evil

If you're going to use this to write webcrawlers, rate-limit yourself.