clipboard_manager 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +11 -11
- data/config/config.yml +1 -2
- data/data/VERSION +1 -1
- data/lib/clipboard_manager/clipboard_manager.rb +1 -12
- data/lib/clipboard_manager/config.rb +0 -1
- data/lib/clipboard_manager/version.rb +1 -1
- data/lib/clipboard_manager.rb +3 -0
- metadata +25 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d15ad1a4cb7b8e9c785a3cd485d4b477cd8016e
|
4
|
+
data.tar.gz: 394fcf2189bdbf7773b8733eb72a236bd2590336
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f17023fb4a17596d96497b75e07ff13edef85525318f32770697b405cfd35f4fc488957be5d1db7cb137c840ca3be07a7f8b3c26e89c1cd4395833284505563
|
7
|
+
data.tar.gz: 972cf3488a31da6684bebccb359c4e4d7eb9b0c9f75b8e4547747d9e81aa8daf992c8fe368543dd459540a69aa09150f77976df2b92c111db29030da48e3385f
|
data/README.rdoc
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
= clipboard_manager
|
2
2
|
|
3
|
+
{<img src="https://badge.fury.io/rb/clipboard_manager.svg" alt="Gem Version" />}[http://badge.fury.io/rb/clipboard_manager]
|
4
|
+
|
3
5
|
== DESCRIPTION:
|
4
6
|
|
5
7
|
Ruby Gtk3App Clipboard Manager.
|
@@ -10,14 +12,11 @@ Ruby Gtk3App Clipboard Manager.
|
|
10
12
|
|
11
13
|
== FEATURES
|
12
14
|
|
15
|
+
* history
|
13
16
|
* wget youtube-dl mplayer command to play youtube video
|
14
17
|
* firefox opens amazon webpage
|
15
18
|
* espeak
|
16
|
-
*
|
17
|
-
|
18
|
-
Currently needs zenity for confirmations...
|
19
|
-
Zenity is easy to install if it's not already in your linux system.
|
20
|
-
Was just lazy on adding my own dialog for this, will fix soon.
|
19
|
+
* zbarcam qrcode
|
21
20
|
|
22
21
|
== INSTALL:
|
23
22
|
|
@@ -33,10 +32,10 @@ Towards the bottom of the file you will find the available tasks:
|
|
33
32
|
|
34
33
|
:tasks:
|
35
34
|
:mplayer:
|
36
|
-
- https?://www
|
37
|
-
- :
|
38
|
-
- wget -O - $(youtube-dl -f 5/36/17/18 -g '$
|
39
|
-
-cache-min 1 -
|
35
|
+
- "(https?://www\\.youtube\\.com/watch\\?v=[\\w\\-]+)"
|
36
|
+
- :bashit
|
37
|
+
- wget --quiet -O - $(youtube-dl -f 5/36/17/18 -g '$1') | mplayer -really-quiet
|
38
|
+
-cache 8192 -cache-min 1 -
|
40
39
|
:firefox:
|
41
40
|
- "^https?://www.amazon.com/"
|
42
41
|
- :firefox
|
@@ -44,11 +43,12 @@ Towards the bottom of the file you will find the available tasks:
|
|
44
43
|
- ".{80,}"
|
45
44
|
- :espeak
|
46
45
|
|
46
|
+
|
47
47
|
It is by this configuration that one can modify and add tasks.
|
48
48
|
|
49
49
|
The _mplayer_ task will run when the clipboard text matches a youtube link.
|
50
50
|
It will run the given system command "wget.. youtube_dl... '$0' | mplayer ...",
|
51
|
-
where $
|
51
|
+
where $1 will be replaced by the match.
|
52
52
|
|
53
53
|
The _firefox_ task will run when the clipboard text matches an amazon link.
|
54
54
|
It will open the link with firefox.
|
@@ -56,7 +56,7 @@ It will open the link with firefox.
|
|
56
56
|
The _espeak_ task will run when the clipboard text is at least 80 characters long.
|
57
57
|
It will have espeak read the text.
|
58
58
|
|
59
|
-
Currently, clipboard_manager has three tasks methods: bashit
|
59
|
+
Currently, clipboard_manager has three tasks methods: bashit, firefox, and espeak.
|
60
60
|
|
61
61
|
For firefox and espeak, the pattern is used to recognize the text.
|
62
62
|
The whole copied text is used to pass on to firefox as a url, or espeak as text to be read.
|
data/config/config.yml
CHANGED
@@ -11,7 +11,6 @@
|
|
11
11
|
:MaxHistory: 13
|
12
12
|
:MaxString: 60
|
13
13
|
:QrcTimeOut: 3
|
14
|
-
:QrcCommand: zbarcam --nodisplay --raw --prescale=800x800
|
15
14
|
:IsPwd: |-
|
16
15
|
\A
|
17
16
|
(?!\w+:\/\/) # not like url
|
@@ -33,7 +32,7 @@
|
|
33
32
|
:Logo: "/home/fox/.local/share/gtk3app/clipboardmanager/logo.png"
|
34
33
|
:about_dialog:
|
35
34
|
:set_program_name: Clipboard Manager
|
36
|
-
:set_version: 1.0.
|
35
|
+
:set_version: 1.0.2
|
37
36
|
:set_copyright: "(c) 2014 CarlosJHR64"
|
38
37
|
:set_comments: 'A Ruby Gtk3App Clipboard Manager '
|
39
38
|
:set_website: https://github.com/carlosjhr64/clipboard_manager
|
data/data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.2
|
@@ -104,18 +104,7 @@ class ClipboardManager
|
|
104
104
|
end
|
105
105
|
|
106
106
|
def do_qrcode!
|
107
|
-
qrcode =
|
108
|
-
IO.popen(CONFIG[:QrcCommand], 'r') do |io|
|
109
|
-
begin
|
110
|
-
Timeout.timeout(CONFIG[:QrcTimeOut]) do
|
111
|
-
qrcode = io.gets.strip
|
112
|
-
end
|
113
|
-
rescue Timeout::Error
|
114
|
-
$!.puts 'QrcTimeOut'
|
115
|
-
ensure
|
116
|
-
Process.kill('INT', io.pid)
|
117
|
-
end
|
118
|
-
end
|
107
|
+
qrcode = Helpema::ZBar.qrcode(CONFIG[:QrcTimeOut])
|
119
108
|
if qrcode.nil?
|
120
109
|
CLIPBOARD.clear
|
121
110
|
status(@nope)
|
data/lib/clipboard_manager.rb
CHANGED
@@ -3,6 +3,7 @@ require 'timeout'
|
|
3
3
|
|
4
4
|
# Work gems
|
5
5
|
require 'gtk3app'
|
6
|
+
require 'helpema/zbar'
|
6
7
|
|
7
8
|
# This Gem
|
8
9
|
require_relative 'clipboard_manager/version.rb'
|
@@ -14,4 +15,6 @@ require_relative 'clipboard_manager/clipboard_manager.rb'
|
|
14
15
|
#`zbarcam`
|
15
16
|
#`firefox`
|
16
17
|
#`espeak`
|
18
|
+
#`wget`
|
19
|
+
#`youtube-dl`
|
17
20
|
#`system`
|
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.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- carlosjhr64
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gtk3app
|
@@ -30,6 +30,26 @@ dependencies:
|
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 1.0.0
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: helpema
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0.0'
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 0.0.0
|
43
|
+
type: :runtime
|
44
|
+
prerelease: false
|
45
|
+
version_requirements: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - "~>"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '0.0'
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 0.0.0
|
33
53
|
description: |
|
34
54
|
Ruby Gtk3App Clipboard Manager.
|
35
55
|
email: carlosjhr64@gmail.com
|
@@ -74,8 +94,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
94
|
requirements:
|
75
95
|
- 'ruby: ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-linux]'
|
76
96
|
- 'zbarcam: 0.10'
|
77
|
-
- 'firefox: Mozilla Firefox
|
97
|
+
- 'firefox: Mozilla Firefox 34.0'
|
78
98
|
- 'espeak: eSpeak text-to-speech: 1.47.11 03.May.13 Data at: /usr/share/espeak-data'
|
99
|
+
- 'wget: GNU Wget 1.16 built on linux-gnu.'
|
100
|
+
- 'youtube-dl: 2014.11.13'
|
79
101
|
- 'system: linux/bash'
|
80
102
|
rubyforge_project:
|
81
103
|
rubygems_version: 2.4.1
|