From d6e04bae8e770b867000276c16fca5ae9fd57496 Mon Sep 17 00:00:00 2001 From: Denis Lehmann Date: Tue, 23 Nov 2021 19:11:28 +0100 Subject: [PATCH 01/10] update pixelation argument --- huepaper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/huepaper.py b/huepaper.py index 1d53826..79268b9 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", From 32d83f1820da351dfe3b3e94236c1a6779794c21 Mon Sep 17 00:00:00 2001 From: Denis Lehmann Date: Wed, 24 Nov 2021 08:40:12 +0100 Subject: [PATCH 02/10] add numpy --- requirements.txt | 1 + setup.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 0861ac0..be5d6d3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ colour +numpy pillow diff --git a/setup.py b/setup.py index 0976e7a..04b0bcf 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", "pillow"], + install_requires=["colour", "numpy", "pillow"], ) From dcfdab89448d0da672a929d08777d4ddfc3d537b Mon Sep 17 00:00:00 2001 From: Denis Lehmann Date: Wed, 24 Nov 2021 08:40:20 +0100 Subject: [PATCH 03/10] update README --- README.org | 56 +++++++++++++++++------------------------------------- 1 file changed, 17 insertions(+), 39 deletions(-) diff --git a/README.org b/README.org index 5666078..b95dff2 100644 --- a/README.org +++ b/README.org @@ -1,7 +1,4 @@ * huepaper - a colorful wallpaper generator - :PROPERTIES: - :CUSTOM_ID: huepaper - :END: #+caption: Logo [[./images/logo.png]] @@ -11,54 +8,35 @@ You can find [[#examples][examples]] below. ** 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: - #+begin_example sh - nix run github:Deleh/huepaper - #+end_example + : $ nix run github:Deleh/huepaper Parameters can be passed by appending a double-dash: - #+begin_example sh - nix run github:Deleh/huepaper -- -hue 0.5 --color lightblue - #+end_example + : $ nix run github:Deleh/huepaper -- -hue 0.5 --color lightblue 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: - #+begin_example sh - pip install -r requirements.txt - ./huepaper.py + : $ pip install -r requirements.txt + : $ ./huepaper.py #+end_example To install it in your Python environment run: - #+begin_example sh - python setup.py install - #+end_example + : $ python setup.py install ** Usage - :PROPERTIES: - :CUSTOM_ID: usage - :END: - #+begin_example text + #+begin_example 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. @@ -77,7 +55,7 @@ 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 @@ -88,7 +66,7 @@ -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. @@ -102,9 +80,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. @@ -116,35 +94,35 @@ =huepaper= - -------------- + ----- #+caption: Huepaper 1 [[./images/huepaper_2.png]] =huepaper -c lightgreen= - -------------- + ----- #+caption: Huepaper 3 [[./images/huepaper_3.png]] =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= - -------------- + ----- #+caption: Huepaper 5 [[./images/huepaper_5.png]] =huepaper -hue 0.3 -lmin 0.5 -lmax 0.5 -l 0.5 -P 64x36= - -------------- + ----- #+caption: Huepaper 6 [[./images/huepaper_6.png]] From 1fe736523ede7ba4c75c447f4fe4f07fc18ce19d Mon Sep 17 00:00:00 2001 From: Denis Lehmann Date: Thu, 25 Nov 2021 13:38:06 +0100 Subject: [PATCH 04/10] update arg description --- huepaper.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/huepaper.py b/huepaper.py index 79268b9..6265d28 100755 --- a/huepaper.py +++ b/huepaper.py @@ -126,13 +126,13 @@ if __name__ == "__main__": "-smin", default=0.2, type=float, - help="minimum satisfaction for colors in range [0, 1] (default: 0.2)", + help="minimum saturation for colors in range [0, 1] (default: 0.2)", ) parser.add_argument( "-smax", default=1.0, type=float, - help="maximum satisfaction for colors in range [0, 1] (default: 1.0)", + help="maximum saturation for colors in range [0, 1] (default: 1.0)", ) parser.add_argument( "-lmin", @@ -164,6 +164,9 @@ if __name__ == "__main__": lum_min = args.lmin lum_max = args.lmax + print(vars(args)) + exit() + # Get size try: values = size.split("x") From c04a4b4357200508b3b7de46d7f016da8161cefa Mon Sep 17 00:00:00 2001 From: Denis Lehmann Date: Thu, 25 Nov 2021 13:38:17 +0100 Subject: [PATCH 05/10] update README --- README.org | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.org b/README.org index b95dff2..faa7d2c 100644 --- a/README.org +++ b/README.org @@ -60,8 +60,8 @@ -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 satisfaction for colors in range [0, 1] (default: 0.2) - -smax SMAX maximum satisfaction for colors in range [0, 1] (default: 1.0) + -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) -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 @@ -92,39 +92,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 From bb641ed2ec3968548cb8d71d754274876fe80404 Mon Sep 17 00:00:00 2001 From: Denis Lehmann Date: Sat, 27 Nov 2021 17:14:12 +0100 Subject: [PATCH 06/10] update README --- README.org | 1 + 1 file changed, 1 insertion(+) diff --git a/README.org b/README.org index faa7d2c..c49f592 100644 --- a/README.org +++ b/README.org @@ -6,6 +6,7 @@ *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 even more examples visit the Mastodon [[https://botsin.space/@huebot][huebot]]. ** Installation From 20407dfc78aa1f1e544d44bd7fd0eecac946c6d6 Mon Sep 17 00:00:00 2001 From: Denis Lehmann Date: Sat, 27 Nov 2021 17:16:43 +0100 Subject: [PATCH 07/10] update README --- README.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.org b/README.org index c49f592..4929b88 100644 --- a/README.org +++ b/README.org @@ -6,7 +6,7 @@ *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 even more examples visit the Mastodon [[https://botsin.space/@huebot][huebot]]. + For more examples visit the Mastodon [[https://botsin.space/@huebot][huebot]]. ** Installation From ab7f6def08ac2192bcdbed9f36239d47461e9b7a Mon Sep 17 00:00:00 2001 From: Denis Lehmann Date: Wed, 12 Jan 2022 02:00:42 +0100 Subject: [PATCH 08/10] remove debug output --- huepaper.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/huepaper.py b/huepaper.py index 6265d28..21f75bf 100755 --- a/huepaper.py +++ b/huepaper.py @@ -164,9 +164,6 @@ if __name__ == "__main__": lum_min = args.lmin lum_max = args.lmax - print(vars(args)) - exit() - # Get size try: values = size.split("x") From 72ad0d4cd04e6919bc163dd0b2160f0251a29f57 Mon Sep 17 00:00:00 2001 From: Denis Lehmann Date: Wed, 12 Jan 2022 02:03:17 +0100 Subject: [PATCH 09/10] update flake inputs --- flake.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index ee220aa..53d881a 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "flake-utils": { "locked": { - "lastModified": 1637014545, - "narHash": "sha256-26IZAc5yzlD9FlDT54io1oqG/bBoyka+FJk5guaX4x4=", + "lastModified": 1638122382, + "narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=", "owner": "numtide", "repo": "flake-utils", - "rev": "bba5dcc8e0b20ab664967ad83d24d64cb64ec4f4", + "rev": "74f7e4319258e287b0f9cb95426c9853b282730b", "type": "github" }, "original": { @@ -17,11 +17,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1637155076, - "narHash": "sha256-26ZPNiuzlsnXpt55Q44+yzXvp385aNAfevzVEKbrU5Q=", + "lastModified": 1641710811, + "narHash": "sha256-yVJ+CtwWZY8BnkNIJ/ue5a28yrRM6CkDF1LvmGmqqwM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "715f63411952c86c8f57ab9e3e3cb866a015b5f2", + "rev": "0ecf7d414811f831060cf55707c374d54fbb1dec", "type": "github" }, "original": { From 048805bf049a6627c7611b4ec88617806e94d795 Mon Sep 17 00:00:00 2001 From: Denis Lehmann Date: Tue, 14 Feb 2023 21:43:13 +0100 Subject: [PATCH 10/10] update flake inputs --- flake.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 53d881a..47d5708 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "flake-utils": { "locked": { - "lastModified": 1638122382, - "narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=", + "lastModified": 1676283394, + "narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=", "owner": "numtide", "repo": "flake-utils", - "rev": "74f7e4319258e287b0f9cb95426c9853b282730b", + "rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073", "type": "github" }, "original": { @@ -17,11 +17,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1641710811, - "narHash": "sha256-yVJ+CtwWZY8BnkNIJ/ue5a28yrRM6CkDF1LvmGmqqwM=", + "lastModified": 1676300157, + "narHash": "sha256-1HjRzfp6LOLfcj/HJHdVKWAkX9QRAouoh6AjzJiIerU=", "owner": "nixos", "repo": "nixpkgs", - "rev": "0ecf7d414811f831060cf55707c374d54fbb1dec", + "rev": "545c7a31e5dedea4a6d372712a18e00ce097d462", "type": "github" }, "original": {