mirror of
https://github.com/lifegpc/pixiv_downloader.git
synced 2026-07-08 01:32:41 +08:00
add new option update-exif
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: pixiv_downloader\n"
|
"Project-Id-Version: pixiv_downloader\n"
|
||||||
"POT-Creation-Date: 2022-03-10 22:29+0800\n"
|
"POT-Creation-Date: 2022-03-16 20:03+0800\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <[email protected]>\n"
|
"Language-Team: LANGUAGE <[email protected]>\n"
|
||||||
@@ -98,15 +98,15 @@ msgstr ""
|
|||||||
msgid "Can not parse expired time:"
|
msgid "Can not parse expired time:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: cookies.rs:366 data/json.rs:53 settings.rs:418 webclient.rs:288
|
#: cookies.rs:366 data/json.rs:53 settings.rs:418 webclient.rs:283
|
||||||
msgid "Failed to remove file:"
|
msgid "Failed to remove file:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: cookies.rs:372 data/json.rs:64 settings.rs:425 webclient.rs:294
|
#: cookies.rs:372 data/json.rs:64 settings.rs:425 webclient.rs:289
|
||||||
msgid "Failed to create file:"
|
msgid "Failed to create file:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: cookies.rs:379 data/json.rs:70 settings.rs:431 webclient.rs:307
|
#: cookies.rs:379 data/json.rs:70 settings.rs:431 webclient.rs:302
|
||||||
msgid "Failed to write file:"
|
msgid "Failed to write file:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -114,136 +114,140 @@ msgstr ""
|
|||||||
msgid "Failed to unescape string:"
|
msgid "Failed to unescape string:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: download.rs:18 pixiv_web.rs:58
|
#: download.rs:19 pixiv_web.rs:58
|
||||||
msgid "Failed to initialize pixiv web api client."
|
msgid "Failed to initialize pixiv web api client."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: download.rs:27
|
#: download.rs:28
|
||||||
msgid "Warning: Web api client not logined, some future may not work."
|
msgid "Warning: Web api client not logined, some future may not work."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: download.rs:63
|
#: download.rs:64
|
||||||
msgid "Failed to get page count."
|
msgid "Failed to get page count."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: download.rs:72
|
#: download.rs:73
|
||||||
msgid "Failed to get pages' data."
|
msgid "Failed to get pages' data."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: download.rs:85
|
#: download.rs:86
|
||||||
msgid "Failed to save metadata to JSON file."
|
msgid "Failed to save metadata to JSON file."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: download.rs:95 download.rs:142
|
#: download.rs:96 download.rs:170
|
||||||
msgid "Failed to get original picture's link."
|
msgid "Failed to get original picture's link."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: download.rs:101 download.rs:148
|
#: download.rs:102 download.rs:176
|
||||||
msgid "Failed to get file name from url:"
|
msgid "Failed to get file name from url:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: download.rs:108 download.rs:114 download.rs:155 download.rs:161
|
#: download.rs:117 download.rs:156 download.rs:195 download.rs:225
|
||||||
|
msgid "Failed to add exif data to image:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: download.rs:136 download.rs:142 download.rs:205 download.rs:211
|
||||||
#: pixiv_web.rs:153
|
#: pixiv_web.rs:153
|
||||||
msgid "Failed to download image:"
|
msgid "Failed to download image:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: download.rs:119 download.rs:166
|
#: download.rs:147 download.rs:216
|
||||||
msgid "Downloaded image:"
|
msgid "Downloaded image:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: download.rs:128 download.rs:175
|
|
||||||
msgid "Failed to add exif data to image:"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: dur.rs:73
|
#: dur.rs:73
|
||||||
msgid "Failed to parse duration from string."
|
msgid "Failed to parse duration from string."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: opts.rs:88
|
#: opts.rs:91
|
||||||
msgid "Warning: The specified config file not found."
|
msgid "Warning: The specified config file not found."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: opts.rs:112
|
#: opts.rs:115
|
||||||
msgid "Usage:"
|
msgid "Usage:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: opts.rs:114
|
#: opts.rs:117
|
||||||
msgid "Download an artwork"
|
msgid "Download an artwork"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: opts.rs:116
|
#: opts.rs:119
|
||||||
msgid "Fix the config file"
|
msgid "Fix the config file"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: opts.rs:118
|
#: opts.rs:121
|
||||||
msgid "Print all available settings"
|
msgid "Print all available settings"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: opts.rs:126
|
#: opts.rs:129
|
||||||
msgid "Print help message."
|
msgid "Print help message."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: opts.rs:130
|
#: opts.rs:133
|
||||||
msgid "The location of config file."
|
msgid "The location of config file."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: opts.rs:136 settings_list.rs:11
|
#: opts.rs:139 settings_list.rs:11
|
||||||
msgid "The location of cookies file. Used for web API."
|
msgid "The location of cookies file. Used for web API."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: opts.rs:142 settings_list.rs:12
|
#: opts.rs:145 settings_list.rs:12
|
||||||
msgid "The language of translated tags."
|
msgid "The language of translated tags."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: opts.rs:145
|
#: opts.rs:148
|
||||||
msgid "Verbose logging."
|
msgid "Verbose logging."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: opts.rs:146
|
#: opts.rs:149
|
||||||
msgid "Overwrite existing file."
|
msgid "Overwrite existing file."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: opts.rs:147
|
#: opts.rs:150
|
||||||
msgid "Skip overwrite existing file."
|
msgid "Skip overwrite existing file."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: opts.rs:151 settings_list.rs:13
|
#: opts.rs:154 settings_list.rs:13
|
||||||
msgid "Max retry count if request failed."
|
msgid "Max retry count if request failed."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: opts.rs:157 settings_list.rs:14
|
#: opts.rs:160 settings_list.rs:14
|
||||||
msgid "The interval (in seconds) between two retries."
|
msgid "The interval (in seconds) between two retries."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: opts.rs:160 settings_list.rs:15
|
#: opts.rs:163 settings_list.rs:15
|
||||||
msgid "Use data from webpage first."
|
msgid "Use data from webpage first."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: opts.rs:180
|
#: opts.rs:167 settings_list.rs:18
|
||||||
|
msgid "Add/Update exif information to image files even when overwrite are disabled."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: opts.rs:188
|
||||||
msgid "Unknown command."
|
msgid "Unknown command."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: opts.rs:190
|
#: opts.rs:198
|
||||||
msgid "Failed to parse ID:"
|
msgid "Failed to parse ID:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: opts.rs:196
|
#: opts.rs:204
|
||||||
msgid "No URL or ID specified."
|
msgid "No URL or ID specified."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: opts.rs:204
|
#: opts.rs:212
|
||||||
msgid "No detailed command specified."
|
msgid "No detailed command specified."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: opts.rs:217
|
#: opts.rs:225
|
||||||
msgid "Unknown config subcommand."
|
msgid "Unknown config subcommand."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: opts.rs:253
|
#: opts.rs:261
|
||||||
msgid "Retry count must be an non-negative integer:"
|
msgid "Retry count must be an non-negative integer:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: opts.rs:262
|
#: opts.rs:270
|
||||||
msgid "Failed to parse retry interval:"
|
msgid "Failed to parse retry interval:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -355,7 +359,7 @@ msgstr ""
|
|||||||
msgid "Do you want to delete file \"<file>\"?"
|
msgid "Do you want to delete file \"<file>\"?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: utils.rs:51 webclient.rs:152
|
#: utils.rs:51 webclient.rs:151
|
||||||
msgid "Can not parse URL:"
|
msgid "Can not parse URL:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -363,39 +367,39 @@ msgstr ""
|
|||||||
msgid "Failed to get file name from path:"
|
msgid "Failed to get file name from path:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: webclient.rs:112
|
#: webclient.rs:111
|
||||||
msgid "Failed to parse Set-Cookie header."
|
msgid "Failed to parse Set-Cookie header."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: webclient.rs:117
|
#: webclient.rs:116
|
||||||
msgid "Failed to convert to string:"
|
msgid "Failed to convert to string:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: webclient.rs:159
|
#: webclient.rs:158
|
||||||
msgid "Parameters should be object or array:"
|
msgid "Parameters should be object or array:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: webclient.rs:179
|
#: webclient.rs:178
|
||||||
msgid "Parameters should be array:"
|
msgid "Parameters should be array:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: webclient.rs:183
|
#: webclient.rs:182
|
||||||
msgid "Parameters need at least a value:"
|
msgid "Parameters need at least a value:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: webclient.rs:222
|
#: webclient.rs:221
|
||||||
msgid "Retry after <num> seconds."
|
msgid "Retry after <num> seconds."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: webclient.rs:226
|
#: webclient.rs:225
|
||||||
msgid "Retry <count> times now."
|
msgid "Retry <count> times now."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: webclient.rs:240
|
#: webclient.rs:239
|
||||||
msgid "Error when request:"
|
msgid "Error when request:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: webclient.rs:301
|
#: webclient.rs:296
|
||||||
msgid "Error when downloading file:"
|
msgid "Error when downloading file:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: pixiv_downloader\n"
|
"Project-Id-Version: pixiv_downloader\n"
|
||||||
"POT-Creation-Date: 2022-03-10 22:29+0800\n"
|
"POT-Creation-Date: 2022-03-16 20:03+0800\n"
|
||||||
"PO-Revision-Date: 2022-03-10 22:30+0800\n"
|
"PO-Revision-Date: 2022-03-16 20:05+0800\n"
|
||||||
"Last-Translator: lifegpc <[email protected]>\n"
|
"Last-Translator: lifegpc <[email protected]>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"Language: zh_CN\n"
|
"Language: zh_CN\n"
|
||||||
@@ -99,15 +99,15 @@ msgstr "无效的Cookie:"
|
|||||||
msgid "Can not parse expired time:"
|
msgid "Can not parse expired time:"
|
||||||
msgstr "无法解析过期时间:"
|
msgstr "无法解析过期时间:"
|
||||||
|
|
||||||
#: cookies.rs:366 data/json.rs:53 settings.rs:418 webclient.rs:288
|
#: cookies.rs:366 data/json.rs:53 settings.rs:418 webclient.rs:283
|
||||||
msgid "Failed to remove file:"
|
msgid "Failed to remove file:"
|
||||||
msgstr "无法删除文件:"
|
msgstr "无法删除文件:"
|
||||||
|
|
||||||
#: cookies.rs:372 data/json.rs:64 settings.rs:425 webclient.rs:294
|
#: cookies.rs:372 data/json.rs:64 settings.rs:425 webclient.rs:289
|
||||||
msgid "Failed to create file:"
|
msgid "Failed to create file:"
|
||||||
msgstr "无法创建文件:"
|
msgstr "无法创建文件:"
|
||||||
|
|
||||||
#: cookies.rs:379 data/json.rs:70 settings.rs:431 webclient.rs:307
|
#: cookies.rs:379 data/json.rs:70 settings.rs:431 webclient.rs:302
|
||||||
msgid "Failed to write file:"
|
msgid "Failed to write file:"
|
||||||
msgstr "无法写入文件:"
|
msgstr "无法写入文件:"
|
||||||
|
|
||||||
@@ -115,136 +115,141 @@ msgstr "无法写入文件:"
|
|||||||
msgid "Failed to unescape string:"
|
msgid "Failed to unescape string:"
|
||||||
msgstr "无法反转义字符串:"
|
msgstr "无法反转义字符串:"
|
||||||
|
|
||||||
#: download.rs:18 pixiv_web.rs:58
|
#: download.rs:19 pixiv_web.rs:58
|
||||||
msgid "Failed to initialize pixiv web api client."
|
msgid "Failed to initialize pixiv web api client."
|
||||||
msgstr "无法初始化 Pixiv 网页 API 客户端。"
|
msgstr "无法初始化 Pixiv 网页 API 客户端。"
|
||||||
|
|
||||||
#: download.rs:27
|
#: download.rs:28
|
||||||
msgid "Warning: Web api client not logined, some future may not work."
|
msgid "Warning: Web api client not logined, some future may not work."
|
||||||
msgstr "警告:Web API 客户端未登录,一些功能可能无法工作。"
|
msgstr "警告:Web API 客户端未登录,一些功能可能无法工作。"
|
||||||
|
|
||||||
#: download.rs:63
|
#: download.rs:64
|
||||||
msgid "Failed to get page count."
|
msgid "Failed to get page count."
|
||||||
msgstr "无法获取页数。"
|
msgstr "无法获取页数。"
|
||||||
|
|
||||||
#: download.rs:72
|
#: download.rs:73
|
||||||
msgid "Failed to get pages' data."
|
msgid "Failed to get pages' data."
|
||||||
msgstr "无法获取每页数据。"
|
msgstr "无法获取每页数据。"
|
||||||
|
|
||||||
#: download.rs:85
|
#: download.rs:86
|
||||||
msgid "Failed to save metadata to JSON file."
|
msgid "Failed to save metadata to JSON file."
|
||||||
msgstr "无法将元数据保存到 JSON 文件。"
|
msgstr "无法将元数据保存到 JSON 文件。"
|
||||||
|
|
||||||
#: download.rs:95 download.rs:142
|
#: download.rs:96 download.rs:170
|
||||||
msgid "Failed to get original picture's link."
|
msgid "Failed to get original picture's link."
|
||||||
msgstr "无法获取原图链接。"
|
msgstr "无法获取原图链接。"
|
||||||
|
|
||||||
#: download.rs:101 download.rs:148
|
#: download.rs:102 download.rs:176
|
||||||
msgid "Failed to get file name from url:"
|
msgid "Failed to get file name from url:"
|
||||||
msgstr "无法从 URL 获取文件名:"
|
msgstr "无法从 URL 获取文件名:"
|
||||||
|
|
||||||
#: download.rs:108 download.rs:114 download.rs:155 download.rs:161
|
#: download.rs:117 download.rs:156 download.rs:195 download.rs:225
|
||||||
|
msgid "Failed to add exif data to image:"
|
||||||
|
msgstr "无法往图片增加 EXIF 数据:"
|
||||||
|
|
||||||
|
#: download.rs:136 download.rs:142 download.rs:205 download.rs:211
|
||||||
#: pixiv_web.rs:153
|
#: pixiv_web.rs:153
|
||||||
msgid "Failed to download image:"
|
msgid "Failed to download image:"
|
||||||
msgstr "无法下载图片:"
|
msgstr "无法下载图片:"
|
||||||
|
|
||||||
#: download.rs:119 download.rs:166
|
#: download.rs:147 download.rs:216
|
||||||
msgid "Downloaded image:"
|
msgid "Downloaded image:"
|
||||||
msgstr "已下载图片:"
|
msgstr "已下载图片:"
|
||||||
|
|
||||||
#: download.rs:128 download.rs:175
|
|
||||||
msgid "Failed to add exif data to image:"
|
|
||||||
msgstr "无法往图片增加 EXIF 数据:"
|
|
||||||
|
|
||||||
#: dur.rs:73
|
#: dur.rs:73
|
||||||
msgid "Failed to parse duration from string."
|
msgid "Failed to parse duration from string."
|
||||||
msgstr "无法解析从字符串解析时长。"
|
msgstr "无法解析从字符串解析时长。"
|
||||||
|
|
||||||
#: opts.rs:88
|
#: opts.rs:91
|
||||||
msgid "Warning: The specified config file not found."
|
msgid "Warning: The specified config file not found."
|
||||||
msgstr "警告:没有找到指定的设置文件。"
|
msgstr "警告:没有找到指定的设置文件。"
|
||||||
|
|
||||||
#: opts.rs:112
|
#: opts.rs:115
|
||||||
msgid "Usage:"
|
msgid "Usage:"
|
||||||
msgstr "使用方法:"
|
msgstr "使用方法:"
|
||||||
|
|
||||||
#: opts.rs:114
|
#: opts.rs:117
|
||||||
msgid "Download an artwork"
|
msgid "Download an artwork"
|
||||||
msgstr "下载一个作品"
|
msgstr "下载一个作品"
|
||||||
|
|
||||||
#: opts.rs:116
|
#: opts.rs:119
|
||||||
msgid "Fix the config file"
|
msgid "Fix the config file"
|
||||||
msgstr "修复设置文件"
|
msgstr "修复设置文件"
|
||||||
|
|
||||||
#: opts.rs:118
|
#: opts.rs:121
|
||||||
msgid "Print all available settings"
|
msgid "Print all available settings"
|
||||||
msgstr "打印所有可用的设置"
|
msgstr "打印所有可用的设置"
|
||||||
|
|
||||||
#: opts.rs:126
|
#: opts.rs:129
|
||||||
msgid "Print help message."
|
msgid "Print help message."
|
||||||
msgstr "打印帮助信息。"
|
msgstr "打印帮助信息。"
|
||||||
|
|
||||||
#: opts.rs:130
|
#: opts.rs:133
|
||||||
msgid "The location of config file."
|
msgid "The location of config file."
|
||||||
msgstr "设置文件的位置。"
|
msgstr "设置文件的位置。"
|
||||||
|
|
||||||
#: opts.rs:136 settings_list.rs:11
|
#: opts.rs:139 settings_list.rs:11
|
||||||
msgid "The location of cookies file. Used for web API."
|
msgid "The location of cookies file. Used for web API."
|
||||||
msgstr "cookies 文件的位置。用于网页 API。"
|
msgstr "cookies 文件的位置。用于网页 API。"
|
||||||
|
|
||||||
#: opts.rs:142 settings_list.rs:12
|
#: opts.rs:145 settings_list.rs:12
|
||||||
msgid "The language of translated tags."
|
msgid "The language of translated tags."
|
||||||
msgstr "翻译后的标签语言。"
|
msgstr "翻译后的标签语言。"
|
||||||
|
|
||||||
#: opts.rs:145
|
#: opts.rs:148
|
||||||
msgid "Verbose logging."
|
msgid "Verbose logging."
|
||||||
msgstr "启用详细内容输出。"
|
msgstr "启用详细内容输出。"
|
||||||
|
|
||||||
#: opts.rs:146
|
#: opts.rs:149
|
||||||
msgid "Overwrite existing file."
|
msgid "Overwrite existing file."
|
||||||
msgstr "覆盖已有文件。"
|
msgstr "覆盖已有文件。"
|
||||||
|
|
||||||
#: opts.rs:147
|
#: opts.rs:150
|
||||||
msgid "Skip overwrite existing file."
|
msgid "Skip overwrite existing file."
|
||||||
msgstr "跳过覆盖已有文件。"
|
msgstr "跳过覆盖已有文件。"
|
||||||
|
|
||||||
#: opts.rs:151 settings_list.rs:13
|
#: opts.rs:154 settings_list.rs:13
|
||||||
msgid "Max retry count if request failed."
|
msgid "Max retry count if request failed."
|
||||||
msgstr "请求失败时最大重试次数。"
|
msgstr "请求失败时最大重试次数。"
|
||||||
|
|
||||||
#: opts.rs:157 settings_list.rs:14
|
#: opts.rs:160 settings_list.rs:14
|
||||||
msgid "The interval (in seconds) between two retries."
|
msgid "The interval (in seconds) between two retries."
|
||||||
msgstr "两次尝试的间隔时间(单位:秒)。"
|
msgstr "两次尝试的间隔时间(单位:秒)。"
|
||||||
|
|
||||||
#: opts.rs:160 settings_list.rs:15
|
#: opts.rs:163 settings_list.rs:15
|
||||||
msgid "Use data from webpage first."
|
msgid "Use data from webpage first."
|
||||||
msgstr "优先使用来自网页的数据。"
|
msgstr "优先使用来自网页的数据。"
|
||||||
|
|
||||||
#: opts.rs:180
|
#: opts.rs:167 settings_list.rs:18
|
||||||
|
msgid ""
|
||||||
|
"Add/Update exif information to image files even when overwrite are disabled."
|
||||||
|
msgstr "添加或更新图片的 EXIF 信息,即使不覆盖图片文件。"
|
||||||
|
|
||||||
|
#: opts.rs:188
|
||||||
msgid "Unknown command."
|
msgid "Unknown command."
|
||||||
msgstr "未知指令。"
|
msgstr "未知指令。"
|
||||||
|
|
||||||
#: opts.rs:190
|
#: opts.rs:198
|
||||||
msgid "Failed to parse ID:"
|
msgid "Failed to parse ID:"
|
||||||
msgstr "无法解析 ID:"
|
msgstr "无法解析 ID:"
|
||||||
|
|
||||||
#: opts.rs:196
|
#: opts.rs:204
|
||||||
msgid "No URL or ID specified."
|
msgid "No URL or ID specified."
|
||||||
msgstr "没有指定网址或 ID。"
|
msgstr "没有指定网址或 ID。"
|
||||||
|
|
||||||
#: opts.rs:204
|
#: opts.rs:212
|
||||||
msgid "No detailed command specified."
|
msgid "No detailed command specified."
|
||||||
msgstr "没有指定更详细的指令。"
|
msgstr "没有指定更详细的指令。"
|
||||||
|
|
||||||
#: opts.rs:217
|
#: opts.rs:225
|
||||||
msgid "Unknown config subcommand."
|
msgid "Unknown config subcommand."
|
||||||
msgstr "未知的 config 子指令。"
|
msgstr "未知的 config 子指令。"
|
||||||
|
|
||||||
#: opts.rs:253
|
#: opts.rs:261
|
||||||
msgid "Retry count must be an non-negative integer:"
|
msgid "Retry count must be an non-negative integer:"
|
||||||
msgstr "重试次数不能是负数:"
|
msgstr "重试次数不能是负数:"
|
||||||
|
|
||||||
#: opts.rs:262
|
#: opts.rs:270
|
||||||
msgid "Failed to parse retry interval:"
|
msgid "Failed to parse retry interval:"
|
||||||
msgstr "无法解析间隔时间:"
|
msgstr "无法解析间隔时间:"
|
||||||
|
|
||||||
@@ -360,7 +365,7 @@ msgstr "移除匹配的部分。"
|
|||||||
msgid "Do you want to delete file \"<file>\"?"
|
msgid "Do you want to delete file \"<file>\"?"
|
||||||
msgstr "你想要删除文件 <file> 吗?"
|
msgstr "你想要删除文件 <file> 吗?"
|
||||||
|
|
||||||
#: utils.rs:51 webclient.rs:152
|
#: utils.rs:51 webclient.rs:151
|
||||||
msgid "Can not parse URL:"
|
msgid "Can not parse URL:"
|
||||||
msgstr "无法解析 URL:"
|
msgstr "无法解析 URL:"
|
||||||
|
|
||||||
@@ -368,39 +373,39 @@ msgstr "无法解析 URL:"
|
|||||||
msgid "Failed to get file name from path:"
|
msgid "Failed to get file name from path:"
|
||||||
msgstr "无法从路径获取文件名:"
|
msgstr "无法从路径获取文件名:"
|
||||||
|
|
||||||
#: webclient.rs:112
|
#: webclient.rs:111
|
||||||
msgid "Failed to parse Set-Cookie header."
|
msgid "Failed to parse Set-Cookie header."
|
||||||
msgstr "无法解析 Set-Cookie 头部。"
|
msgstr "无法解析 Set-Cookie 头部。"
|
||||||
|
|
||||||
#: webclient.rs:117
|
#: webclient.rs:116
|
||||||
msgid "Failed to convert to string:"
|
msgid "Failed to convert to string:"
|
||||||
msgstr "无法转换为字符串:"
|
msgstr "无法转换为字符串:"
|
||||||
|
|
||||||
#: webclient.rs:159
|
#: webclient.rs:158
|
||||||
msgid "Parameters should be object or array:"
|
msgid "Parameters should be object or array:"
|
||||||
msgstr "参数应该是对象或数组:"
|
msgstr "参数应该是对象或数组:"
|
||||||
|
|
||||||
#: webclient.rs:179
|
#: webclient.rs:178
|
||||||
msgid "Parameters should be array:"
|
msgid "Parameters should be array:"
|
||||||
msgstr "参数应该是数组:"
|
msgstr "参数应该是数组:"
|
||||||
|
|
||||||
#: webclient.rs:183
|
#: webclient.rs:182
|
||||||
msgid "Parameters need at least a value:"
|
msgid "Parameters need at least a value:"
|
||||||
msgstr "参数需要至少含有一个值:"
|
msgstr "参数需要至少含有一个值:"
|
||||||
|
|
||||||
#: webclient.rs:222
|
#: webclient.rs:221
|
||||||
msgid "Retry after <num> seconds."
|
msgid "Retry after <num> seconds."
|
||||||
msgstr "<num> 秒后重试。"
|
msgstr "<num> 秒后重试。"
|
||||||
|
|
||||||
#: webclient.rs:226
|
#: webclient.rs:225
|
||||||
msgid "Retry <count> times now."
|
msgid "Retry <count> times now."
|
||||||
msgstr "正在进行第 <count> 次重试。"
|
msgstr "正在进行第 <count> 次重试。"
|
||||||
|
|
||||||
#: webclient.rs:240
|
#: webclient.rs:239
|
||||||
msgid "Error when request:"
|
msgid "Error when request:"
|
||||||
msgstr "请求时发生错误:"
|
msgstr "请求时发生错误:"
|
||||||
|
|
||||||
#: webclient.rs:301
|
#: webclient.rs:296
|
||||||
msgid "Error when downloading file:"
|
msgid "Error when downloading file:"
|
||||||
msgstr "下载文件时发生错误:"
|
msgstr "下载文件时发生错误:"
|
||||||
|
|
||||||
|
|||||||
@@ -110,6 +110,15 @@ impl Main {
|
|||||||
if !overwrite {
|
if !overwrite {
|
||||||
#[cfg(feature = "exif")]
|
#[cfg(feature = "exif")]
|
||||||
{
|
{
|
||||||
|
if pw.helper.update_exif() {
|
||||||
|
if add_exifdata_to_image(&file_name, &datas, np).is_err() {
|
||||||
|
println!(
|
||||||
|
"{} {}",
|
||||||
|
gettext("Failed to add exif data to image:"),
|
||||||
|
file_name.to_str().unwrap_or("(null)")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
np += 1;
|
np += 1;
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
@@ -179,6 +188,15 @@ impl Main {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
if !overwrite {
|
if !overwrite {
|
||||||
|
if pw.helper.update_exif() {
|
||||||
|
if add_exifdata_to_image(&file_name, &datas, 0).is_err() {
|
||||||
|
println!(
|
||||||
|
"{} {}",
|
||||||
|
gettext("Failed to add exif data to image:"),
|
||||||
|
file_name.to_str().unwrap_or("(null)")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,4 +104,16 @@ impl<'a> OptHelper<'a> {
|
|||||||
}
|
}
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Return whether to add/update exif information to image files even
|
||||||
|
/// when overwrite are disabled.
|
||||||
|
pub fn update_exif(&self) -> bool {
|
||||||
|
if self.opt.update_exif {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if self.settings.have_bool("update-exif") {
|
||||||
|
return self.settings.get_bool("update-exif").unwrap();
|
||||||
|
}
|
||||||
|
false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,6 +59,8 @@ pub struct CommandOpts {
|
|||||||
pub retry_interval: Option<NonTailList<Duration>>,
|
pub retry_interval: Option<NonTailList<Duration>>,
|
||||||
/// Use data from webpage first
|
/// Use data from webpage first
|
||||||
pub use_webpage: bool,
|
pub use_webpage: bool,
|
||||||
|
/// Add/Update exif information to image files even when overwrite are disabled
|
||||||
|
pub update_exif: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl CommandOpts {
|
impl CommandOpts {
|
||||||
@@ -75,6 +77,7 @@ impl CommandOpts {
|
|||||||
retry: None,
|
retry: None,
|
||||||
retry_interval: None,
|
retry_interval: None,
|
||||||
use_webpage: false,
|
use_webpage: false,
|
||||||
|
update_exif: false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -158,6 +161,11 @@ pub fn parse_cmd() -> Option<CommandOpts> {
|
|||||||
"LIST",
|
"LIST",
|
||||||
);
|
);
|
||||||
opts.optflag("", "use-webpage", gettext("Use data from webpage first."));
|
opts.optflag("", "use-webpage", gettext("Use data from webpage first."));
|
||||||
|
opts.optflag(
|
||||||
|
"",
|
||||||
|
"update-exif",
|
||||||
|
gettext("Add/Update exif information to image files even when overwrite are disabled."),
|
||||||
|
);
|
||||||
let result = match opts.parse(&argv[1..]) {
|
let result = match opts.parse(&argv[1..]) {
|
||||||
Ok(m) => m,
|
Ok(m) => m,
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
@@ -265,5 +273,6 @@ pub fn parse_cmd() -> Option<CommandOpts> {
|
|||||||
re.as_mut().unwrap().retry_interval = Some(r.unwrap());
|
re.as_mut().unwrap().retry_interval = Some(r.unwrap());
|
||||||
}
|
}
|
||||||
re.as_mut().unwrap().use_webpage = result.opt_present("use-webpage");
|
re.as_mut().unwrap().use_webpage = result.opt_present("use-webpage");
|
||||||
|
re.as_mut().unwrap().update_exif = result.opt_present("update-exif");
|
||||||
re
|
re
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ pub fn get_settings_list() -> Vec<SettingDes> {
|
|||||||
SettingDes::new("retry-interval", gettext("The interval (in seconds) between two retries."), JsonValueType::Multiple, Some(check_retry_interval)).unwrap(),
|
SettingDes::new("retry-interval", gettext("The interval (in seconds) between two retries."), JsonValueType::Multiple, Some(check_retry_interval)).unwrap(),
|
||||||
SettingDes::new("use-webpage", gettext("Use data from webpage first."), JsonValueType::Boolean, None).unwrap(),
|
SettingDes::new("use-webpage", gettext("Use data from webpage first."), JsonValueType::Boolean, None).unwrap(),
|
||||||
SettingDes::new("author-name-filters", gettext("Remove the part which after these parttens."), JsonValueType::Array, Some(check_author_name_filters)).unwrap(),
|
SettingDes::new("author-name-filters", gettext("Remove the part which after these parttens."), JsonValueType::Array, Some(check_author_name_filters)).unwrap(),
|
||||||
|
#[cfg(feature = "exif")]
|
||||||
|
SettingDes::new("update-exif", gettext("Add/Update exif information to image files even when overwrite are disabled."), JsonValueType::Boolean, None).unwrap(),
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user