This is a nodejs script that uses lovebizhi apis to collect wallpapers, and auto change wallpapers for OS X. Chinese Post
If you haven't installed nodejs, you can use Homebrew to install it.
brew install node
- Clone this script.
node install
to install all the dependencies.- Add a new file
config
. - Put
OUTPATH="/path/to/your/folder/for/wallpapers"
inconfig
.
The following shell commands will do all the work above. You just need to change "/path/to/your/folder/for/wallpapers" to the absolute path in which you want to store your collected wallpapers.
OUTPATH="/path/to/your/folder/for/wallpapers"
mkdir lovebizhi-collecor
cd lovebizhi-collecor
git clone "https://github.com/songchenwen/lovebizhi-collector.git" .
npm install
touch config
echo "OUTPATH=\"$OUTPATH\"" > config
Then you can run run.sh
to begin collectting the wallpapers.
sh run.sh
There is a shell script you can use to add a LaunchAgent
to the OS X system to auto run the collector at an interval.
sh add_launch_agent.sh
You can edit the following lines in index.js
to configure this script.
var categories = [API.categories.landscape, API.categories.plant];
var screenWidth = 2560;
var screenHeight = 1600;
var maxFileCount = 100;
The available catetories are listed below:
API.categories.moviestar
API.categories.landscape
API.categories.beauty
API.categories.plant
API.categories.animal
API.categories.game
API.categories.cartoon
API.categories.festival
API.categories.car
API.categories.food
API.categories.sport