Git Product home page Git Product logo

csvsplit's People

Contributors

frontporchstep avatar jeffpaine avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

csvsplit's Issues

Move or copy docs into package doc?

To be more idiomatically go, the package documentation ought to be in comments directly above the package main declaration. The only concern I have is with either having an anemic README.md or having full versions of both but having to keep them in sync.

Add a -padding flag?

It should count the lines in a file and pad filenames appropriately. e.g. 001.csv, 002.csv instead of 1.csv, 2.csv. This should default to false as it will require a file to be read twice.

Refactor saveCSVFile

This part especially feels wonky

if _, err := os.Stat(fileName); os.IsNotExist(err)...

Handling of csv headers

Add one to each file?

Right now, the header (if it's present in the original) is only printed to the first file.

No -input flag?

Or at least make it optional? E.g.

$ csvsplit -records 10 file.csv

Instead of / equivalent to

$ csvsplit -records 10 -input files.csv

Better default output file numbering

Right now, we auto-append 001, 002, etc. to output filenames. It would be cool to have this zero padding reflect the number of files actually saved (e.g. 01.csv for < 99 files), but I would think that would require us to count (read into memory) all the lines of the file, first.

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.