mireru 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -0
- data/lib/mireru/command/mireru.rb +15 -0
- data/lib/mireru/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee216063487b526fe0bed9bc27ce8b46c5bdb89b
|
4
|
+
data.tar.gz: 27cbe68ba5678985d175ad8aa2329473a1f68919
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8df06e44085f7137453e05c02b54defd93f1f9b3a16bc3295fbf4de581b98c001bfb6366f59225fa493c13a56875c24fcefb8191dbc0df58bce9dd2cf3b4e78e
|
7
|
+
data.tar.gz: 93259e7fe5584cc5d66841cfecde0b360b5cecd47bcee15af275b5f263cda1688261ceaacc6ace4625bc9d58500bad100bd99df58501ba547ad8d0c99676f3bc
|
data/README.md
CHANGED
@@ -8,8 +8,20 @@ A file viewer with a focus on flexibility by Ruby/GTK3.
|
|
8
8
|
|
9
9
|
## Usage
|
10
10
|
|
11
|
+
### Launch
|
12
|
+
|
11
13
|
$ mireru [FILE...]
|
12
14
|
|
15
|
+
If no argument then search current directory.
|
16
|
+
|
17
|
+
### Keybind
|
18
|
+
|
19
|
+
n: next
|
20
|
+
|
21
|
+
p: prev
|
22
|
+
|
23
|
+
q: quit
|
24
|
+
|
13
25
|
## Contributing
|
14
26
|
|
15
27
|
1. Fork it
|
@@ -17,6 +17,16 @@ module Mireru
|
|
17
17
|
def run(arguments)
|
18
18
|
if arguments.empty?
|
19
19
|
file_container = Dir.glob("*")
|
20
|
+
elsif /\A(-h|--help)\z/ =~ arguments[0]
|
21
|
+
puts(USAGE)
|
22
|
+
puts <<-EOS
|
23
|
+
If no argument, then search current directory.
|
24
|
+
Keybind:
|
25
|
+
n: next
|
26
|
+
p: prev
|
27
|
+
q: quit
|
28
|
+
EOS
|
29
|
+
exit(true)
|
20
30
|
else
|
21
31
|
file_container = arguments
|
22
32
|
end
|
@@ -34,15 +44,20 @@ module Mireru
|
|
34
44
|
image.file = file_container.shift
|
35
45
|
|
36
46
|
window = Gtk::Window.new
|
47
|
+
window.title = File.basename(image.file)
|
37
48
|
|
38
49
|
window.signal_connect("key_press_event") do |w, e|
|
39
50
|
case e.keyval
|
40
51
|
when Gdk::Keyval::GDK_KEY_n
|
41
52
|
file_container.push(image.file)
|
42
53
|
image.file = file_container.shift
|
54
|
+
window.title = File.basename(image.file)
|
55
|
+
window.resize(1, 1)
|
43
56
|
when Gdk::Keyval::GDK_KEY_p
|
44
57
|
file_container.unshift(image.file)
|
45
58
|
image.file = file_container.pop
|
59
|
+
window.title = File.basename(image.file)
|
60
|
+
window.resize(1, 1)
|
46
61
|
when Gdk::Keyval::GDK_KEY_q
|
47
62
|
Gtk.main_quit
|
48
63
|
end
|
data/lib/mireru/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mireru
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masafumi Yokoyama
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-04-
|
11
|
+
date: 2013-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gtk3
|