tb 0.8 → 0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README +14 -7
- data/bin/tb +3 -3
- data/lib/tb.rb +3 -3
- data/lib/tb/basic.rb +34 -34
- data/lib/tb/catreader.rb +3 -3
- data/lib/tb/cmd_cat.rb +5 -5
- data/lib/tb/cmd_consecutive.rb +4 -4
- data/lib/tb/cmd_crop.rb +4 -4
- data/lib/tb/cmd_cross.rb +3 -3
- data/lib/tb/cmd_cut.rb +3 -3
- data/lib/tb/cmd_git.rb +3 -3
- data/lib/tb/cmd_grep.rb +3 -3
- data/lib/tb/cmd_group.rb +3 -3
- data/lib/tb/cmd_gsub.rb +3 -3
- data/lib/tb/cmd_help.rb +3 -3
- data/lib/tb/cmd_join.rb +3 -3
- data/lib/tb/cmd_ls.rb +3 -3
- data/lib/tb/cmd_melt.rb +3 -3
- data/lib/tb/cmd_mheader.rb +3 -3
- data/lib/tb/cmd_nest.rb +3 -3
- data/lib/tb/cmd_newfield.rb +17 -7
- data/lib/tb/cmd_rename.rb +3 -3
- data/lib/tb/cmd_shape.rb +3 -3
- data/lib/tb/cmd_sort.rb +3 -3
- data/lib/tb/cmd_svn.rb +3 -3
- data/lib/tb/cmd_tar.rb +3 -3
- data/lib/tb/cmd_to_csv.rb +4 -4
- data/lib/tb/cmd_to_json.rb +3 -3
- data/lib/tb/cmd_to_ltsv.rb +4 -4
- data/lib/tb/cmd_to_pnm.rb +3 -3
- data/lib/tb/cmd_to_pp.rb +3 -3
- data/lib/tb/cmd_to_tsv.rb +4 -4
- data/lib/tb/cmd_to_yaml.rb +3 -3
- data/lib/tb/cmd_unmelt.rb +3 -3
- data/lib/tb/cmd_unnest.rb +5 -4
- data/lib/tb/cmdmain.rb +3 -3
- data/lib/tb/cmdtop.rb +3 -3
- data/lib/tb/cmdutil.rb +3 -3
- data/lib/tb/csv.rb +10 -4
- data/lib/tb/customcmp.rb +3 -3
- data/lib/tb/customeq.rb +3 -3
- data/lib/tb/enumerable.rb +3 -3
- data/lib/tb/enumerator.rb +3 -3
- data/lib/tb/ex_enumerable.rb +2 -2
- data/lib/tb/ex_enumerator.rb +4 -4
- data/lib/tb/fieldset.rb +3 -3
- data/lib/tb/fileenumerator.rb +6 -6
- data/lib/tb/func.rb +3 -3
- data/lib/tb/json.rb +3 -3
- data/lib/tb/ltsv.rb +32 -7
- data/lib/tb/pnm.rb +3 -3
- data/lib/tb/reader.rb +3 -3
- data/lib/tb/record.rb +3 -3
- data/lib/tb/revcmp.rb +3 -3
- data/lib/tb/ropen.rb +23 -23
- data/lib/tb/search.rb +7 -7
- data/lib/tb/tsv.rb +3 -3
- data/lib/tb/zipper.rb +3 -3
- data/sample/excel2csv +36 -36
- data/sample/poi-xls2csv.rb +78 -78
- data/sample/poi-xls2csv.sh +3 -3
- data/sample/tbplot +214 -112
- data/test/test_basic.rb +4 -4
- data/test/test_cmd_newfield.rb +17 -3
- data/test/test_ex_enumerable.rb +18 -18
- data/test/test_ltsv.rb +8 -0
- metadata +5 -5
data/lib/tb/cmd_git.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# Copyright (C) 2011-2012 Tanaka Akira <akr@fsij.org>
|
2
|
-
#
|
2
|
+
#
|
3
3
|
# Redistribution and use in source and binary forms, with or without
|
4
4
|
# modification, are permitted provided that the following conditions
|
5
5
|
# are met:
|
6
|
-
#
|
6
|
+
#
|
7
7
|
# 1. Redistributions of source code must retain the above copyright
|
8
8
|
# notice, this list of conditions and the following disclaimer.
|
9
9
|
# 2. Redistributions in binary form must reproduce the above
|
@@ -13,7 +13,7 @@
|
|
13
13
|
# 3. The name of the author may not be used to endorse or promote
|
14
14
|
# products derived from this software without specific prior
|
15
15
|
# written permission.
|
16
|
-
#
|
16
|
+
#
|
17
17
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
18
18
|
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
19
19
|
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
data/lib/tb/cmd_grep.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# Copyright (C) 2011-2012 Tanaka Akira <akr@fsij.org>
|
2
|
-
#
|
2
|
+
#
|
3
3
|
# Redistribution and use in source and binary forms, with or without
|
4
4
|
# modification, are permitted provided that the following conditions
|
5
5
|
# are met:
|
6
|
-
#
|
6
|
+
#
|
7
7
|
# 1. Redistributions of source code must retain the above copyright
|
8
8
|
# notice, this list of conditions and the following disclaimer.
|
9
9
|
# 2. Redistributions in binary form must reproduce the above
|
@@ -13,7 +13,7 @@
|
|
13
13
|
# 3. The name of the author may not be used to endorse or promote
|
14
14
|
# products derived from this software without specific prior
|
15
15
|
# written permission.
|
16
|
-
#
|
16
|
+
#
|
17
17
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
18
18
|
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
19
19
|
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
data/lib/tb/cmd_group.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# Copyright (C) 2011-2012 Tanaka Akira <akr@fsij.org>
|
2
|
-
#
|
2
|
+
#
|
3
3
|
# Redistribution and use in source and binary forms, with or without
|
4
4
|
# modification, are permitted provided that the following conditions
|
5
5
|
# are met:
|
6
|
-
#
|
6
|
+
#
|
7
7
|
# 1. Redistributions of source code must retain the above copyright
|
8
8
|
# notice, this list of conditions and the following disclaimer.
|
9
9
|
# 2. Redistributions in binary form must reproduce the above
|
@@ -13,7 +13,7 @@
|
|
13
13
|
# 3. The name of the author may not be used to endorse or promote
|
14
14
|
# products derived from this software without specific prior
|
15
15
|
# written permission.
|
16
|
-
#
|
16
|
+
#
|
17
17
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
18
18
|
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
19
19
|
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
data/lib/tb/cmd_gsub.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# Copyright (C) 2011-2012 Tanaka Akira <akr@fsij.org>
|
2
|
-
#
|
2
|
+
#
|
3
3
|
# Redistribution and use in source and binary forms, with or without
|
4
4
|
# modification, are permitted provided that the following conditions
|
5
5
|
# are met:
|
6
|
-
#
|
6
|
+
#
|
7
7
|
# 1. Redistributions of source code must retain the above copyright
|
8
8
|
# notice, this list of conditions and the following disclaimer.
|
9
9
|
# 2. Redistributions in binary form must reproduce the above
|
@@ -13,7 +13,7 @@
|
|
13
13
|
# 3. The name of the author may not be used to endorse or promote
|
14
14
|
# products derived from this software without specific prior
|
15
15
|
# written permission.
|
16
|
-
#
|
16
|
+
#
|
17
17
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
18
18
|
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
19
19
|
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
data/lib/tb/cmd_help.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# Copyright (C) 2011-2012 Tanaka Akira <akr@fsij.org>
|
2
|
-
#
|
2
|
+
#
|
3
3
|
# Redistribution and use in source and binary forms, with or without
|
4
4
|
# modification, are permitted provided that the following conditions
|
5
5
|
# are met:
|
6
|
-
#
|
6
|
+
#
|
7
7
|
# 1. Redistributions of source code must retain the above copyright
|
8
8
|
# notice, this list of conditions and the following disclaimer.
|
9
9
|
# 2. Redistributions in binary form must reproduce the above
|
@@ -13,7 +13,7 @@
|
|
13
13
|
# 3. The name of the author may not be used to endorse or promote
|
14
14
|
# products derived from this software without specific prior
|
15
15
|
# written permission.
|
16
|
-
#
|
16
|
+
#
|
17
17
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
18
18
|
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
19
19
|
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
data/lib/tb/cmd_join.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# Copyright (C) 2011-2012 Tanaka Akira <akr@fsij.org>
|
2
|
-
#
|
2
|
+
#
|
3
3
|
# Redistribution and use in source and binary forms, with or without
|
4
4
|
# modification, are permitted provided that the following conditions
|
5
5
|
# are met:
|
6
|
-
#
|
6
|
+
#
|
7
7
|
# 1. Redistributions of source code must retain the above copyright
|
8
8
|
# notice, this list of conditions and the following disclaimer.
|
9
9
|
# 2. Redistributions in binary form must reproduce the above
|
@@ -13,7 +13,7 @@
|
|
13
13
|
# 3. The name of the author may not be used to endorse or promote
|
14
14
|
# products derived from this software without specific prior
|
15
15
|
# written permission.
|
16
|
-
#
|
16
|
+
#
|
17
17
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
18
18
|
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
19
19
|
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
data/lib/tb/cmd_ls.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# Copyright (C) 2011-2012 Tanaka Akira <akr@fsij.org>
|
2
|
-
#
|
2
|
+
#
|
3
3
|
# Redistribution and use in source and binary forms, with or without
|
4
4
|
# modification, are permitted provided that the following conditions
|
5
5
|
# are met:
|
6
|
-
#
|
6
|
+
#
|
7
7
|
# 1. Redistributions of source code must retain the above copyright
|
8
8
|
# notice, this list of conditions and the following disclaimer.
|
9
9
|
# 2. Redistributions in binary form must reproduce the above
|
@@ -13,7 +13,7 @@
|
|
13
13
|
# 3. The name of the author may not be used to endorse or promote
|
14
14
|
# products derived from this software without specific prior
|
15
15
|
# written permission.
|
16
|
-
#
|
16
|
+
#
|
17
17
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
18
18
|
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
19
19
|
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
data/lib/tb/cmd_melt.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# Copyright (C) 2012 Tanaka Akira <akr@fsij.org>
|
2
|
-
#
|
2
|
+
#
|
3
3
|
# Redistribution and use in source and binary forms, with or without
|
4
4
|
# modification, are permitted provided that the following conditions
|
5
5
|
# are met:
|
6
|
-
#
|
6
|
+
#
|
7
7
|
# 1. Redistributions of source code must retain the above copyright
|
8
8
|
# notice, this list of conditions and the following disclaimer.
|
9
9
|
# 2. Redistributions in binary form must reproduce the above
|
@@ -13,7 +13,7 @@
|
|
13
13
|
# 3. The name of the author may not be used to endorse or promote
|
14
14
|
# products derived from this software without specific prior
|
15
15
|
# written permission.
|
16
|
-
#
|
16
|
+
#
|
17
17
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
18
18
|
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
19
19
|
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
data/lib/tb/cmd_mheader.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# Copyright (C) 2011-2012 Tanaka Akira <akr@fsij.org>
|
2
|
-
#
|
2
|
+
#
|
3
3
|
# Redistribution and use in source and binary forms, with or without
|
4
4
|
# modification, are permitted provided that the following conditions
|
5
5
|
# are met:
|
6
|
-
#
|
6
|
+
#
|
7
7
|
# 1. Redistributions of source code must retain the above copyright
|
8
8
|
# notice, this list of conditions and the following disclaimer.
|
9
9
|
# 2. Redistributions in binary form must reproduce the above
|
@@ -13,7 +13,7 @@
|
|
13
13
|
# 3. The name of the author may not be used to endorse or promote
|
14
14
|
# products derived from this software without specific prior
|
15
15
|
# written permission.
|
16
|
-
#
|
16
|
+
#
|
17
17
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
18
18
|
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
19
19
|
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
data/lib/tb/cmd_nest.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# Copyright (C) 2011-2012 Tanaka Akira <akr@fsij.org>
|
2
|
-
#
|
2
|
+
#
|
3
3
|
# Redistribution and use in source and binary forms, with or without
|
4
4
|
# modification, are permitted provided that the following conditions
|
5
5
|
# are met:
|
6
|
-
#
|
6
|
+
#
|
7
7
|
# 1. Redistributions of source code must retain the above copyright
|
8
8
|
# notice, this list of conditions and the following disclaimer.
|
9
9
|
# 2. Redistributions in binary form must reproduce the above
|
@@ -13,7 +13,7 @@
|
|
13
13
|
# 3. The name of the author may not be used to endorse or promote
|
14
14
|
# products derived from this software without specific prior
|
15
15
|
# written permission.
|
16
|
-
#
|
16
|
+
#
|
17
17
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
18
18
|
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
19
19
|
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
data/lib/tb/cmd_newfield.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# Copyright (C) 2011-2012 Tanaka Akira <akr@fsij.org>
|
2
|
-
#
|
2
|
+
#
|
3
3
|
# Redistribution and use in source and binary forms, with or without
|
4
4
|
# modification, are permitted provided that the following conditions
|
5
5
|
# are met:
|
6
|
-
#
|
6
|
+
#
|
7
7
|
# 1. Redistributions of source code must retain the above copyright
|
8
8
|
# notice, this list of conditions and the following disclaimer.
|
9
9
|
# 2. Redistributions in binary form must reproduce the above
|
@@ -13,7 +13,7 @@
|
|
13
13
|
# 3. The name of the author may not be used to endorse or promote
|
14
14
|
# products derived from this software without specific prior
|
15
15
|
# written permission.
|
16
|
-
#
|
16
|
+
#
|
17
17
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
18
18
|
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
19
19
|
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
@@ -28,11 +28,16 @@
|
|
28
28
|
|
29
29
|
Tb::Cmd.subcommands << 'newfield'
|
30
30
|
|
31
|
+
Tb::Cmd.default_option[:opt_newfield_ruby] = nil
|
32
|
+
|
31
33
|
def (Tb::Cmd).op_newfield
|
32
34
|
op = OptionParser.new
|
33
|
-
op.banner = "Usage: tb newfield [OPTS] FIELD
|
35
|
+
op.banner = "Usage: tb newfield [OPTS] FIELD VALUE [TABLE]\n" +
|
34
36
|
"Add a field."
|
35
37
|
define_common_option(op, "ho", "--no-pager")
|
38
|
+
op.def_option('--ruby RUBY-EXP', 'ruby expression to generate values. A hash is given as _. no VALUE argument.') {|ruby_exp|
|
39
|
+
Tb::Cmd.opt_newfield_ruby = ruby_exp
|
40
|
+
}
|
36
41
|
op
|
37
42
|
end
|
38
43
|
|
@@ -41,9 +46,14 @@ def (Tb::Cmd).main_newfield(argv)
|
|
41
46
|
exit_if_help('newfield')
|
42
47
|
err('no new field name given.') if argv.empty?
|
43
48
|
field = argv.shift
|
44
|
-
|
45
|
-
|
46
|
-
|
49
|
+
if Tb::Cmd.opt_newfield_ruby
|
50
|
+
rubyexp = Tb::Cmd.opt_newfield_ruby
|
51
|
+
pr = eval("lambda {|_| #{rubyexp} }")
|
52
|
+
else
|
53
|
+
err('no ruby expression given.') if argv.empty?
|
54
|
+
value = argv.shift
|
55
|
+
pr = lambda {|_| value }
|
56
|
+
end
|
47
57
|
argv = ['-'] if argv.empty?
|
48
58
|
creader = Tb::CatReader.open(argv, Tb::Cmd.opt_N)
|
49
59
|
er = creader.newfield(field) {|pairs| pr.call(pairs) }
|
data/lib/tb/cmd_rename.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# Copyright (C) 2011-2012 Tanaka Akira <akr@fsij.org>
|
2
|
-
#
|
2
|
+
#
|
3
3
|
# Redistribution and use in source and binary forms, with or without
|
4
4
|
# modification, are permitted provided that the following conditions
|
5
5
|
# are met:
|
6
|
-
#
|
6
|
+
#
|
7
7
|
# 1. Redistributions of source code must retain the above copyright
|
8
8
|
# notice, this list of conditions and the following disclaimer.
|
9
9
|
# 2. Redistributions in binary form must reproduce the above
|
@@ -13,7 +13,7 @@
|
|
13
13
|
# 3. The name of the author may not be used to endorse or promote
|
14
14
|
# products derived from this software without specific prior
|
15
15
|
# written permission.
|
16
|
-
#
|
16
|
+
#
|
17
17
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
18
18
|
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
19
19
|
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
data/lib/tb/cmd_shape.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# Copyright (C) 2011-2012 Tanaka Akira <akr@fsij.org>
|
2
|
-
#
|
2
|
+
#
|
3
3
|
# Redistribution and use in source and binary forms, with or without
|
4
4
|
# modification, are permitted provided that the following conditions
|
5
5
|
# are met:
|
6
|
-
#
|
6
|
+
#
|
7
7
|
# 1. Redistributions of source code must retain the above copyright
|
8
8
|
# notice, this list of conditions and the following disclaimer.
|
9
9
|
# 2. Redistributions in binary form must reproduce the above
|
@@ -13,7 +13,7 @@
|
|
13
13
|
# 3. The name of the author may not be used to endorse or promote
|
14
14
|
# products derived from this software without specific prior
|
15
15
|
# written permission.
|
16
|
-
#
|
16
|
+
#
|
17
17
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
18
18
|
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
19
19
|
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
data/lib/tb/cmd_sort.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# Copyright (C) 2011-2012 Tanaka Akira <akr@fsij.org>
|
2
|
-
#
|
2
|
+
#
|
3
3
|
# Redistribution and use in source and binary forms, with or without
|
4
4
|
# modification, are permitted provided that the following conditions
|
5
5
|
# are met:
|
6
|
-
#
|
6
|
+
#
|
7
7
|
# 1. Redistributions of source code must retain the above copyright
|
8
8
|
# notice, this list of conditions and the following disclaimer.
|
9
9
|
# 2. Redistributions in binary form must reproduce the above
|
@@ -13,7 +13,7 @@
|
|
13
13
|
# 3. The name of the author may not be used to endorse or promote
|
14
14
|
# products derived from this software without specific prior
|
15
15
|
# written permission.
|
16
|
-
#
|
16
|
+
#
|
17
17
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
18
18
|
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
19
19
|
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
data/lib/tb/cmd_svn.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# Copyright (C) 2011-2012 Tanaka Akira <akr@fsij.org>
|
2
|
-
#
|
2
|
+
#
|
3
3
|
# Redistribution and use in source and binary forms, with or without
|
4
4
|
# modification, are permitted provided that the following conditions
|
5
5
|
# are met:
|
6
|
-
#
|
6
|
+
#
|
7
7
|
# 1. Redistributions of source code must retain the above copyright
|
8
8
|
# notice, this list of conditions and the following disclaimer.
|
9
9
|
# 2. Redistributions in binary form must reproduce the above
|
@@ -13,7 +13,7 @@
|
|
13
13
|
# 3. The name of the author may not be used to endorse or promote
|
14
14
|
# products derived from this software without specific prior
|
15
15
|
# written permission.
|
16
|
-
#
|
16
|
+
#
|
17
17
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
18
18
|
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
19
19
|
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
data/lib/tb/cmd_tar.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# Copyright (C) 2012 Tanaka Akira <akr@fsij.org>
|
2
|
-
#
|
2
|
+
#
|
3
3
|
# Redistribution and use in source and binary forms, with or without
|
4
4
|
# modification, are permitted provided that the following conditions
|
5
5
|
# are met:
|
6
|
-
#
|
6
|
+
#
|
7
7
|
# 1. Redistributions of source code must retain the above copyright
|
8
8
|
# notice, this list of conditions and the following disclaimer.
|
9
9
|
# 2. Redistributions in binary form must reproduce the above
|
@@ -13,7 +13,7 @@
|
|
13
13
|
# 3. The name of the author may not be used to endorse or promote
|
14
14
|
# products derived from this software without specific prior
|
15
15
|
# written permission.
|
16
|
-
#
|
16
|
+
#
|
17
17
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
18
18
|
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
19
19
|
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
data/lib/tb/cmd_to_csv.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# Copyright (C) 2011-2012 Tanaka Akira <akr@fsij.org>
|
2
|
-
#
|
2
|
+
#
|
3
3
|
# Redistribution and use in source and binary forms, with or without
|
4
4
|
# modification, are permitted provided that the following conditions
|
5
5
|
# are met:
|
6
|
-
#
|
6
|
+
#
|
7
7
|
# 1. Redistributions of source code must retain the above copyright
|
8
8
|
# notice, this list of conditions and the following disclaimer.
|
9
9
|
# 2. Redistributions in binary form must reproduce the above
|
@@ -13,7 +13,7 @@
|
|
13
13
|
# 3. The name of the author may not be used to endorse or promote
|
14
14
|
# products derived from this software without specific prior
|
15
15
|
# written permission.
|
16
|
-
#
|
16
|
+
#
|
17
17
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
18
18
|
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
19
19
|
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
@@ -31,7 +31,7 @@ Tb::Cmd.subcommands << 'to-csv'
|
|
31
31
|
def (Tb::Cmd).op_to_csv
|
32
32
|
op = OptionParser.new
|
33
33
|
op.banner = "Usage: tb to-csv [OPTS] [TABLE ...]\n" +
|
34
|
-
"Convert a table to CSV (Comma Separated
|
34
|
+
"Convert a table to CSV (Comma Separated Values)."
|
35
35
|
define_common_option(op, "hNo", "--no-pager")
|
36
36
|
op
|
37
37
|
end
|
data/lib/tb/cmd_to_json.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# Copyright (C) 2011-2012 Tanaka Akira <akr@fsij.org>
|
2
|
-
#
|
2
|
+
#
|
3
3
|
# Redistribution and use in source and binary forms, with or without
|
4
4
|
# modification, are permitted provided that the following conditions
|
5
5
|
# are met:
|
6
|
-
#
|
6
|
+
#
|
7
7
|
# 1. Redistributions of source code must retain the above copyright
|
8
8
|
# notice, this list of conditions and the following disclaimer.
|
9
9
|
# 2. Redistributions in binary form must reproduce the above
|
@@ -13,7 +13,7 @@
|
|
13
13
|
# 3. The name of the author may not be used to endorse or promote
|
14
14
|
# products derived from this software without specific prior
|
15
15
|
# written permission.
|
16
|
-
#
|
16
|
+
#
|
17
17
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
18
18
|
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
19
19
|
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
data/lib/tb/cmd_to_ltsv.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# Copyright (C) 2013 Tanaka Akira <akr@fsij.org>
|
2
|
-
#
|
2
|
+
#
|
3
3
|
# Redistribution and use in source and binary forms, with or without
|
4
4
|
# modification, are permitted provided that the following conditions
|
5
5
|
# are met:
|
6
|
-
#
|
6
|
+
#
|
7
7
|
# 1. Redistributions of source code must retain the above copyright
|
8
8
|
# notice, this list of conditions and the following disclaimer.
|
9
9
|
# 2. Redistributions in binary form must reproduce the above
|
@@ -13,7 +13,7 @@
|
|
13
13
|
# 3. The name of the author may not be used to endorse or promote
|
14
14
|
# products derived from this software without specific prior
|
15
15
|
# written permission.
|
16
|
-
#
|
16
|
+
#
|
17
17
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
18
18
|
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
19
19
|
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
@@ -31,7 +31,7 @@ Tb::Cmd.subcommands << 'to-ltsv'
|
|
31
31
|
def (Tb::Cmd).op_to_ltsv
|
32
32
|
op = OptionParser.new
|
33
33
|
op.banner = "Usage: tb to-ltsv [OPTS] [TABLE]\n" +
|
34
|
-
"Convert a table to LTSV (Tab Separated
|
34
|
+
"Convert a table to LTSV (Labeled Tab Separated Values)."
|
35
35
|
define_common_option(op, "hNo", "--no-pager")
|
36
36
|
op
|
37
37
|
end
|