#+SETUPFILE: ~/.emacs.d/org-templates/projects.org #+EXPORT_FILE_NAME: index #+TITLE: Draco Draco is a script to convert reddit thread to Org document. It accepts a url & prints the Org document to STDOUT. It'll also print comments along with their replies. | Project Home | [[https://andinus.nand.sh/draco/][Draco]] | | Source Code | [[https://git.tilde.institute/andinus/draco/][Andinus / Draco]] | | GitHub (Mirror) | [[https://github.com/andinus/draco/][Draco - GitHub]] | * 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. * Demo This was recorded with =asciinema(1)=. [[https://asciinema.org/a/373860][https://asciinema.org/a/373860.png]] + Draco v0.1.2: https://asciinema.org/a/373860 - alt-link: https://andinus.nand.sh/static/draco/v0.1.2.cast + Draco 2020-11-19: https://asciinema.org/a/373851 - alt-link: https://andinus.nand.sh/static/draco/2020-11-19.cast * Installation Follow these instructions to get draco & then install the dependencies, they're listed below. All dependencies are in Debian & Fedora repositories. Check the /News/ section before updating or downloading latest release. 1. Download the release: - https://git.tilde.institute/andinus/draco - https://github.com/andinus/draco/releases 2. Extract the file. 3. =cd= into the directory. 4. Run =make install= as root. 5. Install dependencies. * Dependencies #+BEGIN_SRC sh # Install dependencies. (OpenBSD) doas pkg_add p5-Unicode-LineBreak p5-JSON-MaybeXS cpan install HTTP::Tiny # Install dependencies. (Debian - apt based) sudo apt install libunicode-linebreak-perl libjson-maybexs-perl \ libhttp-tiny-perl # Install dependencies. (Fedora - dnf based) sudo dnf install perl-JSON-MaybeXS perl-HTTP-Tiny perl-Unicode-LineBreak #+END_SRC * News ** v0.2.0 - 2020-11-23 This version makes the script lot more complex. If you download only small threads then this update is not required. Previous version (v0.1.3) might throw some errors on threads that have comments hidden behind "load more comments" but the rest of thread will be saved. This version will load all those comments hidden behind "load more comments". But not those hidden behind "continue this thread". This is a known bug. + Add "[S]" after submitter's comments. + Print comments hidden under "load more comments". + Document environment variables in manual. + Add "limit=500" & "sort=top" to all posts/comments. + Print more information when debug is on. + Add help option.