[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
17/17: import/utils: beautify-description: Recognize more fragments.
From: |
guix-commits |
Subject: |
17/17: import/utils: beautify-description: Recognize more fragments. |
Date: |
Fri, 13 Sep 2019 18:41:16 -0400 (EDT) |
rekado pushed a commit to branch master
in repository guix.
commit 6e377b88930226f3f74ba9fac74d80c36494d9be
Author: Ricardo Wurmus <address@hidden>
Date: Sat Sep 14 00:36:51 2019 +0200
import/utils: beautify-description: Recognize more fragments.
* guix/import/utils.scm (beautify-description): Handle additional common
initial sentence fragments in descriptions.
---
guix/import/utils.scm | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/guix/import/utils.scm b/guix/import/utils.scm
index 252875e..4694b6e 100644
--- a/guix/import/utils.scm
+++ b/guix/import/utils.scm
@@ -212,10 +212,19 @@ with dashes."
(define (beautify-description description)
"Improve the package DESCRIPTION by turning a beginning sentence fragment
into a proper sentence and by using two spaces between sentences."
- (let ((cleaned (if (string-prefix? "A " description)
- (string-append "This package provides a"
- (substring description 1))
- description)))
+ (let ((cleaned (cond
+ ((string-prefix? "A " description)
+ (string-append "This package provides a"
+ (substring description 1)))
+ ((string-prefix? "Provides " description)
+ (string-append "This package provides"
+ (substring description
+ (string-length "Provides"))))
+ ((string-prefix? "Functions " description)
+ (string-append "This package provides functions"
+ (substring description
+ (string-length "Functions"))))
+ (else description))))
;; Use double spacing between sentences
(regexp-substitute/global #f "\\. \\b"
cleaned 'pre ". " 'post)))
- 05/17: gnu: r-circlize: Update to 0.4.8., (continued)
- 05/17: gnu: r-circlize: Update to 0.4.8., guix-commits, 2019/09/13
- 08/17: gnu: r-sjstats: Update to 0.17.6., guix-commits, 2019/09/13
- 10/17: gnu: r-activity: Update to 1.3., guix-commits, 2019/09/13
- 06/17: gnu: r-sjlabelled: Update to 1.1.1., guix-commits, 2019/09/13
- 09/17: gnu: r-sjplot: Update to 2.7.1., guix-commits, 2019/09/13
- 04/17: gnu: r-httpuv: Update to 1.5.2., guix-commits, 2019/09/13
- 11/17: gnu: r-tidytree: Update to 0.2.7., guix-commits, 2019/09/13
- 12/17: gnu: r-huge: Update to 1.3.3., guix-commits, 2019/09/13
- 13/17: gnu: Add r-lifecycle., guix-commits, 2019/09/13
- 15/17: gnu: r-diffusionmap: Update to 1.2.0., guix-commits, 2019/09/13
- 17/17: import/utils: beautify-description: Recognize more fragments.,
guix-commits <=
- 16/17: gnu: r-tidyr: Update to 1.0.0., guix-commits, 2019/09/13
- 14/17: gnu: r-seqinr: Update to 3.6-1., guix-commits, 2019/09/13