1.0.2 • Published 4 years ago

bingpaper v1.0.2

Weekly downloads
3
License
ISC
Repository
github
Last release
4 years ago

bingpaper

Package of utils to get bing daily wallpaper and set it as wallpaper to your PC.

install from npm

$ npm install --save bingpaper

how to use

//only for CommonJS
//create test.js 
const bingUtils = require('bingpaper');
bingUtils.setWallpaper();

//in terminal
node test

and you will find your wallpaper on desktop changed to lastest bing wallpaper.

the picture is stored in C:\Users\Administrator\Pictures in default

useful utils

here, I offer some useful utils for you.

  1. get information about bing wallpaper, including urls of these pictures bingUtils.featchPicInfo(options, callback)
parameterstyperequireddefaultothers
optionsObjectNo{}for options parameters
options.nNumberNo1maximum is 7,download numbers of pictures
options.formatStringNo'js'request format, don't change
options.idsnumberNo0I don't know, don't change
callbackFunctionYesdefault contains image info, type of this parameter is Array
  1. get picture urls bingUtils.featchPicURLs(options, callback)
parameterstyperequireddefaultothers
optionsObjectNo{}for options parameters
options.nNumberNo1maximum is 7,download numbers of pictures
options.formatStringNo'js'request format, don't change
options.idsnumberNo0I don't know, don't change
callbackFunctionYesdefault contains urls, type of this parameter is Object
  1. download these pictures bingUtils.downloadPic(url, options, callback)
parameterstyperequireddefaultothers
urlStringYesa url to download a picture
optionsObjectNo{}for options parameters
options.nameStringNodate of this daygive a name for your picture
options.pathStringNoC:\Users\Administrator\Pictureswhere you save your picture
callbackFunctionYeswhen you finish download your picture
  1. straightly set your desktop wallpaper as today's bing wallpaper bingUtils.setWallpaper()

Tip 1: I failed to wabpack this project. anybody can help me?

Tip 2: If you have no idea what I just said, go and see test of this project

Tip 3: You can run Set.bat to set your desktop wallpaper

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago