{"id":14128449,"url":"https://github.com/andinus/draco","last_synced_at":"2025-07-25T22:31:56.315Z","repository":{"id":97564362,"uuid":"314033673","full_name":"andinus/draco","owner":"andinus","description":"Draco is a script to convert reddit thread to Org document","archived":false,"fork":false,"pushed_at":"2022-08-09T09:10:09.000Z","size":83,"stargazers_count":10,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-16T16:22:32.817Z","etag":null,"topics":["hacktoberfest","org-mode","reddit"],"latest_commit_sha":null,"homepage":"https://andinus.unfla.me/projects/draco/","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andinus.png","metadata":{"files":{"readme":"README.org","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-11-18T19:15:24.000Z","updated_at":"2023-01-27T08:09:49.000Z","dependencies_parsed_at":"2024-01-31T10:09:16.903Z","dependency_job_id":null,"html_url":"https://github.com/andinus/draco","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andinus%2Fdraco","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andinus%2Fdraco/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andinus%2Fdraco/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andinus%2Fdraco/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andinus","download_url":"https://codeload.github.com/andinus/draco/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227621914,"owners_count":17795021,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","org-mode","reddit"],"created_at":"2024-08-15T16:01:44.125Z","updated_at":"2024-12-01T20:09:02.238Z","avatar_url":"https://github.com/andinus.png","language":"Perl","funding_links":[],"categories":["Perl"],"sub_categories":[],"readme":"#+title: Draco\n#+setupfile: ~/.emacs.d/org-templates/projects.org\n#+export_file_name: index\n\nDraco is a script to convert reddit thread to Org document. It accepts a\nurl \u0026 prints the Org document to STDOUT. It'll also print comments along\nwith their replies.\n\n| Project Home    | [[https://andinus.nand.sh/projects/draco/][Draco]]           |\n| Source Code     | [[https://git.unfla.me/draco/][Andinus / Draco]] |\n| GitHub (Mirror) | [[https://github.com/andinus/draco/][Draco - GitHub]]  |\n\n* Why?\n\nI reference things from the web in my Journal \u0026 don't want those links\nto break so I save them locally. Previously I used to manually archive\nthe whole thread, this automates it.\n\n* Demo\n\nThis was recorded with =asciinema(1)=.\n\n[[https://asciinema.org/a/373860][https://asciinema.org/a/373860.png]]\n\n+ Draco v0.3.2: https://asciinema.org/a/375432\n+ Draco v0.1.2: https://asciinema.org/a/373860\n+ Draco 2020-11-19: https://asciinema.org/a/373851\n+ alt-link (download): https://andinus.nand.sh/static/draco/\n\n* Installation\n\nFollow these instructions to get draco \u0026 then install the dependencies,\nthey're listed below. All dependencies are in Debian \u0026 Fedora\nrepositories.\n\nCheck the /News/ section before updating or downloading latest release.\n\n** Release\n\nRelease archives are generated by cgit/GitHub.\n\n1. Download the release:\n   - https://git.tilde.institute/andinus/draco\n   - https://github.com/andinus/draco/releases\n2. Extract the file.\n3. =cd= into the directory.\n4. Run =make install= as root.\n5. Install dependencies.\n\n** From Source\n\nAll commits will be signed by my [[https://andinus.nand.sh/static/D9AE4AEEE1F1B3598E81D9DFB67D55D482A799FD.asc][PGP Key]].\n\n#+begin_src sh\n# Clone the project.\ngit clone https://git.tilde.institute/andinus/draco\ncd draco\n\n# Install draco. Use `sudo' if `doas' is not present.\ndoas make install\n\n# Install dependencies. See the section below.\n#+end_src\n\n* Dependencies\n\n** OpenBSD\n\n#+begin_src sh\ndoas pkg_add p5-Unicode-LineBreak p5-JSON-MaybeXS p5-IO-Socket-SSL\ncpan install HTTP::Tiny\n#+end_src\n\n** Debian (apt)\n\n#+begin_src sh\nsudo apt install libunicode-linebreak-perl libjson-maybexs-perl \\\n     libhttp-tiny-perl libio-socket-ssl-perl\n#+end_src\n\n** Fedora (dnf)\n\n#+begin_src sh\nsudo dnf install perl-JSON-MaybeXS perl-HTTP-Tiny perl-Unicode-LineBreak \\\n     perl-IO-Socket-SSL\n#+end_src\n\n* News\n\n** v0.3.3 - 2022-08-09\n\n+ Add IO::Socket::SSL dependency.\n  Required for HTTPs support.\n\n+ Print response 'contents' on errors.\n  From https://metacpan.org/pod/HTTP::Tiny,\n  #+begin_quote\n  Errors during request execution will result in a pseudo-HTTP status\n  code of 599 and a reason of \"Internal Exception\". The content field in\n  the response will contain the text of the error.\n  #+end_quote\n\n** v0.3.2 - 2020-11-26\n\n+ Add =author_flair_text= to properties section of each comment.\n+ Keep each dot in a single line.\n  This feature was added in v0.3.0 but each dot was printed in a new\n  line. For huge posts this would be annoying so now dots are printed in\n  a single line.\n\n** v0.3.1 - 2020-11-25\n\nMinor improvement.\n\n+ Put author name in code block if it begins \u0026 ends with \"=_=\".\n  Org underlines headings that begin \u0026 end with \"=_=\".\n\n** v0.3.0 - 2020-11-24\n\nThis version adds code to fetch all the comments in a thread. Now users\ncan archive the whole thread.\n\nEveryone should get this update, the code has become a lot more complex\nsince v0.1.3. If you don't want to update then you can get the patches\nfor small changes from the git history.\n\n+ Fetch all the comments.\n+ Add debug message for HTTP calls.\n  It'll print a \".\" for every HTTP call. Users will be able to tell when\n  the script is making HTTP calls.\n\n** v0.2.2 - 2020-11-24\n\nThis version is mostly structural changes, it'll now be easier to add\ncode to fetch comments hidden behind \"continue this thread\".\n\n+ Add more debug information.\n\n** v0.2.1 - 2020-11-24\n\n+ Previously fetching comments hidden under \"load more comments\" would\n  fail if the url passed by user ends in \"/\". This has been fixed in\n  this release.\n\n** v0.2.0 - 2020-11-23\n\nThis version makes the script lot more complex. If you download only\nsmall threads then this update is not required.\n\nPrevious version (v0.1.3) might throw some errors on threads that have\ncomments hidden behind \"load more comments\" but the rest of thread will\nbe saved.\n\nThis version will load all those comments hidden behind \"load more\ncomments\". But not those hidden behind \"continue this thread\". This is a\nknown bug.\n\n+ Add \"[S]\" after submitter's comments.\n+ Print comments hidden under \"load more comments\".\n+ Document environment variables in manual.\n+ Add \"limit=500\" \u0026 \"sort=top\" to all posts/comments.\n+ Print more information when debug is on.\n+ Add help option.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandinus%2Fdraco","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandinus%2Fdraco","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandinus%2Fdraco/lists"}