No commit activity in last 3 years
No release in over 3 years
LineHeadWasher remove start of target pattern charactors.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
~> 2.14.1
~> 0.8.2

Runtime

~> 4.0.2
 Project Readme

LineHeadWasher

Build Status Coverage Status

LineHeadWasher remove start of target pattern charactors.

Installation

Add this line to your application's Gemfile:

gem 'line_head_washer'

And then execute:

$ bundle

Or install it yourself as:

$ gem install line_head_washer

Usage

generate Washfile

lhwasher init
# encoding: utf-8

# input file or directory by regexp
# input is required
# input allow only String
# input's default value => "./*.txt"
input "./*.txt"

# output directory
# output is required
# output allow only String
# output's default value => "./"
output "./"

# remove_regexp
# remove_regexp is required
# remove_regexp allow only String
# remove_regexp's default value => "[ |	]"
remove_regexp "[ |	]"

edit Washfile

# encoding: utf-8

input "./inputs/*.txt"
output "./outputs"
remove_regexp "[ |	]*"

prepare test input files

$ mkdir inputs
$ cat <<EOS>test1.txt
hoge
  hige
	hege
EOS
$ cat <<EOS>test2.txt
hoge
hige  
hege	
EOS

execute wash files

lhwasher e

check results

$ cat outputs/test1.txt

$ cat outputs/test2.txt

History

version 0.0.2 : test version up. version 0.0.1 : first release.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request