diff --git a/README.org b/README.org index 4929b88..5666078 100644 --- a/README.org +++ b/README.org @@ -1,4 +1,7 @@ * huepaper - a colorful wallpaper generator + :PROPERTIES: + :CUSTOM_ID: huepaper + :END: #+caption: Logo [[./images/logo.png]] @@ -6,38 +9,56 @@ *huepaper* creates wallpapers based on color hues. Bring a little color in your life by randomness, because every huepaper is truly unique. You can find [[#examples][examples]] below. - For more examples visit the Mastodon [[https://botsin.space/@huebot][huebot]]. ** Installation + :PROPERTIES: + :CUSTOM_ID: installation + :END: *** Nix + :PROPERTIES: + :CUSTOM_ID: nix + :END: This project is a [[https://nixos.wiki/wiki/Flakes][Nix Flake]]. - If you have a recent version of the [[https://nixos.org/][Nix package manager]] installed and Flakes are enabled, run huepaper like this: + If you have a recent version of the [[https://nixos.org/][Nix package manager]] installed and flakes are enabled, run huepaper like this: - : $ nix run github:Deleh/huepaper + #+begin_example sh + nix run github:Deleh/huepaper + #+end_example Parameters can be passed by appending a double-dash: - : $ nix run github:Deleh/huepaper -- -hue 0.5 --color lightblue + #+begin_example sh + nix run github:Deleh/huepaper -- -hue 0.5 --color lightblue + #+end_example Global installation can be done by including this flake in your flaked NixOS configuration as always :) *** Legacy + :PROPERTIES: + :CUSTOM_ID: legacy + :END: Execute the following steps to run huepaper: - : $ pip install -r requirements.txt - : $ ./huepaper.py + #+begin_example sh + pip install -r requirements.txt + ./huepaper.py #+end_example To install it in your Python environment run: - : $ python setup.py install + #+begin_example sh + python setup.py install + #+end_example ** Usage + :PROPERTIES: + :CUSTOM_ID: usage + :END: - #+begin_example + #+begin_example text usage: huepaper [-h] [-s SIZE] [-c COLOR] [-np] [-o OUTPUT] [-l [LINES]] [-lb [LINES_BRIGHT]] [-ld [LINES_DARK]] [-P [PIXELATE]] [-e EMBLEM] [-hue HUE] [-smin SMIN] [-smax SMAX] [-lmin LMIN] [-lmax LMAX] Create wallpapers based on color hues. @@ -56,18 +77,18 @@ include one to three bright random lines with given opacity in range [0, 1] (default: 0.1) -ld [LINES_DARK], --lines_dark [LINES_DARK] include one to three dark random lines with given opacity in range [0, 1] (default: 0.1) - -p [PIXELATE], --pixelate [PIXELATE] + -P [PIXELATE], --pixelate [PIXELATE] pixelate image with WIDTHxHEIGHT (default: 16x9) -e EMBLEM, --emblem EMBLEM emblem to add in the center of the huepaper -hue HUE maximum hue to differ from given color in range [0, 1] (default: 0.1) - -smin SMIN minimum saturation for colors in range [0, 1] (default: 0.2) - -smax SMAX maximum saturation for colors in range [0, 1] (default: 1.0) + -smin SMIN minimum satisfaction for colors in range [0, 1] (default: 0.2) + -smax SMAX maximum satisfaction for colors in range [0, 1] (default: 1.0) -lmin LMIN minimum luminance for colors in range [0, 1] (default: 0.2) -lmax LMAX maximum luminance for colors in range [0, 1] (default: 0.9) #+end_example - All image operations are called in order of the help file. E.g. pixelate (=-p=) is called after adding lines (=-l=). + All image operations are called in order of the help file. E.g. pixelate (=-P=) is called after adding lines (=-l=). If you set the color via =-c= it is not guaranteed, that it is included in the huepaper. Colors, similar to the given one are chosen. @@ -81,9 +102,9 @@ If you want an offset, e.g. put it in the left bottom corner, provide an emblem file with the size of the huepaper, transparent background and your emblem in the bottom left corner. ** Examples - :properties: - :custom_id: examples - :end: + :PROPERTIES: + :CUSTOM_ID: examples + :END: Please note, that every huepaper call generates a new random image. You will never get the same huepaper twice. @@ -93,39 +114,39 @@ #+caption: Huepaper 1 [[./images/huepaper_1.png]] - : $ huepaper + =huepaper= - ----- + -------------- #+caption: Huepaper 1 [[./images/huepaper_2.png]] - : $ huepaper -c lightgreen + =huepaper -c lightgreen= - ----- + -------------- #+caption: Huepaper 3 [[./images/huepaper_3.png]] - : $ huepaper -c "#ff7f50" -lb 0.05 + =huepaper -c "#ff7f50" -lb 0.05= - ----- + -------------- #+caption: Huepaper 4 [[./images/huepaper_4.png]] - : $ huepaper -hue 1.0 -lmin 0.3 -lmax 0.6 -smin 0.8 -smax 1.0 + =huepaper -hue 1.0 -lmin 0.3 -lmax 0.6 -smin 0.8 -smax 1.0= - ----- + -------------- #+caption: Huepaper 5 [[./images/huepaper_5.png]] - : $ huepaper -hue 0.3 -lmin 0.5 -lmax 0.5 -l 0.5 -P 64x36 + =huepaper -hue 0.3 -lmin 0.5 -lmax 0.5 -l 0.5 -P 64x36= - ----- + -------------- #+caption: Huepaper 6 [[./images/huepaper_6.png]] - : $ huepaper -l -lb -ld -e nixos.png + =huepaper -l -lb -ld -e nixos.png= diff --git a/flake.lock b/flake.lock index 47d5708..ee220aa 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "flake-utils": { "locked": { - "lastModified": 1676283394, - "narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=", + "lastModified": 1637014545, + "narHash": "sha256-26IZAc5yzlD9FlDT54io1oqG/bBoyka+FJk5guaX4x4=", "owner": "numtide", "repo": "flake-utils", - "rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073", + "rev": "bba5dcc8e0b20ab664967ad83d24d64cb64ec4f4", "type": "github" }, "original": { @@ -17,11 +17,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1676300157, - "narHash": "sha256-1HjRzfp6LOLfcj/HJHdVKWAkX9QRAouoh6AjzJiIerU=", + "lastModified": 1637155076, + "narHash": "sha256-26ZPNiuzlsnXpt55Q44+yzXvp385aNAfevzVEKbrU5Q=", "owner": "nixos", "repo": "nixpkgs", - "rev": "545c7a31e5dedea4a6d372712a18e00ce097d462", + "rev": "715f63411952c86c8f57ab9e3e3cb866a015b5f2", "type": "github" }, "original": { diff --git a/huepaper.py b/huepaper.py index 21f75bf..1d53826 100755 --- a/huepaper.py +++ b/huepaper.py @@ -107,7 +107,7 @@ if __name__ == "__main__": help="include one to three dark random lines with given opacity in range [0, 1] (default: 0.1)", ) parser.add_argument( - "-p", + "-P", "--pixelate", nargs="?", const="16x9", @@ -126,13 +126,13 @@ if __name__ == "__main__": "-smin", default=0.2, type=float, - help="minimum saturation for colors in range [0, 1] (default: 0.2)", + help="minimum satisfaction for colors in range [0, 1] (default: 0.2)", ) parser.add_argument( "-smax", default=1.0, type=float, - help="maximum saturation for colors in range [0, 1] (default: 1.0)", + help="maximum satisfaction for colors in range [0, 1] (default: 1.0)", ) parser.add_argument( "-lmin", diff --git a/requirements.txt b/requirements.txt index be5d6d3..0861ac0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,2 @@ colour -numpy pillow diff --git a/setup.py b/setup.py index 04b0bcf..0976e7a 100644 --- a/setup.py +++ b/setup.py @@ -17,5 +17,5 @@ setup( license="LICENSE", description="A colorful wallpaper generator", long_description=open("README.org").read(), - install_requires=["colour", "numpy", "pillow"], + install_requires=["colour", "pillow"], )