[PATCH] gnu: Add textpieces

  • Done
  • quality assurance status badge
Details
3 participants
  • Sughosha
  • Christopher Baines
  • Maxim Cournoyer
Owner
unassigned
Submitted by
Sughosha
Severity
normal
S
S
Sughosha wrote on 22 Sep 2022 08:23
(name . guix-patches@gnu.org)(address . guix-patches@gnu.org)
zpY3eWupENESH69mFgO7pNhk1_H7Dl9K5SX2ubtSGbtJIH_f7BvXOsCNjkOdw-aOjz-C8C7hWe8K6yhyPiEXXpGRPDQeH538igNe8V5-Yko=@proton.me
From: Sughosha <sughosha@proton.me>

* gnu/packages/text-editors.scm (textpieces): New variable.
---
gnu/packages/text-editors.scm | 55 +++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)

Toggle diff (79 lines)
diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index 0c30a705b9..8852bbf067 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -45,6 +45,7 @@ (define-module (gnu packages text-editors)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (guix build-system glib-or-gtk)
+ #:use-module (guix build-system meson)
#:use-module (guix build-system python)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages)
@@ -62,6 +63,7 @@ (define-module (gnu packages text-editors)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages gettext)
#:use-module (gnu packages glib)
+ #:use-module (gnu packages gnome)
#:use-module (gnu packages gtk)
#:use-module (gnu packages guile)
#:use-module (gnu packages haskell-xyz)
@@ -1260,3 +1262,56 @@ (define-public mle
splitting, multiple cursors, and integration with various shell
commands.")
(license license:asl2.0)))
+
+(define-public textpieces
+ (package
+ (name "textpieces")
+ (version "3.2.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/liferooter/textpieces")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32
+ "14zq2c7js80m4cq8wpdb3kyz5sw96l8znbz027w8s94gqhm632ff"))))
+ (arguments
+ `(#:tests? #f ;fails to validate appstream file
+ #:glib-or-gtk? #t))
+ (build-system meson-build-system)
+ (native-inputs (list pkg-config
+ vala
+ desktop-file-utils
+ appstream-glib
+ gettext-minimal
+ `(,glib "bin")
+ blueprint-compiler
+ `(,gtk "bin")))
+ (inputs (list gtk
+ libadwaita
+ gtksourceview
+ json-glib
+ libgee
+ python
+ python-pygobject
+ python-pyyaml))
+ (home-page "https://github.com/liferooter/textpieces")
+ (synopsis "Quick text processor")
+ (description
+ "Text Pieces tool for quick text transformations such as checksums,
+encoding, decoding and so on.
+
+The basic features of Text Pieces are:
+@itemize
+@item Base64 encoding and decoding
+@item SHA-1, SHA-2 and MD5 checksums
+@item Prettify and minify JSON
+@item Covert JSON to YAML and vice versa
+@item Count lines, symbols and words
+@item Escape and unescape string, URL and HTML
+@item Remove leading and trailing whitespaces
+@item Sort and reverse sort lines
+@item Reverse lines and whole text
+@item You can write your own scripts and create custom tools
+@end itemize")
+ (license license:gpl3)))
--
2.37.3
M
M
Maxim Cournoyer wrote on 28 Sep 2022 19:26
(name . Sughosha)(address . Sughosha@proton.me)(address . 57999@debbugs.gnu.org)
87y1u3v298.fsf@gmail.com
Hello,

Sughosha <Sughosha@proton.me> writes:

Toggle quote (4 lines)
> From: Sughosha <sughosha@proton.me>
>
> * gnu/packages/text-editors.scm (textpieces): New variable.

[...]

Toggle quote (15 lines)
> +(define-public textpieces
> + (package
> + (name "textpieces")
> + (version "3.2.0")
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/liferooter/textpieces")
> + (commit (string-append "v" version))))
> + (sha256
> + (base32
> + "14zq2c7js80m4cq8wpdb3kyz5sw96l8znbz027w8s94gqhm632ff"))))
> + (arguments
> + `(#:tests? #f ;fails to validate appstream file

Is this a known issue upstream? If so, it should be linked with a full
sentence, for example: "The test suite fails validating the appstream
file (see: https://www.upstream-issue-url)."

Toggle quote (19 lines)
> + #:glib-or-gtk? #t))
> + (build-system meson-build-system)
> + (native-inputs (list pkg-config
> + vala
> + desktop-file-utils
> + appstream-glib
> + gettext-minimal
> + `(,glib "bin")
> + blueprint-compiler
> + `(,gtk "bin")))
> + (inputs (list gtk
> + libadwaita
> + gtksourceview
> + json-glib
> + libgee
> + python
> + python-pygobject
> + python-pyyaml))

Please sort the dependencies in lexicographical order.

Toggle quote (5 lines)
> + (synopsis "Quick text processor")
> + (description
> + "Text Pieces tool for quick text transformations such as checksums,

^ is a tool
Toggle quote (1 lines)
> +encoding, decoding and so on.
^, etc.

Toggle quote (15 lines)
> +The basic features of Text Pieces are:
> +@itemize
> +@item Base64 encoding and decoding
> +@item SHA-1, SHA-2 and MD5 checksums
> +@item Prettify and minify JSON
> +@item Covert JSON to YAML and vice versa
> +@item Count lines, symbols and words
> +@item Escape and unescape string, URL and HTML
> +@item Remove leading and trailing whitespaces
> +@item Sort and reverse sort lines
> +@item Reverse lines and whole text
> +@item You can write your own scripts and create custom tools
> +@end itemize")
> + (license license:gpl3)))

The rest looks fine. It'd be nice to get the test suite passing.

Thanks,

Maxim
S
S
Sughosha wrote on 28 Sep 2022 19:35
(address . maxim.cournoyer@gmail.com)(address . 57999@debbugs.gnu.org)
hIbSRv41X_s3LKsXCfvcu1hKe20yYm6Amz0RRrVlHwKXxqJIZ5ibjpzYl5xIF25wz_IflW3CHp8W_N45JGRpJOg1epcrm-8JC8UKdMML0j0=@proton.me
Hi,

Thanks for reviewing. The problem is only that while validating the appstream it requires connecting to internet, but in Guix packaging works offline. Otherwise if built outside Guix, then it passes the test.

And, I will correct and send another patch file.

Sughosha

Gesendet von Proton Mail für Mobilgeräte

-------- Original-Nachricht --------
Am 28. Sept. 2022, 7:26 PM, schrieb Maxim Cournoyer :

Toggle quote (1 lines)
> Hello, Sughosha writes: > From: Sughosha > > * gnu/packages/text-editors.scm (textpieces): New variable. [...] > +(define-public textpieces > + (package > + (name "textpieces") > + (version "3.2.0") > + (source (origin > + (method git-fetch) > + (uri (git-reference > + (url "https://github.com/liferooter/textpieces") + (commit (string-append "v" version)))) + (sha256 + (base32 + "14zq2c7js80m4cq8wpdb3kyz5sw96l8znbz027w8s94gqhm632ff")))) + (arguments + `(#:tests? #f ;fails to validate appstream file Is this a known issue upstream? If so, it should be linked with a full sentence, for example: "The test suite fails validating the appstream file (see: https://www.upstream-issue-url)." + #:glib-or-gtk? #t)) + (build-system meson-build-system) + (native-inputs (list pkg-config + vala + desktop-file-utils + appstream-glib + gettext-minimal + `(,glib "bin") + blueprint-compiler + `(,gtk "bin"))) + (inputs (list gtk + libadwaita + gtksourceview + json-glib + libgee + python + python-pygobject + python-pyyaml)) Please sort the dependencies in lexicographical order. + (home-page "https://github.com/liferooter/textpieces") + (synopsis "Quick text processor") + (description + "Text Pieces tool for quick text transformations such as checksums, ^ is a tool +encoding, decoding and so on. ^, etc. +The basic features of Text Pieces are: +@itemize +@item Base64 encoding and decoding +@item SHA-1, SHA-2 and MD5 checksums +@item Prettify and minify JSON +@item Covert JSON to YAML and vice versa +@item Count lines, symbols and words +@item Escape and unescape string, URL and HTML +@item Remove leading and trailing whitespaces +@item Sort and reverse sort lines +@item Reverse lines and whole text +@item You can write your own scripts and create custom tools +@end itemize") + (license license:gpl3))) The rest looks fine. It'd be nice to get the test suite passing. Thanks, Maxim
Attachment: file
C
C
Christopher Baines wrote on 16 Oct 2022 20:27
Re: [bug#57999] [PATCH] gnu: Add textpieces
(name . Sughosha)(address . Sughosha@proton.me)
87czarbp04.fsf@cbaines.net
Sughosha via Guix-patches via <guix-patches@gnu.org> writes:

Toggle quote (7 lines)
> Thanks for reviewing. The problem is only that while validating the
> appstream it requires connecting to internet, but in Guix packaging
> works offline. Otherwise if built outside Guix, then it passes the
> test.
>
> And, I will correct and send another patch file.

Hi both,

I got a bit confused and I thought an updated patch was attached to this
reply, and went ahead and pushed as
fc68b97db12b34dec558fde73d651aa0d3bbd446, with a couple of tweaks.

I did miss changing some of the things that Maxim suggested though. If
you can Sughosha, please do send a patch to make the relevant changes,
otherwise I can try and clean things up.

Thanks,

Chris
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmNMTatfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9XdMhA//U4BZjlPnlD7Vg5VO5tsKbVLQ+4sxXWaU
UR1fgJgaFghyLh/UStHxt/sUDlG76XBnAeno3VR+opF8wgudPEB8gQEXaf7fOtQh
lfhrWA4PrLsLcw7fWHpzGnMd/TjtMIuxjGvLVvm8JH3Tj6NjS7rOdKzJhBkfCau1
4BFt9V7CJBoJgQLC8syFFXln1PinXWHlJmFxqZjMjduuTliwXyomz6Jesttv++GU
XtLq6C7vrKu+gRvowv2G/DPfpKMdcdcsfSGIzu1Ycvq3qzfrpNrIL+8u4zzal4hi
yYQDY8MBHv/w7ypw3UaUM3o84BrC5tfaMrholZHKYl/4wnzrnOFjX4BVsOJFPbBD
kGzPQbKvwa2PySF+7bqyNy6vRPPJqfkzlkdowi0L7wSChif99vKn6BmOvLttM6VN
bGP2vb8HelicgaUBCHxMTmN34PAkRhMEmKomNIcmj75eUrdfjpN7VkjTTmux1zMI
wEVyc/ioDJrPxoa3covddFR06JtsfBbq4v5E5Gl4HUU5a71W5km72vRzwevAzwaN
Ev+OQhkLs7JmcyksL0Lq3f42U77JkuFAapJWnckMJ/4OTnlTBlgUqHcZXoZG18JA
LM9IY7OBvSvDAs5H2kyJHiJ7d0Vl/0nDRvPGopWbUxHnKFsOAnM9LrELJtHQ6DMl
jNxVI6AygqQ=
=llV7
-----END PGP SIGNATURE-----

S
S
Sughosha wrote on 17 Oct 2022 07:19
(name . 57999@debbugs.gnu.org)(address . 57999@debbugs.gnu.org)
Ds6JEIbIgEzjlRgFHWZTxJkyaagPp77dVdIw2Uj7-5tYEV2vqpRXede0zQnSN_Xlw0rPYEkMTgcRjymRyirozlH4cR-WmPawoSxIisGViT8=@proton.me
From c5737d59c0854162dfed9f580ca30b2c4a5fdfad Mon Sep 17 00:00:00 2001
From: Sughosha <sughosha@proton.me>
Date: Mon, 17 Oct 2022 07:09:40 +0200
Subject: [PATCH] gnu: textpieces: Reorder dependencies and fix description

* gnu/packages/textpieces.scm (textpieces)[description]: Fix description.
[inputs]: Reorder dependencies.
[native-inputs]: Reorder dependencies.
---
gnu/packages/text-editors.scm | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)

Toggle diff (46 lines)
diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index dacd2ef80d..f278b0902c 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -920,28 +920,28 @@ (define-public textpieces
#:glib-or-gtk? #t))
(build-system meson-build-system)
(native-inputs
- (list pkg-config
- vala
+ (list appstream-glib
+ blueprint-compiler
desktop-file-utils
- appstream-glib
gettext-minimal
- blueprint-compiler
`(,glib "bin")
- `(,gtk "bin")))
+ `(,gtk "bin")
+ pkg-config
+ vala))
(inputs
- (list json-glib
+ (list gtk
+ gtksourceview
+ json-glib
libadwaita
libgee
python
python-pygobject
- python-pyyaml
- gtk
- gtksourceview))
+ python-pyyaml))
(home-page "https://github.com/liferooter/textpieces")
(synopsis "Quick text processor")
(description
- "Text Pieces tool for quick text transformations such as checksums,
-encoding, decoding and so on.
+ "Text Pieces is a tool for quick text transformations such as checksums,
+encoding, decoding, etc.
The basic features of Text Pieces are:
@itemize
--
2.38.0
C
C
Christopher Baines wrote on 18 Oct 2022 12:15
(name . Sughosha)(address . Sughosha@proton.me)
875yghh1ym.fsf@cbaines.net
Sughosha <Sughosha@proton.me> writes:

Toggle quote (12 lines)
> From c5737d59c0854162dfed9f580ca30b2c4a5fdfad Mon Sep 17 00:00:00 2001
> From: Sughosha <sughosha@proton.me>
> Date: Mon, 17 Oct 2022 07:09:40 +0200
> Subject: [PATCH] gnu: textpieces: Reorder dependencies and fix description
>
> * gnu/packages/textpieces.scm (textpieces)[description]: Fix description.
> [inputs]: Reorder dependencies.
> [native-inputs]: Reorder dependencies.
> ---
> gnu/packages/text-editors.scm | 22 +++++++++++-----------
> 1 file changed, 11 insertions(+), 11 deletions(-)

Thanks, I've pushed this to master as
3c7d4fdc30530f35005d2555a50bbe9fa4b12da7.

Chris
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmNOfNFfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9Xf19hAAg6rWd1xVgJsMcCq9H0At+AQ30h28Wygc
YU7bQ/rcyYpSb86ppM+B+8JIRXAh+uIgfl7izUflVrdHcucx2asY97abAjNFLlTi
FpGzTe1gHSZ4LG1pc3HsX08xDNT4JPyGU5eUUVAacNIbUT6zc4vh21G+nlPKPuFM
ma8IZuikcxhOcytav32j4eCYnqC8pmKGJz88mItajrcK2eR6kZ9EWfTWdRY6bDAr
T9eZBJQcfy3xcV7nPAl6d0rz2147VVjRyhNIciMIlNI12v7gvAILxLALpYM2rjIR
4AYCeF3xYXZTf2ZZ212cMVXIqMCDw2FGTdigVhu6ILlsHDGfRoIUF0ZhvVfMrPyE
BFz/KWeQktNYyzKTV1y/3LKrrdMhYTNAizNnpJIhlCD0ES6e072m39MNCtxr8guY
d1i9kUQWNsgXiLq+429uP3ujRbxM2PGHT3pCwtwiUgTwqSf3/kLYcqmlHEzakQTS
T6zP5ZVEmKG75Bs/hP7lXqYpBrX4lcAVoX/xwQLeZpVCZGjrPv2W7YZ9HRZ0iunh
StTX0bJvOgmlH+m+qub8U8SJu5Bs1GLJa1v0ocnoWsYHi4bFrZwgVYw7EA6I2dVP
Gf5FW2IE+Z4IdRGIyxam/VhFrnykdGhhz9Nr3ug8fqRplkkv58jrTL55UuzB8HoW
T5HztFVefnI=
=osRP
-----END PGP SIGNATURE-----

Closed
?