aboutsummaryrefslogtreecommitdiffstats
path: root/extras/tools/add_switches.txt.pl
blob: 0ec38b1686acb3e1b2050658a7b7bebe6ecb174e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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 '/home/tech/gondul/include';
use JSON;
use nms::util;

my @switches = parse_switches_txt(*STDIN);

print JSON::XS::encode_json(\@switches);