.Dd $Mdocdate: November 19 2020 $ .Dt DRACO 1 .Os .Sh NAME .Nm draco .Nd a script to convert reddit thread to Org document .Sh SYNOPSIS .Nm draco .Op Fl dhv .Ar .Sh DESCRIPTION .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. The default is to print all comments that are included in first HTTP call. Some comments might not be included in it so user needs to set `FETCH_ALL' flag to fetch those comments. This is not the default because it might make multiple HTTP calls. .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. .It Fl h Print this help. .Pp .Sh ENVIRONMENT VARIABLES .Bl -tag -width Ds .It FETCH_ALL Fetch all comments. This might make multiple HTTP calls to reddit. This should fetch all the comments. .Sh EXAMPLES .Bl -tag -width Ds .It FETCH_ALL=1 draco -d > /tmp/thread.org Archive the whole thread to `/tmp/thread.org'. This might make multiple HTTP calls. .It draco -d > /dev/null Archive the thread. This will only archive the comments that are included in first HTTP call. .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 Check :PROPERTIES: section under Post & Comments. They include useful information. .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. .Sh AUTHOR .An Andinus Aq Mt andinus@nand.sh