Skip to content

Instantly share code, notes, and snippets.

@pjf
Created November 16, 2014 12:15
Show Gist options
  • Save pjf/3a7ab40beba836c8d95f to your computer and use it in GitHub Desktop.
Save pjf/3a7ab40beba836c8d95f to your computer and use it in GitHub Desktop.
Inflate and validate netkan files directory into CKAN-meta
#!/usr/bin/perl
use 5.010;
use strict;
use warnings;
use autodie qw(:all);
my ($file) = @ARGV;
my ($base) = ($file =~ m{(?:.*/)?(.*)\.netkan$});
system("../CKAN/netkan.exe --outputdir=../CKAN-meta/ $file");
system("../CKAN/bin/ckan-validate ../CKAN-meta/$base*.ckan");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment