Skip to content

Instantly share code, notes, and snippets.

@ConstantineXVI
Created December 3, 2012 18:44
Show Gist options
  • Save ConstantineXVI/4197014 to your computer and use it in GitHub Desktop.
Save ConstantineXVI/4197014 to your computer and use it in GitHub Desktop.
Embloginate
#!/usr/bin/env perl
chdir($ARGV[0]);
my $doc = `rake new_post["$ARGV[2]"]`;
my $file;
my $pwd = `pwd`;
if ($doc =~ /(source\/_posts\/.*\.markdown)/) {
$file = $pwd . "/" . $1;
$file =~ s/\n//;
system("$ARGV[1] $file");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment