GithubHelp home page GithubHelp logo

transmogrifier's Introduction

transmogrifier

Author

Jonathan Wight <[email protected]>

Description

Python command line tool to convert data between different formats

Currently works with JSON, yaml and (XML based) plists

Install

From source:

$ python setup.py install

Or if you wish to help develop transmogrifier

$ python setup.py develop

With pip:

$ pip install transmogrifier

Usage

usage: transmogrifier [-h] [-i INPUT] [--input-type INPUT_TYPE] [-o OUTPUT]
                      [--output-type INPUT_TYPE] [--pretty] [-v]
                      [--loglevel LOGLEVEL] [--logfile LOG_FILE]
                      [args [args ...]]

positional arguments:
  args

optional arguments:
  -h, --help            show this help message and exit
  -i INPUT, --input INPUT
                        The input file (type is inferred by file extension).
  --input-type INPUT_TYPE
                        The input file type (overides file extension if any).
  -o OUTPUT, --output OUTPUT
                        Output directory for generated files.
  --output-type INPUT_TYPE
                        The output file type (overides file extension if any).
  --pretty              Prettify the output (where possible).
  -v, --verbose         set the log level to INFO
  --loglevel LOGLEVEL   set the log level, 0 = no log, 10+ = level of logging
  --logfile LOG_FILE    File to log messages to. If - or not provided then
                        stdout is used.

Examples

Read Test.json, prettify it and print it to standard output

$ transmogrifier —pretty -i Test.json

Read Test.plist and save it as Test.json

$ transmogrifier -i Test.plist —output-type json

Read file Test.txt as JSON and save it as yaml file Test.yaml

t$ ransmogrifier —input-type=json Test.txt Test.yaml

Known Issues

  • Doesn’t work with multiple YAML documents in one file. YAML parsing
  • seems too accepting. Check that what you’re converting makes sense.

transmogrifier's People

Contributors

schwa avatar

Watchers

 avatar  avatar  avatar

Forkers

fish2000

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.