s7n 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +7 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +28 -0
- data/LICENCE +24 -0
- data/README.rdoc +54 -0
- data/Rakefile +67 -0
- data/bin/s7ncli +23 -0
- data/lib/s7n.rb +12 -0
- data/lib/s7n/action.rb +7 -0
- data/lib/s7n/attribute.rb +226 -0
- data/lib/s7n/cipher.rb +110 -0
- data/lib/s7n/configuration.rb +41 -0
- data/lib/s7n/entry.rb +106 -0
- data/lib/s7n/entry_collection.rb +44 -0
- data/lib/s7n/entry_template.rb +10 -0
- data/lib/s7n/exception.rb +116 -0
- data/lib/s7n/file.rb +77 -0
- data/lib/s7n/gpass_file.rb +203 -0
- data/lib/s7n/key.rb +83 -0
- data/lib/s7n/message_catalog.rb +5 -0
- data/lib/s7n/s7n_file.rb +47 -0
- data/lib/s7n/s7ncli.rb +226 -0
- data/lib/s7n/s7ncli/attribute_command.rb +83 -0
- data/lib/s7n/s7ncli/command.rb +215 -0
- data/lib/s7n/s7ncli/entry_collection_command.rb +63 -0
- data/lib/s7n/s7ncli/entry_command.rb +728 -0
- data/lib/s7n/s7ncli/option.rb +101 -0
- data/lib/s7n/secret_generator.rb +30 -0
- data/lib/s7n/undo_stack.rb +7 -0
- data/lib/s7n/unicode_data.rb +29 -0
- data/lib/s7n/utils.rb +37 -0
- data/lib/s7n/version.rb +3 -0
- data/lib/s7n/world.rb +158 -0
- data/po/ja/s7n.po +533 -0
- data/po/s7n.pot +533 -0
- data/s7n.gemspec +30 -0
- data/test/s7n/attribute_test.rb +50 -0
- data/test/s7n/gpass_file_test.rb +169 -0
- data/test/s7n/gpass_file_test/passwords.gps.empty +1 -0
- data/test/s7n/gpass_file_test/passwords.gps.one_entry +2 -0
- data/test/s7n/gpass_file_test/passwords.gps.three_entries +3 -0
- data/test/s7n/gpass_file_test/passwords.gps.with_folders +0 -0
- data/test/s7n/secret_generator_test.rb +29 -0
- data/test/s7n/unicode_data_test.rb +28 -0
- data/test/s7n/world_test.rb +35 -0
- data/test/test_helper.rb +11 -0
- metadata +153 -0
@@ -0,0 +1,101 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
|
3
|
+
require "gettext"
|
4
|
+
require "optparse"
|
5
|
+
|
6
|
+
module S7n
|
7
|
+
class S7nCli
|
8
|
+
# Option クラスとそれを継承したクラスは Ximapd プロジェクトからコピー
|
9
|
+
# しています。
|
10
|
+
# * http://projects.netlab.jp/svn/ximapd/
|
11
|
+
class Option
|
12
|
+
include GetText
|
13
|
+
|
14
|
+
def initialize(*args)
|
15
|
+
case args.length
|
16
|
+
when 2
|
17
|
+
@name, @description = *args
|
18
|
+
@arg_name = nil
|
19
|
+
when 3
|
20
|
+
@short_name, @name, @description = *args
|
21
|
+
when 4
|
22
|
+
@short_name, @name, @arg_name, @description = *args
|
23
|
+
else
|
24
|
+
msg = _("wrong # of arguments (%d for 2)") % args.length
|
25
|
+
raise ArgumentError, msg
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def opt_name
|
30
|
+
return @name.tr("_", "-")
|
31
|
+
end
|
32
|
+
|
33
|
+
def arg_name
|
34
|
+
if @arg_name.nil?
|
35
|
+
@arg_name = @name.slice(/[a-z]*\z/ni).upcase
|
36
|
+
end
|
37
|
+
return @arg_name
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
class BoolOption < Option
|
42
|
+
def define(opts, config)
|
43
|
+
define_args = []
|
44
|
+
if @short_name
|
45
|
+
define_args << ("-" + @short_name)
|
46
|
+
end
|
47
|
+
define_args << ("--[no-]" + opt_name)
|
48
|
+
define_args << @description
|
49
|
+
opts.define(*define_args) do |arg|
|
50
|
+
config[@name] = arg
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
class IntOption < Option
|
56
|
+
def define(opts, config)
|
57
|
+
define_args = []
|
58
|
+
if @short_name
|
59
|
+
define_args << ("-" + @short_name)
|
60
|
+
end
|
61
|
+
define_args << ("--" + opt_name + "=" + arg_name)
|
62
|
+
define_args << Integer
|
63
|
+
define_args << @description
|
64
|
+
opts.define(*define_args) do |arg|
|
65
|
+
config[@name] = arg
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
class StringOption < Option
|
71
|
+
def define(opts, config)
|
72
|
+
define_args = []
|
73
|
+
if @short_name
|
74
|
+
define_args << ("-" + @short_name)
|
75
|
+
end
|
76
|
+
define_args << ("--" + opt_name + "=" + arg_name)
|
77
|
+
define_args << @description
|
78
|
+
opts.define(*define_args) do |arg|
|
79
|
+
config[@name] = arg
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
class ArrayOption < Option
|
85
|
+
def define(opts, config)
|
86
|
+
define_args = []
|
87
|
+
if @short_name
|
88
|
+
define_args << ("-" + @short_name)
|
89
|
+
end
|
90
|
+
s = arg_name[0, 1]
|
91
|
+
args = ("1".."3").collect { |i| s + i.to_s }.join(",")
|
92
|
+
define_args << ("--" + opt_name + "=" + args)
|
93
|
+
define_args << Array
|
94
|
+
define_args << @description
|
95
|
+
opts.define(*define_args) do |arg|
|
96
|
+
config[@name] = arg
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
|
3
|
+
module S7n
|
4
|
+
# パスワードや暗証番号などの機密情報を自動生成する処理を表現する。
|
5
|
+
class SecretGenerator
|
6
|
+
# 文字の集合を示すシンボルから実際の文字の配列へのハッシュ。
|
7
|
+
SYMBOL_CHARACTERS = {
|
8
|
+
:alphabet => ("a".."z").to_a + ("A".."Z").to_a,
|
9
|
+
:upper_alphabet => ("A".."Z").to_a,
|
10
|
+
:lower_alphabet => ("a".."z").to_a,
|
11
|
+
:number => ("0".."9").to_a,
|
12
|
+
# TODO: アスキーコードの表を確認する。
|
13
|
+
:symbol => '!"#$%&\'()-=^~\\|@`[{;+:*]},<.>/?_'.scan(%r"."),
|
14
|
+
}
|
15
|
+
|
16
|
+
def self.generate(options)
|
17
|
+
res = ""
|
18
|
+
characters = []
|
19
|
+
(options[:characters] || [:alphabet, :number]).each do |sym|
|
20
|
+
if SYMBOL_CHARACTERS.key?(sym)
|
21
|
+
characters.concat(SYMBOL_CHARACTERS[sym])
|
22
|
+
end
|
23
|
+
end
|
24
|
+
options[:length].times do
|
25
|
+
res << characters[rand(characters.length)]
|
26
|
+
end
|
27
|
+
return res
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
|
3
|
+
module S7n
|
4
|
+
# UNICODE に関する処理を表現する。
|
5
|
+
module UnicodeData
|
6
|
+
module_function
|
7
|
+
|
8
|
+
# chr で指定された 1 文字の文字幅を示す次のシンボルを返す。
|
9
|
+
# :F:: East Asian Full-width
|
10
|
+
# :H:: East Asian Half-width
|
11
|
+
# :W:: East Asian Wide
|
12
|
+
# :Na:: East Asian Narrow (Na)
|
13
|
+
# :A:: East Asian Ambiguous (A)
|
14
|
+
# :N:: Not East Asian
|
15
|
+
# 2 文字以上が与えられた場合、最初の 1 文字を対象とする。
|
16
|
+
#
|
17
|
+
# まだ、ASCII と半角カナにしか対応していない。
|
18
|
+
def east_asian_width(chr)
|
19
|
+
n = chr[0].encode("UTF-8").ord
|
20
|
+
if n >= 0 && n <= 127 || n == 0x203E
|
21
|
+
return :N
|
22
|
+
elsif n >= 0xFF61 && n <= 0xFF9F
|
23
|
+
return :H
|
24
|
+
else
|
25
|
+
return :F
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
data/lib/s7n/utils.rb
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
|
3
|
+
require "gettext"
|
4
|
+
require "s7n/exception"
|
5
|
+
|
6
|
+
module S7n
|
7
|
+
# 便利なメソッドの集合。
|
8
|
+
module Utils
|
9
|
+
include GetText
|
10
|
+
|
11
|
+
# 実行したユーザのホームディレクトリを返す。
|
12
|
+
def home_dir
|
13
|
+
return File.expand_path("~")
|
14
|
+
end
|
15
|
+
module_function :home_dir
|
16
|
+
|
17
|
+
# str で指定した文字列の内容を破壊する。
|
18
|
+
# メモリ上のパスフレーズをクリアするために使用する。
|
19
|
+
def shred_string(str)
|
20
|
+
# TODO: OpenSSL などを使用してまともな実装にする。
|
21
|
+
str.length.times do |i|
|
22
|
+
str[i] = "1"
|
23
|
+
end
|
24
|
+
end
|
25
|
+
module_function :shred_string
|
26
|
+
|
27
|
+
# command で指定したコマンドを実行する。
|
28
|
+
# 終了コードが 0 でなければ、ApplicationError 例外を発生させる。
|
29
|
+
def execute(command)
|
30
|
+
system(command)
|
31
|
+
if $? != 0
|
32
|
+
raise ApplicationError, _("failed execute: command=<%s>") % command
|
33
|
+
end
|
34
|
+
end
|
35
|
+
module_function :execute
|
36
|
+
end
|
37
|
+
end
|
data/lib/s7n/version.rb
ADDED
data/lib/s7n/world.rb
ADDED
@@ -0,0 +1,158 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
|
3
|
+
require "logger"
|
4
|
+
require "gettext"
|
5
|
+
require "fileutils"
|
6
|
+
require "yaml"
|
7
|
+
require "s7n/utils"
|
8
|
+
require "s7n/entry_collection"
|
9
|
+
require "s7n/undo_stack"
|
10
|
+
require "s7n/configuration"
|
11
|
+
require "s7n/s7n_file"
|
12
|
+
|
13
|
+
module S7n
|
14
|
+
# アプリケーション全体を表現する。
|
15
|
+
class World
|
16
|
+
include GetText
|
17
|
+
|
18
|
+
# 設定や機密情報などを格納するディレクトリ。
|
19
|
+
attr_accessor :base_dir
|
20
|
+
|
21
|
+
# Logger のインスタンス。
|
22
|
+
attr_accessor :logger
|
23
|
+
|
24
|
+
# マスターキー。
|
25
|
+
attr_accessor :master_key
|
26
|
+
|
27
|
+
# 機密情報の集合。
|
28
|
+
attr_reader :entry_collection
|
29
|
+
|
30
|
+
# UndoStack オブジェクト。
|
31
|
+
attr_reader :undo_stack
|
32
|
+
|
33
|
+
# Configuration オブジェクト。
|
34
|
+
attr_reader :configuration
|
35
|
+
|
36
|
+
# 変更があるかどうか。
|
37
|
+
attr_accessor :changed
|
38
|
+
|
39
|
+
# デバッグモードかどうか。
|
40
|
+
attr_accessor :debug
|
41
|
+
|
42
|
+
def initialize
|
43
|
+
@base_dir = File.join(Utils::home_dir, ".s7")
|
44
|
+
@logger = Logger.new(STDERR)
|
45
|
+
@entry_collection = EntryCollection.new
|
46
|
+
@undo_stack = UndoStack.new
|
47
|
+
@configuration = Configuration.new(self)
|
48
|
+
@changed = false
|
49
|
+
@debug = false
|
50
|
+
end
|
51
|
+
|
52
|
+
# 2 重起動を防止するためにロックするためのファイルのパスを取得する。
|
53
|
+
def lock_path
|
54
|
+
return File.join(base_dir, "lock")
|
55
|
+
end
|
56
|
+
|
57
|
+
# 機密情報を格納するファイルのパスを取得する。
|
58
|
+
def secrets_path
|
59
|
+
return File.join(base_dir, "secrets")
|
60
|
+
end
|
61
|
+
|
62
|
+
# 設定を格納するファイルのパスを取得する。
|
63
|
+
def configuration_path
|
64
|
+
return File.join(base_dir, "configuration")
|
65
|
+
end
|
66
|
+
|
67
|
+
# ログの記録を開始する。
|
68
|
+
def start_logging
|
69
|
+
log_path = File.join(base_dir, "s7n.log")
|
70
|
+
self.logger = Logger.new(log_path)
|
71
|
+
logger.level = Logger::DEBUG
|
72
|
+
end
|
73
|
+
|
74
|
+
# 2 重起動を防止するため、lock ファイルを作成する。
|
75
|
+
# すでに s7 を起動していた場合、ApplicationError 例外を発生させる。
|
76
|
+
def lock
|
77
|
+
if File.exist?(lock_path)
|
78
|
+
pid = File.read(lock_path).to_i
|
79
|
+
begin
|
80
|
+
Process.kill(0, pid)
|
81
|
+
raise ApplicationError, _("running other s7n: pid=<%d>") % pid
|
82
|
+
rescue Errno::ENOENT, Errno::ESRCH
|
83
|
+
end
|
84
|
+
end
|
85
|
+
File.open(lock_path, "w") do |f|
|
86
|
+
f.flock(File::LOCK_EX)
|
87
|
+
f.write(Process.pid)
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
# lock ファイルを削除する。
|
92
|
+
def unlock
|
93
|
+
if File.exist?(lock_path)
|
94
|
+
pid = File.read(lock_path).to_i
|
95
|
+
if pid == Process.pid
|
96
|
+
FileUtils.rm(lock_path)
|
97
|
+
else
|
98
|
+
raise ApplicationError, _("running other s7n: pid=<%d>") % pid
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
def dump
|
104
|
+
hash = {}
|
105
|
+
hash["entries"] = entry_collection.entries.collect { |entry|
|
106
|
+
{
|
107
|
+
"attributes" => entry.attributes.collect { |attr|
|
108
|
+
{
|
109
|
+
"type" => attr.type,
|
110
|
+
"name" => attr.name,
|
111
|
+
"value" => attr.value,
|
112
|
+
"secret" => attr.secret?,
|
113
|
+
"editabled" => attr.editable?,
|
114
|
+
"protected" => attr.protected?,
|
115
|
+
}
|
116
|
+
},
|
117
|
+
"tags" => entry.tags,
|
118
|
+
}
|
119
|
+
}
|
120
|
+
return hash.to_yaml
|
121
|
+
end
|
122
|
+
|
123
|
+
def load(data)
|
124
|
+
hash = YAML.load(data)
|
125
|
+
hash["entries"].each do |entry_hash|
|
126
|
+
entry = Entry.new
|
127
|
+
attributes = entry_hash["attributes"].collect { |attr_hash|
|
128
|
+
type = attr_hash["type"]
|
129
|
+
attr_names = ["name", "value", "secret", "editabled", "protected"]
|
130
|
+
Attribute.create_instance(type,
|
131
|
+
attr_hash.select { |key, value|
|
132
|
+
attr_names.include?(key)
|
133
|
+
})
|
134
|
+
}
|
135
|
+
entry.add_attributes(attributes)
|
136
|
+
entry.tags.push(*entry_hash["tags"])
|
137
|
+
entry_collection.add_entries(entry)
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
# 情報をファイルに書き出す。
|
142
|
+
# すでに secrets ファイルが存在してれば、.bak というサフィックスを
|
143
|
+
# 追加してバックアップを取る。
|
144
|
+
def save(force = false)
|
145
|
+
if force || @changed
|
146
|
+
if File.exist?(secrets_path)
|
147
|
+
FileUtils.cp(secrets_path, secrets_path + ".bak")
|
148
|
+
end
|
149
|
+
S7nFile.write(secrets_path,
|
150
|
+
master_key,
|
151
|
+
configuration.cipher_type,
|
152
|
+
dump)
|
153
|
+
configuration.save(configuration_path)
|
154
|
+
@changed = false
|
155
|
+
end
|
156
|
+
end
|
157
|
+
end
|
158
|
+
end
|
data/po/ja/s7n.po
ADDED
@@ -0,0 +1,533 @@
|
|
1
|
+
# s7 - The secret informations manager
|
2
|
+
# Copyright (C) 2008 TAKAO Kouji <kouji@takao7.net>
|
3
|
+
# This file is distributed under the same license as the s7.
|
4
|
+
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
5
|
+
#
|
6
|
+
#, fuzzy
|
7
|
+
msgid ""
|
8
|
+
msgstr ""
|
9
|
+
"Project-Id-Version: s7n 0.1.0\n"
|
10
|
+
"POT-Creation-Date: 2012-03-18 14:35+0900\n"
|
11
|
+
"PO-Revision-Date: 2012-03-18 14:41+0900\n"
|
12
|
+
"Last-Translator: TAKAO Kouji <kouji@takao7.net>\n"
|
13
|
+
"Language-Team: Japanese\n"
|
14
|
+
"Language: \n"
|
15
|
+
"MIME-Version: 1.0\n"
|
16
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
17
|
+
"Content-Transfer-Encoding: 8bit\n"
|
18
|
+
"Plural-Forms: nplurals=2; plural=n == 1 ? 0 : 1;\n"
|
19
|
+
|
20
|
+
#: lib/s7n/attribute.rb:161
|
21
|
+
msgid "Yes"
|
22
|
+
msgstr "はい"
|
23
|
+
|
24
|
+
#: lib/s7n/attribute.rb:161
|
25
|
+
msgid "No"
|
26
|
+
msgstr "いいえ"
|
27
|
+
|
28
|
+
#: lib/s7n/entry.rb:59
|
29
|
+
msgid "not same attribute type: name=<%s> expected=<%s> actual=<%s>"
|
30
|
+
msgstr "属性の型が違います: 名前=<%s> 期待する型=<%s> 指定された型=<%s>"
|
31
|
+
|
32
|
+
#: lib/s7n/exception.rb:14
|
33
|
+
msgid "Invlaid passphrase."
|
34
|
+
msgstr "不正なパスフレーズです。"
|
35
|
+
|
36
|
+
#: lib/s7n/exception.rb:25
|
37
|
+
msgid "Invalid path: path=<%s>"
|
38
|
+
msgstr "パスが違います: パス=<%s>"
|
39
|
+
|
40
|
+
#: lib/s7n/exception.rb:36
|
41
|
+
msgid "Does not exit: path=<%s>"
|
42
|
+
msgstr "ファイルやディレクトリは存在しません: パス=<%s>"
|
43
|
+
|
44
|
+
#: lib/s7n/exception.rb:54
|
45
|
+
msgid "No such entry."
|
46
|
+
msgstr "そのようなエントリーはありません。"
|
47
|
+
|
48
|
+
#: lib/s7n/exception.rb:56
|
49
|
+
msgid "No such entry:%s"
|
50
|
+
msgstr "そのようなエントリーはありません:%s"
|
51
|
+
|
52
|
+
#: lib/s7n/exception.rb:75
|
53
|
+
msgid "No such attribute."
|
54
|
+
msgstr "そのような属性はありません。"
|
55
|
+
|
56
|
+
#: lib/s7n/exception.rb:77
|
57
|
+
msgid "No such attribute:%s"
|
58
|
+
msgstr "そのような属性はありません:%s"
|
59
|
+
|
60
|
+
#: lib/s7n/exception.rb:90
|
61
|
+
msgid "Invalid data length: actual=<%s> needed=<%s>"
|
62
|
+
msgstr "データ長が不正です: 実際の値=<%s> 期待値=<%s>"
|
63
|
+
|
64
|
+
#: lib/s7n/exception.rb:96
|
65
|
+
msgid "Canceled."
|
66
|
+
msgstr "キャンセルしました。"
|
67
|
+
|
68
|
+
#: lib/s7n/exception.rb:113
|
69
|
+
msgid "Failed the command: command=<%s> status=<%d>"
|
70
|
+
msgstr ""
|
71
|
+
|
72
|
+
#: lib/s7n/gpass_file.rb:26
|
73
|
+
msgid "name"
|
74
|
+
msgstr ""
|
75
|
+
|
76
|
+
#: lib/s7n/gpass_file.rb:27
|
77
|
+
msgid "description"
|
78
|
+
msgstr ""
|
79
|
+
|
80
|
+
#: lib/s7n/gpass_file.rb:28
|
81
|
+
msgid "created_at"
|
82
|
+
msgstr ""
|
83
|
+
|
84
|
+
#: lib/s7n/gpass_file.rb:29
|
85
|
+
msgid "updated_at"
|
86
|
+
msgstr ""
|
87
|
+
|
88
|
+
#: lib/s7n/gpass_file.rb:30
|
89
|
+
msgid "expiration"
|
90
|
+
msgstr ""
|
91
|
+
|
92
|
+
#: lib/s7n/gpass_file.rb:31
|
93
|
+
msgid "expire_at"
|
94
|
+
msgstr ""
|
95
|
+
|
96
|
+
#: lib/s7n/gpass_file.rb:34
|
97
|
+
msgid "username"
|
98
|
+
msgstr ""
|
99
|
+
|
100
|
+
#: lib/s7n/gpass_file.rb:35
|
101
|
+
msgid "password"
|
102
|
+
msgstr ""
|
103
|
+
|
104
|
+
#: lib/s7n/gpass_file.rb:38
|
105
|
+
msgid "hostname"
|
106
|
+
msgstr ""
|
107
|
+
|
108
|
+
#: lib/s7n/gpass_file.rb:41
|
109
|
+
msgid "url"
|
110
|
+
msgstr ""
|
111
|
+
|
112
|
+
#: lib/s7n/gpass_file.rb:86
|
113
|
+
msgid "not supported version: %s"
|
114
|
+
msgstr ""
|
115
|
+
|
116
|
+
#: lib/s7n/gpass_file.rb:94
|
117
|
+
msgid "duplicated entry id: %s"
|
118
|
+
msgstr ""
|
119
|
+
|
120
|
+
#: lib/s7n/gpass_file.rb:130
|
121
|
+
msgid "invalid entry type: type=<%s>"
|
122
|
+
msgstr ""
|
123
|
+
|
124
|
+
#: lib/s7n/s7ncli/attribute_command.rb:14
|
125
|
+
#: lib/s7n/s7ncli/attribute_command.rb:51
|
126
|
+
msgid "Copy the attribute value to the clipboard."
|
127
|
+
msgstr ""
|
128
|
+
|
129
|
+
#: lib/s7n/s7ncli/attribute_command.rb:15
|
130
|
+
msgid "usage: copy [ID] [ATTRIBUTE NAME] [OPTIONS]"
|
131
|
+
msgstr ""
|
132
|
+
|
133
|
+
#: lib/s7n/s7ncli/attribute_command.rb:26 lib/s7n/s7ncli/entry_command.rb:406
|
134
|
+
#: lib/s7n/s7ncli/entry_command.rb:454
|
135
|
+
msgid "Entry ID."
|
136
|
+
msgstr ""
|
137
|
+
|
138
|
+
#: lib/s7n/s7ncli/attribute_command.rb:27
|
139
|
+
msgid "Attribute name."
|
140
|
+
msgstr ""
|
141
|
+
|
142
|
+
#: lib/s7n/s7ncli/attribute_command.rb:29
|
143
|
+
msgid "Inclement the entry's rate after copied."
|
144
|
+
msgstr ""
|
145
|
+
|
146
|
+
#: lib/s7n/s7ncli/attribute_command.rb:31
|
147
|
+
msgid "Lock screen after copied."
|
148
|
+
msgstr ""
|
149
|
+
|
150
|
+
#: lib/s7n/s7ncli/attribute_command.rb:32
|
151
|
+
msgid "Copy command."
|
152
|
+
msgstr ""
|
153
|
+
|
154
|
+
#: lib/s7n/s7ncli/attribute_command.rb:47 lib/s7n/s7ncli/entry_command.rb:422
|
155
|
+
#: lib/s7n/s7ncli/entry_command.rb:466 lib/s7n/s7ncli/entry_command.rb:707
|
156
|
+
msgid "Too few arguments."
|
157
|
+
msgstr ""
|
158
|
+
|
159
|
+
#: lib/s7n/s7ncli/attribute_command.rb:71 lib/s7n/s7ncli/entry_command.rb:481
|
160
|
+
msgid "Changed rate to %d."
|
161
|
+
msgstr ""
|
162
|
+
|
163
|
+
#: lib/s7n/s7ncli/command.rb:119
|
164
|
+
msgid "Describe the commands."
|
165
|
+
msgstr ""
|
166
|
+
|
167
|
+
#: lib/s7n/s7ncli/command.rb:120
|
168
|
+
msgid "usage: help [COMMAND]"
|
169
|
+
msgstr ""
|
170
|
+
|
171
|
+
#: lib/s7n/s7ncli/command.rb:129 lib/s7n/s7ncli/entry_command.rb:284
|
172
|
+
#: lib/s7n/s7ncli.rb:182
|
173
|
+
msgid "Unknown command: %s"
|
174
|
+
msgstr ""
|
175
|
+
|
176
|
+
#: lib/s7n/s7ncli/command.rb:132
|
177
|
+
msgid "Type 'help <command>' for help on a specific command."
|
178
|
+
msgstr ""
|
179
|
+
|
180
|
+
#: lib/s7n/s7ncli/command.rb:134
|
181
|
+
msgid "Available commands:"
|
182
|
+
msgstr ""
|
183
|
+
|
184
|
+
#: lib/s7n/s7ncli/command.rb:153
|
185
|
+
msgid "Save."
|
186
|
+
msgstr ""
|
187
|
+
|
188
|
+
#: lib/s7n/s7ncli/command.rb:153
|
189
|
+
msgid "usage: save"
|
190
|
+
msgstr ""
|
191
|
+
|
192
|
+
#: lib/s7n/s7ncli/command.rb:157
|
193
|
+
msgid "Force."
|
194
|
+
msgstr ""
|
195
|
+
|
196
|
+
#: lib/s7n/s7ncli/command.rb:163
|
197
|
+
msgid "Saved."
|
198
|
+
msgstr ""
|
199
|
+
|
200
|
+
#: lib/s7n/s7ncli/command.rb:171
|
201
|
+
msgid "Lock screen after saved."
|
202
|
+
msgstr ""
|
203
|
+
|
204
|
+
#: lib/s7n/s7ncli/command.rb:171
|
205
|
+
msgid "usage: lock"
|
206
|
+
msgstr ""
|
207
|
+
|
208
|
+
#: lib/s7n/s7ncli/command.rb:175
|
209
|
+
msgid "Locked screen."
|
210
|
+
msgstr ""
|
211
|
+
|
212
|
+
#: lib/s7n/s7ncli/command.rb:177 lib/s7n/s7ncli.rb:120 lib/s7n/s7ncli.rb:132
|
213
|
+
msgid "Enter the master key for s7n: "
|
214
|
+
msgstr "s7nのマスターキーを入力してください: "
|
215
|
+
|
216
|
+
#: lib/s7n/s7ncli/command.rb:183
|
217
|
+
msgid "Unlocked."
|
218
|
+
msgstr ""
|
219
|
+
|
220
|
+
#: lib/s7n/s7ncli/command.rb:187 lib/s7n/s7ncli/entry_command.rb:77
|
221
|
+
#: lib/s7n/s7ncli/entry_command.rb:129
|
222
|
+
msgid "Try again."
|
223
|
+
msgstr ""
|
224
|
+
|
225
|
+
#: lib/s7n/s7ncli/command.rb:192 lib/s7n/s7ncli.rb:190 lib/s7n/s7ncli.rb:219
|
226
|
+
msgid "----- back trace -----"
|
227
|
+
msgstr ""
|
228
|
+
|
229
|
+
#: lib/s7n/s7ncli/command.rb:198 lib/s7n/s7ncli/command.rb:207
|
230
|
+
msgid "Quit."
|
231
|
+
msgstr ""
|
232
|
+
|
233
|
+
#: lib/s7n/s7ncli/command.rb:208
|
234
|
+
msgid "usage: quit"
|
235
|
+
msgstr ""
|
236
|
+
|
237
|
+
#: lib/s7n/s7ncli/entry_collection_command.rb:15
|
238
|
+
msgid "Import the entry colleciton from file."
|
239
|
+
msgstr ""
|
240
|
+
|
241
|
+
#: lib/s7n/s7ncli/entry_collection_command.rb:16
|
242
|
+
msgid "usage: import [PATH] [OPTIONS]"
|
243
|
+
msgstr ""
|
244
|
+
|
245
|
+
#: lib/s7n/s7ncli/entry_collection_command.rb:22
|
246
|
+
msgid "type"
|
247
|
+
msgstr ""
|
248
|
+
|
249
|
+
#: lib/s7n/s7ncli/entry_collection_command.rb:23
|
250
|
+
msgid "path"
|
251
|
+
msgstr ""
|
252
|
+
|
253
|
+
#: lib/s7n/s7ncli/entry_collection_command.rb:38
|
254
|
+
msgid "Import the entry collection in the GPass file: %s"
|
255
|
+
msgstr ""
|
256
|
+
|
257
|
+
#: lib/s7n/s7ncli/entry_collection_command.rb:41
|
258
|
+
msgid "Enter the master passphrase for GPass(^D is cancel): "
|
259
|
+
msgstr ""
|
260
|
+
|
261
|
+
#: lib/s7n/s7ncli/entry_collection_command.rb:48
|
262
|
+
msgid "Imported %d entries."
|
263
|
+
msgstr ""
|
264
|
+
|
265
|
+
#: lib/s7n/s7ncli/entry_collection_command.rb:57
|
266
|
+
msgid "not supported type: %s"
|
267
|
+
msgstr ""
|
268
|
+
|
269
|
+
#: lib/s7n/s7ncli/entry_command.rb:15
|
270
|
+
msgid "<n>,e<n>:edit attribute a:add attribute d<n>:delete attribute"
|
271
|
+
msgstr ""
|
272
|
+
|
273
|
+
#: lib/s7n/s7ncli/entry_command.rb:16
|
274
|
+
msgid "t:edit tags s:save"
|
275
|
+
msgstr ""
|
276
|
+
|
277
|
+
#: lib/s7n/s7ncli/entry_command.rb:27
|
278
|
+
msgid "Attribute name%s: "
|
279
|
+
msgstr ""
|
280
|
+
|
281
|
+
#: lib/s7n/s7ncli/entry_command.rb:34
|
282
|
+
msgid "Already exist: %s"
|
283
|
+
msgstr ""
|
284
|
+
|
285
|
+
#: lib/s7n/s7ncli/entry_command.rb:49
|
286
|
+
msgid " (%s)"
|
287
|
+
msgstr ""
|
288
|
+
|
289
|
+
#: lib/s7n/s7ncli/entry_command.rb:53
|
290
|
+
msgid "Value%s: "
|
291
|
+
msgstr ""
|
292
|
+
|
293
|
+
#: lib/s7n/s7ncli/entry_command.rb:58
|
294
|
+
msgid "Comfirm value: "
|
295
|
+
msgstr ""
|
296
|
+
|
297
|
+
#: lib/s7n/s7ncli/entry_command.rb:60
|
298
|
+
msgid "Mismatched."
|
299
|
+
msgstr ""
|
300
|
+
|
301
|
+
#: lib/s7n/s7ncli/entry_command.rb:73
|
302
|
+
msgid "The value is empty."
|
303
|
+
msgstr ""
|
304
|
+
|
305
|
+
#: lib/s7n/s7ncli/entry_command.rb:91
|
306
|
+
msgid "Edit tags%s: "
|
307
|
+
msgstr ""
|
308
|
+
|
309
|
+
#: lib/s7n/s7ncli/entry_command.rb:101
|
310
|
+
msgid "Is this a secret? (%s): "
|
311
|
+
msgstr ""
|
312
|
+
|
313
|
+
#: lib/s7n/s7ncli/entry_command.rb:107
|
314
|
+
msgid "Attribute type: "
|
315
|
+
msgstr ""
|
316
|
+
|
317
|
+
#: lib/s7n/s7ncli/entry_command.rb:123
|
318
|
+
msgid "Unknown type: %s"
|
319
|
+
msgstr ""
|
320
|
+
|
321
|
+
#: lib/s7n/s7ncli/entry_command.rb:149
|
322
|
+
msgid "tags"
|
323
|
+
msgstr ""
|
324
|
+
|
325
|
+
#: lib/s7n/s7ncli/entry_command.rb:151
|
326
|
+
msgid "Command (h:help, s:save, ^C:cancel): "
|
327
|
+
msgstr ""
|
328
|
+
|
329
|
+
#: lib/s7n/s7ncli/entry_command.rb:179 lib/s7n/s7ncli/entry_command.rb:257
|
330
|
+
msgid "Invalid index: %d"
|
331
|
+
msgstr ""
|
332
|
+
|
333
|
+
#: lib/s7n/s7ncli/entry_command.rb:181 lib/s7n/s7ncli/entry_command.rb:375
|
334
|
+
msgid "Edit attribute: %s"
|
335
|
+
msgstr ""
|
336
|
+
|
337
|
+
#: lib/s7n/s7ncli/entry_command.rb:193 lib/s7n/s7ncli/entry_command.rb:227
|
338
|
+
msgid "Generate value? (no): "
|
339
|
+
msgstr ""
|
340
|
+
|
341
|
+
#: lib/s7n/s7ncli/entry_command.rb:195 lib/s7n/s7ncli/entry_command.rb:230
|
342
|
+
msgid "Length (8): "
|
343
|
+
msgstr ""
|
344
|
+
|
345
|
+
#: lib/s7n/s7ncli/entry_command.rb:214
|
346
|
+
msgid "Updated '%s'."
|
347
|
+
msgstr ""
|
348
|
+
|
349
|
+
#: lib/s7n/s7ncli/entry_command.rb:216
|
350
|
+
msgid "Add attribute."
|
351
|
+
msgstr ""
|
352
|
+
|
353
|
+
#: lib/s7n/s7ncli/entry_command.rb:252
|
354
|
+
msgid "Added attribute: '%s'"
|
355
|
+
msgstr ""
|
356
|
+
|
357
|
+
#: lib/s7n/s7ncli/entry_command.rb:260
|
358
|
+
msgid "Can't delete attribute: %s"
|
359
|
+
msgstr ""
|
360
|
+
|
361
|
+
#: lib/s7n/s7ncli/entry_command.rb:263
|
362
|
+
msgid "Delete attribute '%s'? (no): "
|
363
|
+
msgstr ""
|
364
|
+
|
365
|
+
#: lib/s7n/s7ncli/entry_command.rb:268
|
366
|
+
msgid "Deleted attribute: '%s'"
|
367
|
+
msgstr ""
|
368
|
+
|
369
|
+
#: lib/s7n/s7ncli/entry_command.rb:275
|
370
|
+
msgid "Updated tags."
|
371
|
+
msgstr ""
|
372
|
+
|
373
|
+
#: lib/s7n/s7ncli/entry_command.rb:279
|
374
|
+
msgid "Saved: %d"
|
375
|
+
msgstr ""
|
376
|
+
|
377
|
+
#: lib/s7n/s7ncli/entry_command.rb:312
|
378
|
+
msgid "tag"
|
379
|
+
msgstr ""
|
380
|
+
|
381
|
+
#: lib/s7n/s7ncli/entry_command.rb:327 lib/s7n/s7ncli/entry_command.rb:362
|
382
|
+
msgid "Add the entry."
|
383
|
+
msgstr ""
|
384
|
+
|
385
|
+
#: lib/s7n/s7ncli/entry_command.rb:328
|
386
|
+
msgid "usage: add [NAME] [TAGS] [OPTIONS]"
|
387
|
+
msgstr ""
|
388
|
+
|
389
|
+
#: lib/s7n/s7ncli/entry_command.rb:334
|
390
|
+
msgid "Name."
|
391
|
+
msgstr ""
|
392
|
+
|
393
|
+
#: lib/s7n/s7ncli/entry_command.rb:335 lib/s7n/s7ncli/entry_command.rb:508
|
394
|
+
msgid "Tags."
|
395
|
+
msgstr ""
|
396
|
+
|
397
|
+
#: lib/s7n/s7ncli/entry_command.rb:337
|
398
|
+
msgid "Entry ID that is copied."
|
399
|
+
msgstr ""
|
400
|
+
|
401
|
+
#: lib/s7n/s7ncli/entry_command.rb:401 lib/s7n/s7ncli/entry_command.rb:430
|
402
|
+
msgid "Edit the entry."
|
403
|
+
msgstr ""
|
404
|
+
|
405
|
+
#: lib/s7n/s7ncli/entry_command.rb:402
|
406
|
+
msgid "usage: edit <ID> [OPTIONS]"
|
407
|
+
msgstr ""
|
408
|
+
|
409
|
+
#: lib/s7n/s7ncli/entry_command.rb:448
|
410
|
+
msgid "Show the entry."
|
411
|
+
msgstr "エントリーの情報を表示する。"
|
412
|
+
|
413
|
+
#: lib/s7n/s7ncli/entry_command.rb:449
|
414
|
+
msgid "usage: show <ID> [OPTIONS]"
|
415
|
+
msgstr ""
|
416
|
+
|
417
|
+
#: lib/s7n/s7ncli/entry_command.rb:456
|
418
|
+
msgid "Show value of secret attributes."
|
419
|
+
msgstr ""
|
420
|
+
|
421
|
+
#: lib/s7n/s7ncli/entry_command.rb:498
|
422
|
+
msgid "Search the entry."
|
423
|
+
msgstr ""
|
424
|
+
|
425
|
+
#: lib/s7n/s7ncli/entry_command.rb:499
|
426
|
+
msgid "usage: search [QUERY] [OPTIONS]"
|
427
|
+
msgstr ""
|
428
|
+
|
429
|
+
#: lib/s7n/s7ncli/entry_command.rb:507
|
430
|
+
msgid "Query."
|
431
|
+
msgstr ""
|
432
|
+
|
433
|
+
#: lib/s7n/s7ncli/entry_command.rb:509
|
434
|
+
msgid "Number of entries."
|
435
|
+
msgstr ""
|
436
|
+
|
437
|
+
#: lib/s7n/s7ncli/entry_command.rb:510
|
438
|
+
msgid "Ignore case."
|
439
|
+
msgstr ""
|
440
|
+
|
441
|
+
#: lib/s7n/s7ncli/entry_command.rb:553
|
442
|
+
msgid "No entry."
|
443
|
+
msgstr "エントリーがありません。"
|
444
|
+
|
445
|
+
#: lib/s7n/s7ncli/entry_command.rb:569
|
446
|
+
msgid "Search result of '%s', %d entries."
|
447
|
+
msgstr ""
|
448
|
+
|
449
|
+
#: lib/s7n/s7ncli/entry_command.rb:572
|
450
|
+
msgid "List of %d entries."
|
451
|
+
msgstr ""
|
452
|
+
|
453
|
+
#: lib/s7n/s7ncli/entry_command.rb:575
|
454
|
+
msgid " [page %d/%d]"
|
455
|
+
msgstr ""
|
456
|
+
|
457
|
+
#: lib/s7n/s7ncli/entry_command.rb:583
|
458
|
+
msgid "Command (p:prev, n:next, s:sort, q:quit): "
|
459
|
+
msgstr ""
|
460
|
+
|
461
|
+
#: lib/s7n/s7ncli/entry_command.rb:674
|
462
|
+
msgid ""
|
463
|
+
"%sID |%sName |%sTags(s) "
|
464
|
+
"|%sRate"
|
465
|
+
msgstr ""
|
466
|
+
|
467
|
+
#: lib/s7n/s7ncli/entry_command.rb:698
|
468
|
+
msgid "Delete the entry."
|
469
|
+
msgstr ""
|
470
|
+
|
471
|
+
#: lib/s7n/s7ncli/entry_command.rb:699
|
472
|
+
msgid "usage: delete <ID>"
|
473
|
+
msgstr ""
|
474
|
+
|
475
|
+
#: lib/s7n/s7ncli/entry_command.rb:717
|
476
|
+
msgid "Delete? (no): "
|
477
|
+
msgstr ""
|
478
|
+
|
479
|
+
#: lib/s7n/s7ncli/entry_command.rb:720
|
480
|
+
msgid "Deleted: %d"
|
481
|
+
msgstr ""
|
482
|
+
|
483
|
+
#: lib/s7n/s7ncli.rb:85
|
484
|
+
msgid "usage: s7ncli [options]"
|
485
|
+
msgstr "使用方法: s7ncli [オプション]"
|
486
|
+
|
487
|
+
#: lib/s7n/s7ncli.rb:87
|
488
|
+
msgid "options:"
|
489
|
+
msgstr "オプション:"
|
490
|
+
|
491
|
+
#: lib/s7n/s7ncli.rb:89
|
492
|
+
msgid "Specify the base directory. Default is '%s'."
|
493
|
+
msgstr "ベースディレクトリを指定する。デフォルトは'%s'です。"
|
494
|
+
|
495
|
+
#: lib/s7n/s7ncli.rb:93
|
496
|
+
msgid "Turn on debug mode. Default is '%s'."
|
497
|
+
msgstr "デバッグモードを有効にします。デフォルトは'%s'です。"
|
498
|
+
|
499
|
+
#: lib/s7n/s7ncli.rb:96
|
500
|
+
msgid "Show version."
|
501
|
+
msgstr ""
|
502
|
+
|
503
|
+
#: lib/s7n/s7ncli.rb:97
|
504
|
+
msgid "s7ncli, version %s"
|
505
|
+
msgstr ""
|
506
|
+
|
507
|
+
#: lib/s7n/s7ncli.rb:101
|
508
|
+
msgid "Show help and exit."
|
509
|
+
msgstr "使用方法を表示して終了する。"
|
510
|
+
|
511
|
+
#: lib/s7n/s7ncli.rb:137
|
512
|
+
msgid "Comfirm the master key for s7n: "
|
513
|
+
msgstr ""
|
514
|
+
|
515
|
+
#: lib/s7n/s7ncli.rb:147
|
516
|
+
msgid "created base directory: %s"
|
517
|
+
msgstr ""
|
518
|
+
|
519
|
+
#: lib/s7n/s7ncli.rb:160
|
520
|
+
msgid "could not read: %s"
|
521
|
+
msgstr ""
|
522
|
+
|
523
|
+
#: lib/s7n/s7ncli.rb:209
|
524
|
+
msgid "could not write: %s"
|
525
|
+
msgstr ""
|
526
|
+
|
527
|
+
#: lib/s7n/utils.rb:32
|
528
|
+
msgid "failed execute: command=<%s>"
|
529
|
+
msgstr ""
|
530
|
+
|
531
|
+
#: lib/s7n/world.rb:81 lib/s7n/world.rb:98
|
532
|
+
msgid "running other s7n: pid=<%d>"
|
533
|
+
msgstr "すでにs7nを起動しています: pid=<%d>"
|