public
Description: Snippits - a program that will type text for you. It uses 'snippits', small text files with a simple syntax to determine what to type.
Homepage: http://ben.kudria.net/code/snippits
Clone URL: git://github.com/bkudria/snippits.git
Click here to lend your support to: snippits and make a donation at www.pledgie.com !
snippits / bin / keyout
100755 23 lines (15 sloc) 0.537 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env ruby
 
=begin rdoc
= +keyout+
Takes two arguments:
* Required: The text strign to type.
* Optional: A debug number. 0 is no debugging, 1 is some, 2 is more, etc
 
The text to type will be typed more-or-less as-is, but there are escape
strings for control characters, etc. See Typing::Typer and the
README[link:../README.txt] for a full explanation.
 
Returns nothing, but types the input
=end
 
require 'snippits'
 
debug = (ARGV[1] || 0).to_i
$DEBUG = true if debug > 0
Typing::Typer.new(ARGV[0], debug).type_input_text