From 66de9c0d2a375ff32cd65977768d94271e066b46 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Wed, 1 Mar 2017 18:23:03 -0800 Subject: [PATCH] basics --- Pipfile | 6 ++++++ setup.py | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ toml2json | 10 ++++++++++ 3 files changed, 65 insertions(+) create mode 100644 Pipfile create mode 100644 setup.py create mode 100755 toml2json diff --git a/Pipfile b/Pipfile new file mode 100644 index 0000000..5ba556c --- /dev/null +++ b/Pipfile @@ -0,0 +1,6 @@ +[[source]] +url = "https://pypi.python.org/simple" +verify_ssl = true + +[packages] +toml = "*" diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..1758e42 --- /dev/null +++ b/setup.py @@ -0,0 +1,49 @@ +""" +pip-pop manages your requirements files. +""" +import sys +from setuptools import setup + + +setup( + name='toml2json', + version='0.1.0', + url='https://github.com/kennethreitz/toml2json', + license='MIT', + author='Kenneth Reitz', + author_email='me@kennethreitz.org', + # description=__doc__.strip('\n'), + #packages=[], + scripts=['toml2json'], + #include_package_data=True, + zip_safe=False, + platforms='any', + install_requires=['toml'], + classifiers=[ + # As from https://pypi.python.org/pypi?%3Aaction=list_classifiers + #'Development Status :: 1 - Planning', + #'Development Status :: 2 - Pre-Alpha', + #'Development Status :: 3 - Alpha', + 'Development Status :: 4 - Beta', + #'Development Status :: 5 - Production/Stable', + #'Development Status :: 6 - Mature', + #'Development Status :: 7 - Inactive', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + #'Programming Language :: Python :: 2.3', + #'Programming Language :: Python :: 2.4', + #'Programming Language :: Python :: 2.5', + 'Programming Language :: Python :: 2.6', + 'Programming Language :: Python :: 2.7', + #'Programming Language :: Python :: 3', + #'Programming Language :: Python :: 3.0', + #'Programming Language :: Python :: 3.1', + #'Programming Language :: Python :: 3.2', + #'Programming Language :: Python :: 3.3', + 'Intended Audience :: Developers', + 'Intended Audience :: System Administrators', + 'License :: OSI Approved :: BSD License', + 'Operating System :: OS Independent', + 'Topic :: System :: Systems Administration', + ] +) \ No newline at end of file diff --git a/toml2json b/toml2json new file mode 100755 index 0000000..8043d6b --- /dev/null +++ b/toml2json @@ -0,0 +1,10 @@ +#!/usr/bin/env python + +import sys +import json + +import toml + +piped_in = sys.stdin.read() + +print(json.dumps(toml.loads(piped_in))) \ No newline at end of file