From 8ce6c0c504d1fdb604c635cd5a190256d4fbda6a Mon Sep 17 00:00:00 2001 From: Jonas Wagner Date: Tue, 11 Feb 2025 05:52:34 +0100 Subject: [PATCH] reddit --- man/reddit.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/man/reddit.md b/man/reddit.md index 8261246..d341707 100644 --- a/man/reddit.md +++ b/man/reddit.md @@ -1,6 +1,6 @@ --- date created: Wednesday, July 17th 2019, 3:38:37 pm -date modified: Friday, March 29th 2024, 11:36:52 am +date modified: Tuesday, February 11th 2025, 5:52:09 am tags: --- @@ -8,6 +8,16 @@ tags: ehm... okay? +## get json for reddit post + +append `.json` to the end of a reddit url + +## get text for each reddit comment + +```shell +jq -r '.[].data.children[].data | select(.body != null) | "---\n\(.body)"' < reddit.json +``` + ## get markdown version of reddit post you need *jq* for this, at least it makes it easy.