Lolibooru randomiser
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Avril 82b55693b2
fixed?
5 years ago
.gitignore Initial commit 5 years ago
README Initial commit 5 years ago
loli.js fixed? 5 years ago
package-lock.json Initial commit 5 years ago
package.json Initial commit 5 years ago
randomise.js Initial commit 5 years ago

README

Pulls random images from lolibooru.

Usage:
	require("hashloli").randomise(function(datas) {
		if(!datas)
		{
			//Error
			console.log(this.error);
			return;
		}
		datas.forEach(function(data) {
			if(data) {
				let file_url = data.file_url;
				//Do stuff
				
			} else {
				//Error
			}
		}
	});

randomise() can take a second argument to specify configuration. The default is
	new require("hashloli").Config();
See randomise.js for an example.

Command line usage:
	node randomise.js [--verbose] [--debug] [--range=<range>] [--number=<number>] [--page=<page>] [<tags ...>]
Echos either the file url or `undefined' if there was an error. Echos full data in JSON if --verbose is supplied, also prints debug and error messages if --debug is supplied.
The default range is 5.
The default number is 1.
The default (max) page is 150.
If the number exceeds the range then the range is set equal to the number.

More advanced example:
	node randomise.js --verbose --page=10 --number=5 flandre_scarlet blush 

Npm dependancies:
	xmlhttprequest