Geoffrey42 / xSniper

Just a small utility of CSV file columns and cells

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

xSniper

Build Status codecov Updates Python 3 License: MIT

Just a little CSV columns and cells utility.

Table of Contents

Prerequisites

Installation

git clone git@github.com:Geoffrey42/xSniper.git
cd /xSniper
virtualenv venv
source venv/bin/activate

You should now see your prompt prefixed by:

(venv) $

The first time, run:

pip install -r requirements.txt

Usage

From command line

Usage:
    xSniper cell <src.csv> <target.csv> <common-key> [--target-header=<key-header>] (<value-header> | --new-header=<name>) [--output=<output.csv> | -o=<output.csv>]
    xSniper column <src.csv> <target.csv> (<target-header>... | -a | --all) [--output=<output.csv> | -o=<output.csv>]
    xSniper (--help | -h)
    xSniper (--version | -v)

Options:
    -h --help       Show this screen.
    -v --version    Show version.
    cell            if -o is present: write value found in <target.csv>
                    with content from <src.csv> under <value-header> or --new-header in <output.csv>. If not, write in <src.csv>. <common-key must be present in both *.csv files>
    column          if -o is present: write entire <target-header>'s <target.csv> in <output.csv>. If not, write in <result.csv>

Examples

Cell mode

cell mode

Column mode

cell mode

Contributing

Pull requests are welcome. For more details, please refers to our contributing file.

License

MIT

About

Just a small utility of CSV file columns and cells

License:MIT License


Languages

Language:Python 98.1%Language:Makefile 1.9%