Giter VIP home page Giter VIP logo

haijin_kabe's Introduction

Haijin-Kabe 廢人壁

給二次元黨的開發者們

其他語言版本: English

簡介

身為二次元黨,總是不斷的更換壁紙,於是做了個更換壁紙的排程腳本,目前支援OSX與Windows版本.

特色

  • Ruby ftw
  • 可擴充圖源網站
  • 使用Ruby介面管理Crontab計畫任務 (Whenever)
  • 抓取圖片數據以及用戶驗證 (Mechanize)
  • 自動判斷作業系統 (os)
  • 週期性從Pixiv Rank或其它第三方API隨機抓取圖片做為桌面壁紙

倉庫

Github

如何部署

依賴

  • Ruby (建議2.0.0以上) Windows用戶可在 RubyInstaller找到一鍵安裝包
  • Bundler
  • Pixiv用戶帳號(Optional)

安裝與配置

  1. 解壓縮目錄後,使用文字編輯器打開config目錄下名為kabe_setting.yaml檔案,設定圖源(預設為pixiv.moe),如為pixiv則需要一併輸入pixiv用戶名與密碼
# 可選擇從Pixiv官網或第三方源如 pixiv.moe作為圖源
# -'//pixiv.moe'
# -'//pixiv.net'
source: '//pixiv.moe'

# 當選擇從Pixiv官網作為圖源时,需要Pixiv用戶信息作為用戶驗證,否則將返回403錯
pixiv:
  account: 
  password: 

#抓取圖片與更換壁紙的頻率
#分鐘
frequency:
  #切換壁紙的週期(分鐘)
  change_wallpapper: 15
  #收集壁紙的週期(分鐘)
  download_new_image: 60
  1. 於解壓縮目錄下,執行初始化
bundle install
ruby init.rb
  1. 調整背景(Optional) 於[調整桌面背景]中將壁紙放置方式改為[符合螢幕大小]

haijin_kabe's People

Contributors

cwkenwaysun avatar timwei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

kwh3884858 lcylym

haijin_kabe's Issues

无法运行,提示出错,缺少文件

$ ruby init.rb
Initializing...
Downloading images
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- mechanize (LoadError)
	from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /Users/oldzhg/develop/haijin_kabe/lib/download.rb:4:in `<top (required)>'
	from init.rb:3:in `require_relative'
	from init.rb:3:in `<main>'

系统环境:MacBook Air , OS X10.13.2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.