Git Product home page Git Product logo

lcad's Introduction

lcad: Load, convert and dump

Convert any data type to any data type.

Examples:

  • Convert json to yaml:
lcad convert --from json --to yaml --input-file file.json
  • Display a yaml file as a table:
lcad convert --from yaml --to tabulate --input-file file.json

Supported formats:

This table shows what format lcad can read (input) and write (output).

format input output notes
json
yaml
csv
pandas https://pandas.pydata.org/
tabulate https://pypi.org/project/tabulate/
vertical a kind of vertical formatting
py raw Python
pickle serialized Python
lines a list, one element per line

Install

Install as a binary file

make
make install
  • Extra tip: add shell aliases
alias py2json="lcad convert --from py --to json"
alias py2yaml="lcad convert --from py --to yaml"
alias json2py="lcad convert --from json --to py"
alias json2yaml="lcad convert --from json --to yaml"
alias yaml2json="lcad convert --from yaml --to json"
alias yaml2py="lcad convert --from yaml --to py"
alias yaml2csv="lcad convert --from yaml --to csv"
alias csv2yaml="lcad convert --from csv --to yaml"
alias yaml2lines="lcad convert --from yaml --to lines"
alias lines2yaml="lcad convert --from lines --to yaml"

Execute locally

PYTHONPATH=. python ./bin/lcad_bin.py

Development

Execute tests

make clean
make tests
  • pytest tip: Add --capture=no to see print() statements

Build the doc

make doc

The generated doc is available at doc/index.html.

Release

  1. Create release branch
  2. Update version in lcad/__init__.py
  3. Pin versions in requirements.txt
  4. Execute tests with make clean tests
  5. Merge into master
  6. tag with git tag ...
  7. push the work with git push && git push --tags
  8. Install locally with make install
  9. Update version in lcad/__init__.py to master

lcad's People

Contributors

samk avatar

Watchers

 avatar

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.