mpw 3.2.1 → 4.0.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 +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +14 -0
- data/CHANGELOG.md +56 -0
- data/Gemfile +9 -9
- data/README.md +99 -80
- data/VERSION +1 -1
- data/bin/mpw +23 -193
- data/bin/mpw-add +61 -0
- data/bin/mpw-config +108 -0
- data/bin/mpw-copy +71 -0
- data/bin/mpw-delete +66 -0
- data/bin/mpw-export +70 -0
- data/bin/mpw-genpwd +50 -0
- data/bin/mpw-import +61 -0
- data/bin/mpw-list +66 -0
- data/bin/mpw-update +70 -0
- data/bin/mpw-wallet +116 -0
- data/i18n/en.yml +70 -32
- data/i18n/fr.yml +70 -32
- data/lib/mpw/cli.rb +333 -220
- data/lib/mpw/config.rb +53 -40
- data/lib/mpw/item.rb +13 -13
- data/lib/mpw/mpw.rb +75 -98
- data/mpw.gemspec +9 -9
- data/templates/add_form.erb +9 -0
- data/templates/update_form.erb +17 -0
- data/test/files/fixtures.yml +0 -4
- data/test/init.rb +19 -0
- data/test/test_config.rb +64 -0
- data/test/test_item.rb +42 -88
- data/test/test_mpw.rb +88 -139
- data/test/test_translate.rb +31 -0
- data/test/tests.rb +4 -1
- metadata +96 -27
- data/CHANGELOG +0 -13
- data/test/files/test_import.csv +0 -3
- data/test/files/test_import.yml +0 -23
data/i18n/en.yml
CHANGED
@@ -1,18 +1,19 @@
|
|
1
1
|
---
|
2
2
|
en:
|
3
3
|
error:
|
4
|
+
bad_class: "The object class isn't valid!"
|
4
5
|
config:
|
5
6
|
write: "Can't write the config file!"
|
6
|
-
|
7
|
+
load: "Checkconfig failed!"
|
7
8
|
key_bad_format: "The key string isn't in good format!"
|
8
9
|
no_key_public: "You haven't the public key of %{key}!"
|
9
10
|
genkey_gpg:
|
10
11
|
exception: "Can't create the GPG key!"
|
11
12
|
name: "You must define a name for your GPG key!"
|
12
13
|
password: "You must define a password for your GPG key!"
|
13
|
-
|
14
|
-
id_no_exist: "Can't delete the item %{id}, it doesn't exist!"
|
14
|
+
empty: "The class is void"
|
15
15
|
export: "Can't export, unable to write in %{file}!"
|
16
|
+
export_key: "Can't export the GPG key"
|
16
17
|
gpg_file:
|
17
18
|
decrypt: "Can't decrypt file!"
|
18
19
|
encrypt: "Can't encrypt the GPG file!"
|
@@ -21,7 +22,7 @@ en:
|
|
21
22
|
write_data: "Can't to write the MPW file!"
|
22
23
|
import: "Can't import, unable to read %{file}!"
|
23
24
|
update:
|
24
|
-
|
25
|
+
host_empty: "You must define a host!"
|
25
26
|
sync:
|
26
27
|
general: "An error has appeared during the sync"
|
27
28
|
connection: "Connection fail!"
|
@@ -35,47 +36,78 @@ en:
|
|
35
36
|
warning:
|
36
37
|
select: 'Your choice is not a valid element!'
|
37
38
|
|
39
|
+
command:
|
40
|
+
add: "Add a new item"
|
41
|
+
config: "Manage the general config"
|
42
|
+
copy: "Copy a login, password or OTP code"
|
43
|
+
delete: "Delete an item"
|
44
|
+
export: "Export the data in plain text"
|
45
|
+
genpwd: "Generate a password"
|
46
|
+
import: "Import data from a file"
|
47
|
+
list: "Print the items"
|
48
|
+
update: "Update an item"
|
49
|
+
wallet: "Manage the wallet config"
|
50
|
+
|
38
51
|
option:
|
39
52
|
add: "Add an item or key"
|
53
|
+
add_gpg_key: "Share the wallet with an other GPG key"
|
40
54
|
alpha: "Use letter to generate a password"
|
41
55
|
config: "Specify the configuration file to use"
|
42
56
|
clipboard: "Disable the clipboard feature"
|
57
|
+
default_wallet: "Specify the default wallet to use"
|
58
|
+
delete_gpg_key: "Delete the wallet's share with an other GPG key"
|
59
|
+
disable_alpha: "Don't use letter to generate a password"
|
60
|
+
disable_numeric: "Don't use number to generate a password"
|
61
|
+
disable_special_chars: "Don't use special char to generate a password"
|
43
62
|
export: "Export a wallet in an yaml file"
|
44
|
-
|
63
|
+
file_export: "Specify the file where export data"
|
64
|
+
file_import: "Specify the file to import"
|
45
65
|
force: "No ask to confirm when you delete an item"
|
46
66
|
generate_password: "Generate a random password (default 8 characters)"
|
67
|
+
gpg_exe: "Set the gpg binary path to use"
|
68
|
+
gpg_key: "Specify a GPG key (ex: user@example.com)"
|
47
69
|
group: "Search the items with specified group"
|
48
70
|
help: "Show this help message"
|
49
|
-
|
71
|
+
host: "Specify the server for the synchronization"
|
72
|
+
init: "Initialize mpw"
|
50
73
|
import: "Import item since a yaml file"
|
51
|
-
key: "Specify the key name
|
74
|
+
key: "Specify the key name"
|
75
|
+
lang: "Set the software language"
|
76
|
+
length: "Size of the password"
|
77
|
+
list: "List the wallets"
|
78
|
+
list_keys: "List the GPG keys in wallet"
|
52
79
|
no_sync: "Disable synchronization with the server"
|
53
80
|
numeric: "Use number to generate a password"
|
81
|
+
password: "Change the password for the synchronization"
|
82
|
+
path: "Specify the remote path"
|
83
|
+
pattern: "Given search pattern"
|
84
|
+
port: "Specify the connection port"
|
85
|
+
protocol: "Specify the protocol for the connection"
|
86
|
+
random_password: "Generate a random password"
|
54
87
|
setup: "Create a new configuration file"
|
55
88
|
setup_wallet: "Create a new configuration file for a wallet"
|
56
89
|
special_chars: "Use special char to generate a password"
|
57
90
|
show: "Search and show the items"
|
58
91
|
show_all: "List all items"
|
59
|
-
remove: "Delete an item"
|
60
|
-
update: "Update an item"
|
61
92
|
usage: "Usage"
|
93
|
+
user: "Specify the user for the connection"
|
62
94
|
wallet: "Specify a wallet to use"
|
95
|
+
wallet_dir: "Set the wallets folder"
|
63
96
|
|
64
97
|
form:
|
65
98
|
select: "Select the item: "
|
66
99
|
add_key:
|
67
100
|
valid: "Key has been added!"
|
68
101
|
add_item:
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
otp_key: "Enter the otp secret (base32 secret key): "
|
102
|
+
name: "The item's name (mandatory"
|
103
|
+
group: "The group's name"
|
104
|
+
host: "The hostname or ip"
|
105
|
+
protocol: "The protocol of the connection (ssh, http, ...)"
|
106
|
+
login: "The login of connection"
|
107
|
+
password: "The password"
|
108
|
+
port: "The connection port"
|
109
|
+
comment: "A comment"
|
110
|
+
otp_key: "The OTP secret"
|
79
111
|
valid: "Item has been added!"
|
80
112
|
clipboard:
|
81
113
|
choice: "What do you want to copy ? [q = quit, p = password, l = login]: "
|
@@ -88,16 +120,20 @@ en:
|
|
88
120
|
login: "Press <l> to copy the login"
|
89
121
|
password: "Press <p> to copy the password"
|
90
122
|
otp_code: "Press <o> to copy the otp code"
|
123
|
+
quit: "Press <q> to quit"
|
91
124
|
delete_key:
|
92
125
|
valid: "Key has been deleted!"
|
93
126
|
delete_item:
|
94
|
-
ask: "Are you sure you want to remove the item
|
95
|
-
valid: "The item
|
96
|
-
not_valid: "The item %{id} hasn't been removed, because it doesn't exist!"
|
127
|
+
ask: "Are you sure you want to remove the item ?"
|
128
|
+
valid: "The item has been removed!"
|
97
129
|
import:
|
98
130
|
ask: "Are you sure you want to import this file %{file} ?"
|
131
|
+
file_empty: "The import file is empty!"
|
132
|
+
file_not_exist: "The import file doesn't exist!"
|
99
133
|
valid: "The import is succesfull!"
|
100
134
|
not_valid: "No data to import!"
|
135
|
+
set_config:
|
136
|
+
valid: "The config file has been edited!"
|
101
137
|
setup_config:
|
102
138
|
title: "Setup a new config file"
|
103
139
|
lang: "Choose your language (en, fr, ...) [default=%{lang}]: "
|
@@ -106,6 +142,7 @@ en:
|
|
106
142
|
wallet_dir: "Enter the wallets's folder path [default=%{home}/wallets]: "
|
107
143
|
valid: "The config file has been created!"
|
108
144
|
setup_wallet:
|
145
|
+
password: "Sync password: "
|
109
146
|
title: "Wallet setup"
|
110
147
|
sync_type: "Synchronization type (ssh, ftp): "
|
111
148
|
sync_host: "Synchronization server: "
|
@@ -127,16 +164,15 @@ en:
|
|
127
164
|
wait: "Please waiting during the GPG key generate, this process can take few minutes."
|
128
165
|
valid: "Your GPG key has been created ;-)"
|
129
166
|
update_item:
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
otp_key: "Enter the otp secret (base32 secret key): "
|
167
|
+
name: "The item's name (mandatory"
|
168
|
+
group: "The group's name"
|
169
|
+
host: "The hostname or ip"
|
170
|
+
protocol: "The protocol of the connection (ssh, http, ...)"
|
171
|
+
login: "The login of connection"
|
172
|
+
password: "The password (leave empty if you don't want change)"
|
173
|
+
port: "The connection port"
|
174
|
+
comment: "A comment"
|
175
|
+
otp_key: "The OTP secret (leave empty if you don't want change"
|
140
176
|
valid: "Item has been updated!"
|
141
177
|
export:
|
142
178
|
valid: "The export in %{file} is succesfull!"
|
@@ -144,6 +180,7 @@ en:
|
|
144
180
|
display:
|
145
181
|
comment: "Comment"
|
146
182
|
error: "ERROR"
|
183
|
+
keys: "GPG keys"
|
147
184
|
gpg_password: "GPG passphrase: "
|
148
185
|
group: "Group"
|
149
186
|
login: "Login"
|
@@ -155,6 +192,7 @@ en:
|
|
155
192
|
port: "Port"
|
156
193
|
protocol: "Protocol"
|
157
194
|
server: "Server"
|
195
|
+
wallets: "Wallets"
|
158
196
|
warning: "Warning"
|
159
197
|
|
160
198
|
formats:
|
data/i18n/fr.yml
CHANGED
@@ -1,18 +1,19 @@
|
|
1
1
|
---
|
2
2
|
fr:
|
3
3
|
error:
|
4
|
+
bad_class: "La classe de l'objet n'est pas celle attendue!"
|
4
5
|
config:
|
5
6
|
write: "Impossible d'écrire le fichier de configuration!"
|
6
|
-
|
7
|
+
load: "Le fichier de configuration est invalide!"
|
7
8
|
key_bad_format: "La clé GPG est invalide!"
|
8
9
|
no_key_public: "Vous ne possédez pas la clé publique de %{key}!"
|
9
10
|
genkey_gpg:
|
10
11
|
exception: "La création de la clé GPG n'a pas pu aboutir!"
|
11
12
|
name: "Vous devez définir un nom pour votre clé GPG!"
|
12
13
|
password: "Vous devez définir un mot de passe pour votre clé GPG!"
|
13
|
-
|
14
|
-
id_no_exist: "Impossible de supprimer l'élément %{id}, car il n'existe pas!"
|
14
|
+
empty: "La classe est vide"
|
15
15
|
export: "Impossible d'exporter les données dans le fichier %{file}!"
|
16
|
+
export_key: "Impossible d'exporter la clé GPG"
|
16
17
|
gpg_file:
|
17
18
|
decrypt: "Impossible de déchiffrer le fichier GPG!"
|
18
19
|
encrypt: "Impossible de chiffrer le fichier GPG!"
|
@@ -21,7 +22,7 @@ fr:
|
|
21
22
|
write_data: "Impossible d'écrire le fichier MPW!"
|
22
23
|
import: "Impossible d'importer le fichier %{file}, car il n'est pas lisible!"
|
23
24
|
update:
|
24
|
-
|
25
|
+
host_empty: "Vous devez définir un host!"
|
25
26
|
sync:
|
26
27
|
general: "Une erreur est survenue durant la synchronisation"
|
27
28
|
connection: "La connexion n'a pu être établie!"
|
@@ -35,47 +36,78 @@ fr:
|
|
35
36
|
warning:
|
36
37
|
select: "Votre choix n'est pas un élément valide!"
|
37
38
|
|
39
|
+
command:
|
40
|
+
add: "Ajoute un nouvel élément"
|
41
|
+
config: "Gère la configuration générale"
|
42
|
+
copy: "Copie un identifiant, un mot de passe ou un code OTP"
|
43
|
+
delete: "Supprimer un élément d'un portefeuille"
|
44
|
+
export: "Exporte les données"
|
45
|
+
genpwd: "Génére un mot de passe"
|
46
|
+
import: "Importe des données"
|
47
|
+
list: "Liste les éléments d'un portefeuille"
|
48
|
+
update: "Met à jour un élément"
|
49
|
+
wallet: "Gére la configuration d'un portefeuille"
|
50
|
+
|
38
51
|
option:
|
39
52
|
add: "Ajoute un élément ou une clé"
|
53
|
+
add_gpg_key: "Partage le portefeuille avec une autre clé GPG"
|
40
54
|
alpha: "Utilise des lettres dans la génération d'un mot de passe"
|
41
55
|
config: "Spécifie le fichier de configuration à utiliser"
|
42
56
|
clipboard: "Désactive la fonction presse papier"
|
57
|
+
default_wallet: "Spécifie le porte-feuille à utiliser par défaut"
|
58
|
+
delete_gpg_key: "Supprime le partage le portefeuille avec une autre clé GPG"
|
59
|
+
disable_alpha: "Désactive l'utilisation des lettres dans la génération d'un mot de passe"
|
60
|
+
disable_numeric: "Désactive l'utilisation des chiffre dans la génération d'un mot de passe"
|
61
|
+
disable_special_chars: "Désactive l'utilisation des charactères speciaux dans la génération d'un mot de passe"
|
43
62
|
export: "Exporte un portefeuille dans un fichier yaml"
|
44
|
-
|
63
|
+
file_export: "Spécifie le fichier où exporter les données"
|
64
|
+
file_import: "Spécifie le fichier à importer"
|
45
65
|
force: "Ne demande pas de confirmation pour la suppression d'un élément"
|
46
66
|
generate_password: "Génére un mot de passe aléatoire (défaut 8 caractères)"
|
67
|
+
gpg_exe: "Spécifie le chemin du binaire gpg à utiliser"
|
68
|
+
gpg_key: "Spécifie une clé GPG (ex: user@example.com)"
|
47
69
|
group: "Recherche les éléments appartenant au groupe spécifié"
|
48
70
|
help: "Affiche ce message d'aide"
|
49
|
-
|
71
|
+
host: "Spécifie le serveur pour la synchronisation"
|
50
72
|
import: "Importe des éléments depuis un fichier yaml"
|
51
|
-
|
73
|
+
init: "Initialise mpw"
|
74
|
+
key: "Spécifie le nom d'une clé"
|
75
|
+
lang: "Spécifie la langue du logiciel (ex: fr)"
|
76
|
+
length: "Taille du mot de passe"
|
77
|
+
list: "Liste les portefeuilles"
|
78
|
+
list_keys: "Liste les clés GPG dans le portefeuille"
|
52
79
|
no_sync: "Désactive la synchronisation avec le serveur"
|
53
80
|
numeric: "Utilise des chiffre dans la génération d'un mot de passe"
|
81
|
+
password: "Changer le mot de passe de connexion"
|
82
|
+
path: "Spécifie le chemin distant"
|
83
|
+
pattern: "Motif de donnée à chercher"
|
84
|
+
port: "Spécifie le port de connexion"
|
85
|
+
protocol: "Spécifie le protocol utilisé pour la connexion"
|
86
|
+
random_password: "Génére un mot de passe aléatoire"
|
54
87
|
setup: "Création d'un nouveau fichier de configuration"
|
55
88
|
setup_wallet: "Création d'un nouveau fichier de configuration pour un portefeuille"
|
56
89
|
special_chars: "Utilise des charactères speciaux dans la génération d'un mot de passe"
|
57
90
|
show: "Recherche et affiche les éléments"
|
58
91
|
show_all: "Liste tous les éléments"
|
59
|
-
remove: "Supprime un élément"
|
60
|
-
update: "Met à jour un élément"
|
61
92
|
usage: "Utilisation"
|
93
|
+
user: "Spécifie l'identifiant de connection"
|
62
94
|
wallet: "Spécifie le portefeuille à utiliser"
|
95
|
+
wallet_dir: "Spécifie le répertoire des portefeuilles"
|
63
96
|
|
64
97
|
form:
|
65
98
|
select: "Sélectionner l'élément: "
|
66
99
|
add_key:
|
67
100
|
valid: "La clé a bien été ajoutée!"
|
68
101
|
add_item:
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
otp_key: "Entrez le secret OTP: "
|
102
|
+
name: "Le nom de l'élément (obligatoire)"
|
103
|
+
group: "Le nom du groupe"
|
104
|
+
host: "Le nom de domaine ou l'ip"
|
105
|
+
protocol: "Le protocole de connexion (ssh, http, ...)"
|
106
|
+
login: "L'identifiant de connexion"
|
107
|
+
password: "Le mot de passe"
|
108
|
+
port: "Le port de connexion"
|
109
|
+
comment: "Un commentaire"
|
110
|
+
otp_key: "Le secret OTP"
|
79
111
|
valid: "L'élément a bien été ajouté!"
|
80
112
|
clipboard:
|
81
113
|
choice: "Que voulez-vous copier ? : "
|
@@ -88,16 +120,20 @@ fr:
|
|
88
120
|
login: "Pressez <l> pour copier l'identifiant"
|
89
121
|
password: "Pressez <p> pour copier le mot de passe"
|
90
122
|
otp_code: "Pressez <o> pour copier le code OTP"
|
123
|
+
quit: "Pressez <q> pour quitter"
|
91
124
|
delete_key:
|
92
125
|
valid: "La clé a bien été supprimée!"
|
93
126
|
delete_item:
|
94
|
-
ask: "Êtes vous sûre de vouloir supprimer l'élément
|
95
|
-
valid: "L'élément
|
96
|
-
not_valid: "L'élément %{id} n'a pu être supprimé, car il n'existe pas!"
|
127
|
+
ask: "Êtes vous sûre de vouloir supprimer l'élément ?"
|
128
|
+
valid: "L'élément a bien été supprimé!"
|
97
129
|
import:
|
98
130
|
ask: "Êtes vous sûre de vouloir importer le fichier %{file} ?"
|
131
|
+
file_empty: "Le fichier d'import est vide!"
|
132
|
+
file_not_exist: "Le fichier d'import n'existe pas"
|
99
133
|
valid: "L'import est un succès!"
|
100
134
|
not_valid: "Aucune donnée à importer!"
|
135
|
+
set_config:
|
136
|
+
valid: "Le fichier de configuration a bien été modifié!"
|
101
137
|
setup_config:
|
102
138
|
title: "Création d'un nouveau fichier de configuration"
|
103
139
|
lang: "Choisissez votre langue (en, fr, ...) [défaut=%{lang}]: "
|
@@ -106,6 +142,7 @@ fr:
|
|
106
142
|
wallet_dir: "Entrez le chemin du répertoire qui contiendra les porte-feuilles de mot de passe [défaut=%{home}/wallets]: "
|
107
143
|
valid: "Le fichier de configuration a bien été créé!"
|
108
144
|
setup_wallet:
|
145
|
+
password: "Mot de passe de synchronisation: "
|
109
146
|
title: "Configuration du porte-feuille"
|
110
147
|
sync_type: "Type de synchronisation (ssh, ftp): "
|
111
148
|
sync_host: "Serveur: "
|
@@ -127,16 +164,15 @@ fr:
|
|
127
164
|
wait: "Veuillez patienter durant la génération de votre clé GPG, ce processus peut prendre quelques minutes."
|
128
165
|
valid: "Votre clé GPG a bien été créée ;-)"
|
129
166
|
update_item:
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
otp_key: "Entrez le secret OTP: "
|
167
|
+
name: "Le nom de l'élément (obligatoire)"
|
168
|
+
group: "Le nom du groupe"
|
169
|
+
host: "Le nom de domaine ou l'ip"
|
170
|
+
protocol: "Le protocole de connexion (ssh, http, ...)"
|
171
|
+
login: "L'identifiant de connexion"
|
172
|
+
password: "Le mot de passe (laissez vide si vous ne voulez pas le changer)"
|
173
|
+
port: "Le port de connexion"
|
174
|
+
comment: "Un commentaire"
|
175
|
+
otp_key: "Le secret OTP (laissez vide si vous ne voulez pas le changer)"
|
140
176
|
valid: "L'élément a bien été mis à jour!"
|
141
177
|
export:
|
142
178
|
valid: "L'export dans %{file} est un succès!"
|
@@ -144,6 +180,7 @@ fr:
|
|
144
180
|
display:
|
145
181
|
comment: "Commentaire"
|
146
182
|
error: "ERREUR"
|
183
|
+
keys: "Clés GPG"
|
147
184
|
gpg_password: "Mot de passe GPG: "
|
148
185
|
group: "Groupe"
|
149
186
|
login: "Identifiant"
|
@@ -155,6 +192,7 @@ fr:
|
|
155
192
|
port: "Port"
|
156
193
|
protocol: "Protocol"
|
157
194
|
server: "Serveur"
|
195
|
+
wallets: "Porte-feuilles"
|
158
196
|
warning: "Warning"
|
159
197
|
|
160
198
|
formats:
|