stutter: (Stutter Text|String)-Utterer

[ library, mit, program, tools ] [ Propose Tags ]

CLI regex-like string generator


[Skip to Readme]

Modules

[Last Documentation]

  • Stutter
    • Stutter.Parser
    • Stutter.Producer

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.1.0.1, 0.1.0.2
Dependencies attoparsec (>=0.13.1.0 && <0.14), base (>=4.9.1.0 && <4.10), bytestring (>=0.10.8.1 && <0.11), conduit (>=1.2.10 && <1.3), conduit-combinators (>=1.1.1 && <1.2), conduit-extra (>=1.1.16 && <1.2), mtl (>=2.2.1 && <2.3), optparse-applicative (>=0.13.2.0 && <0.14), resourcet (>=1.1.9 && <1.2), stutter (>=0.1.0.1 && <0.2), text (>=1.2.2.1 && <1.3) [details]
License MIT
Copyright (c) 2017 Nicolas Mattia
Author Nicolas Mattia
Maintainer nicolas@nmattia.com
Category Tools
Home page https://github.com/nmattia/stutter#readme
Uploaded by nmattia at 2017-05-25T19:38:12Z
Distributions
Executables stutter
Downloads 1965 total (9 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2017-05-25 [all 3 reports]

Readme for stutter-0.1.0.1

[back to package description]

sc_check-sections: - examples

Stutter

Stutter is a string utterer.

utterer: someone who expresses in language; someone who talks (especially someone who delivers a public speech or someone especially garrulous) (www.vocabulary.com)

Stutter takes a string definition and crafts as many different strings as it can. See the examples section below for inspiration.

Building

You need the Haskell build tool stack. Just run:

$ stack build

Installing

You currently need the Haskell build tool stack. Just run:

$ stack install

Contributing

There are several ways you can contribute:

  • Complain: Just open an issue and let me know what could be improved.
  • Share a use-case: You found a cool case? Great! open an issue or (even better) a PR with your issue added to the examples below.
  • Support: Share stutter with your friends, you never know who might need it.
  • Implement: All PRs are welcome.

Examples

Stutter can be used as a very simple echo clone:

$ stutter 'Hello, World!'
Hello, World!

But stutter also knows how to enumerate:

$ stutter 'foo|bar|baz'
foo
bar
baz

You can easily specify which parts you want to enumerate, and which parts should always be there:

$ stutter 'My name is (what\?|who\?|Slim Shady)'
My name is what?
My name is who?
My name is Slim Shady

Stutter can also enumerate file contents:

$ stutter 'foo|bar|baz' > test.txt
$ stutter '(@test.txt) -- stutter was here'
foo -- stutter was here
bar -- stutter was here
baz -- stutter was here

And read from stdin:

$ cat test.txt | stutter 'Check this out, paste: @-'
Check this out, paste: foo
Check this out, paste: bar
Check this out, paste: baz

Stutter also likes ranges:

$ stutter '[0-9a-f]'
0
1
2
3
4
5
6
7
8
9
a
b
c
d
e
f

Of course, it can all be used together:

$ stutter 'My name is (@test.txt) [a-c] (who\?|what\?|Slim Shady)'
My name is foo a who?
My name is foo a what?
My name is foo a Slim Shady
My name is foo b who?
My name is foo b what?
...
My name is baz c who?
My name is baz c what?
My name is baz c Slim Shady

Stutter can teach you binary:

$ stutter '(0b(0|1){#|5})|I know binary!'
0b00000
0b00001
0b00010
0b00011
0b00100
0b00101
...
0b11010
0b11011
0b11100
0b11101
0b11110
0b11111
I know binary!

Stutter can repeat a char:

$ stutter 'a{42}'
a
a
a
...
$ stutter 'a{42}' | wc -l
42