From 9c5a8783e922b23621e4cf94612fd2d54b668f8a Mon Sep 17 00:00:00 2001 From: Andinus Date: Thu, 19 Nov 2020 12:22:54 +0530 Subject: Link the post title to url --- draco.pl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/draco.pl b/draco.pl index 6209123..bd5be36 100755 --- a/draco.pl +++ b/draco.pl @@ -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. -- cgit 1.4.1-2-gfad0