kawatte

command module
v0.0.0-...-279c5e6 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2024 License: MIT Imports: 3 Imported by: 0

README

Kawatte GoDoc Go Report Card

Kawatte recursively walks the file tree and finds and replaces the patterns found in a substitution file.

Installation

First install Go.

If you just want to install the binary to your current directory and don't care about the source code, run

GOBIN="$(pwd)" go install github.com/earthboundkid/kawatte@latest

Screenshots

kawatte - (devel)

Kawatte recursively walks the file tree and finds and replaces the patterns
found in a substitution file. The substitution file is a CSV file of
old,new substitutions.

Example:

-- subs.csv --
a,b
b,c
c,a
-- in.txt --
abcdef

kawatte -pat subs.csv -match '*.txt'

-- in.txt --
bcadef


Usage:

	kawatte [options]

Options:
  -dir directory
    	path to the starting directory (default ".")
  -dry-run
    	just print the names of files that would be modified
  -exclude glob
    	glob matching files to exclude (default .*)
  -exclude-dir glob
    	glob matching directories to exclude (default .*)
  -match glob
    	glob matching files to include (default *)
  -match-dir glob
    	glob matching directories to include (default *)
  -pat file
    	path to the CSV file containing substitution patterns
  -v	short alias for -version
  -verbose
    	log debug output
  -version
    	print version information and exit

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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