All Projects → songchenwen → lovebizhi-collector

songchenwen / lovebizhi-collector

Licence: other
This is a nodejs script that uses lovebizhi apis to collect wallpapers, and auto change wallpapers for OS X.

Programming Languages

javascript
184084 projects - #8 most used programming language
shell
77523 projects
applescript
352 projects

Lovebizhi Collector

This is a nodejs script that uses lovebizhi apis to collect wallpapers, and auto change wallpapers for OS X. Chinese Post

Usage

If you haven't installed nodejs, you can use Homebrew to install it.

brew install node
  1. Clone this script.
  2. node install to install all the dependencies.
  3. Add a new file config.
  4. Put OUTPATH="/path/to/your/folder/for/wallpapers" in config.

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

Auto Start

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

Configuration

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
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].