Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package wayshot for openSUSE:Factory checked 
in at 2022-09-28 17:51:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/wayshot (Old)
 and      /work/SRC/openSUSE:Factory/.wayshot.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "wayshot"

Wed Sep 28 17:51:58 2022 rev:6 rq:1006618 version:1.2.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/wayshot/wayshot.changes  2022-08-04 
13:24:03.380599581 +0200
+++ /work/SRC/openSUSE:Factory/.wayshot.new.2275/wayshot.changes        
2022-09-28 17:52:02.163266395 +0200
@@ -1,0 +2,33 @@
+Wed Sep 21 08:41:41 UTC 2022 - socvirnyl.est...@gmail.com
+
+- Update to version 1.2.2:
+  * [bump] 1.2.2
+  * [clippy] Remove PartialEq, Eq warning
+  * [build.rs] Properly gzip the scdoc output
+  * [update] ignore scdoc output files
+  * [rustfmt] Fix formatting build.rs
+  * [contrib/pkgbuild/bin] Update wayshot version
+  * [bump] 1.2.1
+  * [build.rs] Fix scdoc parent stdio inheritance
+  * [contrib/pkgbuild/bin] Update wayshot version
+  * [bump] 1.2.0
+  * [chore] Bump dependencies
+  * [BuildSystem]Don't depend on system shell for scd
+  * [BuildSystem] Update install step
+  * [contrib/pkgbuild/bin] Update makedeps
+  * [contrib/pkgbuild] Fix man-page install paths
+  * [docs/readme] Formattinge error
+  * [Restructure] Move pkgbuilds into PKGBUILD
+  * [contrib/pkgbuild/bin] Add man-page support
+  * [contrib/pkgbuild/git]Add man-pages to git package
+  * [BuildSystem] Improve man page installation
+  * [contrib/pkgbuild/git] Add scdoc to makedeps
+  * [build.rs] Binary existence check
+  * [workflow] doc generation
+  * [docs]Introduce scdoc generation in rust build sys
+  * [chore] Cargo.lock
+  * [contrib/pkgbuild/bin] update pkgbuild version
+  * [backend.rs] PPM optimize performance
+  * [docs/readme] color picker example
+
+-------------------------------------------------------------------

Old:
----
  wayshot-1.1.9.tar.gz

New:
----
  wayshot-1.2.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ wayshot.spec ++++++
--- /var/tmp/diff_new_pack.a4yePs/_old  2022-09-28 17:52:02.763267602 +0200
+++ /var/tmp/diff_new_pack.a4yePs/_new  2022-09-28 17:52:02.767267610 +0200
@@ -19,7 +19,7 @@
 %global rustflags '-Clink-arg=-Wl,-z,relro,-z,now'
 
 Name:           wayshot
-Version:        1.1.9
+Version:        1.2.2
 Release:        0
 Summary:        Screenshot tool for wlroots based compositors
 License:        (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 OR MIT) AND 
(Apache-2.0 OR MIT) AND (Apache-2.0 OR MIT OR Zlib) AND (MIT OR Unlicense) AND 
(Apache-2.0 OR Zlib OR MIT) AND BSD-3-Clause AND ISC AND MIT AND Zlib AND 
BSD-2-Clause

++++++ _service ++++++
--- /var/tmp/diff_new_pack.a4yePs/_old  2022-09-28 17:52:02.795267666 +0200
+++ /var/tmp/diff_new_pack.a4yePs/_new  2022-09-28 17:52:02.799267674 +0200
@@ -3,7 +3,7 @@
     <param name="url">https://github.com/waycrate/wayshot.git</param>
     <param name="versionformat">@PARENT_TAG@</param>
     <param name="scm">git</param>
-    <param name="revision">bbbdc2c1ca3f8b7732829232bc960e63deb2c4db</param>
+    <param name="revision">31baff5</param>
     <param name="versionrewrite-pattern">(.*)</param>
     <param name="versionrewrite-replacement">\1</param>
     <param name="changesgenerate">enable</param>

++++++ vendor.tar.gz ++++++
/work/SRC/openSUSE:Factory/wayshot/vendor.tar.gz 
/work/SRC/openSUSE:Factory/.wayshot.new.2275/vendor.tar.gz differ: char 5, line 
1

++++++ wayshot-1.1.9.tar.gz -> wayshot-1.2.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wayshot-1.1.9/.github/workflows/build.yml 
new/wayshot-1.2.2/.github/workflows/build.yml
--- old/wayshot-1.1.9/.github/workflows/build.yml       2022-07-20 
15:51:15.000000000 +0200
+++ new/wayshot-1.2.2/.github/workflows/build.yml       2022-09-07 
15:54:36.000000000 +0200
@@ -28,3 +28,16 @@
     - name: Check formatting
       run: |
         cargo fmt -- --check
+
+  documentation:
+    runs-on: ubuntu-latest
+
+    steps:
+    - name: Checkout
+      uses: actions/checkout@v2
+
+    - name: Check docs
+      run: |
+        sudo apt update
+        sudo apt install --no-install-recommends scdoc
+        for file in $(find . -type f -iwholename "./docs/*.scd"); do scdoc < 
$file > /dev/null; done
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wayshot-1.1.9/.gitignore new/wayshot-1.2.2/.gitignore
--- old/wayshot-1.1.9/.gitignore        2022-07-20 15:51:15.000000000 +0200
+++ new/wayshot-1.2.2/.gitignore        2022-09-07 15:54:36.000000000 +0200
@@ -1 +1,3 @@
 target
+*.gz
+*.out
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wayshot-1.1.9/Cargo.lock new/wayshot-1.2.2/Cargo.lock
--- old/wayshot-1.1.9/Cargo.lock        2022-07-20 15:51:15.000000000 +0200
+++ new/wayshot-1.2.2/Cargo.lock        2022-09-07 15:54:36.000000000 +0200
@@ -9,12 +9,6 @@
 checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
 
 [[package]]
-name = "adler32"
-version = "1.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234"
-
-[[package]]
 name = "atty"
 version = "0.2.14"
 source = "registry+https://github.com/rust-lang/crates.io-index";
@@ -39,9 +33,9 @@
 
 [[package]]
 name = "bytemuck"
-version = "1.10.0"
+version = "1.12.1"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "c53dfa917ec274df8ed3c572698f381a24eef2efba9492d797301b72b6db408a"
+checksum = "2f5715e491b5a1598fc2bef5a606847b5dc1d48ea625bd3c02c00de8285591da"
 
 [[package]]
 name = "byteorder"
@@ -50,12 +44,6 @@
 checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
 
 [[package]]
-name = "cc"
-version = "1.0.73"
-source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11"
-
-[[package]]
 name = "cfg-if"
 version = "1.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index";
@@ -63,9 +51,9 @@
 
 [[package]]
 name = "clap"
-version = "3.2.13"
+version = "3.2.20"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "ac2bd7a1eb07da9ac757c923f69373deb7bc2ba5efc951b873bcb5e693992dca"
+checksum = "23b71c3ce99b7611011217b366d923f1d0a7e07a92bb2dbf1e84508c673ca3bd"
 dependencies = [
  "atty",
  "bitflags",
@@ -101,15 +89,6 @@
 ]
 
 [[package]]
-name = "deflate"
-version = "1.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "c86f7e25f518f4b81808a2cf1c50996a61f5c2eb394b2393bd87f2a4780a432f"
-dependencies = [
- "adler32",
-]
-
-[[package]]
 name = "downcast-rs"
 version = "1.2.0"
 source = "registry+https://github.com/rust-lang/crates.io-index";
@@ -128,14 +107,24 @@
 
 [[package]]
 name = "fastrand"
-version = "1.7.0"
+version = "1.8.0"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf"
+checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499"
 dependencies = [
  "instant",
 ]
 
 [[package]]
+name = "flate2"
+version = "1.0.24"
+source = "registry+https://github.com/rust-lang/crates.io-index";
+checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6"
+dependencies = [
+ "crc32fast",
+ "miniz_oxide",
+]
+
+[[package]]
 name = "hashbrown"
 version = "0.12.3"
 source = "registry+https://github.com/rust-lang/crates.io-index";
@@ -192,9 +181,9 @@
 
 [[package]]
 name = "libc"
-version = "0.2.126"
+version = "0.2.132"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836"
+checksum = "8371e4e5341c3a96db127eb2465ac681ced4c433e01dd0e938adbef26ba93ba5"
 
 [[package]]
 name = "log"
@@ -207,9 +196,9 @@
 
 [[package]]
 name = "memmap2"
-version = "0.5.5"
+version = "0.5.7"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "3a79b39c93a7a5a27eeaf9a23b5ff43f1b9e0ad6b1cdd441140ae53c35613fc7"
+checksum = "95af15f345b17af2efc8ead6080fb8bc376f8cec1b35277b935637595fe77498"
 dependencies = [
  "libc",
 ]
@@ -225,28 +214,15 @@
 
 [[package]]
 name = "miniz_oxide"
-version = "0.5.3"
+version = "0.5.4"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "6f5c75688da582b8ffc1f1799e9db273f32133c49e048f614d22ec3256773ccc"
+checksum = "96590ba8f175222643a85693f33d26e9c8a015f599c216509b1a6894af675d34"
 dependencies = [
  "adler",
 ]
 
 [[package]]
 name = "nix"
-version = "0.22.3"
-source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "e4916f159ed8e5de0082076562152a76b7a1f64a01fd9d1e0fea002c37624faf"
-dependencies = [
- "bitflags",
- "cc",
- "cfg-if",
- "libc",
- "memoffset",
-]
-
-[[package]]
-name = "nix"
 version = "0.24.2"
 source = "registry+https://github.com/rust-lang/crates.io-index";
 checksum = "195cdbc1741b8134346d515b3a56a1c94b0912758009cfd53f99ea0f57b065fc"
@@ -289,15 +265,15 @@
 
 [[package]]
 name = "once_cell"
-version = "1.13.0"
+version = "1.14.0"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1"
+checksum = "2f7254b99e31cad77da24b08ebf628882739a608578bb1bcdfc1f9c21260d7c0"
 
 [[package]]
 name = "os_str_bytes"
-version = "6.2.0"
+version = "6.3.0"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "648001efe5d5c0102d8cea768e348da85d90af8ba91f0bea908f157951493cd4"
+checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff"
 
 [[package]]
 name = "pkg-config"
@@ -307,39 +283,39 @@
 
 [[package]]
 name = "png"
-version = "0.17.5"
+version = "0.17.6"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "dc38c0ad57efb786dd57b9864e5b18bae478c00c824dc55a38bbc9da95dde3ba"
+checksum = "8f0e7f4c94ec26ff209cee506314212639d6c91b80afb82984819fafce9df01c"
 dependencies = [
  "bitflags",
  "crc32fast",
- "deflate",
+ "flate2",
  "miniz_oxide",
 ]
 
 [[package]]
 name = "proc-macro2"
-version = "1.0.40"
+version = "1.0.43"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "dd96a1e8ed2596c337f8eae5f24924ec83f5ad5ab21ea8e455d3566c69fbcaf7"
+checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab"
 dependencies = [
  "unicode-ident",
 ]
 
 [[package]]
 name = "quote"
-version = "1.0.20"
+version = "1.0.21"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "3bcdf212e9776fbcb2d23ab029360416bb1706b1aea2d1a5ba002727cbcab804"
+checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179"
 dependencies = [
  "proc-macro2",
 ]
 
 [[package]]
 name = "redox_syscall"
-version = "0.2.13"
+version = "0.2.16"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42"
+checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
 dependencies = [
  "bitflags",
 ]
@@ -396,20 +372,20 @@
 
 [[package]]
 name = "unicode-ident"
-version = "1.0.2"
+version = "1.0.3"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "15c61ba63f9235225a22310255a29b806b907c9b8c964bcbd0a2c70f3f2deea7"
+checksum = "c4f5b37a154999a8f3f98cc23a628d850e154479cd94decf3414696e12e31aaf"
 
 [[package]]
 name = "wayland-client"
-version = "0.29.4"
+version = "0.29.5"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "91223460e73257f697d9e23d401279123d36039a3f7a449e983f123292d4458f"
+checksum = "3f3b068c05a039c9f755f881dc50f01732214f5685e379829759088967c46715"
 dependencies = [
  "bitflags",
  "downcast-rs",
  "libc",
- "nix 0.22.3",
+ "nix",
  "wayland-commons",
  "wayland-scanner",
  "wayland-sys",
@@ -417,11 +393,11 @@
 
 [[package]]
 name = "wayland-commons"
-version = "0.29.4"
+version = "0.29.5"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "94f6e5e340d7c13490eca867898c4cec5af56c27a5ffe5c80c6fc4708e22d33e"
+checksum = "8691f134d584a33a6606d9d717b95c4fa20065605f798a3f350d78dced02a902"
 dependencies = [
- "nix 0.22.3",
+ "nix",
  "once_cell",
  "smallvec",
  "wayland-sys",
@@ -429,9 +405,9 @@
 
 [[package]]
 name = "wayland-protocols"
-version = "0.29.4"
+version = "0.29.5"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "60147ae23303402e41fe034f74fb2c35ad0780ee88a1c40ac09a3be1e7465741"
+checksum = "b950621f9354b322ee817a23474e479b34be96c2e909c14f7bc0100e9a970bc6"
 dependencies = [
  "bitflags",
  "wayland-client",
@@ -441,9 +417,9 @@
 
 [[package]]
 name = "wayland-scanner"
-version = "0.29.4"
+version = "0.29.5"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "39a1ed3143f7a143187156a2ab52742e89dac33245ba505c17224df48939f9e0"
+checksum = "8f4303d8fa22ab852f789e75a967f0a2cdc430a607751c0499bada3e451cbd53"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -452,23 +428,24 @@
 
 [[package]]
 name = "wayland-sys"
-version = "0.29.4"
+version = "0.29.5"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "d9341df79a8975679188e37dab3889bfa57c44ac2cb6da166f519a81cbe452d4"
+checksum = "be12ce1a3c39ec7dba25594b97b42cb3195d54953ddb9d3d95a7c3902bc6e9d4"
 dependencies = [
  "pkg-config",
 ]
 
 [[package]]
 name = "wayshot"
-version = "1.1.9"
+version = "1.2.2"
 dependencies = [
  "clap",
  "env_logger",
+ "flate2",
  "image",
  "log",
  "memmap2",
- "nix 0.24.2",
+ "nix",
  "tempfile",
  "wayland-client",
  "wayland-protocols",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wayshot-1.1.9/Cargo.toml new/wayshot-1.2.2/Cargo.toml
--- old/wayshot-1.1.9/Cargo.toml        2022-07-20 15:51:15.000000000 +0200
+++ new/wayshot-1.2.2/Cargo.toml        2022-09-07 15:54:36.000000000 +0200
@@ -1,14 +1,14 @@
 [package]
-authors = ["\nShinyzenith <https://shinyzenith.xyz> ", " Cmeissl 
<https://github.com/cmeissl> ", " Victor Berger <https://github.com/vberger>"]
+authors = ["Shinyzenith <https://shinyzenith.xyz>"]
 description = "Screenshot tool for wlroots based compositors implementing the 
zwlr_screencopy_v1 protocol."
 documentation = "https://docs.rs/crate/wayshot/latest";
-edition = "2021"
+edition = "2018"
 homepage = "https://waycrate.shinyzenith.xyz";
 keywords = ["screenshot", "wayland", "wlroots"]
 license = "BSD-2-Clause"
 name = "wayshot"
 repository = "https://git.sr.ht/~shinyzenith/wayshot";
-version = "1.1.9"
+version = "1.2.2"
 exclude = [
     "CODE_OF_CONDUCT.md",
     "CONTRIBUTING.md",
@@ -28,6 +28,9 @@
 wayland-protocols = { version = "0.29.4", features=["unstable_protocols", 
"client"] }
 tempfile = "3.3.0"
 
+[build-dependencies]
+flate2 = "1.0.24"
+
 [[bin]]
 name = "wayshot"
 path = "src/wayshot.rs"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wayshot-1.1.9/Cargo.toml=uwu 
new/wayshot-1.2.2/Cargo.toml=uwu
--- old/wayshot-1.1.9/Cargo.toml=uwu    1970-01-01 01:00:00.000000000 +0100
+++ new/wayshot-1.2.2/Cargo.toml=uwu    2022-09-07 15:54:36.000000000 +0200
@@ -0,0 +1,33 @@
+[package]
+authors = ["\nShinyzenith <https://shinyzenith.xyz> ", " Cmeissl 
<https://github.com/cmeissl> ", " Victor Berger <https://github.com/vberger>"]
+description = "Screenshot tool for wlroots based compositors implementing the 
zwlr_screencopy_v1 protocol."
+documentation = "https://docs.rs/crate/wayshot/latest";
+edition = "2021"
+homepage = "https://waycrate.shinyzenith.xyz";
+keywords = ["screenshot", "wayland", "wlroots"]
+license = "BSD-2-Clause"
+name = "wayshot"
+repository = "https://git.sr.ht/~shinyzenith/wayshot";
+version = "1.1.9"
+exclude = [
+    "CODE_OF_CONDUCT.md",
+    "CONTRIBUTING.md",
+       "contrib/*",
+       "docs/*",
+       "release.sh",
+]
+
+[dependencies]
+clap = "3.1.18"
+env_logger = { version = "0.9.0", default-features = false, features = 
["atty", "termcolor"] }
+image = { version = "0.24", default-features = false, features = ["jpeg", 
"png", "pnm"] }
+log = "0.4.17"
+memmap2 = "0.5.3"
+nix = "0.24.1"
+wayland-client = "0.29.4"
+wayland-protocols = { version = "0.29.4", features=["unstable_protocols", 
"client"] }
+tempfile = "3.3.0"
+
+[[bin]]
+name = "wayshot"
+path = "src/wayshot.rs"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wayshot-1.1.9/Makefile new/wayshot-1.2.2/Makefile
--- old/wayshot-1.1.9/Makefile  2022-07-20 15:51:15.000000000 +0200
+++ new/wayshot-1.2.2/Makefile  2022-09-07 15:54:36.000000000 +0200
@@ -2,6 +2,8 @@
 BUILDFLAGS := --release
 TARGET_DIR := /usr/bin
 SOURCE_DIR := ./target/release
+MAN1_DIR := /usr/share/man/man1
+MAN7_DIR := /usr/share/man/man7
 
 all: build
 
@@ -11,13 +13,16 @@
 run:
        @cargo run
 
-install:
+install: build
        @mkdir -p $(TARGET_DIR)
        @cp $(SOURCE_DIR)/$(BINARY) $(TARGET_DIR)
        @chmod +x $(TARGET_DIR)/$(BINARY)
+       @find ./docs -type f -iname "*.1.gz" -exec cp {} $(MAN1_DIR) \;
+       @find ./docs -type f -iname "*.7.gz" -exec cp {} $(MAN7_DIR) \;
 
 uninstall:
-       @rm $(TARGET_DIR)/$(BINARY)
+       @rm -f $(TARGET_DIR)/$(BINARY)
+       @rm -f /usr/share/man/**/wayshot.*
 
 check:
        @cargo fmt
@@ -26,6 +31,7 @@
 
 clean:
        @cargo clean
+       @rm -f ./docs/*.1.gz
 
 setup:
        @rustup install stable
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wayshot-1.1.9/README.md new/wayshot-1.2.2/README.md
--- old/wayshot-1.1.9/README.md 2022-07-20 15:51:15.000000000 +0200
+++ new/wayshot-1.2.2/README.md 2022-09-07 15:54:36.000000000 +0200
@@ -1,10 +1,10 @@
 <p align=center>
   <img 
src="https://git.sr.ht/~shinyzenith/wayshot/blob/main/docs/assets/wayshot.png"; 
alt=wayshot width=60%>
   <p align=center>A native, blazing-fast ???????????? screenshot tool for 
wlroots based compositors such as sway and river written in Rust.</p>
-  
+
   <p align="center">
   <a href="./LICENSE.md"><img 
src="https://img.shields.io/github/license/waycrate/wayshot?style=flat-square&logo=appveyor";></a>
-  <img 
src="https://img.shields.io/badge/cargo-v1.1.5-green?style=flat-square&logo=appveyor";>
+  <img 
src="https://img.shields.io/badge/cargo-v1.2.2-green?style=flat-square&logo=appveyor";>
   <img 
src="https://img.shields.io/github/issues/waycrate/wayshot?style=flat-square&logo=appveyor";>
   <img 
src="https://img.shields.io/github/forks/waycrate/wayshot?style=flat-square&logo=appveyor";>
   <img 
src="https://img.shields.io/github/stars/waycrate/wayshot?style=flat-square&logo=appveyor";>
@@ -13,7 +13,11 @@
   </p>
 </p>
 
-# Usage:
+# Some usage examples:
+
+NOTE: Read `man 7 wayshot` for more examples.
+
+NOTE: Read `man wayshot` for flag information.
 
 Region Selection:
 
@@ -27,12 +31,6 @@
 wayshot
 ```
 
-Custom file path:
-
-```bash
-wayshot -f ../screenshot.png --extension jpg
-```
-
 Screenshot and copy to clipboard:
 
 ```bash
@@ -45,12 +43,6 @@
 wayshot -s "$(slurp -p -f '%x %y %w %h')" --stdout | convert - -format 
'%[pixel:p{0,0}]' txt:-|egrep "#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})" -o
 ```
 
-Pick a color, using ImageMagick:
-
-```bash
-wayshot -s "$(slurp -p -f '%x %y %w %h')" --stdout | convert - -format 
'%[pixel:p{0,0}]' txt:-
-```
-
 # Known bugs:
 
 Multi monitor systems break on `--slurp` usage. This is quite the tricky bug 
and will need some refactoring which we're currently working on. 
(https://github.com/waycrate/wayshot/issues/7)
@@ -63,15 +55,16 @@
 
 ## Compile time dependencies:
 
-- rustup
-- make
+-   scdoc (If present, man-pages will be generated.)
+-   rustup
+-   make
 
 ## Compiling:
 
-- `git clone https://github.com/waycrate/wayshot && cd wayshot`
-- `make setup`
-- `make`
-- `sudo make install`
+-   `git clone https://github.com/waycrate/wayshot && cd wayshot`
+-   `make setup`
+-   `make`
+-   `sudo make install`
 
 # Support:
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wayshot-1.1.9/build.rs new/wayshot-1.2.2/build.rs
--- old/wayshot-1.1.9/build.rs  1970-01-01 01:00:00.000000000 +0100
+++ new/wayshot-1.2.2/build.rs  2022-09-07 15:54:36.000000000 +0200
@@ -0,0 +1,71 @@
+extern crate flate2;
+
+use flate2::{write::GzEncoder, Compression};
+use std::{
+    fs::{read_dir, File, OpenOptions},
+    io::{copy, BufReader, ErrorKind},
+    path::Path,
+    process::{exit, Command, Stdio},
+};
+
+fn main() {
+    if let Err(e) = Command::new("scdoc")
+        .stdin(Stdio::null())
+        .stdout(Stdio::null())
+        .stderr(Stdio::null())
+        .spawn()
+    {
+        if let ErrorKind::NotFound = e.kind() {
+            exit(0);
+        }
+    }
+
+    // We just append "out" so it's easy to find all the scdoc output later in 
line 38.
+    let man_pages: Vec<(String, String)> = read_and_replace_by_ext("./docs", 
".scd", ".out");
+    for man_page in man_pages {
+        let output = OpenOptions::new()
+            .write(true)
+            .create(true)
+            .open(Path::new(&man_page.1))
+            .unwrap();
+        _ = Command::new("scdoc")
+            .stdin(Stdio::from(File::open(man_page.0).unwrap()))
+            .stdout(output)
+            .spawn();
+    }
+
+    // Gzipping the man pages
+    let scdoc_output_files: Vec<(String, String)> =
+        read_and_replace_by_ext("./docs", ".out", ".gz");
+    for scdoc_output in scdoc_output_files {
+        let mut input = BufReader::new(File::open(scdoc_output.0).unwrap());
+        let output = OpenOptions::new()
+            .write(true)
+            .create(true)
+            .open(Path::new(&scdoc_output.1))
+            .unwrap();
+        let mut encoder = GzEncoder::new(output, Compression::default());
+        copy(&mut input, &mut encoder).unwrap();
+        encoder.finish().unwrap();
+    }
+}
+
+fn read_and_replace_by_ext(path: &str, search: &str, replace: &str) -> 
Vec<(String, String)> {
+    let mut files: Vec<(String, String)> = Vec::new();
+    for path in read_dir(path).unwrap() {
+        let path = path.unwrap();
+        if path.file_type().unwrap().is_dir() {
+            continue;
+        }
+
+        if let Some(file_name) = path.path().to_str() {
+            if *path.path().extension().unwrap().to_str().unwrap() != 
search[1..] {
+                continue;
+            }
+
+            let file = file_name.replace(search, replace);
+            files.push((file_name.to_string(), file));
+        }
+    }
+    files
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wayshot-1.1.9/contrib/PKGBUILD/bin/PKGBUILD 
new/wayshot-1.2.2/contrib/PKGBUILD/bin/PKGBUILD
--- old/wayshot-1.1.9/contrib/PKGBUILD/bin/PKGBUILD     1970-01-01 
01:00:00.000000000 +0100
+++ new/wayshot-1.2.2/contrib/PKGBUILD/bin/PKGBUILD     2022-09-07 
15:54:36.000000000 +0200
@@ -0,0 +1,31 @@
+# Maintainer: Aakash Sen Sharma <aakashsensha...@gmail.com>
+pkgname=wayshot-bin
+_pkgname=wayshot
+pkgver=1.2.1
+pkgrel=3
+pkgdesc="A screenshot tool for wlroots compositors."
+url="https://github.com/waycrate/wayshot";
+license=('BSD')
+arch=('x86_64')
+optdepends=('slurp: for area selection')
+makedepends=('scdoc' 'rust')
+provides=('wayshot-bin')
+conflicts=('wayshot-git' 'wayshot-musl-git')
+source=("$_pkgname-bin::$url/releases/download/$pkgver/$_pkgname"
+               "$_pkgname-src::git+https://git.sr.ht/~shinyzenith/$_pkgname";
+               )
+sha256sums=('SKIP'
+                       'SKIP'
+                       )
+
+build() {
+       cd $_pkgname-src
+       rustc ./build.rs
+       ./build 1>/dev/null 2>/dev/null 3>/dev/null
+}
+
+package() {
+       install -Dm 755 $_pkgname-bin "$pkgdir/usr/bin/$_pkgname"
+       install -Dm 644 ./$_pkgname-src/docs/wayshot.1.gz 
"$pkgdir/usr/share/man/man1/wayshot.1.gz"
+       install -Dm 644 ./$_pkgname-src/docs/wayshot.7.gz 
"$pkgdir/usr/share/man/man7/wayshot.7.gz"
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wayshot-1.1.9/contrib/PKGBUILD/git/PKGBUILD 
new/wayshot-1.2.2/contrib/PKGBUILD/git/PKGBUILD
--- old/wayshot-1.1.9/contrib/PKGBUILD/git/PKGBUILD     1970-01-01 
01:00:00.000000000 +0100
+++ new/wayshot-1.2.2/contrib/PKGBUILD/git/PKGBUILD     2022-09-07 
15:54:36.000000000 +0200
@@ -0,0 +1,31 @@
+# Maintainer: Aakash Sharma <aakashsensha...@gmail.com>
+pkgname='wayshot-git'
+_pkgname="wayshot"
+pkgver=1.1.9.98.g538caac
+pkgrel=1
+arch=('x86_64')
+url="https://git.sr.ht/~shinyzenith/wayshot";
+pkgdesc="A screenshot tool for wlroots compositors."
+license=('BSD')
+optdepends=('slurp: for area selection')
+makedepends=('rustup' 'git' 'scdoc')
+conflicts=('wayshot-bin' 'wayshot-musl-git')
+source=("$_pkgname::git+https://git.sr.ht/~shinyzenith/$_pkgname";)
+sha256sums=('SKIP')
+
+build(){
+       cd "$_pkgname"
+       cargo build --release
+}
+
+package() {
+       cd "$_pkgname"
+       install -Dm 755 ./target/release/wayshot "$pkgdir/usr/bin/wayshot"
+       install -Dm 644 ./docs/wayshot.1.gz 
"$pkgdir/usr/share/man/man1/wayshot.1.gz"
+       install -Dm 644 ./docs/wayshot.7.gz 
"$pkgdir/usr/share/man/man7/wayshot.7.gz"
+}
+
+pkgver() {
+       cd $_pkgname
+       echo "$(grep '^version =' Cargo.toml|head -n1|cut -d\" -f2|cut -d\- 
-f1).$(git rev-list --count HEAD).g$(git rev-parse --short HEAD)"
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wayshot-1.1.9/contrib/bin/PKGBUILD 
new/wayshot-1.2.2/contrib/bin/PKGBUILD
--- old/wayshot-1.1.9/contrib/bin/PKGBUILD      2022-07-20 15:51:15.000000000 
+0200
+++ new/wayshot-1.2.2/contrib/bin/PKGBUILD      1970-01-01 01:00:00.000000000 
+0100
@@ -1,18 +0,0 @@
-# Maintainer: Aakash Sen Sharma <aakashsensha...@gmail.com>
-pkgname=wayshot-bin
-pkgver=1.1.5
-pkgrel=1
-pkgdesc="A screenshot tool for wlroots compositors."
-url="https://github.com/waycrate/wayshot";
-license=('BSD')
-arch=('x86_64')
-optdepends=('slurp: for area selection')
-provides=('wayshot-bin')
-conflicts=('wayshot-git' 'wayshot-musl-git')
-source=("wayshot::$url/releases/download/$pkgver/wayshot")
-sha256sums=('SKIP')
-
-package() {
-       install -Dm 755 wayshot "$pkgdir/usr/bin/wayshot"
-}
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wayshot-1.1.9/contrib/git/PKGBUILD 
new/wayshot-1.2.2/contrib/git/PKGBUILD
--- old/wayshot-1.1.9/contrib/git/PKGBUILD      2022-07-20 15:51:15.000000000 
+0200
+++ new/wayshot-1.2.2/contrib/git/PKGBUILD      1970-01-01 01:00:00.000000000 
+0100
@@ -1,29 +0,0 @@
-# Maintainer: Aakash Sharma <aakashsensha...@gmail.com>
-pkgname='wayshot-git'
-_pkgname="wayshot"
-pkgver=1.1.1.55.g4235f3c
-pkgrel=1
-arch=('x86_64')
-url="https://git.sr.ht/~shinyzenith/wayshot";
-pkgdesc="A screenshot tool for wlroots compositors."
-license=('BSD')
-optdepends=('slurp: for area selection')
-makedepends=('rustup' 'git')
-conflicts=('wayshot-bin' 'wayshot-musl-git')
-source=("$_pkgname::git+https://git.sr.ht/~shinyzenith/$_pkgname";)
-sha256sums=('SKIP')
-
-build(){
-       cd "$_pkgname"
-       cargo build --release
-}
-
-package() {
-       cd "$_pkgname"
-       install -Dm 755 ./target/release/wayshot "$pkgdir/usr/bin/wayshot"
-}
-
-pkgver() {
-       cd $_pkgname
-       echo "$(grep '^version =' Cargo.toml|head -n1|cut -d\" -f2|cut -d\- 
-f1).$(git rev-list --count HEAD).g$(git rev-parse --short HEAD)"
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wayshot-1.1.9/docs/wayshot.1.scd 
new/wayshot-1.2.2/docs/wayshot.1.scd
--- old/wayshot-1.1.9/docs/wayshot.1.scd        1970-01-01 01:00:00.000000000 
+0100
+++ new/wayshot-1.2.2/docs/wayshot.1.scd        2022-09-07 15:54:36.000000000 
+0200
@@ -0,0 +1,62 @@
+wayshot(1) "github.com/waycrate/wayshot" "General Commands Manual"
+
+# NAME
+
+Wayshot - Screenshot tool for compositors implementing zwlr_screencopy_v1 such 
as sway and river
+
+# SYNOPSIS
+
+*wayshot* [_options_]
+
+# OPTIONS
+
+*-h*, *--help*
+       Print help message and quit.
+
+*-V*, *--version*
+       Print version information.
+
+*-d*, *--debug*
+       Enable debug mode.
+
+*-c*, *--cursor*
+       Enable cursor visibility in screenshots.
+
+*-e*, *--extension*
+       Set the image encoder.
+       Valid arguments:
+               - jpeg
+               - jpg
+               - png (Default encoder)
+               - ppm
+
+*-f*, *--file*
+       Set a custom file path. The default path is 
`./{current_unix_timestamp}-wayshot.{encoder}`
+       eg: 1659034753-wayshot.png
+
+*-l*, *--listoutputs*
+       List all valid output names. This flag is generally used in combination 
with *-o* flag.
+
+*-o*, *--output*
+       Choose a particular display (wl_output) to screenshot.
+
+*-s*, *--slurp*
+       Choose a portion of your display to screenshot using the slurp program.
+       https://github.com/emersion/slurp
+
+*--stdout*
+       Emit image data to stdout. The following flag is helpful to pipe image 
data
+       to other programs.
+
+# KNOWN BUGS
+
+Feel free to send patches for the following:
+- *--slurp* flag does not work as intended on multi monitor systems. After 
multiple attempts at fixing this I have failed time and again.
+
+# SEE ALSO
+       - wayshot(7)
+
+# AUTHORS
+
+Maintained by Shinyzenith <aakashsensha...@gmail.com>.
+For more information about development, see 
<https://github.com/waycrate/wayshot>.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wayshot-1.1.9/docs/wayshot.7.scd 
new/wayshot-1.2.2/docs/wayshot.7.scd
--- old/wayshot-1.1.9/docs/wayshot.7.scd        1970-01-01 01:00:00.000000000 
+0100
+++ new/wayshot-1.2.2/docs/wayshot.7.scd        2022-09-07 15:54:36.000000000 
+0200
@@ -0,0 +1,46 @@
+wayshot(7) "github.com/waycrate/wayshot" "Miscellaneous Information Manual"
+
+# NAME
+
+Wayshot - Screenshot tool for compositors implementing zwlr_screencopy_v1 such 
as sway and river
+
+# SYNOPSIS
+
+*wayshot* [_options_]
+
+# REGION SELECTION
+wayshot -s "$(slurp -f '%x %y %w %h')"
+
+# FULLSCREEN
+
+wayshot
+
+# CUSTOM FILE PATH AND EXTENSION
+
+wayshot -f ../screenshot.png --extension ppm
+
+# SCREENSHOT AND COPY TO CLIPBOARD
+
+wayshot --stdout -e jpeg | wl-copy
+
+# SCREENSHOT A PARTICULAR DISPLAY
+
+wayshot -l # Pick any output name from the following. We use eDP-1 for this 
example.
+wayshot -o eDP-1
+
+# PICK A HEX COLOR CODE, USING IMAGEMAGICk
+
+wayshot -s "$(slurp -p -f '%x %y %w %h')" --stdout | convert - -format 
'%[pixel:p{0,0}]' txt:-|egrep "#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})" -o
+
+# PICK A HEX COLOR CODE WITHOUT USING IMAGEMAGICK
+
+wayshot -s "$(slurp -p -f '%x %y %w %h')" --stdout -e ppm | tail -c 3 | od -An 
-tuC | xargs printf '#%02X%02X%02X\n'
+
+# PICK A COLOR, USING IMAGEMAGICK
+
+wayshot -s "$(slurp -p -f '%x %y %w %h')" --stdout | convert - -format 
'%[pixel:p{0,0}]' txt:-
+
+# AUTHORS
+
+Maintained by Shinyzenith <aakashsensha...@gmail.com>.
+For more information about development, see 
<https://github.com/waycrate/wayshot>.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wayshot-1.1.9/src/backend.rs 
new/wayshot-1.2.2/src/backend.rs
--- old/wayshot-1.1.9/src/backend.rs    2022-07-20 15:51:15.000000000 +0200
+++ new/wayshot-1.2.2/src/backend.rs    2022-09-07 15:54:36.000000000 +0200
@@ -82,7 +82,7 @@
 }
 
 /// Supported image encoding formats.
-#[derive(Debug, Copy, Clone, PartialEq)]
+#[derive(Debug, Copy, Clone, PartialEq, Eq)]
 pub enum EncodingFormat {
     /// Jpeg / jpg encoder.
     Jpg,
@@ -370,7 +370,7 @@
                 frame_copy.frame_format.height,
                 frame_copy.frame_color_type,
             )?;
-            let _ = output_file.flush()?;
+            output_file.flush()?;
         }
         EncodingFormat::Png => {
             PngEncoder::new(&mut output_file).write_image(
@@ -379,20 +379,21 @@
                 frame_copy.frame_format.height,
                 frame_copy.frame_color_type,
             )?;
-            let _ = output_file.flush()?;
+            output_file.flush()?;
         }
         EncodingFormat::Ppm => {
             let rgb8_data = if let ColorType::Rgba8 = 
frame_copy.frame_color_type {
-                let data = frame_copy
-                    .frame_mmap
-                    .iter()
-                    .enumerate()
-                    .filter_map(|(i, &v)| if i % 4 != 3 { Some(v) } else { 
None })
-                    .collect::<Vec<u8>>();
+                let mut data = Vec::with_capacity(
+                    (3 * frame_copy.frame_format.width * 
frame_copy.frame_format.height) as _,
+                );
+                for chunk in frame_copy.frame_mmap.chunks_exact(4) {
+                    data.extend_from_slice(&chunk[..3]);
+                }
                 data
             } else {
                 unimplemented!("Currently only ColorType::Rgba8 is supported")
             };
+
             PnmEncoder::new(&mut output_file)
                 
.with_subtype(pnm::PnmSubtype::Pixmap(pnm::SampleEncoding::Binary))
                 .write_image(
@@ -401,7 +402,7 @@
                     frame_copy.frame_format.height,
                     ColorType::Rgb8,
                 )?;
-            let _ = output_file.flush()?;
+            output_file.flush()?;
         }
     }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wayshot-1.1.9/src/clap.rs 
new/wayshot-1.2.2/src/clap.rs
--- old/wayshot-1.1.9/src/clap.rs       2022-07-20 15:51:15.000000000 +0200
+++ new/wayshot-1.2.2/src/clap.rs       2022-09-07 15:54:36.000000000 +0200
@@ -4,7 +4,7 @@
     let app = Command::new("wayshot")
         .version(env!("CARGO_PKG_VERSION"))
         .author(env!("CARGO_PKG_AUTHORS"))
-        .about("Simple screenshot tool for wlroots based compositors")
+        .about("Screenshot tool for compositors implementing 
zwlr_screencopy_v1.")
         .arg(
             arg!(-d - -debug)
                 .required(false)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wayshot-1.1.9/src/wayshot.rs 
new/wayshot-1.2.2/src/wayshot.rs
--- old/wayshot-1.1.9/src/wayshot.rs    2022-07-20 15:51:15.000000000 +0200
+++ new/wayshot-1.2.2/src/wayshot.rs    2022-09-07 15:54:36.000000000 +0200
@@ -111,7 +111,7 @@
     };
 
     let extension = if args.is_present("extension") {
-        let ext = args.value_of("extension").unwrap().trim();
+        let ext: &str = 
&args.value_of("extension").unwrap().trim().to_lowercase();
         match ext {
             "jpeg" | "jpg" => backend::EncodingFormat::Jpg,
             "png" => backend::EncodingFormat::Png,

Reply via email to