aboutsummaryrefslogtreecommitdiffstats
path: root/tools/add_switches.txt.pl
diff options
context:
space:
mode:
authorKristian Lyngstol <kly@kly.no>2016-02-26 13:05:31 +0000
committerKristian Lyngstol <kly@kly.no>2016-02-26 13:05:31 +0000
commit885156ee6a26ed047bba3f90541eaab92b65d758 (patch)
treee8a70cd6bca09641efac0c64c4c20d27efab2bda /tools/add_switches.txt.pl
parentc6997a4810e09619e9018c91d163f3f38b17212c (diff)
parent3dae75bde90aecc0cef2e3496f3565dcb3eeec0c (diff)
Merge branch 'master' of github.com:tech-server/tgmanage
Diffstat (limited to 'tools/add_switches.txt.pl')
-rwxr-xr-xtools/add_switches.txt.pl16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/add_switches.txt.pl b/tools/add_switches.txt.pl
new file mode 100755
index 0000000..283eeea
--- /dev/null
+++ b/tools/add_switches.txt.pl
@@ -0,0 +1,16 @@
+#!/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 nms::util;
+
+my %switches = parse_switches_txt(*STDIN);
+
+print Dumper(\%switches);