diff options
| author | Andinus <andinus@nand.sh> | 2020-11-19 12:22:54 +0530 |
|---|---|---|
| committer | Andinus <andinus@nand.sh> | 2020-11-19 12:22:54 +0530 |
| commit | 9c5a8783e922b23621e4cf94612fd2d54b668f8a (patch) | |
| tree | e2180f59f6a261ebbfa6b75c704a7cab13a4430b | |
| parent | 04b437bcbd26480d60e4c514ff32bbeacf8881e7 (diff) | |
| download | draco-9c5a8783e922b23621e4cf94612fd2d54b668f8a.tar.gz | |
Link the post title to url
| -rwxr-xr-x | draco.pl | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -53,8 +53,8 @@ my $date = strftime '%+', localtime(); print "#+", "DATE: $date\n"; print "\n"; -# Print the post title. -print "* ", "$post->{title}\n"; +# Print the post title & it's link. +print "* ", "[[$post->{url}][$post->{title}]]\n"; # Add various details to :PROPERTIES:. print ":PROPERTIES:\n"; @@ -65,13 +65,12 @@ foreach my $detail (qw( subreddit created_utc author permalink } print ":END:\n"; -# Add selftext/url if present. +# Add selftext if present. print "\n#+BEGIN_SRC markdown\n", # Break the text at 76 column & add 2 space before every new line. " ", $lb->break($post->{selftext}) =~ s/\n/\n\ \ /gr, "\n", "#+END_SRC\n" if scalar $post->{selftext}; -print "$post->{url}\n" if scalar $post->{selftext}; # $comments contains comment data. We are interested in: replies, # author, body, created_utc & permalink. |