id = "gmvault"
name = "Gmvault"
homepage = "https://github.com/gaubert/gmvault"
description = "Gmvault is a tool for backing up your gmail account and never lose email correspondence."
icon = "https://raw.githubusercontent.com/gaubert/gmvault/master/etc/nsis-install/images/gmv-icon-256.png"
executables = ["gmvault"]
[dotfiles]
paths = []
exclude = []
secret = [
"~/.gmvault/*.oauth2",
"~/.gmvault/*.passwd",
"~/.gmvault/token.sec",
]
side_effect = false
[commands]
format = 1
label = "Back up or restore Gmail"
description = "Back up a Gmail account to a local database or restore one. Check and export are left out."
quality = "ai-draft"
parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false }
[[commands.subcommand]]
path = ["sync"]
label = "Sync account"
description = "Back up a Gmail account into the local database."
[[commands.subcommand.source]]
id = "src"
kind = "help"
url = "https://github.com/gaubert/gmvault/blob/master/src/gmv/gmv_cmd.py"
evidence = """
sync_parser.add_argument('email', \
sync_parser.add_argument("-d", "--db-dir", \
sync_parser.add_argument("-y", "--oauth2", \
sync_parser.add_argument("-p", "--passwd", \
sync_parser.add_argument("--renew-oauth2-tok", \
sync_parser.add_argument("--emails-only", \
sync_parser.add_argument("--chats-only", \
sync_parser.add_argument("--debug", "-debug", \
sync_parser.add_argument('-t', '-type', '--type', \
help='type of synchronisation: full|quick|custom. (default: full)')
"""
[[commands.subcommand.field]]
id = "email"
label = "Gmail address"
type = "string"
position = 0
sources = ["src"]
[[commands.subcommand.field]]
id = "type"
label = "Sync type"
type = "enum"
option = ['--type', '-t']
choices = [{ value = "full", label = "Full" }, { value = "quick", label = "Quick" }, { value = "custom", label = "Custom" }]
sources = ["src"]
[[commands.subcommand.field]]
id = "db_dir"
label = "Database directory"
type = "path"
option = ['--db-dir', '-d']
path = { kind = "directory", role = "output", must_exist = false }
sources = ["src"]
[[commands.subcommand.field]]
id = "oauth2"
label = "Use OAuth"
type = "boolean"
option = ['--oauth2', '-y']
sources = ["src"]
[[commands.subcommand.field]]
id = "passwd"
label = "Interactive password"
type = "boolean"
option = ['--passwd', '-p']
sources = ["src"]
[[commands.subcommand.field]]
id = "renew_token"
label = "Renew OAuth token"
type = "boolean"
option = ['--renew-oauth2-tok']
sources = ["src"]
[[commands.subcommand.field]]
id = "emails_only"
label = "Emails only"
type = "boolean"
option = ['--emails-only']
sources = ["src"]
[[commands.subcommand.field]]
id = "chats_only"
label = "Chats only"
type = "boolean"
option = ['--chats-only']
sources = ["src"]
[[commands.subcommand.field]]
id = "debug"
label = "Debug"
type = "boolean"
option = ['--debug']
sources = ["src"]
[[commands.subcommand.task]]
id = "sync"
label = "Sync account"
fields = ["email", "type", "db_dir", "oauth2", "passwd", "renew_token", "emails_only", "chats_only", "debug"]
required = ["email"]
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["email", "type", "db_dir", "oauth2", "passwd", "renew_token", "emails_only", "chats_only", "debug"]
[[commands.subcommand]]
path = ["restore"]
label = "Restore account"
description = "Restore the local database into a Gmail account."
[[commands.subcommand.source]]
id = "src"
kind = "help"
url = "https://github.com/gaubert/gmvault/blob/master/src/gmv/gmv_cmd.py"
evidence = """
rest_parser.add_argument('email', \
rest_parser.add_argument("-d", "--db-dir", \
rest_parser.add_argument("-y", "--oauth2", \
rest_parser.add_argument("-p", "--passwd", \
rest_parser.add_argument("--renew-oauth2-tok", \
rest_parser.add_argument("--emails-only", \
rest_parser.add_argument("--chats-only", \
rest_parser.add_argument("--debug", "-debug", \
rest_parser.add_argument('-t', '-type', '--type', \
help='type of restoration: full|quick. (default: full)')
rest_parser.add_argument('-a', '--apply-label' , \
help='Apply a label to restored emails')
"""
[[commands.subcommand.field]]
id = "email"
label = "Gmail address"
type = "string"
position = 0
sources = ["src"]
[[commands.subcommand.field]]
id = "type"
label = "Restore type"
type = "enum"
option = ['--type', '-t']
choices = [{ value = "full", label = "Full" }, { value = "quick", label = "Quick" }]
sources = ["src"]
[[commands.subcommand.field]]
id = "apply_label"
label = "Apply label"
type = "string"
option = ['--apply-label', '-a']
sources = ["src"]
[[commands.subcommand.field]]
id = "db_dir"
label = "Database directory"
type = "path"
option = ['--db-dir', '-d']
path = { kind = "directory", role = "output", must_exist = false }
sources = ["src"]
[[commands.subcommand.field]]
id = "oauth2"
label = "Use OAuth"
type = "boolean"
option = ['--oauth2', '-y']
sources = ["src"]
[[commands.subcommand.field]]
id = "passwd"
label = "Interactive password"
type = "boolean"
option = ['--passwd', '-p']
sources = ["src"]
[[commands.subcommand.field]]
id = "renew_token"
label = "Renew OAuth token"
type = "boolean"
option = ['--renew-oauth2-tok']
sources = ["src"]
[[commands.subcommand.field]]
id = "emails_only"
label = "Emails only"
type = "boolean"
option = ['--emails-only']
sources = ["src"]
[[commands.subcommand.field]]
id = "chats_only"
label = "Chats only"
type = "boolean"
option = ['--chats-only']
sources = ["src"]
[[commands.subcommand.field]]
id = "debug"
label = "Debug"
type = "boolean"
option = ['--debug']
sources = ["src"]
[[commands.subcommand.task]]
id = "restore"
label = "Restore account"
fields = ["email", "type", "apply_label", "db_dir", "oauth2", "passwd", "renew_token", "emails_only", "chats_only", "debug"]
required = ["email"]
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["email", "type", "apply_label", "db_dir", "oauth2", "passwd", "renew_token", "emails_only", "chats_only", "debug"]