clipboard_manager 1.0.5 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/data/VERSION +1 -1
- data/lib/clipboard_manager/clipboard_manager.rb +22 -26
- data/lib/clipboard_manager/config.rb +6 -5
- data/lib/clipboard_manager/version.rb +1 -1
- metadata +7 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89604845d3cd62950a1d472cd56d92567c7e6204
|
4
|
+
data.tar.gz: c356ec8f38ab35d00eb476392d3ee8fc270098ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b05626e3889af33830921e33988d209fff5184643c51ecff5938497bab1764abc2a79358b74f1d530b4083d77b7e8781b121ccf191b4d34d4dc8840cc9a3851d
|
7
|
+
data.tar.gz: 3705e8887d7f1830c84cb403f81d11962f6220e90d82cf14493c36f31f3666ef5638ddbd9db955beeb5c0acdb256d56315b3a96e0903ceea82a639eac87d235e
|
data/data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.1.1
|
@@ -53,15 +53,14 @@ class ClipboardManager
|
|
53
53
|
mm.append_menu_item(:do_qrcode!){do_qrcode!}
|
54
54
|
|
55
55
|
@history, @previous = [], nil
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
end
|
56
|
+
text = request_text
|
57
|
+
if text
|
58
|
+
add_history text
|
59
|
+
@previous = text
|
60
|
+
end
|
61
|
+
GLib::Timeout.add(CONFIG[:Sleep]) do
|
62
|
+
step if @running.active?
|
63
|
+
true # repeat
|
65
64
|
end
|
66
65
|
|
67
66
|
status(@ready)
|
@@ -110,17 +109,15 @@ class ClipboardManager
|
|
110
109
|
end
|
111
110
|
|
112
111
|
def do_toggle!
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
end
|
112
|
+
text = request_text
|
113
|
+
@previous = text
|
114
|
+
@running.active = !@running.active?
|
117
115
|
end
|
118
116
|
|
119
117
|
def request_text
|
120
|
-
CLIPBOARD.
|
121
|
-
|
122
|
-
|
123
|
-
end
|
118
|
+
text = CLIPBOARD.wait_for_text
|
119
|
+
text = nil if @is_pwd=~text
|
120
|
+
return text
|
124
121
|
end
|
125
122
|
|
126
123
|
def status(type)
|
@@ -133,14 +130,13 @@ class ClipboardManager
|
|
133
130
|
@timer = nil
|
134
131
|
status @ready
|
135
132
|
end
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
end
|
133
|
+
text = request_text
|
134
|
+
unless text.nil? or @previous == text
|
135
|
+
@previous = text
|
136
|
+
status @working
|
137
|
+
GLib::Timeout.add(0) do
|
138
|
+
manage(text)
|
139
|
+
false # don't repeat
|
144
140
|
end
|
145
141
|
end
|
146
142
|
end
|
@@ -156,7 +152,7 @@ class ClipboardManager
|
|
156
152
|
CONFIG[:tasks].each do |name, _|
|
157
153
|
next unless @checks[name].active?
|
158
154
|
rgx, mth, str = _
|
159
|
-
rgx = Regexp.new(rgx, Regexp::EXTENDED)
|
155
|
+
rgx = Regexp.new(rgx, Regexp::EXTENDED | Regexp::MULTILINE)
|
160
156
|
if md=rgx.match(text) and question?(name)
|
161
157
|
CLIPBOARD.text=Rafini::Empty::STRING
|
162
158
|
begin
|
@@ -1,4 +1,5 @@
|
|
1
1
|
module ClipboardManager
|
2
|
+
using Rafini::String
|
2
3
|
|
3
4
|
help = <<-HELP
|
4
5
|
Usage: gtk3app clipboardmanager [options]
|
@@ -16,16 +17,16 @@ use no-ask and no-running for false.
|
|
16
17
|
(?!\w+:\/\/) # not like url
|
17
18
|
(?!\/[a-z]+\/[a-z]) # not like linux path
|
18
19
|
(?![a-z]+\/[a-z]+\/) # not like relative path
|
19
|
-
(?=.*\d) # at least
|
20
|
+
(?=.*\d) # at least one diget
|
20
21
|
(?=.*[a-z]) # at least one lower case letter
|
21
22
|
(?=.*[A-Z]) # at least one upper case letter
|
22
23
|
(?=.*[^\w\s]) # at least one special character
|
23
|
-
|
24
|
+
\S*$ # no spaces
|
24
25
|
\Z'
|
25
26
|
|
26
27
|
a0 = Rafini::Empty::ARRAY
|
27
28
|
h0 = Rafini::Empty::HASH
|
28
|
-
s0 = Rafini::Empty::STRING
|
29
|
+
#s0 = Rafini::Empty::STRING
|
29
30
|
|
30
31
|
CONFIG = {
|
31
32
|
Help: help,
|
@@ -55,8 +56,8 @@ use no-ask and no-running for false.
|
|
55
56
|
|
56
57
|
about_dialog: {
|
57
58
|
set_program_name: 'Clipboard Manager',
|
58
|
-
set_version: VERSION,
|
59
|
-
set_copyright: '(c)
|
59
|
+
set_version: VERSION.semantic(0..1),
|
60
|
+
set_copyright: '(c) 2015 CarlosJHR64',
|
60
61
|
set_comments: 'A Ruby Gtk3App Clipboard Manager ',
|
61
62
|
set_website: 'https://github.com/carlosjhr64/clipboard_manager',
|
62
63
|
set_website_label: 'See it at GitHub!',
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clipboard_manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- carlosjhr64
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-12-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: helpema
|
@@ -71,18 +71,17 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
71
71
|
- !ruby/object:Gem::Version
|
72
72
|
version: '0'
|
73
73
|
requirements:
|
74
|
-
- 'ruby: ruby 2.
|
75
|
-
- 'gtk3app: 1.
|
74
|
+
- 'ruby: ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]'
|
75
|
+
- 'gtk3app: 1.5.1'
|
76
76
|
- 'zbarcam: 0.10'
|
77
|
-
- 'firefox: Mozilla Firefox
|
77
|
+
- 'firefox: Mozilla Firefox 38.0.5'
|
78
78
|
- 'espeak: eSpeak text-to-speech: 1.47.11 03.May.13 Data at: /usr/share/espeak-data'
|
79
79
|
- 'wget: GNU Wget 1.16.1 built on linux-gnu.'
|
80
|
-
- 'youtube-dl:
|
80
|
+
- 'youtube-dl: 2015.12.18'
|
81
81
|
- 'system: linux/bash'
|
82
82
|
rubyforge_project:
|
83
|
-
rubygems_version: 2.4.1
|
83
|
+
rubygems_version: 2.4.5.1
|
84
84
|
signing_key:
|
85
85
|
specification_version: 4
|
86
86
|
summary: Ruby Gtk3App Clipboard Manager.
|
87
87
|
test_files: []
|
88
|
-
has_rdoc:
|