diff options
author | Kristian Lyngstol <kristian@bohemians.org> | 2016-04-12 18:01:32 +0200 |
---|---|---|
committer | Kristian Lyngstol <kristian@bohemians.org> | 2016-04-12 18:01:32 +0200 |
commit | 09ea945c3908fd42e90eb64c194d9af11d174206 (patch) | |
tree | 8bcf0f98113ea4a92effa1c39344730c7e6f50b0 /tools/add_switches.txt.pl | |
parent | c3ebdbda43c23ade1e49dfd9f546fba1d15f9941 (diff) |
Actual initial import
Fetched from tgmanage.
Diffstat (limited to 'tools/add_switches.txt.pl')
-rwxr-xr-x | tools/add_switches.txt.pl | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/add_switches.txt.pl b/tools/add_switches.txt.pl new file mode 100755 index 0000000..635e356 --- /dev/null +++ b/tools/add_switches.txt.pl @@ -0,0 +1,17 @@ +#!/usr/bin/perl +# Usage: ./add_switches.txt.pl < switches.txt > switches.json +# +# Parses switches.txt into json currently just throws it to stdout +# +# Actually adding them to a DB comes later. + +use strict; +use warnings; +use Data::Dumper; +use lib '../include'; +use JSON; +use nms::util; + +my @switches = parse_switches_txt(*STDIN); + +print JSON::XS::encode_json(\@switches); |