syc-spector 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -1,17 +1,54 @@
1
- # The sycspector scans a file for patterns provided on the command line.
2
- # Lines that match the pattern are saved to a valid file and those lines that
3
- # don't match the pattern are added to an invalid file.
4
- # The valid and invalid files as well as the used pattern are stored in a
5
- # history file. The saved values are used for a subsequent call to sycspector
6
- # with --show and -f for fix.
7
- #
8
- # Invokation Examples
9
- # sycspector mail_addresses -p email
10
- # searches for email addresses in the provided file 'email_addresses'
11
- #
12
- # Lines that are not recognized can be prompted, fixed and appended to the
13
- # valid file with
14
- # sycspector -fa
15
- #
16
- # To show the result of the invokation use
17
- # sycspector --show
1
+ = Welcome to syc-spector
2
+ home :: https://github.com/sugaryourcoffee/syc-spector
3
+
4
+ == Description
5
+ The sycspector scans a file for patterns provided on the command line.
6
+ Lines that match the pattern are saved to a file with valid values and those lines that don't match the pattern are added to a file with invalid values.
7
+ The valid and invalid files as well as the used pattern are stored in a
8
+ history file. The saved values are used for a subsequent call to sycspector
9
+ with --show and -f for fix to show the results or to prompt the invalid values to fix them. Fixed values can appended to the valid values file.
10
+
11
+ == Installation
12
+ sycspector can be installed as a gem from [RubyGems](http://RubyGems.org) with
13
+ $ gem install syc-spector
14
+
15
+ == Invokation Examples
16
+ Rearches for email addresses in the provided file 'email_addresses'
17
+ $ sycspector email_addresses -p email
18
+
19
+ Lines that are not recognized can be prompted, fixed and appended to the
20
+ valid file with
21
+ $ sycspector -fa
22
+
23
+ To show the result of the invokation use
24
+ $ sycspector --show
25
+
26
+ To fix the values from the input file at the first scan
27
+ $ sycspector -f email-addresses -p email
28
+
29
+ To sort the values
30
+ $ sycspector -s email-addresses -p email
31
+
32
+ To fix, sort and remove duplicates (individualize)
33
+ $ sycspector -fsi email-addresses -p email
34
+
35
+ Matching patterns like 'name, firstname'
36
+ $ syscpector name -p "\w+, \w+"
37
+
38
+ Scanning only whole lines use
39
+ $ sycspector name -p "\A\w+, \w+\A"
40
+
41
+ If the file contains lines like "Doe, John and Doe, Jane" these won't be saved at the first scan but can be scanned with the --fix switch and appended to the valid values from the last run
42
+ $ sycspector -fa
43
+
44
+ Fixing a specific file by specifying the invalid file as inputfile
45
+ $ sycspector -fa 2013016-083346_invalid_name -o 2013016-083346_valid_name
46
+
47
+ Specifying the file where the results (valid and invalid) should go to
48
+ $ sycspector -fa -o outputfile
49
+
50
+ To process all at once
51
+ $ sycspector -fis inputfile -o outputfile -p "\A\w+, w+\Z" --show
52
+
53
+ == License
54
+ syc-spector is released under the {MIT License}[http://www.opensource.org/license/MIT].
data/README.rdoc ADDED
@@ -0,0 +1,54 @@
1
+ = Welcome to syc-spector
2
+ home :: https://github.com/sugaryourcoffee/syc-spector
3
+
4
+ == Description
5
+ The sycspector scans a file for patterns provided on the command line.
6
+ Lines that match the pattern are saved to a file with valid values and those lines that don't match the pattern are added to a file with invalid values.
7
+ The valid and invalid files as well as the used pattern are stored in a
8
+ history file. The saved values are used for a subsequent call to sycspector
9
+ with --show and -f for fix to show the results or to prompt the invalid values to fix them. Fixed values can appended to the valid values file.
10
+
11
+ == Installation
12
+ sycspector can be installed as a gem from [RubyGems](http://RubyGems.org) with
13
+ $ gem install syc-spector
14
+
15
+ == Invokation Examples
16
+ Rearches for email addresses in the provided file 'email_addresses'
17
+ $ sycspector email_addresses -p email
18
+
19
+ Lines that are not recognized can be prompted, fixed and appended to the
20
+ valid file with
21
+ $ sycspector -fa
22
+
23
+ To show the result of the invokation use
24
+ $ sycspector --show
25
+
26
+ To fix the values from the input file at the first scan
27
+ $ sycspector -f email-addresses -p email
28
+
29
+ To sort the values
30
+ $ sycspector -s email-addresses -p email
31
+
32
+ To fix, sort and remove duplicates (individualize)
33
+ $ sycspector -fsi email-addresses -p email
34
+
35
+ Matching patterns like 'name, firstname'
36
+ $ syscpector name -p "\w+, \w+"
37
+
38
+ Scanning only whole lines use
39
+ $ sycspector name -p "\A\w+, \w+\A"
40
+
41
+ If the file contains lines like "Doe, John and Doe, Jane" these won't be saved at the first scan but can be scanned with the --fix switch and appended to the valid values from the last run
42
+ $ sycspector -fa
43
+
44
+ Fixing a specific file by specifying the invalid file as inputfile
45
+ $ sycspector -fa 2013016-083346_invalid_name -o 2013016-083346_valid_name
46
+
47
+ Specifying the file where the results (valid and invalid) should go to
48
+ $ sycspector -fa -o outputfile
49
+
50
+ To process all at once
51
+ $ sycspector -fis inputfile -o outputfile -p "\A\w+, w+\Z" --show
52
+
53
+ == License
54
+ syc-spector is released under the {MIT License}[http://www.opensource.org/license/MIT].
data/doc/README.html CHANGED
@@ -85,6 +85,12 @@
85
85
 
86
86
  <div id="documentation" class="description">
87
87
 
88
+ <h1 id="label-syc-spector+-+Dokumentation">syc-spector - Dokumentation</h1>
89
+
90
+ <pre>home :: https://github.com/sugaryourcoffee/syc-spector</pre>
91
+
92
+ <h2 id="label-Description">Description</h2>
93
+
88
94
  <p>The sycspector scans a file for patterns provided on the command line.
89
95
  Lines that match the pattern are saved to a valid file and those lines that
90
96
  don’t match the pattern are added to an invalid file. The valid and invalid
@@ -92,20 +98,58 @@ files as well as the used pattern are stored in a history file. The saved
92
98
  values are used for a subsequent call to sycspector with –show and -f for
93
99
  fix.</p>
94
100
 
95
- <p>Invokation Examples</p>
101
+ <h2 id="label-Invokation+Examples">Invokation Examples</h2>
96
102
 
97
- <pre>sycspector mail_addresses -p email</pre>
103
+ <p>Rearches for email addresses in the provided file ‘email_addresses’</p>
98
104
 
99
- <p>searches for email addresses in the provided file ‘email_addresses’</p>
105
+ <pre>$ sycspector email_addresses -p email</pre>
100
106
 
101
107
  <p>Lines that are not recognized can be prompted, fixed and appended to the
102
108
  valid file with</p>
103
109
 
104
- <pre>sycspector -fa</pre>
110
+ <pre>$ sycspector -fa</pre>
105
111
 
106
112
  <p>To show the result of the invokation use</p>
107
113
 
108
- <pre>sycspector --show</pre>
114
+ <pre>$ sycspector --show</pre>
115
+
116
+ <p>To fix the values from the input file at the first scan</p>
117
+
118
+ <pre>$ sycspector -f email-addresses -p email</pre>
119
+
120
+ <p>To sort the values</p>
121
+
122
+ <pre>$ sycspector -s email-addresses -p email</pre>
123
+
124
+ <p>To fix, sort and remove duplicates (individualize)</p>
125
+
126
+ <pre>$ sycspector -fsi email-addresses -p email</pre>
127
+
128
+ <p>Matching patterns like ‘name, firstname’</p>
129
+
130
+ <pre>$ syscpector name -p &quot;\w+, \w+&quot;</pre>
131
+
132
+ <p>Scanning only whole lines use</p>
133
+
134
+ <pre>$ sycspector name -p &quot;\A\w+, \w+\A&quot;</pre>
135
+
136
+ <p>If the file contains lines like “Doe, John and Doe, Jane” these won’t be
137
+ saved at the first scan but can be scanned with the –fix switch and
138
+ appended to the valid values from the last run</p>
139
+
140
+ <pre>$ sycspector -fa</pre>
141
+
142
+ <p>Fixing a specific file by specifying the invalid file as inputfile</p>
143
+
144
+ <pre>$ sycspector -fa 2013016-083346_invalid_name -o 2013016-083346_valid_name</pre>
145
+
146
+ <p>Specifying the file where the results (valid and invalid) should go to</p>
147
+
148
+ <pre>$ sycspector -fa -o outputfile</pre>
149
+
150
+ <p>To process all at once</p>
151
+
152
+ <pre>$ sycspector -fis inputfile -o outputfile -p &quot;\A\w+, w+\Z&quot; --show</pre>
109
153
 
110
154
  </div>
111
155
 
data/doc/created.rid CHANGED
@@ -1,4 +1,4 @@
1
- Tue, 15 Jan 2013 23:07:10 +0100
1
+ Wed, 16 Jan 2013 08:34:21 +0100
2
2
  ./test/test_options.rb Tue, 15 Jan 2013 23:04:15 +0100
3
3
  ./test/test_separator.rb Tue, 15 Jan 2013 23:02:11 +0100
4
4
  ./test/test_console.rb Tue, 15 Jan 2013 22:59:35 +0100
@@ -8,4 +8,4 @@ Tue, 15 Jan 2013 23:07:10 +0100
8
8
  ./lib/inspector/console.rb Tue, 15 Jan 2013 22:54:55 +0100
9
9
  ./lib/inspector/runner.rb Tue, 15 Jan 2013 22:56:24 +0100
10
10
  ./bin/sycspector Tue, 15 Jan 2013 22:57:52 +0100
11
- ./README Tue, 15 Jan 2013 22:46:24 +0100
11
+ ./README Wed, 16 Jan 2013 08:34:09 +0100
@@ -1 +1 @@
1
- var search_data = {"index":{"searchIndex":["inspector","console","options","runner","separator","object","testconsole","testoptions","testseparator","char_if_pressed()","fix()","get_file_from_history()","initialize_infile()","initialize_options()","new()","new()","new()","print_statistics()","process()","prompt()","run()","save_result_files()","setup()","setup()","teardown()","readme"],"longSearchIndex":["inspector","inspector::console","inspector::options","inspector::runner","inspector::separator","object","testconsole","testoptions","testseparator","inspector::console#char_if_pressed()","inspector::separator#fix()","inspector::options#get_file_from_history()","testseparator#initialize_infile()","testseparator#initialize_options()","inspector::options::new()","inspector::runner::new()","inspector::separator::new()","inspector::separator#print_statistics()","inspector::separator#process()","inspector::console#prompt()","inspector::runner#run()","inspector::options#save_result_files()","testoptions#setup()","testseparator#setup()","testoptions#teardown()",""],"info":[["Inspector","","Inspector.html","","<p>This module encapsulates functionality related to scanning values for\npatterns. If a line contains the …\n"],["Inspector::Console","","Inspector/Console.html","","<p>Console provides functions for user input\n"],["Inspector::Options","","Inspector/Options.html","","<p>Parses the provided command line flags, switches and arguments\n"],["Inspector::Runner","","Inspector/Runner.html","","<p>Processes based on the provided command line arguments the scan of the file\nor shows the last processed …\n"],["Inspector::Separator","","Inspector/Separator.html","","<p>The Separator scans the input file for a provided pattern and prints the\nresults of the scan to the console. …\n"],["Object","","Object.html","",""],["TestConsole","","TestConsole.html","","<p>Tests the Console class\n"],["TestOptions","","TestOptions.html","","<p>Test of the Options class\n"],["TestSeparator","","TestSeparator.html","","<p>Tests the Separator class\n"],["char_if_pressed","Inspector::Console","Inspector/Console.html#method-i-char_if_pressed","()","<p>Listens for key presses and returns the pressed key without pressing return\n"],["fix","Inspector::Separator","Inspector/Separator.html#method-i-fix","(value, pattern)","<p>Prompts the PROMPT_STRING and tests the value against the pattern\n<p>Return a hash with :value and :answer …\n"],["get_file_from_history","Inspector::Options","Inspector/Options.html#method-i-get_file_from_history","(type)","<p>After running the application output files are saved in the history.\n–get_file_from_history– retrieves …\n"],["initialize_infile","TestSeparator","TestSeparator.html#method-i-initialize_infile","(values = [], separator)","<p>Initilize the infile with provided values and separating the values with\nthe provided separator\n"],["initialize_options","TestSeparator","TestSeparator.html#method-i-initialize_options","(opts={})","<p>Overrides some of the standard @optinons initialized in setup\n"],["new","Inspector::Options","Inspector/Options.html#method-c-new","(argv)","<p>Initializes Options and parses the provided user input from the command\nline\n"],["new","Inspector::Runner","Inspector/Runner.html#method-c-new","(argv)","<p>Initializes runner and invokes Options with the command line arguments\nprovided\n"],["new","Inspector::Separator","Inspector/Separator.html#method-c-new","()","<p>Initializes the Separator and creating a Console object\n"],["print_statistics","Inspector::Separator","Inspector/Separator.html#method-i-print_statistics","(opts)","<p>Prints the results of the invokation of Separator.process\n"],["process","Inspector::Separator","Inspector/Separator.html#method-i-process","(opts)","<p>Processes the scan of the lines of the file and add the values eather to\nthe valid or invalid values. …\n"],["prompt","Inspector::Console","Inspector/Console.html#method-i-prompt","(choice_line)","<p>Prompts the user for input.\n<p>choice_line is the prompt string. If the prompt string contains a (x)\nsequence …\n"],["run","Inspector::Runner","Inspector/Runner.html#method-i-run","()","<p>Runs the Separator or shows the requested valid or invalid file. To show\nthe file ‘less’ is used.\n"],["save_result_files","Inspector::Options","Inspector/Options.html#method-i-save_result_files","(opts)","<p>Save the results of the last run of the application to\n<code>.sycspector.data</code>. It contains the valid and invalid …\n"],["setup","TestOptions","TestOptions.html#method-i-setup","()","<p>Intializes the input, valid, invalid and history file\n"],["setup","TestSeparator","TestSeparator.html#method-i-setup","()","<p>Initialize the @options\n"],["teardown","TestOptions","TestOptions.html#method-i-teardown","()","<p>Cleans up the test directory by deleting the files created in setup\n"],["README","","README.html","","<p>The sycspector scans a file for patterns provided on the command line.\nLines that match the pattern are …\n"]]}}
1
+ var search_data = {"index":{"searchIndex":["inspector","console","options","runner","separator","object","testconsole","testoptions","testseparator","char_if_pressed()","fix()","get_file_from_history()","initialize_infile()","initialize_options()","new()","new()","new()","print_statistics()","process()","prompt()","run()","save_result_files()","setup()","setup()","teardown()","readme"],"longSearchIndex":["inspector","inspector::console","inspector::options","inspector::runner","inspector::separator","object","testconsole","testoptions","testseparator","inspector::console#char_if_pressed()","inspector::separator#fix()","inspector::options#get_file_from_history()","testseparator#initialize_infile()","testseparator#initialize_options()","inspector::options::new()","inspector::runner::new()","inspector::separator::new()","inspector::separator#print_statistics()","inspector::separator#process()","inspector::console#prompt()","inspector::runner#run()","inspector::options#save_result_files()","testoptions#setup()","testseparator#setup()","testoptions#teardown()",""],"info":[["Inspector","","Inspector.html","","<p>This module encapsulates functionality related to scanning values for\npatterns. If a line contains the …\n"],["Inspector::Console","","Inspector/Console.html","","<p>Console provides functions for user input\n"],["Inspector::Options","","Inspector/Options.html","","<p>Parses the provided command line flags, switches and arguments\n"],["Inspector::Runner","","Inspector/Runner.html","","<p>Processes based on the provided command line arguments the scan of the file\nor shows the last processed …\n"],["Inspector::Separator","","Inspector/Separator.html","","<p>The Separator scans the input file for a provided pattern and prints the\nresults of the scan to the console. …\n"],["Object","","Object.html","",""],["TestConsole","","TestConsole.html","","<p>Tests the Console class\n"],["TestOptions","","TestOptions.html","","<p>Test of the Options class\n"],["TestSeparator","","TestSeparator.html","","<p>Tests the Separator class\n"],["char_if_pressed","Inspector::Console","Inspector/Console.html#method-i-char_if_pressed","()","<p>Listens for key presses and returns the pressed key without pressing return\n"],["fix","Inspector::Separator","Inspector/Separator.html#method-i-fix","(value, pattern)","<p>Prompts the PROMPT_STRING and tests the value against the pattern\n<p>Return a hash with :value and :answer …\n"],["get_file_from_history","Inspector::Options","Inspector/Options.html#method-i-get_file_from_history","(type)","<p>After running the application output files are saved in the history.\n–get_file_from_history– retrieves …\n"],["initialize_infile","TestSeparator","TestSeparator.html#method-i-initialize_infile","(values = [], separator)","<p>Initilize the infile with provided values and separating the values with\nthe provided separator\n"],["initialize_options","TestSeparator","TestSeparator.html#method-i-initialize_options","(opts={})","<p>Overrides some of the standard @optinons initialized in setup\n"],["new","Inspector::Options","Inspector/Options.html#method-c-new","(argv)","<p>Initializes Options and parses the provided user input from the command\nline\n"],["new","Inspector::Runner","Inspector/Runner.html#method-c-new","(argv)","<p>Initializes runner and invokes Options with the command line arguments\nprovided\n"],["new","Inspector::Separator","Inspector/Separator.html#method-c-new","()","<p>Initializes the Separator and creating a Console object\n"],["print_statistics","Inspector::Separator","Inspector/Separator.html#method-i-print_statistics","(opts)","<p>Prints the results of the invokation of Separator.process\n"],["process","Inspector::Separator","Inspector/Separator.html#method-i-process","(opts)","<p>Processes the scan of the lines of the file and add the values eather to\nthe valid or invalid values. …\n"],["prompt","Inspector::Console","Inspector/Console.html#method-i-prompt","(choice_line)","<p>Prompts the user for input.\n<p>choice_line is the prompt string. If the prompt string contains a (x)\nsequence …\n"],["run","Inspector::Runner","Inspector/Runner.html#method-i-run","()","<p>Runs the Separator or shows the requested valid or invalid file. To show\nthe file ‘less’ is used.\n"],["save_result_files","Inspector::Options","Inspector/Options.html#method-i-save_result_files","(opts)","<p>Save the results of the last run of the application to\n<code>.sycspector.data</code>. It contains the valid and invalid …\n"],["setup","TestOptions","TestOptions.html#method-i-setup","()","<p>Intializes the input, valid, invalid and history file\n"],["setup","TestSeparator","TestSeparator.html#method-i-setup","()","<p>Initialize the @options\n"],["teardown","TestOptions","TestOptions.html#method-i-teardown","()","<p>Cleans up the test directory by deleting the files created in setup\n"],["README","","README.html","","<p>syc-spector - Dokumentation\n\n<pre>home :: https://github.com/sugaryourcoffee/syc-spector</pre>\n<p>Description\n"]]}}
@@ -27,6 +27,13 @@
27
27
  <ul>
28
28
  <li class="file">
29
29
  <a href="README.html">README</a>
30
+
31
+ <img class="toc-toggle" src="images/transparent.png" alt="" title="toggle headings">
32
+ <ul class="initially-hidden">
33
+ <li><a href="README.html#label-syc-spector+-+Dokumentation">syc-spector - Dokumentation</a>
34
+ <li><a href="README.html#label-Description">Description</a>
35
+ <li><a href="README.html#label-Invokation+Examples">Invokation Examples</a>
36
+ </ul>
30
37
  </li>
31
38
 
32
39
  </ul>
Binary file
data/sycspector.gemspec CHANGED
@@ -5,7 +5,7 @@ Gem::Specification.new do |s|
5
5
  Allow to sort, remove double and manually fix values."
6
6
  s.description = File.read(File.join(File.dirname(__FILE__), 'README'))
7
7
  s.requirements = ['No requirements']
8
- s.version = "0.0.1"
8
+ s.version = "0.0.2"
9
9
  s.author = "Pierre Sugar"
10
10
  s.email = "pierre@sugaryourcoffee.de"
11
11
  s.homepage = "http://syc.dyndns.org/drupal"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: syc-spector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,50 +9,42 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-15 00:00:00.000000000 Z
12
+ date: 2013-01-16 00:00:00.000000000 Z
13
13
  dependencies: []
14
- description: ! '# The sycspector scans a file for patterns provided on the command
15
- line.
16
-
17
- # Lines that match the pattern are saved to a valid file and those lines that
18
-
19
- # don''t match the pattern are added to an invalid file.
20
-
21
- # The valid and invalid files as well as the used pattern are stored in a
22
-
23
- # history file. The saved values are used for a subsequent call to sycspector
24
-
25
- # with --show and -f for fix.
26
-
27
- #
28
-
29
- # Invokation Examples
30
-
31
- # sycspector mail_addresses -p email
32
-
33
- # searches for email addresses in the provided file ''email_addresses''
34
-
35
- #
36
-
37
- # Lines that are not recognized can be prompted, fixed and appended to the
38
-
39
- # valid file with
40
-
41
- # sycspector -fa
42
-
43
- #
44
-
45
- # To show the result of the invokation use
46
-
47
- # sycspector --show
48
-
49
- '
14
+ description: ! "= Welcome to syc-spector\n home :: https://github.com/sugaryourcoffee/syc-spector\n\n==
15
+ Description\nThe sycspector scans a file for patterns provided on the command line.\nLines
16
+ that match the pattern are saved to a file with valid values and those lines that
17
+ don't match the pattern are added to a file with invalid values.\nThe valid and
18
+ invalid files as well as the used pattern are stored in a\nhistory file. The saved
19
+ values are used for a subsequent call to sycspector\nwith --show and -f for fix
20
+ to show the results or to prompt the invalid values to fix them. Fixed values can
21
+ appended to the valid values file.\n\n== Installation\nsycspector can be installed
22
+ as a gem from [RubyGems](http://RubyGems.org) with\n $ gem install syc-spector\n\n==
23
+ Invokation Examples\nRearches for email addresses in the provided file 'email_addresses'\n
24
+ \ $ sycspector email_addresses -p email\n\nLines that are not recognized can be
25
+ prompted, fixed and appended to the\nvalid file with\n $ sycspector -fa\n\nTo show
26
+ the result of the invokation use\n $ sycspector --show\n\nTo fix the values from
27
+ the input file at the first scan\n $ sycspector -f email-addresses -p email\n\nTo
28
+ sort the values\n $ sycspector -s email-addresses -p email\n\nTo fix, sort and
29
+ remove duplicates (individualize)\n $ sycspector -fsi email-addresses -p email\n\nMatching
30
+ patterns like 'name, firstname'\n $ syscpector name -p \"\\w+, \\w+\"\n\nScanning
31
+ only whole lines use\n $ sycspector name -p \"\\A\\w+, \\w+\\A\"\n\nIf the file
32
+ contains lines like \"Doe, John and Doe, Jane\" these won't be saved at the first
33
+ scan but can be scanned with the --fix switch and appended to the valid values from
34
+ the last run\n $ sycspector -fa\n\nFixing a specific file by specifying the invalid
35
+ file as inputfile\n $ sycspector -fa 2013016-083346_invalid_name -o 2013016-083346_valid_name\n\nSpecifying
36
+ the file where the results (valid and invalid) should go to\n $ sycspector -fa
37
+ -o outputfile\n\nTo process all at once\n $ sycspector -fis inputfile -o outputfile
38
+ -p \"\\A\\w+, w+\\Z\" --show\n\n== License\nsyc-spector is released under the {MIT
39
+ License}[http://www.opensource.org/license/MIT].\n"
50
40
  email: pierre@sugaryourcoffee.de
51
41
  executables:
52
42
  - sycspector
53
43
  extensions: []
54
44
  extra_rdoc_files: []
55
45
  files:
46
+ - syc-spector-0.0.1.gem
47
+ - README.rdoc
56
48
  - test/test_options.rb
57
49
  - test/test_separator.rb
58
50
  - test/test_console.rb