| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Looks prettier.
|
|
|
|
|
|
| |
New demo image link wasn't working, I guess it'll take some time to
generate the png. I'll link to the old demo. And the alt-links were
clutter so I replaced them with a single link to the directory.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Looks like downs is always set to 0 & ups is equal to score so no
point in saving those.
|
|
|
|
|
| |
It was already included but some people might need the raw value so we
include that too. It's included in brackets after parsed value.
|
|
|
|
|
| |
It could put a lot of dots, each in new line which makes reading
previous debug messages hard.
|
| |
|
| |
|
|
|
|
|
| |
If the author name starts & ends with "_" then Org will underline it,
so we put those names in a code block.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This will handle all the comments now!
I've explained the change in comments but I'll paste it here too:
The problem here is that if the thread is too large then at
the end reddit will include similar block in which it'll put
all other top-level comments in children of 2nd kind.
"kind": "more",
"data": {
"id": "gde31fk",
...
"children": [
"gde31fk",
"gdbrnyd",
...
If the "load more comments" only hides a single thread then
it's the only one included in "children". Note how the "id" &
first element of "children" is same.
So, reddit wants us to check for the length of this list
"children", if it is greater than 1 then we need to pull those
comments independently. If not then we just have
|
|
|
|
|
|
|
| |
Now Draco prints all comments except top-level comments hidden under
"load more comments".
I forgot to check for those kind of comments.
|
| |
|
|
|
|
| |
This bug wasn't present in v0.2.1 so I've removed it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
iterate_over_comments() is a sub to handle all comments.
print_comment_chain() can only parse first kind of comments now, i.e.
top-level comments & their replies.
Comments hidden under "load more comments" & "continue this thread"
require other operations before print_comment_chain() can print them.
All those operations are handled by iterate_over_comments().
Currently "continue this thread" is skipped but "load more comments"
is parsed. This doesn't add anything to previous releases but just
changes the structure.
I'm just preparing to add code to parse comments hidden under
"continue this thread". After that Draco will be able to archive the
whole thread. Previously handling this would've required copying the
same code over 3 times, now it'll be handled at one place.
3 times would've been:
1. when we start iterating over top-level comments.
2. when comments hidden under "load more comments" are parsed &
their child is hidden under "continue this thread".
3. when replies of normal comments are hidden under "continue this
thread".
Case 1 & 2 is fixed by switching to iterate_over_comments(). For
third, the replies are handled by iterate_over_comments() so the 3rd
case is also fixed.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
$comment in print_comment_chain() was changed to $comment_data to
prevent confusion in future.
We have to check if url has "/" at the end because if it does have it
then previously we were appending "$comment_data->{id}.json" to it
which makes the url look like:
http://<reddit>/<post_id>//<comment_id>.json
And reddit doesn't like that, reddit wants it to be:
http://<reddit>/<post_id>/<comment_id>.json
Notice the double '/' in previous link.
|
| |
|
|
|
|
|
|
|
|
|
| |
This version makes the script lot more complex.
This version will load all those comments hidden behind "load more
comments". But not those hidden behind "continue this thread".
Starting this release we have a News section.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Unicode::LineBreak seems better.
|
| |
|
|
|
|
|
|
| |
Space before each line was done because some text may contain `*' at
the start of line which confuses Org & it presents that as a new
heading. Inserting a space before every new line fixes this.
|
| |
|
|
|