diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2013-08-29 22:58:56 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2013-08-29 22:58:56 -0400 |
commit | f1c28ec52e331ccb8cac0470811d6f66dc09692b (patch) | |
tree | 246c14291a8457a9e9e75cd64521fe3079598a1c | |
parent | 001c5dac095d31fba4ba545ed3902e2ab026792a (diff) | |
download | slp_misc-f1c28ec52e331ccb8cac0470811d6f66dc09692b.tar.gz slp_misc-f1c28ec52e331ccb8cac0470811d6f66dc09692b.tar.bz2 slp_misc-f1c28ec52e331ccb8cac0470811d6f66dc09692b.zip |
update conversion script to split out months too.
-rw-r--r-- | nb2ikiwiki.pl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/nb2ikiwiki.pl b/nb2ikiwiki.pl index 80766c0..2835985 100644 --- a/nb2ikiwiki.pl +++ b/nb2ikiwiki.pl @@ -160,9 +160,11 @@ close(OUT); # Note that subdirectories for each year are created. my $year = &UnixDate($date, "%Y"); - mkdir($year); + my $month = &UnixDate($date, "%m"); + mkdir("$year"); + mkdir("$year/$month"); - open(OUT, ">" . $year . "/" . sanitize($title) . ".mdwn") or die "Unable to open article output file"; + open(OUT, ">" . $year . "/" . $month . "/" . sanitize($title) . ".mdwn") or die "Unable to open article output file"; print OUT $formatted_article; close(OUT); } |