overlap

Crates.iooverlap
lib.rsoverlap
version0.0.2
sourcesrc
created_at2019-02-11 17:53:58.217516
updated_at2019-02-11 23:44:33.968711
descriptionA tool shows overlap text in files
homepagehttps://gitlab.com/grauwoelfchen/overlap
repositoryhttps://gitlab.com/grauwoelfchen/overlap
max_upload_size
id114137
size26,997
Yasuhiro Яша Asaka (grauwoelfchen)

documentation

https://gitlab.com/grauwoelfchen/overlap

README

Overlap

pipeline coverage

A tool shows overlap text in files.

It works almost same as:

% find a.txt b.txt | xargs  cat | \
> awk -F '\n' '{d[$1]++} END {for (n in d) {print n,d[n]}}' | grep 2 | cut -d ' ' -f 1

Repository

https://gitlab.com/grauwoelfchen/overlap

Installation

% cargo install overlap

# or clone and build
% git clone https://github.com/grauwoelfchen/overlap.git && cd overlap
% make install

Usage

% overlap --file FILE --file FILE --file FILE ...

There is an example.

% cat a.txt
Hoi!
Hoi Zäme!
Grüezi wohl!
% cat b.txt
Hallo!
Moin moin!
Grüezi mitenand!
Hoi!
% overlap --file a.txt --file b.txt
Hoi!

About other options, take a look overlap --help.

Build

Check make help

# debug build
% make build:debug
% docker build -t grauwoelfchen/overlap:latest .
% docker container run -i --rm \
  -v $(pwd)/tmp \
  grauwoelfchen/overlap:latest \
  --file /tmp/a.txt --file /tmp/b.txt
Hoi!

Development

Vet

# check code using all vet:xxx targets
% make vet:all

Test

% make test

Coverage

cov requires kcov.

# (optional)
% .tools/setup-kcov

% make coverage

CI

Run CI jobs on local docker conatiner (Gentoo Linux) using gitlab-runner.
See .gitlab-ci.yml.

# install gitlab-runner into .tools
% .tools/setup-gitlab-runner

# prepare environment variables for CI via .env.ci
% cp .env.ci.sample .env

# e.g. test (see .gitlab-ci.yml)
% .tools/ci-runner test

License

Overlap
Copyright 2019 Yasuhiro Яша Asaka

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Commit count: 59

cargo fmt