golumn 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +3 -0
- data/.travis.yml +5 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +45 -0
- data/LICENSE.txt +21 -0
- data/README.md +48 -0
- data/Rakefile +6 -0
- data/bin/console +11 -0
- data/bin/setup +8 -0
- data/exe/golumn +6 -0
- data/golumn.gemspec +28 -0
- data/lib/golumn.rb +14 -0
- data/lib/golumn/app.rb +43 -0
- data/lib/golumn/version.rb +3 -0
- metadata +116 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 8c73ed3d843df030c81a8beb52873d8c5edd4d90
|
4
|
+
data.tar.gz: bd2e49110f4fa22f2e06951a99090db2bd5545ad
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a66292a087bc4b4ae486ccc00c9c3adc0a34cb52a6195abd8207be62a1c91df67fba1025d85a1d60d82c227452bebdead60285de9d0efd8487510517c565605c
|
7
|
+
data.tar.gz: 2397ad24074dcfcf45597fdd4156e7bb2f5b68a875b058af03a32fcb6cac83ca4202fbdb49986ef03c821be38ff74f3a758fcba1a091361b591525dbb813ee63
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
golumn (0.1.0)
|
5
|
+
rwx
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
coderay (1.1.1)
|
11
|
+
diff-lcs (1.3)
|
12
|
+
method_source (0.8.2)
|
13
|
+
pry (0.10.4)
|
14
|
+
coderay (~> 1.1.0)
|
15
|
+
method_source (~> 0.8.1)
|
16
|
+
slop (~> 3.4)
|
17
|
+
rake (10.5.0)
|
18
|
+
rspec (3.7.0)
|
19
|
+
rspec-core (~> 3.7.0)
|
20
|
+
rspec-expectations (~> 3.7.0)
|
21
|
+
rspec-mocks (~> 3.7.0)
|
22
|
+
rspec-core (3.7.0)
|
23
|
+
rspec-support (~> 3.7.0)
|
24
|
+
rspec-expectations (3.7.0)
|
25
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
26
|
+
rspec-support (~> 3.7.0)
|
27
|
+
rspec-mocks (3.7.0)
|
28
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
29
|
+
rspec-support (~> 3.7.0)
|
30
|
+
rspec-support (3.7.0)
|
31
|
+
rwx (0.0.1.1.dev)
|
32
|
+
slop (3.6.0)
|
33
|
+
|
34
|
+
PLATFORMS
|
35
|
+
ruby
|
36
|
+
|
37
|
+
DEPENDENCIES
|
38
|
+
bundler (~> 1.16.a)
|
39
|
+
golumn!
|
40
|
+
pry
|
41
|
+
rake (~> 10.0)
|
42
|
+
rspec (~> 3.0)
|
43
|
+
|
44
|
+
BUNDLED WITH
|
45
|
+
1.16.0.pre.2
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 Scott Pierce
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
# Golumn
|
2
|
+
|
3
|
+
THIS DOESN'T WORK, YET!!! SORRY
|
4
|
+
|
5
|
+
`column` command with a GUI.
|
6
|
+
|
7
|
+
Are you tired of copy pasting data into Excel?!?
|
8
|
+
Are you tired of viewing grid data in ascii tables?!?
|
9
|
+
|
10
|
+
Golumn allows us to quickly view tabular data in a GUI grid.
|
11
|
+
|
12
|
+
## Usage
|
13
|
+
|
14
|
+
```sh
|
15
|
+
golumn -ts ',' interesting_data.csv
|
16
|
+
|
17
|
+
psql -c 'copy (select * from customers) to stdout csv header' | golumn -ts ','
|
18
|
+
```
|
19
|
+
|
20
|
+
## Installation
|
21
|
+
|
22
|
+
Add this line to your application's Gemfile:
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
gem 'golumn'
|
26
|
+
```
|
27
|
+
|
28
|
+
And then execute:
|
29
|
+
|
30
|
+
$ bundle
|
31
|
+
|
32
|
+
Or install it yourself as:
|
33
|
+
|
34
|
+
$ gem install golumn
|
35
|
+
|
36
|
+
## Development
|
37
|
+
|
38
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
39
|
+
|
40
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
41
|
+
|
42
|
+
## Contributing
|
43
|
+
|
44
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/ddrscott/golumn.
|
45
|
+
|
46
|
+
## License
|
47
|
+
|
48
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/console
ADDED
data/bin/setup
ADDED
data/exe/golumn
ADDED
data/golumn.gemspec
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'golumn/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'golumn'
|
8
|
+
spec.version = Golumn::VERSION
|
9
|
+
spec.authors = ['Scott Pierce']
|
10
|
+
spec.email = ['ddrscott@gmail.com']
|
11
|
+
|
12
|
+
spec.summary = '`column` command with a GUI'
|
13
|
+
spec.homepage = 'https://github.com/ddrscott/golumn'
|
14
|
+
spec.license = 'MIT'
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
17
|
+
f.match(%r{^(test|spec|features)/})
|
18
|
+
end
|
19
|
+
spec.bindir = 'exe'
|
20
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
|
+
spec.require_paths = ['lib']
|
22
|
+
|
23
|
+
spec.add_development_dependency 'bundler', '~> 1.16.a'
|
24
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
25
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
26
|
+
|
27
|
+
spec.add_dependency 'rwx'
|
28
|
+
end
|
data/lib/golumn.rb
ADDED
data/lib/golumn/app.rb
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
module Golumn
|
2
|
+
# main app
|
3
|
+
class App < WX::App
|
4
|
+
def on_init
|
5
|
+
@frame = WX::Frame.new(nil, title: 'widgets demo')
|
6
|
+
@frame.layout
|
7
|
+
@frame.show
|
8
|
+
end
|
9
|
+
|
10
|
+
foo = <<-SQL
|
11
|
+
grid = new wxGrid( this,
|
12
|
+
-1,
|
13
|
+
wxPoint( 0, 0 ),
|
14
|
+
wxSize( 400, 300 ) );
|
15
|
+
// Then we call CreateGrid to set the dimensions of the grid
|
16
|
+
// (100 rows and 10 columns in this example)
|
17
|
+
grid->CreateGrid( 100, 10 );
|
18
|
+
// We can set the sizes of individual rows and columns
|
19
|
+
// in pixels
|
20
|
+
grid->SetRowSize( 0, 60 );
|
21
|
+
grid->SetColSize( 0, 120 );
|
22
|
+
// And set grid cell contents as strings
|
23
|
+
grid->SetCellValue( 0, 0, "wxGrid is good" );
|
24
|
+
// We can specify that some cells are read->only
|
25
|
+
grid->SetCellValue( 0, 3, "This is read->only" );
|
26
|
+
grid->SetReadOnly( 0, 3 );
|
27
|
+
// Colours can be specified for grid cell contents
|
28
|
+
grid->SetCellValue(3, 3, "green on grey");
|
29
|
+
grid->SetCellTextColour(3, 3, *wxGREEN);
|
30
|
+
grid->SetCellBackgroundColour(3, 3, *wxLIGHT_GREY);
|
31
|
+
// We can specify the some cells will store numeric
|
32
|
+
// values rather than strings. Here we set grid column 5
|
33
|
+
// to hold floating point values displayed with width of 6
|
34
|
+
// and precision of 2
|
35
|
+
grid->SetColFormatFloat(5, 6, 2);
|
36
|
+
grid->SetCellValue(0, 6, "3.1415");
|
37
|
+
SQL
|
38
|
+
|
39
|
+
def build_grid
|
40
|
+
@grid = WX::Grid.new(nil, WX::Point.new(0, 0), WX::Size.new(400, 300))
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
metadata
ADDED
@@ -0,0 +1,116 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: golumn
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Scott Pierce
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-10-25 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.16.a
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.16.a
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rwx
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description:
|
70
|
+
email:
|
71
|
+
- ddrscott@gmail.com
|
72
|
+
executables:
|
73
|
+
- golumn
|
74
|
+
extensions: []
|
75
|
+
extra_rdoc_files: []
|
76
|
+
files:
|
77
|
+
- ".gitignore"
|
78
|
+
- ".rspec"
|
79
|
+
- ".travis.yml"
|
80
|
+
- Gemfile
|
81
|
+
- Gemfile.lock
|
82
|
+
- LICENSE.txt
|
83
|
+
- README.md
|
84
|
+
- Rakefile
|
85
|
+
- bin/console
|
86
|
+
- bin/setup
|
87
|
+
- exe/golumn
|
88
|
+
- golumn.gemspec
|
89
|
+
- lib/golumn.rb
|
90
|
+
- lib/golumn/app.rb
|
91
|
+
- lib/golumn/version.rb
|
92
|
+
homepage: https://github.com/ddrscott/golumn
|
93
|
+
licenses:
|
94
|
+
- MIT
|
95
|
+
metadata: {}
|
96
|
+
post_install_message:
|
97
|
+
rdoc_options: []
|
98
|
+
require_paths:
|
99
|
+
- lib
|
100
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0'
|
105
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
requirements: []
|
111
|
+
rubyforge_project:
|
112
|
+
rubygems_version: 2.6.13
|
113
|
+
signing_key:
|
114
|
+
specification_version: 4
|
115
|
+
summary: "`column` command with a GUI"
|
116
|
+
test_files: []
|