GitXplorerGitXplorer
s

syn

public
379 stars
12 forks
4 issues

Commits

List of commits on branch master.
Unverified
b8f2866a33aef24508eb25c58a265e3edd2fafb8

Update BRLOptionParser to 0.3.1

sstephencelis committed 9 years ago
Unverified
e37c5895a622fdc57dcad70f3894e3a3ecc32064

Xcode Updates

sstephencelis committed 9 years ago
Unverified
6f55a3724a54f9ddb1b6c21b7a7aa2c80b3417c0

Update README to point to latest binary

sstephencelis committed 11 years ago
Unverified
08511f63e067e8dedffaddec524d911d966faf26

Bump version to 0.2.1

sstephencelis committed 11 years ago
Unverified
d406ca48673ef49721e2dd788fe50e5264e6d90e

We really don't expect an error here

sstephencelis committed 11 years ago
Unverified
01598c6234caee1af0ca3540754152aedb807e72

Happy new year

sstephencelis committed 11 years ago

README

The README file for this repository.

syn

Syntax control for the command line.

syn uses OS X's natural language processing tools to tokenize and highlight text (from standard input) that matches specified tags.

(Animated demo)

Inspired by iA Writer.

Install

syn requires OS X 10.7 or above.

$ curl -LOs https://github.com/stephencelis/syn/releases/download/v0.2.2/syn \
  && chmod 755 syn \
  && mv syn /usr/local/bin

Or clone/download the repository and run make install (requires Xcode to be installed).

Usage

E.g.,

# find pesky adverbs
$ syn --adverbs < nanowrimo.txt
# highlight nouns and noun-likes
$ syn --nouns --pronouns --personal-names --place-names < nanowrimo.txt
# peruse the classics
$ curl -Ls http://www.gutenberg.org/ebooks/11231.txt.utf-8 | \
  syn -A | \
  less -r
# generate listicles
$ syn -a -ftable < moby-dick.txt | \
  cut -d ' ' -f4 | sort -f | uniq -ci | sort -nr | head -10 | tr a-z A-Z
 441 OLD
 430 OTHER
 305 SUCH
 290 GREAT
 275 LAST
 238 LITTLE
 215 SAME
 199 OWN
 199 GOOD
 191 WHITE

-h,

usage: syn [tags] [-f <formatter=ansi>] [-vh]
Tags:
    -n, --nouns                      Match nouns
    -V, --verbs                      Match verbs
    -a, --adjectives                 Match adjectives
    -A, --adverbs                    Match adverbs
    -N, --pronouns                   Match pronouns
    -d, --determiners                Match determiners
    -p, --particles                  Match particles
    -P, --prepositions               Match prepositions
    -1, --numbers                    Match numbers
    -c, --conjunctions               Match conjunctions
    -i, --interjections              Match interjections
    -C, --classifiers                Match classifiers
    -I, --idioms                     Match idioms
    -H, --personal-names             Match personal (human) names
    -l, --place-names                Match place names (locations)

Configuration:
    -f, --formatter                  One of 'ansi', 'table', or 'json'

    -v, --version                    Show version
    -h, --help                       Show this screen

License

syn is available under the MIT license. See the LICENSE file for more information.