BurritoKingdom
In Burrito Kingdom, you have little say over the images used in your projects. In Burrito Kingdom, we replace every image file in a directory of your choice with a random Google image based on keyword(s) of your choice.
Functions
burritorizeFolder(directory, keywords, safeSearch, callback)
Replaces all of the image files in the relative directory with Google image search results.
Arguments
directory
- Relative path (string) to the directory you'd like to fill with random images.keywords
- Single string of keywords as you would type into a Google search bar. If set tonull
,''
, or any otherfalse
-y value, the search term will default to the name of the file being replaced.safeSearch
-true
orfalse
.
Example
var burritoKingdom = ; var directory = './public/imgs';var keywords = 'burrito';var safeSearch = false; burritoKingdom;
burritoWatch(directory, keywords, safeSearch)
Like burritorizeFolder
, except that it continues to watch the directory for one additional change per file (or any added file).
Arguments
directory
- Relative path (string) to the directory you'd like to fill with random images.keywords
- Single string of keywords as you would type into a Google search bar. If set tonull
,''
, or any otherfalse
-y value, the search term will default to the name of the file being replaced.safeSearch
-true
orfalse
.
Example
var burritoKingdom = ; var directory = './public/imgs';var keywords = 'burrito';var safeSearch = false; burritoKingdom;// ./public/imgs will be filled with burritos. If one// of those images was changed to something else, it will// turn it back into a burrito picture (up to once per file).// It will also replace any image added to that folder// (while running) with a burrito.