otpui 0.2.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 +7 -0
- data/.gitignore +10 -0
- data/.rspec +2 -0
- data/.travis.yml +16 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +3 -0
- data/LICENSE.txt +21 -0
- data/README.md +26 -0
- data/Rakefile +6 -0
- data/bin/console +7 -0
- data/bin/otpui +9 -0
- data/bin/setup +6 -0
- data/lib/otpui.rb +95 -0
- data/lib/otpui/log.rb +7 -0
- data/lib/otpui/otp_list.rb +56 -0
- data/lib/otpui/resources.rb +15 -0
- data/lib/otpui/settings.rb +65 -0
- data/lib/otpui/version.rb +3 -0
- data/lib/share/glade/main.glade +254 -0
- data/lib/share/icons/logo.png +0 -0
- data/otpui.gemspec +31 -0
- data/screenshot.png +0 -0
- metadata +192 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 4ae3b2332f1619882ca28125ed1d19a4fb740ea6
|
4
|
+
data.tar.gz: 6f954bb6a0513a490901e9d06a5104a19d7dab53
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c4028722f22e3e5f14e2e418d0c0d3b9f5b87ed7016537a8af067f2f23998738dea8d4d23d45fa0ac94fb488f10bcca652fc490c94b39af465d9890537f36270
|
7
|
+
data.tar.gz: 3a46b5adfe89a66111bf9177828bf2ca3b89b49d990a58054455afd33a7381a95ff45c665cdfd3714c6b058c32b34d2604b65644c4a2ce3d84142b8d83ba06a4
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
sudo: required
|
2
|
+
language: ruby
|
3
|
+
rvm:
|
4
|
+
- 2.4.0
|
5
|
+
- 2.3.3
|
6
|
+
- 2.2.6
|
7
|
+
before_install:
|
8
|
+
- gem install bundler
|
9
|
+
deploy:
|
10
|
+
provider: rubygems
|
11
|
+
api_key:
|
12
|
+
secure: Dc9m0Liq7Co6FR4pCh6h6ffmDbT0ukPVrmtUzpJyol+Sl/ljpa/HcIQ5xTc1EfOHF33KJMBMgdYE/vAsme/pJ6ghtGhkkD4IUVGeaPCiX+sDadAmOX6EEZmI35EAVs8MIN7n7NwDWKycf1V74pIl6U8Uh3H9A2DFaZYc/1gpfD5hRCQU7AVn5C5D+nCRgfwlKwi/scE0/0DaFbJWVCWy1bHPdS7x2qSKNGO0UGEELlsrk7YhHuEFHMRShH4z7NoLlC6vUbsCuVR6XECQypWPwWGRBU/GURlOqUi6Y+dbnQNiJ4MvMmAAYC7n/ItpMNzgtY4yXFLHVGLQfsgwMLxMcys8IVxJ99Ckm9AguErgApNfm7dAdNWxN3CoG2l4DocCBglSpAvBUUW43watRjax/K2K9RmL+eV5nVs+7J3xYisndAT+u6hNILgmJGbrLsPe8rFIzbkwbRhAsiMEg1L0TiCTWhmFaOTJ8IcL3Lu46NO6OlNH5zDYdLgPE89j7houqZwF3D26YCn8qJ4Mo1k3XS+OTY1WHyV1TkUW2eZOKYs4zkB0GhZmNwDzFHS3Qg2puUJRF7LOQOOG3hvFnNzol0E8u4fOdTwMBzAH1sD750YKvkP6s9q1hNK99pMAdI5KR+10ajnZVTlUvWbz0un0G9qTmlDMFETG4EBuFmp6bnU=
|
13
|
+
gem: otpui
|
14
|
+
on:
|
15
|
+
tags: true
|
16
|
+
repo: vayan/otpui
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at yann@vaillant.im. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 Yann Vaillant
|
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,26 @@
|
|
1
|
+
# OTPui
|
2
|
+
|
3
|
+
[](https://travis-ci.org/vayan/otpui)
|
4
|
+
|
5
|
+
Basic GTK app to display and copy OTP on Linux
|
6
|
+
|
7
|
+
- [x] Import QRCodes made for Google Authenticator
|
8
|
+
- [x] Import secrets directly
|
9
|
+
- [x] Copy in clipboard on double click
|
10
|
+
- [ ] Delete a OTP
|
11
|
+
- [ ] Show timer
|
12
|
+
- [ ] Stop stealing Google Authenticator logo
|
13
|
+
- [ ] Be pretty
|
14
|
+
|
15
|
+
This is not really secure, only use it if you have an encrypted disk or something.
|
16
|
+
|
17
|
+
Every issuers and secrets are stored in cleartext in ~/.config/otpui
|
18
|
+
|
19
|
+

|
20
|
+
|
21
|
+
## Installation
|
22
|
+
|
23
|
+
TODO
|
24
|
+
|
25
|
+
## requirements
|
26
|
+
* `xclip`
|
data/Rakefile
ADDED
data/bin/console
ADDED
data/bin/otpui
ADDED
data/bin/setup
ADDED
data/lib/otpui.rb
ADDED
@@ -0,0 +1,95 @@
|
|
1
|
+
require "uri/query_params"
|
2
|
+
require "glib2"
|
3
|
+
require "gtk3"
|
4
|
+
require "rotp"
|
5
|
+
require "clipboard"
|
6
|
+
require "zxing"
|
7
|
+
|
8
|
+
require "otpui/version"
|
9
|
+
require "otpui/log"
|
10
|
+
require "otpui/resources"
|
11
|
+
require "otpui/settings"
|
12
|
+
require "otpui/otp_list"
|
13
|
+
|
14
|
+
module Otpui
|
15
|
+
class Main
|
16
|
+
def on_menuitem_about_activate(object)
|
17
|
+
@about_window.show
|
18
|
+
end
|
19
|
+
|
20
|
+
def on_main_window_destroy(object)
|
21
|
+
Gtk.main_quit()
|
22
|
+
end
|
23
|
+
|
24
|
+
def on_settings_menu_item_activate(object)
|
25
|
+
dialog = SettingsDialog.new
|
26
|
+
dialog.show
|
27
|
+
end
|
28
|
+
|
29
|
+
def on_menuitem_add_otp_code_activate(object)
|
30
|
+
@builder["otp_add_via_code_popover"].show
|
31
|
+
end
|
32
|
+
|
33
|
+
def on_new_otp_button_activate(object)
|
34
|
+
@settings.add_secret(
|
35
|
+
@builder["new_otp_name"].text,
|
36
|
+
@builder["new_otp_code"].text
|
37
|
+
)
|
38
|
+
@builder["otp_add_via_code_popover"].hide
|
39
|
+
end
|
40
|
+
|
41
|
+
def on_menuitem_add_otp_qrcode_activate(object)
|
42
|
+
dialog = Gtk::FileChooserDialog.new(
|
43
|
+
title: "Gtk::FileChooser sample",
|
44
|
+
action: Gtk::FileChooserAction::OPEN,
|
45
|
+
buttons: [
|
46
|
+
[Gtk::Stock::OPEN, Gtk::ResponseType::ACCEPT],
|
47
|
+
[Gtk::Stock::CANCEL, Gtk::ResponseType::CANCEL]
|
48
|
+
]
|
49
|
+
)
|
50
|
+
|
51
|
+
if dialog.run == Gtk::ResponseType::ACCEPT
|
52
|
+
uri = URI(ZXing.decode(dialog.filename))
|
53
|
+
|
54
|
+
@settings.add_secret(
|
55
|
+
uri.query_params["issuer"],
|
56
|
+
uri.query_params["secret"]
|
57
|
+
)
|
58
|
+
|
59
|
+
dialog.destroy
|
60
|
+
elsif
|
61
|
+
dialog.destroy
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
def connect_signals
|
66
|
+
@builder.connect_signals do |handler|
|
67
|
+
begin
|
68
|
+
method(handler)
|
69
|
+
rescue
|
70
|
+
Log.debug "#{handler} not yet implemented!"
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
def start
|
76
|
+
logo = GdkPixbuf::Pixbuf.new(file: Resources.get_icon("logo.png"))
|
77
|
+
@settings = Settings.load
|
78
|
+
Gtk::Window.set_default_icon(logo)
|
79
|
+
@builder = Gtk::Builder.new
|
80
|
+
@builder.add_from_file Resources.get_glade("main.glade")
|
81
|
+
@about_window = @builder["about_window"]
|
82
|
+
@about_window.version = Otpui::VERSION
|
83
|
+
@about_window.logo = logo
|
84
|
+
|
85
|
+
otp_list = OtpList.new(@builder)
|
86
|
+
otp_list.run
|
87
|
+
|
88
|
+
connect_signals
|
89
|
+
|
90
|
+
@builder["main_window"].show_all
|
91
|
+
|
92
|
+
Gtk.main
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
data/lib/otpui/log.rb
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
module Otpui
|
2
|
+
class OtpList
|
3
|
+
def initialize(builder)
|
4
|
+
@otps = Settings.load.secrets
|
5
|
+
@model = Gtk::ListStore.new(String, String)
|
6
|
+
|
7
|
+
renderer = Gtk::CellRendererText.new
|
8
|
+
column_name = Gtk::TreeViewColumn.new("Issuer", renderer, { text: 0 })
|
9
|
+
column_secret = Gtk::TreeViewColumn.new("Secret", renderer, { text: 1 })
|
10
|
+
treeview = Gtk::TreeView.new(@model)
|
11
|
+
|
12
|
+
treeview.append_column(column_name)
|
13
|
+
treeview.append_column(column_secret)
|
14
|
+
treeview.selection.set_mode(:single)
|
15
|
+
builder["scrolled_otps_win"].add_with_viewport(treeview)
|
16
|
+
|
17
|
+
treeview.signal_connect("row_activated") do |_treeview, path, _column|
|
18
|
+
iter = @model.get_iter(path)
|
19
|
+
Clipboard.copy iter[1]
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def list_size
|
24
|
+
i = 0
|
25
|
+
@model.each { i += 1 }
|
26
|
+
i
|
27
|
+
end
|
28
|
+
|
29
|
+
def refresh_values
|
30
|
+
@model.each do |_model, path, iter|
|
31
|
+
secret = @otps.fetch iter[0]
|
32
|
+
totp = ROTP::TOTP.new(secret)
|
33
|
+
iter[1] = totp.now.to_s
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def refresh_all
|
38
|
+
@model.clear
|
39
|
+
@otps.each do |issuer, secret|
|
40
|
+
iter = @model.append
|
41
|
+
totp = ROTP::TOTP.new(secret)
|
42
|
+
iter[0] = issuer
|
43
|
+
iter[1] = totp.now.to_s
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
def run
|
48
|
+
GLib::Timeout.add(1000) do
|
49
|
+
list_size == @otps.size ?
|
50
|
+
refresh_values :
|
51
|
+
refresh_all
|
52
|
+
true
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Otpui
|
2
|
+
class Resources
|
3
|
+
def self.base_dir
|
4
|
+
"#{File.dirname(__FILE__)}/../share/"
|
5
|
+
end
|
6
|
+
|
7
|
+
def self.get_icon(name)
|
8
|
+
File.join base_dir, "icons", name
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.get_glade(name)
|
12
|
+
File.join base_dir, "glade", name
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
require "yaml"
|
2
|
+
|
3
|
+
module Otpui
|
4
|
+
class Settings
|
5
|
+
def initialize(yaml = {})
|
6
|
+
@settings = yaml
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.config_dir
|
10
|
+
dir = "#{ENV['HOME']}/.config/otpui"
|
11
|
+
end
|
12
|
+
|
13
|
+
def save
|
14
|
+
dir = Settings.config_dir
|
15
|
+
unless File.directory?(dir)
|
16
|
+
Log.debug "Creating settings directory: #{dir}"
|
17
|
+
Dir.mkdir dir
|
18
|
+
end
|
19
|
+
Log.debug "Saving settings to #{File.join(dir,'settings.yaml')}"
|
20
|
+
File.open(File.join(dir,"settings.yaml"), "w") do |f|
|
21
|
+
f.puts @settings.to_yaml
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def [](key)
|
26
|
+
@settings[key]
|
27
|
+
end
|
28
|
+
|
29
|
+
def []=(key, val)
|
30
|
+
@settings[key] = val
|
31
|
+
end
|
32
|
+
|
33
|
+
def each(&block)
|
34
|
+
@settings.each &block
|
35
|
+
end
|
36
|
+
|
37
|
+
def secrets
|
38
|
+
@settings["secrets"]
|
39
|
+
end
|
40
|
+
|
41
|
+
def add_secret(issuer, secret)
|
42
|
+
secrets.merge! issuer => secret
|
43
|
+
save
|
44
|
+
end
|
45
|
+
|
46
|
+
def self.load
|
47
|
+
return @@instance if defined? @@instance
|
48
|
+
Log.debug "Loading settings from #{config_dir}/settings.yaml"
|
49
|
+
file = "#{config_dir}/settings.yaml"
|
50
|
+
if File.exist? file
|
51
|
+
begin
|
52
|
+
@@instance = Settings.new YAML.load_file(file)
|
53
|
+
rescue TypeError
|
54
|
+
@@instance = Settings.new
|
55
|
+
rescue Exception => e
|
56
|
+
Log.error "Error loading settings: #{e}\n#{e.backtrace}"
|
57
|
+
end
|
58
|
+
else
|
59
|
+
@@instance = Settings.new
|
60
|
+
@@instance.save
|
61
|
+
end
|
62
|
+
@@instance
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
@@ -0,0 +1,254 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!-- Generated with glade 3.20.0 -->
|
3
|
+
<interface>
|
4
|
+
<requires lib="gtk+" version="3.20"/>
|
5
|
+
<object class="GtkAboutDialog" id="about_window">
|
6
|
+
<property name="can_focus">False</property>
|
7
|
+
<property name="type_hint">dialog</property>
|
8
|
+
<property name="program_name">OTPui</property>
|
9
|
+
<property name="website">https://github.com/vayan/otpui</property>
|
10
|
+
<property name="website_label" translatable="yes">github.com/vayan/otpui</property>
|
11
|
+
<property name="authors">Yann Vaillant</property>
|
12
|
+
<property name="logo_icon_name">image-missing</property>
|
13
|
+
<property name="license_type">mit-x11</property>
|
14
|
+
<child internal-child="vbox">
|
15
|
+
<object class="GtkBox">
|
16
|
+
<property name="can_focus">False</property>
|
17
|
+
<property name="orientation">vertical</property>
|
18
|
+
<property name="spacing">2</property>
|
19
|
+
<child internal-child="action_area">
|
20
|
+
<object class="GtkButtonBox">
|
21
|
+
<property name="can_focus">False</property>
|
22
|
+
<property name="layout_style">end</property>
|
23
|
+
</object>
|
24
|
+
<packing>
|
25
|
+
<property name="expand">False</property>
|
26
|
+
<property name="fill">False</property>
|
27
|
+
<property name="position">0</property>
|
28
|
+
</packing>
|
29
|
+
</child>
|
30
|
+
<child>
|
31
|
+
<placeholder/>
|
32
|
+
</child>
|
33
|
+
</object>
|
34
|
+
</child>
|
35
|
+
</object>
|
36
|
+
<object class="GtkImage" id="image_widget_add_otp_code">
|
37
|
+
<property name="visible">True</property>
|
38
|
+
<property name="can_focus">False</property>
|
39
|
+
<property name="stock">gtk-missing-image</property>
|
40
|
+
</object>
|
41
|
+
<object class="GtkImage" id="image_widget_add_otp_qrcode">
|
42
|
+
<property name="visible">True</property>
|
43
|
+
<property name="can_focus">False</property>
|
44
|
+
<property name="stock">gtk-new</property>
|
45
|
+
</object>
|
46
|
+
<object class="GtkApplicationWindow" id="main_window">
|
47
|
+
<property name="can_focus">False</property>
|
48
|
+
<property name="default_width">400</property>
|
49
|
+
<property name="default_height">500</property>
|
50
|
+
<signal name="destroy" handler="on_main_window_destroy" swapped="no"/>
|
51
|
+
<child>
|
52
|
+
<object class="GtkBox">
|
53
|
+
<property name="visible">True</property>
|
54
|
+
<property name="can_focus">False</property>
|
55
|
+
<property name="orientation">vertical</property>
|
56
|
+
<child>
|
57
|
+
<object class="GtkMenuBar">
|
58
|
+
<property name="visible">True</property>
|
59
|
+
<property name="can_focus">False</property>
|
60
|
+
<child>
|
61
|
+
<object class="GtkMenuItem" id="menuitem1">
|
62
|
+
<property name="visible">True</property>
|
63
|
+
<property name="can_focus">False</property>
|
64
|
+
<property name="label" translatable="yes">_File</property>
|
65
|
+
<property name="use_underline">True</property>
|
66
|
+
<child type="submenu">
|
67
|
+
<object class="GtkMenu">
|
68
|
+
<property name="visible">True</property>
|
69
|
+
<property name="can_focus">False</property>
|
70
|
+
<child>
|
71
|
+
<object class="GtkImageMenuItem" id="menuitem_add_otp_code">
|
72
|
+
<property name="label">New</property>
|
73
|
+
<property name="visible">True</property>
|
74
|
+
<property name="can_focus">False</property>
|
75
|
+
<property name="image">image_widget_add_otp_code</property>
|
76
|
+
<property name="use_stock">False</property>
|
77
|
+
<signal name="activate" handler="on_menuitem_add_otp_code_activate" swapped="no"/>
|
78
|
+
</object>
|
79
|
+
</child>
|
80
|
+
<child>
|
81
|
+
<object class="GtkImageMenuItem" id="menuitem_add_otp_qrcode">
|
82
|
+
<property name="label">New from QRCode</property>
|
83
|
+
<property name="visible">True</property>
|
84
|
+
<property name="can_focus">False</property>
|
85
|
+
<property name="image">image_widget_add_otp_qrcode</property>
|
86
|
+
<property name="use_stock">False</property>
|
87
|
+
<signal name="activate" handler="on_menuitem_add_otp_qrcode_activate" swapped="no"/>
|
88
|
+
</object>
|
89
|
+
</child>
|
90
|
+
<child>
|
91
|
+
<object class="GtkSeparatorMenuItem">
|
92
|
+
<property name="visible">True</property>
|
93
|
+
<property name="can_focus">False</property>
|
94
|
+
</object>
|
95
|
+
</child>
|
96
|
+
<child>
|
97
|
+
<object class="GtkImageMenuItem">
|
98
|
+
<property name="label">gtk-quit</property>
|
99
|
+
<property name="visible">True</property>
|
100
|
+
<property name="can_focus">False</property>
|
101
|
+
<property name="use_underline">True</property>
|
102
|
+
<property name="use_stock">True</property>
|
103
|
+
<signal name="activate" handler="on_main_window_destroy" swapped="no"/>
|
104
|
+
</object>
|
105
|
+
</child>
|
106
|
+
</object>
|
107
|
+
</child>
|
108
|
+
</object>
|
109
|
+
</child>
|
110
|
+
<child>
|
111
|
+
<object class="GtkMenuItem">
|
112
|
+
<property name="visible">True</property>
|
113
|
+
<property name="can_focus">False</property>
|
114
|
+
<property name="label" translatable="yes">_Edit</property>
|
115
|
+
<property name="use_underline">True</property>
|
116
|
+
<child type="submenu">
|
117
|
+
<object class="GtkMenu">
|
118
|
+
<property name="visible">True</property>
|
119
|
+
<property name="can_focus">False</property>
|
120
|
+
<child>
|
121
|
+
<object class="GtkImageMenuItem">
|
122
|
+
<property name="label">gtk-cut</property>
|
123
|
+
<property name="visible">True</property>
|
124
|
+
<property name="can_focus">False</property>
|
125
|
+
<property name="use_underline">True</property>
|
126
|
+
<property name="use_stock">True</property>
|
127
|
+
</object>
|
128
|
+
</child>
|
129
|
+
<child>
|
130
|
+
<object class="GtkImageMenuItem">
|
131
|
+
<property name="label">gtk-copy</property>
|
132
|
+
<property name="visible">True</property>
|
133
|
+
<property name="can_focus">False</property>
|
134
|
+
<property name="use_underline">True</property>
|
135
|
+
<property name="use_stock">True</property>
|
136
|
+
</object>
|
137
|
+
</child>
|
138
|
+
<child>
|
139
|
+
<object class="GtkImageMenuItem">
|
140
|
+
<property name="label">gtk-paste</property>
|
141
|
+
<property name="visible">True</property>
|
142
|
+
<property name="can_focus">False</property>
|
143
|
+
<property name="use_underline">True</property>
|
144
|
+
<property name="use_stock">True</property>
|
145
|
+
</object>
|
146
|
+
</child>
|
147
|
+
<child>
|
148
|
+
<object class="GtkImageMenuItem">
|
149
|
+
<property name="label">gtk-delete</property>
|
150
|
+
<property name="visible">True</property>
|
151
|
+
<property name="can_focus">False</property>
|
152
|
+
<property name="use_underline">True</property>
|
153
|
+
<property name="use_stock">True</property>
|
154
|
+
</object>
|
155
|
+
</child>
|
156
|
+
</object>
|
157
|
+
</child>
|
158
|
+
</object>
|
159
|
+
</child>
|
160
|
+
<child>
|
161
|
+
<object class="GtkMenuItem">
|
162
|
+
<property name="visible">True</property>
|
163
|
+
<property name="can_focus">False</property>
|
164
|
+
<property name="label" translatable="yes">_Help</property>
|
165
|
+
<property name="use_underline">True</property>
|
166
|
+
<child type="submenu">
|
167
|
+
<object class="GtkMenu">
|
168
|
+
<property name="visible">True</property>
|
169
|
+
<property name="can_focus">False</property>
|
170
|
+
<child>
|
171
|
+
<object class="GtkImageMenuItem" id="menuitem_about">
|
172
|
+
<property name="label">gtk-about</property>
|
173
|
+
<property name="visible">True</property>
|
174
|
+
<property name="can_focus">False</property>
|
175
|
+
<property name="use_underline">True</property>
|
176
|
+
<property name="use_stock">True</property>
|
177
|
+
<signal name="activate" handler="on_menuitem_about_activate" swapped="no"/>
|
178
|
+
</object>
|
179
|
+
</child>
|
180
|
+
</object>
|
181
|
+
</child>
|
182
|
+
</object>
|
183
|
+
</child>
|
184
|
+
</object>
|
185
|
+
<packing>
|
186
|
+
<property name="expand">False</property>
|
187
|
+
<property name="fill">True</property>
|
188
|
+
<property name="position">0</property>
|
189
|
+
</packing>
|
190
|
+
</child>
|
191
|
+
<child>
|
192
|
+
<object class="GtkScrolledWindow" id="scrolled_otps_win">
|
193
|
+
<property name="visible">True</property>
|
194
|
+
<property name="can_focus">True</property>
|
195
|
+
<property name="shadow_type">in</property>
|
196
|
+
<child>
|
197
|
+
<placeholder/>
|
198
|
+
</child>
|
199
|
+
</object>
|
200
|
+
<packing>
|
201
|
+
<property name="expand">True</property>
|
202
|
+
<property name="fill">True</property>
|
203
|
+
<property name="position">1</property>
|
204
|
+
</packing>
|
205
|
+
</child>
|
206
|
+
</object>
|
207
|
+
</child>
|
208
|
+
</object>
|
209
|
+
<object class="GtkPopover" id="otp_add_via_code_popover">
|
210
|
+
<property name="can_focus">False</property>
|
211
|
+
<property name="relative_to">menuitem1</property>
|
212
|
+
<child>
|
213
|
+
<object class="GtkGrid">
|
214
|
+
<property name="visible">True</property>
|
215
|
+
<property name="can_focus">False</property>
|
216
|
+
<child>
|
217
|
+
<object class="GtkEntry" id="new_otp_name">
|
218
|
+
<property name="visible">True</property>
|
219
|
+
<property name="can_focus">True</property>
|
220
|
+
<property name="placeholder_text" translatable="yes">Name</property>
|
221
|
+
</object>
|
222
|
+
<packing>
|
223
|
+
<property name="left_attach">0</property>
|
224
|
+
<property name="top_attach">0</property>
|
225
|
+
</packing>
|
226
|
+
</child>
|
227
|
+
<child>
|
228
|
+
<object class="GtkButton" id="new_otp_button">
|
229
|
+
<property name="label" translatable="yes">Add</property>
|
230
|
+
<property name="visible">True</property>
|
231
|
+
<property name="can_focus">True</property>
|
232
|
+
<property name="receives_default">True</property>
|
233
|
+
<signal name="clicked" handler="on_new_otp_button_activate" swapped="no"/>
|
234
|
+
</object>
|
235
|
+
<packing>
|
236
|
+
<property name="left_attach">2</property>
|
237
|
+
<property name="top_attach">0</property>
|
238
|
+
</packing>
|
239
|
+
</child>
|
240
|
+
<child>
|
241
|
+
<object class="GtkEntry" id="new_otp_code">
|
242
|
+
<property name="visible">True</property>
|
243
|
+
<property name="can_focus">True</property>
|
244
|
+
<property name="placeholder_text" translatable="yes">Code</property>
|
245
|
+
</object>
|
246
|
+
<packing>
|
247
|
+
<property name="left_attach">1</property>
|
248
|
+
<property name="top_attach">0</property>
|
249
|
+
</packing>
|
250
|
+
</child>
|
251
|
+
</object>
|
252
|
+
</child>
|
253
|
+
</object>
|
254
|
+
</interface>
|
Binary file
|
data/otpui.gemspec
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
lib = File.expand_path("../lib", __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require "otpui/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "otpui"
|
7
|
+
spec.version = Otpui::VERSION
|
8
|
+
spec.authors = ["Yann Vaillant"]
|
9
|
+
spec.email = ["gems@vaillant.im"]
|
10
|
+
spec.summary = %q{One Time Password Ui}
|
11
|
+
spec.description = %q{One Time Password Ui}
|
12
|
+
spec.homepage = "https://github.com/vayan/otpui"
|
13
|
+
spec.license = "MIT"
|
14
|
+
|
15
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
16
|
+
f.match(%r{^(test|spec|features)/})
|
17
|
+
end
|
18
|
+
spec.executables = ["otpui"]
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
spec.add_development_dependency "rspec"
|
24
|
+
|
25
|
+
spec.add_dependency "rotp"
|
26
|
+
spec.add_dependency "gtk3"
|
27
|
+
spec.add_dependency "clipboard"
|
28
|
+
spec.add_dependency "zxing"
|
29
|
+
spec.add_dependency "uri-query_params"
|
30
|
+
spec.add_dependency "gio2", "< 3.1"
|
31
|
+
end
|
data/screenshot.png
ADDED
Binary file
|
metadata
ADDED
@@ -0,0 +1,192 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: otpui
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Yann Vaillant
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-01-16 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: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '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: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rotp
|
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
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: gtk3
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: clipboard
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: zxing
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: uri-query_params
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: gio2
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "<"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '3.1'
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "<"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '3.1'
|
139
|
+
description: One Time Password Ui
|
140
|
+
email:
|
141
|
+
- gems@vaillant.im
|
142
|
+
executables:
|
143
|
+
- otpui
|
144
|
+
extensions: []
|
145
|
+
extra_rdoc_files: []
|
146
|
+
files:
|
147
|
+
- ".gitignore"
|
148
|
+
- ".rspec"
|
149
|
+
- ".travis.yml"
|
150
|
+
- CODE_OF_CONDUCT.md
|
151
|
+
- Gemfile
|
152
|
+
- LICENSE.txt
|
153
|
+
- README.md
|
154
|
+
- Rakefile
|
155
|
+
- bin/console
|
156
|
+
- bin/otpui
|
157
|
+
- bin/setup
|
158
|
+
- lib/otpui.rb
|
159
|
+
- lib/otpui/log.rb
|
160
|
+
- lib/otpui/otp_list.rb
|
161
|
+
- lib/otpui/resources.rb
|
162
|
+
- lib/otpui/settings.rb
|
163
|
+
- lib/otpui/version.rb
|
164
|
+
- lib/share/glade/main.glade
|
165
|
+
- lib/share/icons/logo.png
|
166
|
+
- otpui.gemspec
|
167
|
+
- screenshot.png
|
168
|
+
homepage: https://github.com/vayan/otpui
|
169
|
+
licenses:
|
170
|
+
- MIT
|
171
|
+
metadata: {}
|
172
|
+
post_install_message:
|
173
|
+
rdoc_options: []
|
174
|
+
require_paths:
|
175
|
+
- lib
|
176
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
181
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
182
|
+
requirements:
|
183
|
+
- - ">="
|
184
|
+
- !ruby/object:Gem::Version
|
185
|
+
version: '0'
|
186
|
+
requirements: []
|
187
|
+
rubyforge_project:
|
188
|
+
rubygems_version: 2.4.8
|
189
|
+
signing_key:
|
190
|
+
specification_version: 4
|
191
|
+
summary: One Time Password Ui
|
192
|
+
test_files: []
|