codeforces-viewer 0.0.1 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +13 -5
- data/.travis.yml +17 -0
- data/README.md +67 -10
- data/lib/codeforces/viewer/version.rb +1 -1
- data/spec/spec_helper.rb +2 -0
- data/spec/test/t2u9hw5_render_spec.rb +2 -0
- data/spec/test/tirgu7u_viewer_spec.rb +2 -0
- data/spec/test/tukgi3p_cacher_spec.rb +2 -0
- metadata +20 -19
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
NmY5NjMzYzg4NzRiMzNiMGJmYjZkMzk5MGRkZjAwZWMwYWVjYjJjZg==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
OTNhZWNjYmNlYjU1YzdkYmZjZjlmZmQ4YTI0YTZlM2EzNGE1ODdjNw==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
ZDJiNzMwNzA3Njc0NzkwYWFjMmYwOTVmZjczY2QzODExNDg5MDEyOGE3YWE3
|
10
|
+
NTJmZmQ3NDQxNDA2ZTRjOTM3YTAyYzEzNGMzYmFhOTJlMDhhMzM3MzliZWFi
|
11
|
+
ZjJlNDQ0ZTlhNmVhODI1ZGI4OTRjYjI1Mzk1OTgwMGNhNmU4MDk=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
OTJkYTY4NDlmMzNjMjI5OTJhYTFiMTlkZDhkZDQ5ODlkYjYyMWZlNmFkYWRh
|
14
|
+
MDQxMGZjNzA0MGRlZjBhMDNlMDUwNmUxNzkyMWMyNTdkYjljZWQ1OWE1NTM3
|
15
|
+
MzdlYTk2Y2Q3OWYzNjYyNTg4OTRlNDdkMDY4NGZkYjUyMGJiMzc=
|
data/.travis.yml
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
language: ruby
|
2
|
+
rvm:
|
3
|
+
- 2.1.0
|
4
|
+
- 2.0.0
|
5
|
+
- 1.9.3
|
6
|
+
install:
|
7
|
+
- export NOKOGIRI_USE_SYSTEM_LIBRARIES="YES"
|
8
|
+
- bundle install
|
9
|
+
script:
|
10
|
+
- bundle exec rake spec
|
11
|
+
deploy:
|
12
|
+
provider: rubygems
|
13
|
+
api_key:
|
14
|
+
master:
|
15
|
+
secure: "dXTqo1MMFAA4xaXCewzAxGqiW17JmwVJ842c0pBzC6wlbayzG+zsnlRErxMtWn3XLG8OaaYytqmg/hZIW6vkn7uMekCFh55sPaEU7A8aCd4BPJlepAhPrUep8zMFPkm++dkifEYmO9b1X8tH6hhmfQHStV5SAMlVAd0INQwP7HU="
|
16
|
+
gem:
|
17
|
+
master: codeforces-viewer
|
data/README.md
CHANGED
@@ -1,29 +1,86 @@
|
|
1
1
|
# Codeforces::Viewer
|
2
2
|
|
3
|
-
|
3
|
+
A simple command-line viewer for Codeforces.
|
4
|
+
|
5
|
+
[](http://badge.fury.io/rb/codeforces-viewer)
|
6
|
+
[](https://travis-ci.org/sh19910711/ruby-codeforces-viewer)
|
4
7
|
|
5
8
|
## Installation
|
6
9
|
|
7
|
-
|
10
|
+
$ gem install codeforces-viewer
|
8
11
|
|
9
|
-
|
12
|
+
## Usage
|
10
13
|
|
11
|
-
|
14
|
+
### How to view problem statement
|
12
15
|
|
13
|
-
$
|
16
|
+
$ codeforces-viewer -c {contest-id} -p {problem-id}
|
14
17
|
|
15
|
-
|
18
|
+
#### Example usage
|
16
19
|
|
17
|
-
$
|
20
|
+
$ codeforces-viewer -c 123 -p A
|
18
21
|
|
19
|
-
|
22
|
+
#### One More Thing: Use pager command [less, more, etc...]
|
23
|
+
|
24
|
+
$ codeforces-viewer -c 123 -p A | less -R
|
25
|
+
|
26
|
+
### Download sample input/output
|
27
|
+
|
28
|
+
#### Download sample input
|
29
|
+
|
30
|
+
$ codeforces-viewer -c 123 -p A -i 0 > input.all.txt
|
31
|
+
|
32
|
+
You can specify input id as follow:
|
33
|
+
|
34
|
+
$ codeforces-viewer -c 123 -p A -i 1 > input.1.txt
|
35
|
+
|
36
|
+
#### Donwload sample output
|
37
|
+
|
38
|
+
$ codeforces-viewer -c 123 -p A -o 0 > input.all.txt
|
39
|
+
|
40
|
+
You can also specify output id as follow:
|
20
41
|
|
21
|
-
|
42
|
+
$ codeforces-viewer -c 123 -p A -o 2 > output.2.txt
|
43
|
+
|
44
|
+
#### Disable to cache
|
45
|
+
|
46
|
+
Downloaded files (currently, html files only) are cached (in `~/.codeforces-viewer/cache/*`) by default.
|
47
|
+
|
48
|
+
When you don't want to cache them, add `--no-cache` option as follow:
|
49
|
+
|
50
|
+
$ codeforces-viewer -c 123 -p A --no-cache | less -R
|
22
51
|
|
23
52
|
## Contributing
|
24
53
|
|
25
|
-
1. Fork it (
|
54
|
+
1. Fork it ( https://github.com/sh19910711/ruby-codeforces-viewer/fork )
|
26
55
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
56
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
57
|
4. Push to the branch (`git push origin my-new-feature`)
|
29
58
|
5. Create new Pull Request
|
59
|
+
|
60
|
+
## License
|
61
|
+
|
62
|
+
Copyright (c) 2014 [Hiroyuki Sano](https://github.com/sh19910711)
|
63
|
+
|
64
|
+
MIT License
|
65
|
+
|
66
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
67
|
+
a copy of this software and associated documentation files (the
|
68
|
+
"Software"), to deal in the Software without restriction, including
|
69
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
70
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
71
|
+
permit persons to whom the Software is furnished to do so, subject to
|
72
|
+
the following conditions:
|
73
|
+
|
74
|
+
The above copyright notice and this permission notice shall be
|
75
|
+
included in all copies or substantial portions of the Software.
|
76
|
+
|
77
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
78
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
79
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
80
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
81
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
82
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
83
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
84
|
+
|
85
|
+
|
86
|
+
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: codeforces-viewer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hiroyuki Sano
|
@@ -14,98 +14,98 @@ dependencies:
|
|
14
14
|
name: nokogiri
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ! '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ! '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: colorize
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ! '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ! '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '1.5'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '1.5'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ! '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ! '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ! '>='
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ! '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: webmock
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ! '>='
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ! '>='
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: fakefs
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ! '>='
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ! '>='
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
description: A simple command-line viewer for Codeforces
|
@@ -116,7 +116,8 @@ executables:
|
|
116
116
|
extensions: []
|
117
117
|
extra_rdoc_files: []
|
118
118
|
files:
|
119
|
-
-
|
119
|
+
- .gitignore
|
120
|
+
- .travis.yml
|
120
121
|
- Gemfile
|
121
122
|
- LICENSE.txt
|
122
123
|
- README.md
|
@@ -147,17 +148,17 @@ require_paths:
|
|
147
148
|
- lib
|
148
149
|
required_ruby_version: !ruby/object:Gem::Requirement
|
149
150
|
requirements:
|
150
|
-
- -
|
151
|
+
- - ! '>='
|
151
152
|
- !ruby/object:Gem::Version
|
152
153
|
version: '0'
|
153
154
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
154
155
|
requirements:
|
155
|
-
- -
|
156
|
+
- - ! '>='
|
156
157
|
- !ruby/object:Gem::Version
|
157
158
|
version: '0'
|
158
159
|
requirements: []
|
159
160
|
rubyforge_project:
|
160
|
-
rubygems_version: 2.2.
|
161
|
+
rubygems_version: 2.2.1
|
161
162
|
signing_key:
|
162
163
|
specification_version: 4
|
163
164
|
summary: A simple command-line viewer for Codeforces
|