#graphics #cli #image #wallpaper #api

app wallhaven

A CLI for quickly access WallHaven API for downloading wallpapers

1 unstable release

0.1.0 Aug 25, 2022

#1902 in Command line utilities

MIT license

18KB
336 lines

github crates

Wallhaven is CLI for downloading quickly and easily wallpaper from Wallhaven using their API



Usage

Set API key

wallhaven --set-api "asdjj188371jjasdGGJASUUEWQJ8" 

Search without API key and query

wallhaven -q "anime +cat" -s VIEWS -x 110 -a 1920x1080 -p ~/.Pictures/wallpapers

Search without API key and color

wallhaven -C 0066cc -s FAVORITES -a 1920x1080 -p ~/.Pictures/wallpapers

Search with API user preferences

wallhaven -q "nature -mountain" -s TOPLIST -p ~/.Pictures/wallpapers

Search overwriting API user preferences with given preferences (one use)

wallhaven -q "mountain" -n -c 101 -p ~/.Pictures/wallpapers

Search as non-user ignoring API stored user

wallhaven -q "mountain" -n -c 101 -p ~/.Pictures/wallpapers

Installation

Cargo:

You can install the binary crate directly

cargo install wallhaven 

Manual Installation:

you can clone wallhaven repo and build it locally

git clone https://github.com/dax99993/wallhaven
cd wallhaven 
cargo install --path .

Features

  • API key support
  • Downloading progress bar
  • Overwrite API preferences but keep NSFW from API.
  • Made with love <3

Todo

  • Replace the love in exchange for good code.
  • Refactor Code
  • Add more helpful argument description and examples
  • Learn about async code to implement it correctly.

Notes

  • I'm new in Rust so, a lot of unclean and ugly code.
  • If you create a good version similar to this program please notify me at dax99993@gmail.com, i want to see a good code example of this program.

License

MIT

Dependencies

~9–16MB
~324K SLoC