The nmis-parser package

[ Tags: bsd3, library, parsers, text ] [ Propose Tags ]

Parser for NMIS (Network Management Information System) files to record type. Main module to use is Text.Nmis and parseNmis function

[Skip to Readme]


Dependencies base (>=4.7 && <5), containers, megaparsec (<5.3.2) [details]
License BSD3
Copyright 2017 Sasa Bogicevic
Author Sasa Bogicevic
Category Text, Parsers
Home page
Source repository head: git clone
Uploaded Sat Aug 12 21:03:42 UTC 2017 by v0d1ch
Downloads 308 total (138 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2017-08-12 [all 1 reports]
Hackage Matrix CI




Maintainer's Corner

For package maintainers and hackage trustees

Readme for nmis-parser-

[back to package description]

NMIS file parser

  • NMIS stands for Network Management Information System

This parser parses the NMIS format files to Nmis record type

Example usage :

  module Main where
  import System.Environment (getArgs)
  import System.IO
  import Text.Megaparsec
  import Text.Nmis

  main :: IO ()
  main = do
    args <- getArgs
    case args of
      [] -> putStrLn "error: you need to pass in file path"
      [path] -> do
              contents <- readFile path
              let result = parse parseNmis "" contents
              case result of
                  Left nodes -> print $ parseErrorPretty nodes
                  Right nodes -> do
                      print nodes
      _ -> putStrLn "error: you need to pass in only one file path"