diff options
author | yuri <yuri@FreeBSD.org> | 2018-04-05 12:45:13 +0800 |
---|---|---|
committer | yuri <yuri@FreeBSD.org> | 2018-04-05 12:45:13 +0800 |
commit | c45494b178c59af3fb4d9397c326bc43f4f1a3f5 (patch) | |
tree | 9623641da943b53da13bacd4534bf9b0114552a8 | |
parent | c1c1eb532141ba7608ffcc444621cdbd23f97b02 (diff) | |
download | freebsd-ports-gnome-c45494b178c59af3fb4d9397c326bc43f4f1a3f5.tar.gz freebsd-ports-gnome-c45494b178c59af3fb4d9397c326bc43f4f1a3f5.tar.zst freebsd-ports-gnome-c45494b178c59af3fb4d9397c326bc43f4f1a3f5.zip |
New port: textproc/py-textfsm: Parses semi-structured text into Python tables
PR: 227076
Submitted by: Kai <freebsd_ports@k-worx.org>
-rw-r--r-- | textproc/Makefile | 1 | ||||
-rw-r--r-- | textproc/py-textfsm/Makefile | 21 | ||||
-rw-r--r-- | textproc/py-textfsm/distinfo | 3 | ||||
-rw-r--r-- | textproc/py-textfsm/pkg-descr | 17 |
4 files changed, 42 insertions, 0 deletions
diff --git a/textproc/Makefile b/textproc/Makefile index 1bfb47d34f54..fdaac3053bed 100644 --- a/textproc/Makefile +++ b/textproc/Makefile @@ -1393,6 +1393,7 @@ SUBDIR += py-syck SUBDIR += py-tabletext SUBDIR += py-terminaltables + SUBDIR += py-textfsm SUBDIR += py-texttable SUBDIR += py-tinycss SUBDIR += py-toronado diff --git a/textproc/py-textfsm/Makefile b/textproc/py-textfsm/Makefile new file mode 100644 index 000000000000..621a34fc5b59 --- /dev/null +++ b/textproc/py-textfsm/Makefile @@ -0,0 +1,21 @@ +# $FreeBSD$ + +PORTNAME= textfsm +DISTVERSION= 0.4.0 +CATEGORIES= textproc python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= freebsd_ports@k-worx.org +COMMENT= Parses semi-structured text into Python tables + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/COPYING + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR} + +USES= python +USE_PYTHON= distutils autoplist +NO_ARCH= yes + +.include <bsd.port.mk> diff --git a/textproc/py-textfsm/distinfo b/textproc/py-textfsm/distinfo new file mode 100644 index 000000000000..9ad96eb99699 --- /dev/null +++ b/textproc/py-textfsm/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1522335440 +SHA256 (textfsm-0.4.0.tar.gz) = 41b51501f5e0e4bd02dc521bee3565a95cc576fe6ebf3625d2fb2d32c241a32e +SIZE (textfsm-0.4.0.tar.gz) = 38355 diff --git a/textproc/py-textfsm/pkg-descr b/textproc/py-textfsm/pkg-descr new file mode 100644 index 000000000000..333f945d9bd4 --- /dev/null +++ b/textproc/py-textfsm/pkg-descr @@ -0,0 +1,17 @@ +Python module which implements a template based state machine for parsing +semi-formatted text. Originally developed to allow programmatic access to +information returned from the command line interface (CLI) of networking +devices. + +The engine takes two inputs - a template file, and text input (such as command +responses from the CLI of a device) and returns a list of records that contains +the data parsed from the text. + +A template file is needed for each uniquely structured text input. Some examples +are provided with the code and users are encouraged to develop their own. + +By developing a pool of template files, scripts can call TextFSM to parse useful +information from a variety of sources. It is also possible to use different +templates on the same data in order to create different tables (or views). + +WWW: https://github.com/google/textfsm |