Also print the .selftext - gophercgis - Collection of gopher CGI/DCGI for geomyidae
(HTM) hg clone https://bitbucket.org/iamleot/gophercgis
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) changeset 546ee58dd340687694600141a177f271d26b1234
(DIR) parent a6131dcc2ef0ab6a4ad3f9669a33d27b8a314593
(HTM) Author: Leonardo Taccari <iamleot@gmail.com>
Date: Wed, 8 Aug 2018 14:49:30
Also print the .selftext
Diffstat:
reddit/c.dcgi | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff -r a6131dcc2ef0 -r 546ee58dd340 reddit/c.dcgi
--- a/reddit/c.dcgi Wed Aug 08 14:44:09 2018 +0200
+++ b/reddit/c.dcgi Wed Aug 08 14:49:30 2018 +0200
@@ -20,7 +20,13 @@
"t\(.author) \( .created_utc | strftime("%F %H:%M") )",
"tScore: \(.score)",
"tComments: \(.num_comments)",
- "t" ),
+ "t",
+ if .selftext != "" then
+ "t\(.selftext | split("\n") | join("\nt") )",
+ "t"
+ else
+ empty
+ end ),
( .[1] | .. | select(.kind? == "t1") | .data |
"t\(.author) \(.score) \( .created_utc | strftime("%F %H:%M") )",
"t\(.body | split("\n") | join("\nt") )",