textmood 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.md +6 -0
  2. data/bin/textmood +3 -2
  3. metadata +1 -1
data/README.md CHANGED
@@ -79,6 +79,12 @@ textmood -l en_US "<some text>"
79
79
  -0.4375
80
80
  ```
81
81
 
82
+ Alternatively, you can pipe some text to textmood on stdin:
83
+ ```bash
84
+ echo "<some text>" | textmood -l en_US
85
+ -0.4375
86
+ ```
87
+
82
88
  The cli tool has many useful options, mostly mirroring those of the library. Here’s the
83
89
  output from `textmood -h`:
84
90
  ```
data/bin/textmood CHANGED
@@ -13,7 +13,7 @@ $:.unshift File.join(File.dirname(__FILE__), *%w{ .. lib })
13
13
  require "optparse"
14
14
  require "textmood"
15
15
 
16
- usage = "Usage: #{File.basename($0)} [options] \"<text>\""
16
+ usage = "Usage: #{File.basename($0)} [options] \"<text>\"\n OR\n echo \"<text>\" | #{File.basename($0)} [options]"
17
17
 
18
18
  def mini_usage(usage, notext = false)
19
19
  puts usage
@@ -21,7 +21,8 @@ def mini_usage(usage, notext = false)
21
21
  if notext
22
22
  puts "ERROR: Quoted text must be provided after the last option."
23
23
  else
24
- puts "ERROR: An IETF language tag must be provided using the -l/--language option."
24
+ puts "ERROR: An IETF language tag must be provided using the -l/--language option,"
25
+ puts " or sentiment files must be provided with the -f/--file option."
25
26
  end
26
27
  puts ""
27
28
  puts "Use \"#{File.basename($0)} -h\" for full usage info."
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: textmood
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: