aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--pastebin/skeleton.org2
-rwxr-xr-xpastebin/website-pastebin9
2 files changed, 9 insertions, 2 deletions
diff --git a/pastebin/skeleton.org b/pastebin/skeleton.org
index f97da72..d116991 100644
--- a/pastebin/skeleton.org
+++ b/pastebin/skeleton.org
@@ -2,6 +2,6 @@
title: $title
date: $date
---
-#+BEGIN_SRC FIXME -n
+#+BEGIN_SRC $lang -n
FIXME
#+END_SRC
diff --git a/pastebin/website-pastebin b/pastebin/website-pastebin
index 0d38ac2..9aa4956 100755
--- a/pastebin/website-pastebin
+++ b/pastebin/website-pastebin
@@ -42,10 +42,12 @@ use Term::ANSIColor;
my $help = 0;
my $title = '';
+my $lang = '';
my $test = 0;
GetOptions(
'help|h|?' => \$help,
'title|t=s' => \$title,
+ 'lang|l=s' => \$lang,
'test|?' => \$test
) or pod2usage(-verbose => 1, -exitval => 2);
pod2usage(
@@ -57,6 +59,11 @@ pod2usage(
-exitval => 2,
-message => colored("Missing required --title argument.", "red")
) if !$title && !$test;
+pod2usage(
+ -verbose =>1,
+ -exitval => 2,
+ -message => colored("Missing required --lang argument.", "red")
+) if !$lang && !$test;
# Taken from:
# https://stackoverflow.com/a/4009519
@@ -87,7 +94,7 @@ our $in = "$dirname/skeleton.org";
our $out;
my $date = `date +"%Y-%m-%d"`;
chomp $date;
-my %ENV = (title => $title, date => $date);
+my %ENV = (title => $title, date => $date, lang => $lang);
# Derived from both:
# https://unix.stackexchange.com/a/294836