diff options
author | Andinus <andinus@nand.sh> | 2020-11-19 12:18:35 +0530 |
---|---|---|
committer | Andinus <andinus@nand.sh> | 2020-11-19 12:18:35 +0530 |
commit | 04b437bcbd26480d60e4c514ff32bbeacf8881e7 (patch) | |
tree | 48181dcd066a85b6a7b60fcebf4d50337b056ec4 | |
parent | 6ba91ec366a853d3b5dab64b3746af64726bca04 (diff) | |
download | draco-04b437bcbd26480d60e4c514ff32bbeacf8881e7.tar.gz |
Add date to the document
-rwxr-xr-x | draco.pl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/draco.pl b/draco.pl index a926246..6209123 100755 --- a/draco.pl +++ b/draco.pl @@ -6,6 +6,8 @@ use warnings; use HTTP::Tiny; use JSON::MaybeXS; +use POSIX qw(strftime); + # For wrapping comment blocks. use Unicode::LineBreak; my $lb = Unicode::LineBreak->new(ColMax => 76); # Default is 76. @@ -46,6 +48,11 @@ my $post = $json_data->[0]->{data}->{children}->[0]->{data}; # Start the Org document. print "#+", "STARTUP:content\n"; +# Print the date. +my $date = strftime '%+', localtime(); +print "#+", "DATE: $date\n"; +print "\n"; + # Print the post title. print "* ", "$post->{title}\n"; |