Coder Social home page Coder Social logo

anon-csv-cli's Introduction

Rust Crates.io

A tool to anonymise CSV files, providing various options to substitute real data with plausable fake data.

Installation

Using Cargo (which you can install via https://rustup.rs):

cargo install anon-csv-cli

Or via download - the binary will fit your platform:

curl -LSfs https://japaric.github.io/trust/install.sh | \
    sh -s -- --git byron/anon-csv-cli --crate anon-csv

Usage

curl https://people.sc.fsu.edu/~jburkardt/data/csv/addresses.csv > addresses.csv
anon-csv ./addresses.csv  0:name.first_name 1:name.last_name 2:address.street_name 3:address.city 4:address.state_abbr 5:address.zip

Use the --header flag to ignore the first line, usually the header, and the --delimiter <other delimiter> flag to use a different field delimiter. The latter defaults to ,.

Works well with XSV

XSV is a tool to perform various operations on CSV files. It can be used in conjunction with this one for additional processing.

https://github.com/BurntSushi/xsv

Available fake data types

The fake data is provided by the fake crate.

Name.first_name
Name.last_name
Name.prefix
Name.suffix
Name.name
Name.name_with_middle
Name.title_descriptor
Name.title_level
Name.title_job
Name.title

Address.time_zone
Address.city_prefix
Address.city_suffix
Address.street_suffix
Address.state
Address.state_abbr
Address.city
Address.street_name
Address.building_number
Address.street_address
Address.secondary_address
Address.zip
Address.postcode
Address.latitude
Address.longitude

Company.suffix
Company.name
Company.buzzword
Company.catch_phrase
Company.bs
Company.profession
Company.industry

Lorem.word
Lorem.words
Lorem.sentence
Lorem.sentences
Lorem.paragraph
Lorem.paragraphs

Number.phone_number
Number.cell_number
Number.digit

Internet.free_email_provider
Internet.domain_suffix
Internet.user_name
Internet.free_email
Internet.safe_email
Internet.password
Internet.ip
Internet.ipv4
Internet.ipv6
Internet.color
Internet.user_agent

Boolean.simple

anon-csv-cli's People

Contributors

byron avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.