rangespec

package module
v0.0.0-...-278b3e4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2023 License: MIT Imports: 4 Imported by: 0

README

CSV Utilities

This repo has a collection of CSV utilities to manipulate CSV files. Here is a brief description of each. Each utility is in its own folder and has its own README.

  • catcsv: concatenate two CSV files
  • comparecsv: compare two CSV files
  • dedupcsv: remove duplicates in a CSV file
  • diffcsv: shows differences between two CSV files
  • editcsv: alter contents of a CSV; regexp replace supported
  • obfuscatecsv: obscures content in a regular fashion
  • pivotcsv: do a pivot table operation
  • recursecsv: recursively process hierarchical data; supports the Oracle list of hierarchical functions
  • reordercsv: alters order of columns of a CSV file
  • searchcsv: outputs matching rows of a CSV file; regexp supported
  • sortcsv: sorts a CSV file
  • splitcsv: splits a CSV by columns and/or rows
  • transformcsv: using a "text/template", will transform a CSV by applying the template for each row

Each utility has its own README with examples.

To install go get github.com/mandolyte/csv-utils.

Afterwards you can use go install to compile the ones of interest or just use go run.

To install all of them: sh build_all.sh.

To Do:

  • document recursedata.go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RangeSpec

type RangeSpec struct {
	Max uint64
	// contains filtered or unexported fields
}

RangeSpec parses a range specification, such as: 1,3,5-8,12- It will return a slice of RangeSpec, being two ints, a start and a stop Ranges start at 1, not zero.

func New

func New(r string) (*RangeSpec, error)

New takes a range specification string and returns a slice of RangeSpec structs

func (*RangeSpec) InRange

func (rs *RangeSpec) InRange(num uint64) bool

InRange will test whehter a number is in the range specification

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL