summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2020-11-20 11:04:43 +0530
committerAndinus <andinus@nand.sh>2020-11-20 11:04:43 +0530
commitd37383dc4c808fa116791cd9becd7a1df41f50ad (patch)
tree47fac0a45ce931c8c62357de3e0287aa41f7e95e
parent56e880f5028d9f1892d1af28007ab6a7108ad977 (diff)
downloaddraco-d37383dc4c808fa116791cd9becd7a1df41f50ad.tar.gz
Add "[S]" after submitter's comments
-rw-r--r--draco.110
-rwxr-xr-xdraco.pl4
2 files changed, 8 insertions, 6 deletions
diff --git a/draco.1 b/draco.1
index d68912b..797252b 100644
--- a/draco.1
+++ b/draco.1
@@ -12,29 +12,29 @@
 .Nm
 is a script to convert reddit thread to Org document. It accepts a url
 & prints the Org document to STDOUT.
-
+.Pp
 It'll also print comments along with their replies. It's limited by
 the reddit API.
-
+.Pp
 The options are as follows:
 .Bl -tag -width Ds
 .It Fl d
 Turn on debug messages. Debug messages will be printed to STDERR.
 .It Fl v
 Print version.
-.Pp
 .Sh NOTES
 Draco will add 2 spaces before every new line. Comments/Posts may
 contain `*' at the start of line & that confuses Org. Org might
 interpret it as a new heading so we add a space before every new line.
-
+.Pp
 All text will be wrapped at 76 characters, including 2 spaces before
 every new line the maximum number of columns becomes 78.
 .Pp
+The date of archive is saved under :PROPERTIES: of the post as
+:ARCHIVE_DATE:.
 .Sh WHY?
 I reference things from the web in my Journal & don't want those links
 to break so I save them locally. Previously I used to manually archive
 the whole thread, this automates it.
-.Pp
 .Sh AUTHOR
 .An Andinus Aq Mt andinus@nand.sh
diff --git a/draco.pl b/draco.pl
index ac67ee9..08779a1 100755
--- a/draco.pl
+++ b/draco.pl
@@ -91,7 +91,9 @@ sub print_comment_chain {
     my $comment = shift @_;
     my $level = shift @_;
 
-    print "*" x ($level + 2), " ", "$comment->{author}\n";
+    print "*" x ($level + 2), " ", "$comment->{author}";
+    print " [S]" if $comment->{is_submitter};
+    print "\n";
 
     # Print comment details.
     print ":PROPERTIES:\n";