1
- #+SETUPFILE: ~/.emacs.d/org-templates/projects.org
2
- #+EXPORT_FILE_NAME: index
3
- #+OPTIONS: toc:1
4
- #+TITLE: Draco
1
+ #+title: Draco
2
+ #+setupfile: ~/.emacs.d/org-templates/projects.org
3
+ #+export_file_name: index
5
4
6
5
Draco is a script to convert reddit thread to Org document. It accepts a
7
6
url & prints the Org document to STDOUT. It'll also print comments along
8
7
with their replies.
9
8
10
- | Project Home | [[https://andinus.nand.sh/draco/][Draco]] |
11
- | Source Code | [[https://git.tilde.institute/andinus /draco/][Andinus / Draco]] |
9
+ | Project Home | [[https://andinus.nand.sh/projects/ draco/][Draco]] |
10
+ | Source Code | [[https://git.unfla.me /draco/][Andinus / Draco]] |
12
11
| GitHub (Mirror) | [[https://github.com/andinus/draco/][Draco - GitHub]] |
13
12
14
13
* Why?
14
+
15
15
I reference things from the web in my Journal & don't want those links
16
16
to break so I save them locally. Previously I used to manually archive
17
17
the whole thread, this automates it.
18
+
18
19
* Demo
20
+
19
21
This was recorded with =asciinema(1)=.
20
22
21
23
[[https://asciinema.org/a/373860][https://asciinema.org/a/373860.png]]
@@ -24,13 +26,17 @@ This was recorded with =asciinema(1)=.
24
26
+ Draco v0.1.2: https://asciinema.org/a/373860
25
27
+ Draco 2020-11-19: https://asciinema.org/a/373851
26
28
+ alt-link (download): https://andinus.nand.sh/static/draco/
29
+
27
30
* Installation
31
+
28
32
Follow these instructions to get draco & then install the dependencies,
29
33
they're listed below. All dependencies are in Debian & Fedora
30
34
repositories.
31
35
32
36
Check the /News/ section before updating or downloading latest release.
37
+
33
38
** Release
39
+
34
40
Release archives are generated by cgit/GitHub.
35
41
36
42
1. Download the release:
@@ -40,10 +46,12 @@ Release archives are generated by cgit/GitHub.
40
46
3. =cd= into the directory.
41
47
4. Run =make install= as root.
42
48
5. Install dependencies.
49
+
43
50
** From Source
51
+
44
52
All commits will be signed by my [[https://andinus.nand.sh/static/D9AE4AEEE1F1B3598E81D9DFB67D55D482A799FD.asc][PGP Key]].
45
53
46
- #+BEGIN_SRC sh
54
+ #+begin_src sh
47
55
# Clone the project.
48
56
git clone https://git.tilde.institute/andinus/draco
49
57
cd draco
@@ -52,35 +60,63 @@ cd draco
52
60
doas make install
53
61
54
62
# Install dependencies. See the section below.
55
- #+END_SRC
63
+ #+end_src
64
+
56
65
* Dependencies
66
+
57
67
** OpenBSD
58
- #+BEGIN_SRC sh
68
+
69
+ #+begin_src sh
59
70
doas pkg_add p5-Unicode-LineBreak p5-JSON-MaybeXS p5-IO-Socket-SSL
60
71
cpan install HTTP::Tiny
61
- #+END_SRC
72
+ #+end_src
73
+
62
74
** Debian (apt)
63
- #+BEGIN_SRC sh
75
+
76
+ #+begin_src sh
64
77
sudo apt install libunicode-linebreak-perl libjson-maybexs-perl \
65
- libhttp-tiny-perl
66
- #+END_SRC
78
+ libhttp-tiny-perl libio-socket-ssl-perl
79
+ #+end_src
80
+
67
81
** Fedora (dnf)
68
- #+BEGIN_SRC sh
69
- sudo dnf install perl-JSON-MaybeXS perl-HTTP-Tiny perl-Unicode-LineBreak
70
- #+END_SRC
82
+
83
+ #+begin_src sh
84
+ sudo dnf install perl-JSON-MaybeXS perl-HTTP-Tiny perl-Unicode-LineBreak \
85
+ perl-IO-Socket-SSL
86
+ #+end_src
87
+
71
88
* News
89
+
90
+ ** v0.3.3 - 2022-08-09
91
+
92
+ + Add IO::Socket::SSL dependency.
93
+ Required for HTTPs support.
94
+
95
+ + Print response 'contents' on errors.
96
+ From https://metacpan.org/pod/HTTP::Tiny,
97
+ #+begin_quote
98
+ Errors during request execution will result in a pseudo-HTTP status
99
+ code of 599 and a reason of "Internal Exception". The content field in
100
+ the response will contain the text of the error.
101
+ #+end_quote
102
+
72
103
** v0.3.2 - 2020-11-26
104
+
73
105
+ Add =author_flair_text= to properties section of each comment.
74
106
+ Keep each dot in a single line.
75
107
This feature was added in v0.3.0 but each dot was printed in a new
76
108
line. For huge posts this would be annoying so now dots are printed in
77
109
a single line.
110
+
78
111
** v0.3.1 - 2020-11-25
112
+
79
113
Minor improvement.
80
114
81
115
+ Put author name in code block if it begins & ends with "=_=".
82
116
Org underlines headings that begin & end with "=_=".
117
+
83
118
** v0.3.0 - 2020-11-24
119
+
84
120
This version adds code to fetch all the comments in a thread. Now users
85
121
can archive the whole thread.
86
122
@@ -92,16 +128,22 @@ for small changes from the git history.
92
128
+ Add debug message for HTTP calls.
93
129
It'll print a "." for every HTTP call. Users will be able to tell when
94
130
the script is making HTTP calls.
131
+
95
132
** v0.2.2 - 2020-11-24
133
+
96
134
This version is mostly structural changes, it'll now be easier to add
97
135
code to fetch comments hidden behind "continue this thread".
98
136
99
137
+ Add more debug information.
138
+
100
139
** v0.2.1 - 2020-11-24
140
+
101
141
+ Previously fetching comments hidden under "load more comments" would
102
142
fail if the url passed by user ends in "/". This has been fixed in
103
143
this release.
144
+
104
145
** v0.2.0 - 2020-11-23
146
+
105
147
This version makes the script lot more complex. If you download only
106
148
small threads then this update is not required.
107
149
0 commit comments