From 7fb4336d5e6dbffe64fc39f84bbedd76a12237e6 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Tue, 28 Aug 2007 11:51:20 +0000 Subject: [PATCH] 2007-08-28 Tatsuhiro Tsujikawa Added parameterized URI support. * src/main.cc: -Z option added. * src/OptionHandlerFactory.cc * src/prefs.h: Added PREF_FORCE_SEQUENTIAL. * src/PStringDatum.h: New class. * src/PStringSegment.{h,cc}: New class. * src/PStringNumLoop.h: New class. * src/PStringSelect.h: New class. * src/NumberDecorator.h: New class. * src/FixedWidthNumberDecorator.h: New class. * src/AlphaNumberDecorator.h: New class. * src/PStringVisitor.h: New class. * src/PStringBuildVisitor.{h,cc}: New class. * src/ParameterizedStringParser.{h,cc}: New class. * src/Util.{h,cc} (isNumber): New function. (isLowercase): New function. (isUppercase): New function. (alphaToNum): New function. * test/ParameterizedStringParserTest.cc: New class. * test/AlphaNumberDecoratorTest.cc: New class. * test/PStringBuildVisitorTest.cc: New class. * test/UtilTest.cc (testIsNumber): New function. (testIsLowercase): New function. (testIsUppercase): New function. (testAlphaToNum): New function. Added '\n' after the error message * src/RequestInfo.h (printDownloadAbortMessage) --- ChangeLog | 33 ++++ TODO | 6 +- po/aria2c.pot | 188 ++++++++++---------- po/de.gmo | Bin 9986 -> 9986 bytes po/de.po | 170 +++++++++--------- po/fr.gmo | Bin 33161 -> 33161 bytes po/fr.po | 170 +++++++++--------- po/ja.gmo | Bin 42946 -> 42946 bytes po/ja.po | 170 +++++++++--------- po/ru.gmo | Bin 12207 -> 12207 bytes po/ru.po | 170 +++++++++--------- src/AlphaNumberDecorator.h | 84 +++++++++ src/FixedWidthNumberDecorator.h | 60 +++++++ src/Makefile.am | 12 +- src/Makefile.in | 29 +++- src/NumberDecorator.h | 49 ++++++ src/OptionHandlerFactory.cc | 1 + src/PStringBuildVisitor.cc | 54 ++++++ src/PStringBuildVisitor.h | 68 ++++++++ src/PStringDatum.h | 51 ++++++ src/PStringNumLoop.h | 100 +++++++++++ src/PStringSegment.cc | 49 ++++++ src/PStringSegment.h | 89 ++++++++++ src/PStringSelect.h | 76 +++++++++ src/PStringVisitor.h | 47 +++++ src/ParameterizedStringParser.cc | 145 ++++++++++++++++ src/ParameterizedStringParser.h | 56 ++++++ src/RequestInfo.h | 1 + src/Util.cc | 59 +++++++ src/Util.h | 8 + src/main.cc | 66 ++++++- src/prefs.h | 2 + test/AlphaNumberDecoratorTest.cc | 52 ++++++ test/Makefile.am | 5 +- test/Makefile.in | 35 ++-- test/PStringBuildVisitorTest.cc | 91 ++++++++++ test/ParameterizedStringParserTest.cc | 237 ++++++++++++++++++++++++++ test/UtilTest.cc | 45 +++++ 38 files changed, 2054 insertions(+), 424 deletions(-) create mode 100644 src/AlphaNumberDecorator.h create mode 100644 src/FixedWidthNumberDecorator.h create mode 100644 src/NumberDecorator.h create mode 100644 src/PStringBuildVisitor.cc create mode 100644 src/PStringBuildVisitor.h create mode 100644 src/PStringDatum.h create mode 100644 src/PStringNumLoop.h create mode 100644 src/PStringSegment.cc create mode 100644 src/PStringSegment.h create mode 100644 src/PStringSelect.h create mode 100644 src/PStringVisitor.h create mode 100644 src/ParameterizedStringParser.cc create mode 100644 src/ParameterizedStringParser.h create mode 100644 test/AlphaNumberDecoratorTest.cc create mode 100644 test/PStringBuildVisitorTest.cc create mode 100644 test/ParameterizedStringParserTest.cc diff --git a/ChangeLog b/ChangeLog index 16949eeb..2c1cb9f2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,36 @@ +2007-08-28 Tatsuhiro Tsujikawa + + Added parameterized URI support. + * src/main.cc: -Z option added. + * src/OptionHandlerFactory.cc + * src/prefs.h: Added PREF_FORCE_SEQUENTIAL. + * src/PStringDatum.h: New class. + * src/PStringSegment.{h,cc}: New class. + * src/PStringNumLoop.h: New class. + * src/PStringSelect.h: New class. + * src/NumberDecorator.h: New class. + * src/FixedWidthNumberDecorator.h: New class. + * src/AlphaNumberDecorator.h: New class. + * src/PStringVisitor.h: New class. + * src/PStringBuildVisitor.{h,cc}: New class. + * src/ParameterizedStringParser.{h,cc}: New class. + * src/Util.{h,cc} + (isNumber): New function. + (isLowercase): New function. + (isUppercase): New function. + (alphaToNum): New function. + * test/ParameterizedStringParserTest.cc: New class. + * test/AlphaNumberDecoratorTest.cc: New class. + * test/PStringBuildVisitorTest.cc: New class. + * test/UtilTest.cc + (testIsNumber): New function. + (testIsLowercase): New function. + (testIsUppercase): New function. + (testAlphaToNum): New function. + + Added '\n' after the error message + * src/RequestInfo.h (printDownloadAbortMessage) + 2007-08-26 Tatsuhiro Tsujikawa Merged Ross's patch: Removed setmode(). Use _CRT_fmode to enable binary diff --git a/TODO b/TODO index 92948865..6166eb5a 100644 --- a/TODO +++ b/TODO @@ -38,8 +38,8 @@ * time related headers and compatible macros and definition -> a2time.h * used globally -> common.h -* Rewrite MetaFileUtil -* Add parameterized URI support * Add pgp verification support. I have to use libgpgme?? -* Add outfile auto renaming * Disable segmented download in .metalink + +* Add outfile auto renaming +* Rewrite MetaFileUtil diff --git a/po/aria2c.pot b/po/aria2c.pot index 7952758e..90d86543 100644 --- a/po/aria2c.pot +++ b/po/aria2c.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: http://aria2.sourceforge.net/\n" -"POT-Creation-Date: 2007-08-09 23:54+0900\n" +"POT-Creation-Date: 2007-08-28 20:46+0900\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -794,11 +794,11 @@ msgstr "" msgid "Errors occurred while binding port.\n" msgstr "" -#: src/main.cc:89 +#: src/main.cc:91 msgid " version " msgstr "" -#: src/main.cc:99 +#: src/main.cc:101 msgid "" "This program is free software; you can redistribute it and/or modify\n" "it under the terms of the GNU General Public License as published by\n" @@ -816,49 +816,49 @@ msgid "" "USA\n" msgstr "" -#: src/main.cc:113 +#: src/main.cc:115 msgid "Contact Info:" msgstr "" -#: src/main.cc:120 -#, c-format -msgid "Usage: %s [options] URL ...\n" -msgstr "" - #: src/main.cc:122 #, c-format +msgid "Usage: %s [options] URL ...\n" +msgstr "" + +#: src/main.cc:124 +#, c-format msgid " %s [options] -T TORRENT_FILE FILE ...\n" msgstr "" -#: src/main.cc:125 +#: src/main.cc:127 #, c-format msgid " %s [options] -M METALINK_FILE\n" msgstr "" -#: src/main.cc:128 +#: src/main.cc:130 msgid "Options:" msgstr "" -#: src/main.cc:129 +#: src/main.cc:131 msgid "" " -d, --dir=DIR The directory to store the downloaded file." msgstr "" -#: src/main.cc:130 +#: src/main.cc:132 msgid " -o, --out=FILE The file name of the downloaded file." msgstr "" -#: src/main.cc:131 +#: src/main.cc:133 msgid "" " -l, --log=LOG The file name of the log file. If '-' is\n" " specified, log is written to stdout." msgstr "" -#: src/main.cc:134 +#: src/main.cc:136 msgid " -D, --daemon Run as daemon." msgstr "" -#: src/main.cc:136 +#: src/main.cc:138 msgid "" " -s, --split=N Download a file using N connections. N must " "be\n" @@ -869,7 +869,7 @@ msgid "" " Default: 1" msgstr "" -#: src/main.cc:141 +#: src/main.cc:143 msgid "" " --retry-wait=SEC Set the seconds to wait to retry after an " "error\n" @@ -878,47 +878,47 @@ msgid "" " Default: 5" msgstr "" -#: src/main.cc:144 +#: src/main.cc:146 msgid " -t, --timeout=SEC Set timeout in seconds. Default: 60" msgstr "" -#: src/main.cc:145 +#: src/main.cc:147 msgid "" " -m, --max-tries=N Set number of tries. 0 means unlimited.\n" " Default: 5" msgstr "" -#: src/main.cc:153 +#: src/main.cc:155 msgid "" " --http-proxy=HOST:PORT Use HTTP proxy server. This affects all URLs." msgstr "" -#: src/main.cc:154 +#: src/main.cc:156 msgid " --http-user=USER Set HTTP user. This affects all URLs." msgstr "" -#: src/main.cc:155 +#: src/main.cc:157 msgid " --http-passwd=PASSWD Set HTTP password. This affects all URLs." msgstr "" -#: src/main.cc:156 +#: src/main.cc:158 msgid "" " --http-proxy-user=USER Set HTTP proxy user. This affects all URLs." msgstr "" -#: src/main.cc:157 +#: src/main.cc:159 msgid "" " --http-proxy-passwd=PASSWD Set HTTP proxy password. This affects all URLs." msgstr "" -#: src/main.cc:158 +#: src/main.cc:160 msgid "" " --http-proxy-method=METHOD Set the method to use in proxy request.\n" " METHOD is either 'get' or 'tunnel'.\n" " Default: tunnel" msgstr "" -#: src/main.cc:161 +#: src/main.cc:163 msgid "" " --http-auth-scheme=SCHEME Set HTTP authentication scheme. Currently, " "basic\n" @@ -926,23 +926,23 @@ msgid "" " Default: basic" msgstr "" -#: src/main.cc:164 +#: src/main.cc:166 msgid " --referer=REFERER Set Referer. This affects all URLs." msgstr "" -#: src/main.cc:165 +#: src/main.cc:167 msgid "" " --ftp-user=USER Set FTP user. This affects all URLs.\n" " Default: anonymous" msgstr "" -#: src/main.cc:167 +#: src/main.cc:169 msgid "" " --ftp-passwd=PASSWD Set FTP password. This affects all URLs.\n" " Default: ARIA2USER@" msgstr "" -#: src/main.cc:169 +#: src/main.cc:171 msgid "" " --ftp-type=TYPE Set FTP transfer type. TYPE is either " "'binary'\n" @@ -950,11 +950,11 @@ msgid "" " Default: binary" msgstr "" -#: src/main.cc:172 +#: src/main.cc:174 msgid " -p, --ftp-pasv Use passive mode in FTP." msgstr "" -#: src/main.cc:173 +#: src/main.cc:175 msgid "" " --ftp-via-http-proxy=METHOD Use HTTP proxy in FTP. METHOD is either 'get' " "or\n" @@ -962,7 +962,7 @@ msgid "" " Default: tunnel" msgstr "" -#: src/main.cc:176 +#: src/main.cc:178 msgid "" " --lowest-speed-limit=SPEED Close connection if download speed is lower " "than\n" @@ -975,7 +975,7 @@ msgid "" " Default: 0" msgstr "" -#: src/main.cc:183 +#: src/main.cc:185 msgid "" " --max-download-limit=SPEED Set max download speed in bytes per sec.\n" " 0 means unrestricted.\n" @@ -983,7 +983,7 @@ msgid "" " Default: 0" msgstr "" -#: src/main.cc:187 +#: src/main.cc:189 msgid "" " --file-allocation=METHOD Specify file allocation method. METHOD is " "either\n" @@ -997,7 +997,7 @@ msgid "" " Default: none" msgstr "" -#: src/main.cc:193 +#: src/main.cc:195 msgid "" " --allow-overwrite=true|false If false, aria2 doesn't download a file which\n" " already exists but the corresponding .aria2 " @@ -1006,7 +1006,15 @@ msgid "" " Default: false" msgstr "" -#: src/main.cc:198 +#: src/main.cc:199 +msgid "" +" -Z, --force-sequential Fetch URIs in the command-line sequentially " +"and\n" +" download each URI in a separate session, like\n" +" the usual command-line download utilities." +msgstr "" + +#: src/main.cc:204 msgid "" " --check-integrity=true|false Check file integrity by validating piece " "hash.\n" @@ -1022,7 +1030,7 @@ msgid "" " Default: false" msgstr "" -#: src/main.cc:206 +#: src/main.cc:212 msgid "" " --realtime-chunk-checksum=true|false Validate chunk checksum while\n" " downloading a file in Metalink mode. This " @@ -1032,7 +1040,7 @@ msgid "" " Default: true" msgstr "" -#: src/main.cc:211 +#: src/main.cc:217 msgid "" " -c, --continue Continue downloading a partially downloaded\n" " file. Use this option to resume a download\n" @@ -1042,15 +1050,15 @@ msgid "" " applicable to http(s)/ftp downloads." msgstr "" -#: src/main.cc:217 +#: src/main.cc:223 msgid " -U, --user-agent=USER_AGENT Set user agent for http(s) downloads." msgstr "" -#: src/main.cc:218 +#: src/main.cc:224 msgid " -n, --no-netrc Disables netrc support." msgstr "" -#: src/main.cc:219 +#: src/main.cc:225 msgid "" " -i, --input-file=FILE Downloads URIs found in FILE. You can specify\n" " multiple URIs for a single entity: separate\n" @@ -1059,7 +1067,7 @@ msgid "" " Reads input from stdin when '-' is specified." msgstr "" -#: src/main.cc:223 +#: src/main.cc:229 msgid "" " -j, --max-concurrent-downloads=N Set maximum number of concurrent " "downloads.\n" @@ -1067,20 +1075,20 @@ msgid "" " Default: 5" msgstr "" -#: src/main.cc:226 +#: src/main.cc:232 msgid "" " --load-cookies=FILE Load cookies from FILE. The format of FILE is\n" " the same used by Netscape and Mozilla." msgstr "" -#: src/main.cc:229 +#: src/main.cc:235 msgid "" " -S, --show-files Print file listing of .torrent or .metalink " "file\n" " and exit." msgstr "" -#: src/main.cc:231 +#: src/main.cc:237 msgid "" " --select-file=INDEX... Set file to download by specifing its index.\n" " You can find the file index using the\n" @@ -1094,11 +1102,11 @@ msgid "" "options)." msgstr "" -#: src/main.cc:241 +#: src/main.cc:247 msgid " -T, --torrent-file=TORRENT_FILE The path to the .torrent file." msgstr "" -#: src/main.cc:242 +#: src/main.cc:248 msgid "" " --follow-torrent=true|false Set to false to prevent aria2 from\n" " entering BitTorrent mode even if the filename " @@ -1107,20 +1115,20 @@ msgid "" " Default: true" msgstr "" -#: src/main.cc:246 +#: src/main.cc:252 msgid "" " --direct-file-mapping=true|false Directly read from and write to each file\n" " mentioned in .torrent file.\n" " Default: true" msgstr "" -#: src/main.cc:249 +#: src/main.cc:255 msgid "" " --listen-port=PORT Set TCP port number for BitTorrent downloads.\n" " Default: 6881-6999" msgstr "" -#: src/main.cc:251 +#: src/main.cc:257 msgid "" " --max-upload-limit=SPEED Set max upload speed in bytes per sec.\n" " 0 means unrestricted.\n" @@ -1128,13 +1136,13 @@ msgid "" " Default: 0" msgstr "" -#: src/main.cc:255 +#: src/main.cc:261 msgid "" " --seed-time=MINUTES Specify seeding time in minutes. Also see the\n" " --seed-ratio option." msgstr "" -#: src/main.cc:257 +#: src/main.cc:263 msgid "" " --seed-ratio=RATIO Specify share ratio. Seed completed torrents\n" " until share ratio reaches RATIO. 1.0 is\n" @@ -1144,7 +1152,7 @@ msgid "" " least one of the conditions is satisfied." msgstr "" -#: src/main.cc:262 +#: src/main.cc:268 msgid "" " --peer-id-prefix=PEERI_ID_PREFIX Specify the prefix of peer ID. The peer ID " "in\n" @@ -1157,35 +1165,35 @@ msgid "" " Default: -aria2-" msgstr "" -#: src/main.cc:271 +#: src/main.cc:277 msgid " -M, --metalink-file=METALINK_FILE The file path to the .metalink file." msgstr "" -#: src/main.cc:272 +#: src/main.cc:278 msgid "" " -C, --metalink-servers=NUM_SERVERS The number of servers to connect to\n" " simultaneously.\n" " Default: 5" msgstr "" -#: src/main.cc:275 +#: src/main.cc:281 msgid " --metalink-version=VERSION The version of the file to download." msgstr "" -#: src/main.cc:276 +#: src/main.cc:282 msgid " --metalink-language=LANGUAGE The language of the file to download." msgstr "" -#: src/main.cc:277 +#: src/main.cc:283 msgid "" " --metalink-os=OS The operating system of the file to download." msgstr "" -#: src/main.cc:278 +#: src/main.cc:284 msgid " --metalink-location=LOCATION The location of the prefered server." msgstr "" -#: src/main.cc:279 +#: src/main.cc:285 msgid "" " --follow-metalink=true|false Set to false to prevent aria2 from\n" " entering Metalink mode even if the filename " @@ -1194,85 +1202,93 @@ msgid "" " Default: true" msgstr "" -#: src/main.cc:284 +#: src/main.cc:290 msgid " -v, --version Print the version number and exit." msgstr "" -#: src/main.cc:285 +#: src/main.cc:291 msgid " -h, --help Print this message and exit." msgstr "" -#: src/main.cc:288 +#: src/main.cc:294 msgid "" " You can specify multiple URLs. All URLs must point to the same file\n" " or downloading will fail." msgstr "" -#: src/main.cc:293 +#: src/main.cc:299 msgid "" " Specify files in multi-file torrent to download. Use in conjunction with " "the\n" " -T option. This argument is ignored if you specify the --select-file option." msgstr "" -#: src/main.cc:297 +#: src/main.cc:303 msgid "Examples:" msgstr "" -#: src/main.cc:298 +#: src/main.cc:304 msgid " Download a file using 1 connection:" msgstr "" -#: src/main.cc:300 +#: src/main.cc:306 msgid " Download a file using 2 connections:" msgstr "" -#: src/main.cc:302 +#: src/main.cc:308 msgid "" " Download a file using 2 connections, each connects to a different server:" msgstr "" -#: src/main.cc:304 +#: src/main.cc:310 msgid " You can mix up different protocols:" msgstr "" -#: src/main.cc:308 -msgid " Download a torrent:" -msgstr "" - -#: src/main.cc:310 -msgid " Download a torrent using a local .torrent file:" -msgstr "" - -#: src/main.cc:312 src/main.cc:325 -msgid " Download only selected files:" +#: src/main.cc:312 +msgid " Parameterized URI:" msgstr "" #: src/main.cc:314 +msgid " Parameterized URI. -Z option must be specified:" +msgstr "" + +#: src/main.cc:318 +msgid " Download a torrent:" +msgstr "" + +#: src/main.cc:320 +msgid " Download a torrent using a local .torrent file:" +msgstr "" + +#: src/main.cc:322 src/main.cc:335 +msgid " Download only selected files:" +msgstr "" + +#: src/main.cc:324 msgid " Print file listing of .torrent file:" msgstr "" -#: src/main.cc:319 +#: src/main.cc:329 msgid " Metalink downloading:" msgstr "" -#: src/main.cc:321 +#: src/main.cc:331 msgid " Download a file using local .metalink file:" msgstr "" -#: src/main.cc:323 +#: src/main.cc:333 msgid " Metalink downloading with preferences:" msgstr "" -#: src/main.cc:327 +#: src/main.cc:337 msgid " Download only selected files using index:" msgstr "" -#: src/main.cc:329 +#: src/main.cc:339 msgid " Print file listing of .metalink file:" msgstr "" -#: src/main.cc:333 +#: src/main.cc:343 #, c-format msgid "Report bugs to %s" msgstr "" diff --git a/po/de.gmo b/po/de.gmo index 10b2e5bc5bc90b01578b40b6fbef05ae38503cf1..02983a29234de6913305ab220103e1f49e865f5d 100644 GIT binary patch delta 21 ccmZqjYx3LhRFuQWLcz$u%EWB*TTxL#08#%2z5oCK delta 21 ccmZqjYx3LhRFuQOQo+dB%G6}@TTxL#08$4AzW@LL diff --git a/po/de.po b/po/de.po index 41cdb838..45dd65aa 100644 --- a/po/de.po +++ b/po/de.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: de\n" "Report-Msgid-Bugs-To: http://aria2.sourceforge.net/\n" -"POT-Creation-Date: 2007-08-09 23:54+0900\n" +"POT-Creation-Date: 2007-08-28 20:46+0900\n" "PO-Revision-Date: 2006-05-05 19:44+0900\n" "Last-Translator: Hermann J. Beckers \n" "Language-Team: deutsch \n" @@ -818,11 +818,11 @@ msgstr "" msgid "Errors occurred while binding port.\n" msgstr "Fehler beim Binden an Port aufgetreten.\n" -#: src/main.cc:89 +#: src/main.cc:91 msgid " version " msgstr " Version " -#: src/main.cc:99 +#: src/main.cc:101 #, fuzzy msgid "" "This program is free software; you can redistribute it and/or modify\n" @@ -854,31 +854,31 @@ msgstr "" "along with this program; if not, write to the Free Software\n" "Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n" -#: src/main.cc:113 +#: src/main.cc:115 #, fuzzy msgid "Contact Info:" msgstr "Kontakt-Info: %s\n" -#: src/main.cc:120 +#: src/main.cc:122 #, c-format msgid "Usage: %s [options] URL ...\n" msgstr "Aufruf: %s [Optionen] URL ...\n" -#: src/main.cc:122 +#: src/main.cc:124 #, c-format msgid " %s [options] -T TORRENT_FILE FILE ...\n" msgstr " %s [Optionen] -T TORRENT_FILE FILE ...\n" -#: src/main.cc:125 +#: src/main.cc:127 #, fuzzy, c-format msgid " %s [options] -M METALINK_FILE\n" msgstr " %s [Optionen] -T TORRENT_FILE FILE ...\n" -#: src/main.cc:128 +#: src/main.cc:130 msgid "Options:" msgstr "Optionen:" -#: src/main.cc:129 +#: src/main.cc:131 #, fuzzy msgid "" " -d, --dir=DIR The directory to store the downloaded file." @@ -886,12 +886,12 @@ msgstr "" " -d, --dir=DIR Verzeichnis zum Speichern der abgerufenen " "Datei." -#: src/main.cc:130 +#: src/main.cc:132 #, fuzzy msgid " -o, --out=FILE The file name of the downloaded file." msgstr " -o, --out=FILE Dateiname für die abgerufene Datei." -#: src/main.cc:131 +#: src/main.cc:133 #, fuzzy msgid "" " -l, --log=LOG The file name of the log file. If '-' is\n" @@ -902,11 +902,11 @@ msgstr "" " wird das Log auf die Standardausgabe " "geschrieben." -#: src/main.cc:134 +#: src/main.cc:136 msgid " -D, --daemon Run as daemon." msgstr " -D, --daemon Start als Daemon-Prozeß." -#: src/main.cc:136 +#: src/main.cc:138 #, fuzzy msgid "" " -s, --split=N Download a file using N connections. N must " @@ -924,7 +924,7 @@ msgstr "" " Daher verbindet sich aria2 zu jeder URL mit\n" " N Verbindungen." -#: src/main.cc:141 +#: src/main.cc:143 #, fuzzy msgid "" " --retry-wait=SEC Set the seconds to wait to retry after an " @@ -939,13 +939,13 @@ msgstr "" "und 60 an.\n" " Fehlwert: 5" -#: src/main.cc:144 +#: src/main.cc:146 #, fuzzy msgid " -t, --timeout=SEC Set timeout in seconds. Default: 60" msgstr "" " -t, --timeout=SEC Setzt Wartezeit in Sekunden. Fehlwert: 60" -#: src/main.cc:145 +#: src/main.cc:147 msgid "" " -m, --max-tries=N Set number of tries. 0 means unlimited.\n" " Default: 5" @@ -953,7 +953,7 @@ msgstr "" " -m, --max-tries=N Anzahl Versuche. 0 bedeutet unbegrenzt.\n" " Fehlwert: 5" -#: src/main.cc:153 +#: src/main.cc:155 #, fuzzy msgid "" " --http-proxy=HOST:PORT Use HTTP proxy server. This affects all URLs." @@ -961,20 +961,20 @@ msgstr "" " --http-proxy-user=USER HTTP-Proxy-Anwender setzen. Dies betrifft alle " "URLs." -#: src/main.cc:154 +#: src/main.cc:156 #, fuzzy msgid " --http-user=USER Set HTTP user. This affects all URLs." msgstr "" " --http-user=USER HTTP-Anwendername angeben. Dies betrifft alle " "URLs." -#: src/main.cc:155 +#: src/main.cc:157 #, fuzzy msgid " --http-passwd=PASSWD Set HTTP password. This affects all URLs." msgstr "" " --http-passwd=PASSWD HTTP-Passwort setzen. Dies betrifft alle URLs." -#: src/main.cc:156 +#: src/main.cc:158 #, fuzzy msgid "" " --http-proxy-user=USER Set HTTP proxy user. This affects all URLs." @@ -982,7 +982,7 @@ msgstr "" " --http-proxy-user=USER HTTP-Proxy-Anwender setzen. Dies betrifft alle " "URLs." -#: src/main.cc:157 +#: src/main.cc:159 #, fuzzy msgid "" " --http-proxy-passwd=PASSWD Set HTTP proxy password. This affects all URLs." @@ -990,7 +990,7 @@ msgstr "" " --http-proxy-passwd=PASSWD HTTP-Proxy-Passwort setzen. Dies betrifft alle " "URLs." -#: src/main.cc:158 +#: src/main.cc:160 msgid "" " --http-proxy-method=METHOD Set the method to use in proxy request.\n" " METHOD is either 'get' or 'tunnel'.\n" @@ -1001,7 +1001,7 @@ msgstr "" " METHOD ist entweder 'get' oder 'tunnel'.\n" " Fehlwert: tunnel" -#: src/main.cc:161 +#: src/main.cc:163 msgid "" " --http-auth-scheme=SCHEME Set HTTP authentication scheme. Currently, " "basic\n" @@ -1013,12 +1013,12 @@ msgstr "" " das einzig zulässige Schema.\n" " Fehlwert: basic" -#: src/main.cc:164 +#: src/main.cc:166 #, fuzzy msgid " --referer=REFERER Set Referer. This affects all URLs." msgstr " --referer=REFERER Referer setzen. Dies betrifft alle URLs." -#: src/main.cc:165 +#: src/main.cc:167 #, fuzzy msgid "" " --ftp-user=USER Set FTP user. This affects all URLs.\n" @@ -1027,7 +1027,7 @@ msgstr "" " --ftp-user=USER FTP-Anwender setzen. Dies betrifft alle URLs.\n" " Fehlwert: anonymous" -#: src/main.cc:167 +#: src/main.cc:169 #, fuzzy msgid "" " --ftp-passwd=PASSWD Set FTP password. This affects all URLs.\n" @@ -1036,7 +1036,7 @@ msgstr "" " --ftp-passwd=PASSWD FTP-Passwort setzen. Dies betrifft alle URLs.\n" " Fehlwert: ARIA2USER@" -#: src/main.cc:169 +#: src/main.cc:171 msgid "" " --ftp-type=TYPE Set FTP transfer type. TYPE is either " "'binary'\n" @@ -1048,11 +1048,11 @@ msgstr "" " oder 'ascii'.\n" " Fehlwert: binary" -#: src/main.cc:172 +#: src/main.cc:174 msgid " -p, --ftp-pasv Use passive mode in FTP." msgstr " -p, --ftp-pasv Passiv-Modus für FTP benutzen." -#: src/main.cc:173 +#: src/main.cc:175 msgid "" " --ftp-via-http-proxy=METHOD Use HTTP proxy in FTP. METHOD is either 'get' " "or\n" @@ -1064,7 +1064,7 @@ msgstr "" " 'tunnel'.\n" " Fehlwert: tunnel" -#: src/main.cc:176 +#: src/main.cc:178 #, fuzzy msgid "" " --lowest-speed-limit=SPEED Close connection if download speed is lower " @@ -1083,7 +1083,7 @@ msgstr "" "und 60 an.\n" " Fehlwert: 5" -#: src/main.cc:183 +#: src/main.cc:185 #, fuzzy msgid "" " --max-download-limit=SPEED Set max download speed in bytes per sec.\n" @@ -1097,7 +1097,7 @@ msgstr "" "und 60 an.\n" " Fehlwert: 5" -#: src/main.cc:187 +#: src/main.cc:189 #, fuzzy msgid "" " --file-allocation=METHOD Specify file allocation method. METHOD is " @@ -1117,7 +1117,7 @@ msgstr "" "und 60 an.\n" " Fehlwert: 5" -#: src/main.cc:193 +#: src/main.cc:195 #, fuzzy msgid "" " --allow-overwrite=true|false If false, aria2 doesn't download a file which\n" @@ -1133,7 +1133,15 @@ msgstr "" " auf .torrent endet.\n" " Fehlwert: true" -#: src/main.cc:198 +#: src/main.cc:199 +msgid "" +" -Z, --force-sequential Fetch URIs in the command-line sequentially " +"and\n" +" download each URI in a separate session, like\n" +" the usual command-line download utilities." +msgstr "" + +#: src/main.cc:204 #, fuzzy msgid "" " --check-integrity=true|false Check file integrity by validating piece " @@ -1155,7 +1163,7 @@ msgstr "" "und 60 an.\n" " Fehlwert: 5" -#: src/main.cc:206 +#: src/main.cc:212 #, fuzzy msgid "" " --realtime-chunk-checksum=true|false Validate chunk checksum while\n" @@ -1172,7 +1180,7 @@ msgstr "" " auf .torrent endet.\n" " Fehlwert: true" -#: src/main.cc:211 +#: src/main.cc:217 msgid "" " -c, --continue Continue downloading a partially downloaded\n" " file. Use this option to resume a download\n" @@ -1182,15 +1190,15 @@ msgid "" " applicable to http(s)/ftp downloads." msgstr "" -#: src/main.cc:217 +#: src/main.cc:223 msgid " -U, --user-agent=USER_AGENT Set user agent for http(s) downloads." msgstr "" -#: src/main.cc:218 +#: src/main.cc:224 msgid " -n, --no-netrc Disables netrc support." msgstr "" -#: src/main.cc:219 +#: src/main.cc:225 msgid "" " -i, --input-file=FILE Downloads URIs found in FILE. You can specify\n" " multiple URIs for a single entity: separate\n" @@ -1199,7 +1207,7 @@ msgid "" " Reads input from stdin when '-' is specified." msgstr "" -#: src/main.cc:223 +#: src/main.cc:229 #, fuzzy msgid "" " -j, --max-concurrent-downloads=N Set maximum number of concurrent " @@ -1210,13 +1218,13 @@ msgstr "" " -m, --max-tries=N Anzahl Versuche. 0 bedeutet unbegrenzt.\n" " Fehlwert: 5" -#: src/main.cc:226 +#: src/main.cc:232 msgid "" " --load-cookies=FILE Load cookies from FILE. The format of FILE is\n" " the same used by Netscape and Mozilla." msgstr "" -#: src/main.cc:229 +#: src/main.cc:235 #, fuzzy msgid "" " -S, --show-files Print file listing of .torrent or .metalink " @@ -1226,7 +1234,7 @@ msgstr "" " -S, --show-files Dateiliste der .torrent-Datei ausgeben und " "beenden." -#: src/main.cc:231 +#: src/main.cc:237 #, fuzzy msgid "" " --select-file=INDEX... Set file to download by specifing its index.\n" @@ -1249,12 +1257,12 @@ msgstr "" " Sie können auch '-' verwenden wie in \"1-5\".\n" " ',' und '-' können zusammen benutzt werden." -#: src/main.cc:241 +#: src/main.cc:247 #, fuzzy msgid " -T, --torrent-file=TORRENT_FILE The path to the .torrent file." msgstr " -T, --torrent-file=TORRENT_FILE Datenpfad zur torrent-Datei." -#: src/main.cc:242 +#: src/main.cc:248 #, fuzzy msgid "" " --follow-torrent=true|false Set to false to prevent aria2 from\n" @@ -1270,7 +1278,7 @@ msgstr "" " auf .torrent endet.\n" " Fehlwert: true" -#: src/main.cc:246 +#: src/main.cc:252 msgid "" " --direct-file-mapping=true|false Directly read from and write to each file\n" " mentioned in .torrent file.\n" @@ -1280,7 +1288,7 @@ msgstr "" " .torrent-Datei erwähnten Datei.\n" " Fehlwert: true" -#: src/main.cc:249 +#: src/main.cc:255 #, fuzzy msgid "" " --listen-port=PORT Set TCP port number for BitTorrent downloads.\n" @@ -1289,7 +1297,7 @@ msgstr "" " --listen-port=PORT Port-Nummer zum Lauschen auf Peer-Verbindungen " "setzen." -#: src/main.cc:251 +#: src/main.cc:257 #, fuzzy msgid "" " --max-upload-limit=SPEED Set max upload speed in bytes per sec.\n" @@ -1303,7 +1311,7 @@ msgstr "" "und 60 an.\n" " Fehlwert: 5" -#: src/main.cc:255 +#: src/main.cc:261 #, fuzzy msgid "" " --seed-time=MINUTES Specify seeding time in minutes. Also see the\n" @@ -1312,7 +1320,7 @@ msgstr "" " -m, --max-tries=N Anzahl Versuche. 0 bedeutet unbegrenzt.\n" " Fehlwert: 5" -#: src/main.cc:257 +#: src/main.cc:263 #, fuzzy msgid "" " --seed-ratio=RATIO Specify share ratio. Seed completed torrents\n" @@ -1329,7 +1337,7 @@ msgstr "" " Daher verbindet sich aria2 zu jeder URL mit\n" " N Verbindungen." -#: src/main.cc:262 +#: src/main.cc:268 msgid "" " --peer-id-prefix=PEERI_ID_PREFIX Specify the prefix of peer ID. The peer ID " "in\n" @@ -1342,12 +1350,12 @@ msgid "" " Default: -aria2-" msgstr "" -#: src/main.cc:271 +#: src/main.cc:277 #, fuzzy msgid " -M, --metalink-file=METALINK_FILE The file path to the .metalink file." msgstr " -T, --torrent-file=TORRENT_FILE Datenpfad zur torrent-Datei." -#: src/main.cc:272 +#: src/main.cc:278 #, fuzzy msgid "" " -C, --metalink-servers=NUM_SERVERS The number of servers to connect to\n" @@ -1361,24 +1369,24 @@ msgstr "" " auf .torrent endet.\n" " Fehlwert: true" -#: src/main.cc:275 +#: src/main.cc:281 msgid " --metalink-version=VERSION The version of the file to download." msgstr "" -#: src/main.cc:276 +#: src/main.cc:282 msgid " --metalink-language=LANGUAGE The language of the file to download." msgstr "" -#: src/main.cc:277 +#: src/main.cc:283 msgid "" " --metalink-os=OS The operating system of the file to download." msgstr "" -#: src/main.cc:278 +#: src/main.cc:284 msgid " --metalink-location=LOCATION The location of the prefered server." msgstr "" -#: src/main.cc:279 +#: src/main.cc:285 #, fuzzy msgid "" " --follow-metalink=true|false Set to false to prevent aria2 from\n" @@ -1394,15 +1402,15 @@ msgstr "" " auf .torrent endet.\n" " Fehlwert: true" -#: src/main.cc:284 +#: src/main.cc:290 msgid " -v, --version Print the version number and exit." msgstr " -v, --version Versionsnummer ausgeben und beenden." -#: src/main.cc:285 +#: src/main.cc:291 msgid " -h, --help Print this message and exit." msgstr " -h, --help Diese Anzeige ausgeben und beenden." -#: src/main.cc:288 +#: src/main.cc:294 #, fuzzy msgid "" " You can specify multiple URLs. All URLs must point to the same file\n" @@ -1412,7 +1420,7 @@ msgstr "" "verweisen\n" "oder der Abruf schlägt fehl." -#: src/main.cc:293 +#: src/main.cc:299 #, fuzzy msgid "" " Specify files in multi-file torrent to download. Use in conjunction with " @@ -1424,21 +1432,21 @@ msgstr "" " -T-Option. Diese Argumente werden ignoriert, wenn sie die Option --select-" "file angeben." -#: src/main.cc:297 +#: src/main.cc:303 msgid "Examples:" msgstr "Beispiele:" -#: src/main.cc:298 +#: src/main.cc:304 #, fuzzy msgid " Download a file using 1 connection:" msgstr " Abruf einer Datei über 1 Verbindung:" -#: src/main.cc:300 +#: src/main.cc:306 #, fuzzy msgid " Download a file using 2 connections:" msgstr " Abruf einer Datei mit 2 Verbindungen:" -#: src/main.cc:302 +#: src/main.cc:308 #, fuzzy msgid "" " Download a file using 2 connections, each connects to a different server:" @@ -1446,51 +1454,59 @@ msgstr "" " Abruf einer Datei über 2 Verbindungen, jede verbindet zu einem anderen " "Server:" -#: src/main.cc:304 +#: src/main.cc:310 msgid " You can mix up different protocols:" msgstr " Sie können verschiedene Protokolle mischen:" -#: src/main.cc:308 +#: src/main.cc:312 +msgid " Parameterized URI:" +msgstr "" + +#: src/main.cc:314 +msgid " Parameterized URI. -Z option must be specified:" +msgstr "" + +#: src/main.cc:318 msgid " Download a torrent:" msgstr " Einen torrent abrufen:" -#: src/main.cc:310 +#: src/main.cc:320 #, fuzzy msgid " Download a torrent using a local .torrent file:" msgstr " Einen torrent mit einer lokalen .torrent-Datei abrufen:" -#: src/main.cc:312 src/main.cc:325 +#: src/main.cc:322 src/main.cc:335 msgid " Download only selected files:" msgstr " Nur ausgewählte Dateien abrufen:" -#: src/main.cc:314 +#: src/main.cc:324 msgid " Print file listing of .torrent file:" msgstr " Dateiliste einer .torrent-Datei ausgeben:" -#: src/main.cc:319 +#: src/main.cc:329 msgid " Metalink downloading:" msgstr "" -#: src/main.cc:321 +#: src/main.cc:331 #, fuzzy msgid " Download a file using local .metalink file:" msgstr " Einen torrent mit einer lokalen .torrent-Datei abrufen:" -#: src/main.cc:323 +#: src/main.cc:333 msgid " Metalink downloading with preferences:" msgstr "" -#: src/main.cc:327 +#: src/main.cc:337 #, fuzzy msgid " Download only selected files using index:" msgstr " Nur ausgewählte Dateien abrufen:" -#: src/main.cc:329 +#: src/main.cc:339 #, fuzzy msgid " Print file listing of .metalink file:" msgstr " Dateiliste einer .torrent-Datei ausgeben:" -#: src/main.cc:333 +#: src/main.cc:343 #, c-format msgid "Report bugs to %s" msgstr "Fehler an %s melden" diff --git a/po/fr.gmo b/po/fr.gmo index 2cb71cfc847f4d4cf40cd68a6afef6c6bb7c49c5..8ef39e5a3af745bb4036afae142b815d1f9fb59a 100644 GIT binary patch delta 23 ecmeBdX6kHa+EC@hVPv6TWME}twzvbo8L-5vm0Q3l@t diff --git a/po/fr.po b/po/fr.po index c9e2a520..8155bdf8 100644 --- a/po/fr.po +++ b/po/fr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: aria2 0.11.2\n" "Report-Msgid-Bugs-To: http://aria2.sourceforge.net/\n" -"POT-Creation-Date: 2007-08-09 23:54+0900\n" +"POT-Creation-Date: 2007-08-28 20:46+0900\n" "PO-Revision-Date: 2007-08-16 01:11+0900\n" "Last-Translator: Charles \n" "Language-Team: Français\n" @@ -827,11 +827,11 @@ msgstr "" msgid "Errors occurred while binding port.\n" msgstr "La jonction du port a engendré des erreurs.\n" -#: src/main.cc:89 +#: src/main.cc:91 msgid " version " msgstr " version " -#: src/main.cc:99 +#: src/main.cc:101 msgid "" "This program is free software; you can redistribute it and/or modify\n" "it under the terms of the GNU General Public License as published by\n" @@ -865,40 +865,40 @@ msgstr "" "Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 " "USA\n" -#: src/main.cc:113 +#: src/main.cc:115 msgid "Contact Info:" msgstr "Informations de Contact:" -#: src/main.cc:120 +#: src/main.cc:122 #, c-format msgid "Usage: %s [options] URL ...\n" msgstr "Utilisation: %s [options] URL ...\n" -#: src/main.cc:122 +#: src/main.cc:124 #, c-format msgid " %s [options] -T TORRENT_FILE FILE ...\n" msgstr " %s [options] -T FICHIER FICHIER_TORRENT...\n" -#: src/main.cc:125 +#: src/main.cc:127 #, c-format msgid " %s [options] -M METALINK_FILE\n" msgstr " %s [options] -M FICHIER_METALINK\n" -#: src/main.cc:128 +#: src/main.cc:130 msgid "Options:" msgstr "Options:" -#: src/main.cc:129 +#: src/main.cc:131 msgid "" " -d, --dir=DIR The directory to store the downloaded file." msgstr " -d, --dir=DIR Le dossier pour enregistrer le fichier." -#: src/main.cc:130 +#: src/main.cc:132 msgid " -o, --out=FILE The file name of the downloaded file." msgstr "" " -o, --out=FILE Le nom de fichier pour le fichier téléchargé." -#: src/main.cc:131 +#: src/main.cc:133 msgid "" " -l, --log=LOG The file name of the log file. If '-' is\n" " specified, log is written to stdout." @@ -907,11 +907,11 @@ msgstr "" "Si '-' est spécifié,\n" " le log est redirigé vers stdout." -#: src/main.cc:134 +#: src/main.cc:136 msgid " -D, --daemon Run as daemon." msgstr " -D, --daemon Exécuter en tant que service." -#: src/main.cc:136 +#: src/main.cc:138 msgid "" " -s, --split=N Download a file using N connections. N must " "be\n" @@ -930,7 +930,7 @@ msgstr "" " N connexions.\n" " Défaut: 1" -#: src/main.cc:141 +#: src/main.cc:143 msgid "" " --retry-wait=SEC Set the seconds to wait to retry after an " "error\n" @@ -943,13 +943,13 @@ msgstr "" "et 60.\n" " Défaut: 5" -#: src/main.cc:144 +#: src/main.cc:146 msgid " -t, --timeout=SEC Set timeout in seconds. Default: 60" msgstr "" " -t, --timeout=SEC Définir le délai d'expiration en secondes. " "Défaut: 60" -#: src/main.cc:145 +#: src/main.cc:147 msgid "" " -m, --max-tries=N Set number of tries. 0 means unlimited.\n" " Default: 5" @@ -958,7 +958,7 @@ msgstr "" "illimité.\n" " Défaut: 5" -#: src/main.cc:153 +#: src/main.cc:155 msgid "" " --http-proxy=HOST:PORT Use HTTP proxy server. This affects all URLs." msgstr "" @@ -966,33 +966,33 @@ msgstr "" "tous\n" " les URLs." -#: src/main.cc:154 +#: src/main.cc:156 msgid " --http-user=USER Set HTTP user. This affects all URLs." msgstr "" " --http-user=USER Définir un utilisateur HTTP. Ceci affecte tous " "les URLs." -#: src/main.cc:155 +#: src/main.cc:157 msgid " --http-passwd=PASSWD Set HTTP password. This affects all URLs." msgstr "" " --http-passwd=PASSWD Définir un mot de passe HTTP. Ceci affecte " "tous les URLs." -#: src/main.cc:156 +#: src/main.cc:158 msgid "" " --http-proxy-user=USER Set HTTP proxy user. This affects all URLs." msgstr "" " --http-proxy-user=USER Définir un utilisateur proxy HTTP. Ceci " "affecte tous les URLs" -#: src/main.cc:157 +#: src/main.cc:159 msgid "" " --http-proxy-passwd=PASSWD Set HTTP proxy password. This affects all URLs." msgstr "" " --http-proxy-passwd=PASSWD Définir un mot de passe HTTP. Ceci affecte " "tous les URLs." -#: src/main.cc:158 +#: src/main.cc:160 msgid "" " --http-proxy-method=METHOD Set the method to use in proxy request.\n" " METHOD is either 'get' or 'tunnel'.\n" @@ -1003,7 +1003,7 @@ msgstr "" " METHOD est soit 'get' ou 'tunnel'.\n" " Défaut: tunnel" -#: src/main.cc:161 +#: src/main.cc:163 msgid "" " --http-auth-scheme=SCHEME Set HTTP authentication scheme. Currently, " "basic\n" @@ -1015,13 +1015,13 @@ msgstr "" " est le seul type d'identification supporté.\n" " Défaut: basic" -#: src/main.cc:164 +#: src/main.cc:166 msgid " --referer=REFERER Set Referer. This affects all URLs." msgstr "" " --referer=REFERER Définir le Référant. Ceci affecte tous les " "URLs." -#: src/main.cc:165 +#: src/main.cc:167 msgid "" " --ftp-user=USER Set FTP user. This affects all URLs.\n" " Default: anonymous" @@ -1030,7 +1030,7 @@ msgstr "" "les URLs.\n" " Défaut: anonymous" -#: src/main.cc:167 +#: src/main.cc:169 msgid "" " --ftp-passwd=PASSWD Set FTP password. This affects all URLs.\n" " Default: ARIA2USER@" @@ -1039,7 +1039,7 @@ msgstr "" "les URLs.\n" " Default: ARIA2USER@" -#: src/main.cc:169 +#: src/main.cc:171 msgid "" " --ftp-type=TYPE Set FTP transfer type. TYPE is either " "'binary'\n" @@ -1051,11 +1051,11 @@ msgstr "" " ou 'ascii'.\n" " Défaut: binary" -#: src/main.cc:172 +#: src/main.cc:174 msgid " -p, --ftp-pasv Use passive mode in FTP." msgstr " -p, --ftp-pasv Utiliser le mode passif de FTP." -#: src/main.cc:173 +#: src/main.cc:175 msgid "" " --ftp-via-http-proxy=METHOD Use HTTP proxy in FTP. METHOD is either 'get' " "or\n" @@ -1067,7 +1067,7 @@ msgstr "" " 'tunnel'.\n" " Défaut: tunnel" -#: src/main.cc:176 +#: src/main.cc:178 msgid "" " --lowest-speed-limit=SPEED Close connection if download speed is lower " "than\n" @@ -1090,7 +1090,7 @@ msgstr "" "BitTorrent .\n" " Default: 0" -#: src/main.cc:183 +#: src/main.cc:185 msgid "" " --max-download-limit=SPEED Set max download speed in bytes per sec.\n" " 0 means unrestricted.\n" @@ -1104,7 +1104,7 @@ msgstr "" "1024K).\n" " Défaut: 0" -#: src/main.cc:187 +#: src/main.cc:189 msgid "" " --file-allocation=METHOD Specify file allocation method. METHOD is " "either\n" @@ -1128,7 +1128,7 @@ msgstr "" "fichier\n" " Défaut: none" -#: src/main.cc:193 +#: src/main.cc:195 msgid "" " --allow-overwrite=true|false If false, aria2 doesn't download a file which\n" " already exists but the corresponding .aria2 " @@ -1142,7 +1142,15 @@ msgstr "" " l'ordinateur\n" " Défaut: false" -#: src/main.cc:198 +#: src/main.cc:199 +msgid "" +" -Z, --force-sequential Fetch URIs in the command-line sequentially " +"and\n" +" download each URI in a separate session, like\n" +" the usual command-line download utilities." +msgstr "" + +#: src/main.cc:204 msgid "" " --check-integrity=true|false Check file integrity by validating piece " "hash.\n" @@ -1169,7 +1177,7 @@ msgstr "" " si le fichier .aria2 n'existe pas.\n" " Défaut: false" -#: src/main.cc:206 +#: src/main.cc:212 msgid "" " --realtime-chunk-checksum=true|false Validate chunk checksum while\n" " downloading a file in Metalink mode. This " @@ -1185,7 +1193,7 @@ msgstr "" " Metalink avec vérification d'intégrité.\n" " Défaut: true" -#: src/main.cc:211 +#: src/main.cc:217 msgid "" " -c, --continue Continue downloading a partially downloaded\n" " file. Use this option to resume a download\n" @@ -1205,17 +1213,17 @@ msgstr "" " En ce moment cette option s'applique aux\n" " téléchargements http(s)/ftp." -#: src/main.cc:217 +#: src/main.cc:223 msgid " -U, --user-agent=USER_AGENT Set user agent for http(s) downloads." msgstr "" " -U, --user-agent=USER_AGENT Définit le nom du programme pour les " "téléchargements http(s)." -#: src/main.cc:218 +#: src/main.cc:224 msgid " -n, --no-netrc Disables netrc support." msgstr " -n, --no-netrc Désactiver le support netrc." -#: src/main.cc:219 +#: src/main.cc:225 msgid "" " -i, --input-file=FILE Downloads URIs found in FILE. You can specify\n" " multiple URIs for a single entity: separate\n" @@ -1230,7 +1238,7 @@ msgstr "" " URIs par des tabulations sur une seule ligne.\n" " Lit la sortie de stdin quand '-' est spécifié." -#: src/main.cc:223 +#: src/main.cc:229 msgid "" " -j, --max-concurrent-downloads=N Set maximum number of concurrent " "downloads.\n" @@ -1242,7 +1250,7 @@ msgstr "" " Doit être utilisé avec l'option -i.\n" " Défaut: 5" -#: src/main.cc:226 +#: src/main.cc:232 msgid "" " --load-cookies=FILE Load cookies from FILE. The format of FILE is\n" " the same used by Netscape and Mozilla." @@ -1251,7 +1259,7 @@ msgstr "" "est\n" " celui utilisé par Netscape et Mozilla." -#: src/main.cc:229 +#: src/main.cc:235 msgid "" " -S, --show-files Print file listing of .torrent or .metalink " "file\n" @@ -1261,7 +1269,7 @@ msgstr "" "metalink\n" " et quitte." -#: src/main.cc:231 +#: src/main.cc:237 msgid "" " --select-file=INDEX... Set file to download by specifing its index.\n" " You can find the file index using the\n" @@ -1288,12 +1296,12 @@ msgstr "" "varier selon\n" " la requête (consultez l'option --metalink-*)." -#: src/main.cc:241 +#: src/main.cc:247 msgid " -T, --torrent-file=TORRENT_FILE The path to the .torrent file." msgstr "" " -T, --torrent-file=TORRENT_FILE Le chemin complet du fichier .torrent." -#: src/main.cc:242 +#: src/main.cc:248 msgid "" " --follow-torrent=true|false Set to false to prevent aria2 from\n" " entering BitTorrent mode even if the filename " @@ -1308,7 +1316,7 @@ msgstr "" " téléchargé termine pas l'extension .torrent.\n" " Défaut: true" -#: src/main.cc:246 +#: src/main.cc:252 msgid "" " --direct-file-mapping=true|false Directly read from and write to each file\n" " mentioned in .torrent file.\n" @@ -1319,7 +1327,7 @@ msgstr "" " mentioné dans le fichier .torrent.\n" " Défaut: true" -#: src/main.cc:249 +#: src/main.cc:255 msgid "" " --listen-port=PORT Set TCP port number for BitTorrent downloads.\n" " Default: 6881-6999" @@ -1328,7 +1336,7 @@ msgstr "" "cas d'une connexion P2P.\n" " Default: 6881-6999" -#: src/main.cc:251 +#: src/main.cc:257 msgid "" " --max-upload-limit=SPEED Set max upload speed in bytes per sec.\n" " 0 means unrestricted.\n" @@ -1342,7 +1350,7 @@ msgstr "" "1024K).\n" " Défaut: 0" -#: src/main.cc:255 +#: src/main.cc:261 msgid "" " --seed-time=MINUTES Specify seeding time in minutes. Also see the\n" " --seed-ratio option." @@ -1351,7 +1359,7 @@ msgstr "" "Consultez aussi\n" " l'option --seed-ratio." -#: src/main.cc:257 +#: src/main.cc:263 msgid "" " --seed-ratio=RATIO Specify share ratio. Seed completed torrents\n" " until share ratio reaches RATIO. 1.0 is\n" @@ -1370,7 +1378,7 @@ msgstr "" "conditions\n" " est satisfaite." -#: src/main.cc:262 +#: src/main.cc:268 msgid "" " --peer-id-prefix=PEERI_ID_PREFIX Specify the prefix of peer ID. The peer ID " "in\n" @@ -1383,12 +1391,12 @@ msgid "" " Default: -aria2-" msgstr "" -#: src/main.cc:271 +#: src/main.cc:277 msgid " -M, --metalink-file=METALINK_FILE The file path to the .metalink file." msgstr "" " -M, --metalink-file=METALINK_FILE Le chemin vers le fichier .metalink." -#: src/main.cc:272 +#: src/main.cc:278 msgid "" " -C, --metalink-servers=NUM_SERVERS The number of servers to connect to\n" " simultaneously.\n" @@ -1399,26 +1407,26 @@ msgstr "" " simultanément.\n" " Défaut: 5" -#: src/main.cc:275 +#: src/main.cc:281 msgid " --metalink-version=VERSION The version of the file to download." msgstr " --metalink-version=VERSION La version du fichier à télécharger." -#: src/main.cc:276 +#: src/main.cc:282 msgid " --metalink-language=LANGUAGE The language of the file to download." msgstr " --metalink-language=LANGUAGE La langua du fichier à télécharger." -#: src/main.cc:277 +#: src/main.cc:283 msgid "" " --metalink-os=OS The operating system of the file to download." msgstr "" " --metalink-os=OS Le système d'exploitation auquel est destiné " "le fichier." -#: src/main.cc:278 +#: src/main.cc:284 msgid " --metalink-location=LOCATION The location of the prefered server." msgstr " --metalink-location=LOCATION La localisation du serveur préféré." -#: src/main.cc:279 +#: src/main.cc:285 msgid "" " --follow-metalink=true|false Set to false to prevent aria2 from\n" " entering Metalink mode even if the filename " @@ -1434,15 +1442,15 @@ msgstr "" "metalink.\n" " Défaut: true" -#: src/main.cc:284 +#: src/main.cc:290 msgid " -v, --version Print the version number and exit." msgstr " -v, --version Imprime le numéro de version et quitte." -#: src/main.cc:285 +#: src/main.cc:291 msgid " -h, --help Print this message and exit." msgstr " -h, --help Imprime ce message et quitte." -#: src/main.cc:288 +#: src/main.cc:294 msgid "" " You can specify multiple URLs. All URLs must point to the same file\n" " or downloading will fail." @@ -1451,7 +1459,7 @@ msgstr "" "même fichier\n" " sinon le téléchargement échoue." -#: src/main.cc:293 +#: src/main.cc:299 msgid "" " Specify files in multi-file torrent to download. Use in conjunction with " "the\n" @@ -1461,66 +1469,74 @@ msgstr "" "avec l'option\n" " -T. Ces arguments sont ignorés si vous spécifiez l'option --select-file." -#: src/main.cc:297 +#: src/main.cc:303 msgid "Examples:" msgstr "Exemples:" -#: src/main.cc:298 +#: src/main.cc:304 msgid " Download a file using 1 connection:" msgstr " Téléchargez un fichier avec 1 connexion:" -#: src/main.cc:300 +#: src/main.cc:306 msgid " Download a file using 2 connections:" msgstr " Téléchargez un fichier avec 2 connexion:" -#: src/main.cc:302 +#: src/main.cc:308 msgid "" " Download a file using 2 connections, each connects to a different server:" msgstr "" " Téléchargez un fichier avec 2 connexion, chacune se connectant à un serveur " "différent:" -#: src/main.cc:304 +#: src/main.cc:310 msgid " You can mix up different protocols:" msgstr " Vous pouvez mélanger différents protocoles:" -#: src/main.cc:308 +#: src/main.cc:312 +msgid " Parameterized URI:" +msgstr "" + +#: src/main.cc:314 +msgid " Parameterized URI. -Z option must be specified:" +msgstr "" + +#: src/main.cc:318 msgid " Download a torrent:" msgstr "Téléchargez un torrent:" -#: src/main.cc:310 +#: src/main.cc:320 msgid " Download a torrent using a local .torrent file:" msgstr "Téléchargez un torrent en utilisant un fichier local .torrent:" -#: src/main.cc:312 src/main.cc:325 +#: src/main.cc:322 src/main.cc:335 msgid " Download only selected files:" msgstr "Télécharger seulement les fichiers séléctionnés:" -#: src/main.cc:314 +#: src/main.cc:324 msgid " Print file listing of .torrent file:" msgstr "Imprimer la liste des fichiers .torrent:" -#: src/main.cc:319 +#: src/main.cc:329 msgid " Metalink downloading:" msgstr "Téléchargement Metalink:" -#: src/main.cc:321 +#: src/main.cc:331 msgid " Download a file using local .metalink file:" msgstr "Télécharger un fichier en utilisant un fichier local .metalink:" -#: src/main.cc:323 +#: src/main.cc:333 msgid " Metalink downloading with preferences:" msgstr "Téléchargement Metalink avec comme préférences:" -#: src/main.cc:327 +#: src/main.cc:337 msgid " Download only selected files using index:" msgstr "Télécharger seulement les fichiers sélectionnés en utilisant l'index:" -#: src/main.cc:329 +#: src/main.cc:339 msgid " Print file listing of .metalink file:" msgstr "Imprimer la liste de fichiers du fichier .metalink:" -#: src/main.cc:333 +#: src/main.cc:343 #, c-format msgid "Report bugs to %s" msgstr "Faire part des bugs à %s" diff --git a/po/ja.gmo b/po/ja.gmo index 2ad6d9f8e63c436b92913f249a45d01800806cf6..1dae8e762b02954f98a8123bbdbe79c1c552b087 100644 GIT binary patch delta 23 fcmX?fp6SqerVWY_97YxjMg~?UW}7u5X8HpFYSah> delta 23 fcmX?fp6SqerVWY_90ryOM#fgACYv=QX8HpFYTO6~ diff --git a/po/ja.po b/po/ja.po index 7186980e..4a4c9c97 100644 --- a/po/ja.po +++ b/po/ja.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: aria2c 0.2.1\n" "Report-Msgid-Bugs-To: http://aria2.sourceforge.net/\n" -"POT-Creation-Date: 2007-08-09 23:54+0900\n" +"POT-Creation-Date: 2007-08-28 20:46+0900\n" "PO-Revision-Date: 2007-08-10 00:08+0900\n" "Last-Translator: Tatsuhiro Tsujikawa \n" "Language-Team: Japanese \n" @@ -844,11 +844,11 @@ msgstr "" msgid "Errors occurred while binding port.\n" msgstr "¥Ý¡¼¥È¤ò¥Ð¥¤¥ó¥ÉÃæ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿.\n" -#: src/main.cc:89 +#: src/main.cc:91 msgid " version " msgstr " ¥Ð¡¼¥¸¥ç¥ó " -#: src/main.cc:99 +#: src/main.cc:101 msgid "" "This program is free software; you can redistribute it and/or modify\n" "it under the terms of the GNU General Public License as published by\n" @@ -880,41 +880,41 @@ msgstr "" "Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 " "USA\n" -#: src/main.cc:113 +#: src/main.cc:115 msgid "Contact Info:" msgstr "Ï¢ÍíÀè:" -#: src/main.cc:120 +#: src/main.cc:122 #, c-format msgid "Usage: %s [options] URL ...\n" msgstr "»È¤¤Êý: %s [¥ª¥×¥·¥ç¥ó] URL ...\n" -#: src/main.cc:122 +#: src/main.cc:124 #, c-format msgid " %s [options] -T TORRENT_FILE FILE ...\n" msgstr " %s [¥ª¥×¥·¥ç¥ó] -T TORRENT_FILE FILE ...\n" -#: src/main.cc:125 +#: src/main.cc:127 #, c-format msgid " %s [options] -M METALINK_FILE\n" msgstr " %s [¥ª¥×¥·¥ç¥ó] -M METALINK_FILE\n" -#: src/main.cc:128 +#: src/main.cc:130 msgid "Options:" msgstr "¥ª¥×¥·¥ç¥ó:" -#: src/main.cc:129 +#: src/main.cc:131 msgid "" " -d, --dir=DIR The directory to store the downloaded file." msgstr "" " -d, --dir=DIR ¥À¥¦¥ó¥í¡¼¥É¤·¤¿¥Õ¥¡¥¤¥ë¤òÊݸ¤¹¤ë¥Ç¥£¥ì¥¯¥È¥ê." -#: src/main.cc:130 +#: src/main.cc:132 msgid " -o, --out=FILE The file name of the downloaded file." msgstr "" " -o, --out=FILE ¥À¥¦¥ó¥í¡¼¥É¤·¤¿¥Õ¥¡¥¤¥ë¤ÎÊݸÀè¥Õ¥¡¥¤¥ë̾." -#: src/main.cc:131 +#: src/main.cc:133 msgid "" " -l, --log=LOG The file name of the log file. If '-' is\n" " specified, log is written to stdout." @@ -923,11 +923,11 @@ msgstr "" "ÎÏ\n" " ¤Ë½ÐÎϤ·¤Þ¤¹." -#: src/main.cc:134 +#: src/main.cc:136 msgid " -D, --daemon Run as daemon." msgstr " -D, --daemon ¥Ç¡¼¥â¥ó¤È¤·¤Æµ¯Æ°¤·¤Þ¤¹." -#: src/main.cc:136 +#: src/main.cc:138 msgid "" " -s, --split=N Download a file using N connections. N must " "be\n" @@ -948,7 +948,7 @@ msgstr "" " ¥ó¤ò³ÎΩ¤·¤Þ¤¹.\n" " ¥Ç¥Õ¥©¥ë¥ÈÃÍ: 1" -#: src/main.cc:141 +#: src/main.cc:143 msgid "" " --retry-wait=SEC Set the seconds to wait to retry after an " "error\n" @@ -961,13 +961,13 @@ msgstr "" " ¤¹. 0 - 60 ¤ÎÃͤò»ØÄꤷ¤Æ¤¯¤À¤µ¤¤.\n" " ¥Ç¥Õ¥©¥ë¥ÈÃÍ: 5" -#: src/main.cc:144 +#: src/main.cc:146 msgid " -t, --timeout=SEC Set timeout in seconds. Default: 60" msgstr "" " -t, --timeout=SEC ¥¿¥¤¥à¥¢¥¦¥È¤È¤Ê¤ë»þ´Ö¤òÉäǻØÄꤷ¤Þ¤¹.\n" " ¥Ç¥Õ¥©¥ë¥ÈÃÍ: 60" -#: src/main.cc:145 +#: src/main.cc:147 msgid "" " -m, --max-tries=N Set number of tries. 0 means unlimited.\n" " Default: 5" @@ -976,28 +976,28 @@ msgstr "" "¹Ô\n" " ¤·¤Þ¤¹. ¥Ç¥Õ¥©¥ë¥ÈÃÍ: 5" -#: src/main.cc:153 +#: src/main.cc:155 msgid "" " --http-proxy=HOST:PORT Use HTTP proxy server. This affects all URLs." msgstr "" " --http-proxy=HOST:PORT HTTP ¥×¥í¥­¥·¡¦¥µ¡¼¥Ð¡¼¤ò»ÈÍѤ·¤Þ¤¹.\n" " ¤³¤Î¥ª¥×¥·¥ç¥ó¤Ï¤¹¤Ù¤Æ¤Î URL ¤Ë±Æ¶Á¤·¤Þ¤¹." -#: src/main.cc:154 +#: src/main.cc:156 msgid " --http-user=USER Set HTTP user. This affects all URLs." msgstr "" " --http-user=USER HTTP ¤Ç¤Îǧ¾Ú¥æ¡¼¥¶¡¼¤ò»ØÄꤷ¤Þ¤¹. ¤³¤Î¥ª¥×¥·¥ç" "¥ó\n" " ¤Ï¤¹¤Ù¤Æ¤Î URL ¤Ë±Æ¶Á¤·¤Þ¤¹." -#: src/main.cc:155 +#: src/main.cc:157 msgid " --http-passwd=PASSWD Set HTTP password. This affects all URLs." msgstr "" " --http-passwd=PASSWD HTTP ¤Ç¤Îǧ¾Ú¥Ñ¥¹¥ï¡¼¥É¤ò»ØÄꤷ¤Þ¤¹. ¤³¤Î¥ª¥×" "¥·¥ç\n" " ¥ó¤Ï¤¹¤Ù¤Æ¤Î URL ¤Ë±Æ¶Á¤·¤Þ¤¹." -#: src/main.cc:156 +#: src/main.cc:158 msgid "" " --http-proxy-user=USER Set HTTP proxy user. This affects all URLs." msgstr "" @@ -1007,7 +1007,7 @@ msgstr "" "¤Þ\n" " ¤¹." -#: src/main.cc:157 +#: src/main.cc:159 msgid "" " --http-proxy-passwd=PASSWD Set HTTP proxy password. This affects all URLs." msgstr "" @@ -1017,7 +1017,7 @@ msgstr "" "¤·\n" " ¤Þ¤¹." -#: src/main.cc:158 +#: src/main.cc:160 msgid "" " --http-proxy-method=METHOD Set the method to use in proxy request.\n" " METHOD is either 'get' or 'tunnel'.\n" @@ -1028,7 +1028,7 @@ msgstr "" " ¤¹. 'get' ¤Þ¤¿¤Ï 'tunnel' ¤ò»ØÄꤷ¤Æ¤¯¤À¤µ¤¤.\n" " ¥Ç¥Õ¥©¥ë¥ÈÃÍ: tunnel" -#: src/main.cc:161 +#: src/main.cc:163 msgid "" " --http-auth-scheme=SCHEME Set HTTP authentication scheme. Currently, " "basic\n" @@ -1040,14 +1040,14 @@ msgstr "" " ¤¤¤ë¤Î¤Ï basic ¤Ç¤¹. \n" " ¥Ç¥Õ¥©¥ë¥ÈÃÍ: basic" -#: src/main.cc:164 +#: src/main.cc:166 msgid " --referer=REFERER Set Referer. This affects all URLs." msgstr "" " --referer=REFERER ¥ê¥Õ¥¡¥é¡¼¤ò»ØÄꤷ¤Þ¤¹. ¤³¤Î¥ª¥×¥·¥ç¥ó¤Ï¤¹¤Ù¤Æ" "¤Î\n" " URL ¤Ë±Æ¶Á¤·¤Þ¤¹." -#: src/main.cc:165 +#: src/main.cc:167 msgid "" " --ftp-user=USER Set FTP user. This affects all URLs.\n" " Default: anonymous" @@ -1057,7 +1057,7 @@ msgstr "" " ¤Ï¤¹¤Ù¤Æ¤Î URL ¤Ë±Æ¶Á¤·¤Þ¤¹.\n" " ¥Ç¥Õ¥©¥ë¥ÈÃÍ: anonymous" -#: src/main.cc:167 +#: src/main.cc:169 msgid "" " --ftp-passwd=PASSWD Set FTP password. This affects all URLs.\n" " Default: ARIA2USER@" @@ -1067,7 +1067,7 @@ msgstr "" " ¥ó¤Ï¤¹¤Ù¤Æ¤Î URL ¤Ë±Æ¶Á¤·¤Þ¤¹.\n" " ¥Ç¥Õ¥©¥ë¥ÈÃÍ: ARIA2USER@" -#: src/main.cc:169 +#: src/main.cc:171 msgid "" " --ftp-type=TYPE Set FTP transfer type. TYPE is either " "'binary'\n" @@ -1078,11 +1078,11 @@ msgstr "" " 'ascii' ¤ò»ØÄꤷ¤Æ¤¯¤À¤µ¤¤. ¥Ç¥Õ¥©¥ë¥ÈÃÍ: " "binary" -#: src/main.cc:172 +#: src/main.cc:174 msgid " -p, --ftp-pasv Use passive mode in FTP." msgstr " -p, --ftp-pasv FTP ¤Ç passive ¥â¡¼¥É¤ò»ÈÍѤ·¤Þ¤¹." -#: src/main.cc:173 +#: src/main.cc:175 msgid "" " --ftp-via-http-proxy=METHOD Use HTTP proxy in FTP. METHOD is either 'get' " "or\n" @@ -1095,7 +1095,7 @@ msgstr "" "¤¯\n" " ¤À¤µ¤¤. ¥Ç¥Õ¥©¥ë¥ÈÃÍ: tunnel" -#: src/main.cc:176 +#: src/main.cc:178 msgid "" " --lowest-speed-limit=SPEED Close connection if download speed is lower " "than\n" @@ -1118,7 +1118,7 @@ msgstr "" " ¡¼¥É¤Ë¤Ï±Æ¶Á¤·¤Þ¤»¤ó.\n" " ¥Ç¥Õ¥©¥ë¥ÈÃÍ: 0" -#: src/main.cc:183 +#: src/main.cc:185 msgid "" " --max-download-limit=SPEED Set max download speed in bytes per sec.\n" " 0 means unrestricted.\n" @@ -1133,7 +1133,7 @@ msgstr "" "1024K).\n" " ¥Ç¥Õ¥©¥ë¥ÈÃÍ: 0" -#: src/main.cc:187 +#: src/main.cc:189 msgid "" " --file-allocation=METHOD Specify file allocation method. METHOD is " "either\n" @@ -1158,7 +1158,7 @@ msgstr "" " ¤ë¾ì¹ç¤¬¤¢¤ê¤Þ¤¹.\n" " ¥Ç¥Õ¥©¥ë¥ÈÃÍ: none" -#: src/main.cc:193 +#: src/main.cc:195 msgid "" " --allow-overwrite=true|false If false, aria2 doesn't download a file which\n" " already exists but the corresponding .aria2 " @@ -1175,7 +1175,15 @@ msgstr "" " Ãæ»ß¤·¤Þ¤¹.\n" " ¥Ç¥Õ¥©¥ë¥ÈÃÍ: false" -#: src/main.cc:198 +#: src/main.cc:199 +msgid "" +" -Z, --force-sequential Fetch URIs in the command-line sequentially " +"and\n" +" download each URI in a separate session, like\n" +" the usual command-line download utilities." +msgstr "" + +#: src/main.cc:204 msgid "" " --check-integrity=true|false Check file integrity by validating piece " "hash.\n" @@ -1202,7 +1210,7 @@ msgstr "" " ¤«¤â¤·¤ì¤Þ¤»¤ó.\n" " ¥Ç¥Õ¥©¥ë¥ÈÃÍ: false" -#: src/main.cc:206 +#: src/main.cc:212 msgid "" " --realtime-chunk-checksum=true|false Validate chunk checksum while\n" " downloading a file in Metalink mode. This " @@ -1218,7 +1226,7 @@ msgstr "" " Metalink ¤Ç¤Î¤ß»ÈÍѤǤ­¤Þ¤¹.\n" " ¥Ç¥Õ¥©¥ë¥ÈÃÍ: true" -#: src/main.cc:211 +#: src/main.cc:217 msgid "" " -c, --continue Continue downloading a partially downloaded\n" " file. Use this option to resume a download\n" @@ -1237,15 +1245,15 @@ msgstr "" "ÍÑ\n" " ¤Ç¤­¤Þ¤¹." -#: src/main.cc:217 +#: src/main.cc:223 msgid " -U, --user-agent=USER_AGENT Set user agent for http(s) downloads." msgstr " -U, --user-agent=USER_AGENT ¥æ¡¼¥¶¡¼¥¨¡¼¥¸¥§¥ó¥È¤òÀßÄꤷ¤Þ¤¹." -#: src/main.cc:218 +#: src/main.cc:224 msgid " -n, --no-netrc Disables netrc support." msgstr " -n, --no-netrc netrc ¥µ¥Ý¡¼¥È¤ò»ß¤á¤Þ¤¹." -#: src/main.cc:219 +#: src/main.cc:225 msgid "" " -i, --input-file=FILE Downloads URIs found in FILE. You can specify\n" " multiple URIs for a single entity: separate\n" @@ -1265,7 +1273,7 @@ msgstr "" "¤Þ\n" " ¤¹." -#: src/main.cc:223 +#: src/main.cc:229 msgid "" " -j, --max-concurrent-downloads=N Set maximum number of concurrent " "downloads.\n" @@ -1277,7 +1285,7 @@ msgstr "" " ¤È¶¦¤Ë»È¤Ã¤Æ¤¯¤À¤µ¤¤.\n" " ¥Ç¥Õ¥©¥ë¥ÈÃÍ: 5" -#: src/main.cc:226 +#: src/main.cc:232 msgid "" " --load-cookies=FILE Load cookies from FILE. The format of FILE is\n" " the same used by Netscape and Mozilla." @@ -1287,7 +1295,7 @@ msgstr "" " ¥È¤Ï, Netscape ¤ä Mozilla ¤Ç»È¤ï¤ì¤Æ¤¤¤ë¤â¤Î¤Ç" "¤¹." -#: src/main.cc:229 +#: src/main.cc:235 msgid "" " -S, --show-files Print file listing of .torrent or .metalink " "file\n" @@ -1296,7 +1304,7 @@ msgstr "" " -S, --show-files .torrent/.metalink ¥Õ¥¡¥¤¥ë¤Ë´Þ¤Þ¤ì¤ë¥Õ¥¡¥¤¥ë\n" " ¥ê¥¹¥È¤ò½ÐÎϤ·½ªÎ»¤·¤Þ¤¹." -#: src/main.cc:231 +#: src/main.cc:237 msgid "" " --select-file=INDEX... Set file to download by specifing its index.\n" " You can find the file index using the\n" @@ -1324,11 +1332,11 @@ msgstr "" "¤è¤Ã\n" " ¤Æ¥¤¥ó¥Ç¥Ã¥¯¥¹¤ÏÊѲ½¤¹¤ë¾ì¹ç¤¬¤¢¤ê¤Þ¤¹." -#: src/main.cc:241 +#: src/main.cc:247 msgid " -T, --torrent-file=TORRENT_FILE The path to the .torrent file." msgstr " -T, --torrent-file=TORRENT_FILE .torrent ¥Õ¥¡¥¤¥ë¤Î¥Ñ¥¹¤ò»ØÄê." -#: src/main.cc:242 +#: src/main.cc:248 msgid "" " --follow-torrent=true|false Set to false to prevent aria2 from\n" " entering BitTorrent mode even if the filename " @@ -1343,7 +1351,7 @@ msgstr "" " ¤Ï, BitTorrent ¥â¡¼¥É¤ËÆþ¤ê¤Þ¤»¤ó.\n" " ¥Ç¥Õ¥©¥ë¥ÈÃÍ: true" -#: src/main.cc:246 +#: src/main.cc:252 msgid "" " --direct-file-mapping=true|false Directly read from and write to each file\n" " mentioned in .torrent file.\n" @@ -1354,7 +1362,7 @@ msgstr "" " ¤·¤Þ¤¹.\n" " ¥Ç¥Õ¥©¥ë¥ÈÃÍ: true" -#: src/main.cc:249 +#: src/main.cc:255 msgid "" " --listen-port=PORT Set TCP port number for BitTorrent downloads.\n" " Default: 6881-6999" @@ -1362,7 +1370,7 @@ msgstr "" " --listen-port=PORT ¥Ô¥¢¤«¤é¤ÎÀܳ¤ò¼õ¤±ÉÕ¤±¤ë¥Ý¡¼¥ÈÈÖ¹æ¤ò»ØÄê.\n" " ¥Ç¥Õ¥©¥ë¥ÈÃÍ: 6881-6999" -#: src/main.cc:251 +#: src/main.cc:257 msgid "" " --max-upload-limit=SPEED Set max upload speed in bytes per sec.\n" " 0 means unrestricted.\n" @@ -1377,7 +1385,7 @@ msgstr "" "1024K).\n" " ¥Ç¥Õ¥©¥ë¥ÈÃÍ: 0" -#: src/main.cc:255 +#: src/main.cc:261 msgid "" " --seed-time=MINUTES Specify seeding time in minutes. Also see the\n" " --seed-ratio option." @@ -1385,7 +1393,7 @@ msgstr "" " --seed-time=MINUTES ¥·¡¼¥É¤ò¹Ô¤¦»þ´Ö¤òʬñ°Ì¤Ç»ØÄꤷ¤Þ¤¹. \n" " --seed-ratio ¥ª¥×¥·¥ç¥ó¤â»²¾È¤·¤Æ¤¯¤À¤µ¤¤." -#: src/main.cc:257 +#: src/main.cc:263 msgid "" " --seed-ratio=RATIO Specify share ratio. Seed completed torrents\n" " until share ratio reaches RATIO. 1.0 is\n" @@ -1403,7 +1411,7 @@ msgstr "" "¤¯\n" " ¤È¤â°ìÊý¤Î¾ò·ï¤¬À®Î©¤¹¤ë¤È¥·¡¼¥É¤ò½ªÎ»¤·¤Þ¤¹." -#: src/main.cc:262 +#: src/main.cc:268 msgid "" " --peer-id-prefix=PEERI_ID_PREFIX Specify the prefix of peer ID. The peer ID " "in\n" @@ -1427,11 +1435,11 @@ msgstr "" "¤¹.\n" " ¥Ç¥Õ¥©¥ë¥ÈÃÍ: -aria2-" -#: src/main.cc:271 +#: src/main.cc:277 msgid " -M, --metalink-file=METALINK_FILE The file path to the .metalink file." msgstr " -M, --metalink-file=METALINK_FILE .metalink ¥Õ¥¡¥¤¥ë¤Î¥Ñ¥¹¤ò»ØÄê." -#: src/main.cc:272 +#: src/main.cc:278 msgid "" " -C, --metalink-servers=NUM_SERVERS The number of servers to connect to\n" " simultaneously.\n" @@ -1440,15 +1448,15 @@ msgstr "" " -C, --metalink-servers=NUM_SERVERS Ʊ»þ¤ËÀܳ¤¹¤ë¥µ¡¼¥Ð¤Î¿ô¤ò»ØÄꤷ¤Þ¤¹.\n" " ¥Ç¥Õ¥©¥ë¥ÈÃÍ: 5" -#: src/main.cc:275 +#: src/main.cc:281 msgid " --metalink-version=VERSION The version of the file to download." msgstr " --metalink-version=VERSION ¥À¥¦¥ó¥í¡¼¥É¤¹¤ë¥Õ¥¡¥¤¥ë¤Î¥Ð¡¼¥¸¥ç¥ó." -#: src/main.cc:276 +#: src/main.cc:282 msgid " --metalink-language=LANGUAGE The language of the file to download." msgstr " --metalink-language=LANGUAGE ¥À¥¦¥ó¥í¡¼¥É¤¹¤ë¥Õ¥¡¥¤¥ë¤Î¸À¸ì." -#: src/main.cc:277 +#: src/main.cc:283 msgid "" " --metalink-os=OS The operating system of the file to download." msgstr "" @@ -1456,11 +1464,11 @@ msgstr "" "¥ì¡¼\n" " ¥Æ¥£¥ó¥°¡¦¥·¥¹¥Æ¥à." -#: src/main.cc:278 +#: src/main.cc:284 msgid " --metalink-location=LOCATION The location of the prefered server." msgstr " --metalink-location=LOCATION Í¥ÀèŪ¤Ë¥À¥¦¥ó¥í¡¼¥É¤¹¤ë¥µ¡¼¥Ð¡¼¤Î¾ì½ê." -#: src/main.cc:279 +#: src/main.cc:285 msgid "" " --follow-metalink=true|false Set to false to prevent aria2 from\n" " entering Metalink mode even if the filename " @@ -1475,16 +1483,16 @@ msgstr "" " ¤Ï, Metalink ¥â¡¼¥É¤ËÆþ¤ê¤Þ¤»¤ó.\n" " ¥Ç¥Õ¥©¥ë¥ÈÃÍ: true" -#: src/main.cc:284 +#: src/main.cc:290 msgid " -v, --version Print the version number and exit." msgstr " -v, --version ¥Ð¡¼¥¸¥ç¥óÈÖ¹æ¤òɽ¼¨¤·, ½ªÎ»¤·¤Þ¤¹." -#: src/main.cc:285 +#: src/main.cc:291 msgid " -h, --help Print this message and exit." msgstr "" " -h, --help ¤³¤Î¥Ø¥ë¥×¥á¥Ã¥»¡¼¥¸¤òɽ¼¨¤·, ½ªÎ»¤·¤Þ¤¹." -#: src/main.cc:288 +#: src/main.cc:294 msgid "" " You can specify multiple URLs. All URLs must point to the same file\n" " or downloading will fail." @@ -1493,7 +1501,7 @@ msgstr "" "¤ì\n" " ¤Ð¤Ê¤ê¤Þ¤»¤ó. ¤µ¤â¤Ê¤¯¤Ð¥À¥¦¥ó¥í¡¼¥É¤Ï¼ºÇÔ¤·¤Þ¤¹." -#: src/main.cc:293 +#: src/main.cc:299 msgid "" " Specify files in multi-file torrent to download. Use in conjunction with " "the\n" @@ -1503,64 +1511,72 @@ msgstr "" "¥ó\n" " ¤È¶¦¤Ë»ÈÍѤ·¤Þ¤¹. --select-file ¥ª¥×¥·¥ç¥ó¤ÈÊ»ÍѤϤǤ­¤Þ¤»¤ó." -#: src/main.cc:297 +#: src/main.cc:303 msgid "Examples:" msgstr "Îã:" -#: src/main.cc:298 +#: src/main.cc:304 msgid " Download a file using 1 connection:" msgstr " 1 ¥³¥Í¥¯¥·¥ç¥ó¤Ç¤Î¥À¥¦¥ó¥í¡¼¥É:" -#: src/main.cc:300 +#: src/main.cc:306 msgid " Download a file using 2 connections:" msgstr " 2 ¥³¥Í¥¯¥·¥ç¥ó¤Ç¤Î¥À¥¦¥ó¥í¡¼¥É:" -#: src/main.cc:302 +#: src/main.cc:308 msgid "" " Download a file using 2 connections, each connects to a different server:" msgstr " Æó¤Ä¤Î°Û¤Ê¤ë¥µ¡¼¥Ð¡¼¤ËÀܳ¤·¤Æ¥À¥¦¥ó¥í¡¼¥É:" -#: src/main.cc:304 +#: src/main.cc:310 msgid " You can mix up different protocols:" msgstr " °Û¤Ê¤ë¥×¥í¥È¥³¥ë¤òº®¹ç¤µ¤»¤Æ¥À¥¦¥ó¥í¡¼¥É:" -#: src/main.cc:308 +#: src/main.cc:312 +msgid " Parameterized URI:" +msgstr "" + +#: src/main.cc:314 +msgid " Parameterized URI. -Z option must be specified:" +msgstr "" + +#: src/main.cc:318 msgid " Download a torrent:" msgstr " torrent ¤ò¥À¥¦¥ó¥í¡¼¥É:" -#: src/main.cc:310 +#: src/main.cc:320 msgid " Download a torrent using a local .torrent file:" msgstr " ¥í¡¼¥«¥ë .torrent ¥Õ¥¡¥¤¥ë¤ò»È¤Ã¤Æ¥À¥¦¥ó¥í¡¼¥É:" -#: src/main.cc:312 src/main.cc:325 +#: src/main.cc:322 src/main.cc:335 msgid " Download only selected files:" msgstr " ¥Õ¥¡¥¤¥ë¤ò»ØÄꤷ¤Æ¥À¥¦¥ó¥í¡¼¥É:" -#: src/main.cc:314 +#: src/main.cc:324 msgid " Print file listing of .torrent file:" msgstr " ¤³¤Î .torrent ¥Õ¥¡¥¤¥ë¤Ë´Þ¤Þ¤ì¤ë¥Õ¥¡¥¤¥ë¥ê¥¹¥È¤òɽ¼¨:" -#: src/main.cc:319 +#: src/main.cc:329 msgid " Metalink downloading:" msgstr " Metalink ¤Ç¥À¥¦¥ó¥í¡¼¥É:" -#: src/main.cc:321 +#: src/main.cc:331 msgid " Download a file using local .metalink file:" msgstr " ¥í¡¼¥«¥ë .metalink ¥Õ¥¡¥¤¥ë¤ò»È¤Ã¤Æ¥À¥¦¥ó¥í¡¼¥É:" -#: src/main.cc:323 +#: src/main.cc:333 msgid " Metalink downloading with preferences:" msgstr " ¥æ¡¼¥¶ÀßÄê¤Ë¤è¤ë Metalink ¥À¥¦¥ó¥í¡¼¥É:" -#: src/main.cc:327 +#: src/main.cc:337 msgid " Download only selected files using index:" msgstr " ¥Õ¥¡¥¤¥ë¤Î¥¤¥ó¥Ç¥Ã¥¯¥¹¤ò»ØÄꤷ¤Æ¥À¥¦¥ó¥í¡¼¥É:" -#: src/main.cc:329 +#: src/main.cc:339 msgid " Print file listing of .metalink file:" msgstr " ¤³¤Î .metalink ¥Õ¥¡¥¤¥ë¤Ë´Þ¤Þ¤ì¤ë¥Õ¥¡¥¤¥ë¥ê¥¹¥È¤òɽ¼¨:" -#: src/main.cc:333 +#: src/main.cc:343 #, c-format msgid "Report bugs to %s" msgstr "¥Ð¥°¥ì¥Ý¡¼¥È¤Ï¤³¤Á¤é¤Ø: %s" diff --git a/po/ru.gmo b/po/ru.gmo index c110b81d0f27f274929d125fe7e8e95a1cd254ec..256d21ee42b997929a25ed1ed65a8dbaa43e0804 100644 GIT binary patch delta 21 dcmZ1\n" "Language-Team: \n" @@ -820,11 +820,11 @@ msgstr "" msgid "Errors occurred while binding port.\n" msgstr "Ошибка при открытии порта.\n" -#: src/main.cc:89 +#: src/main.cc:91 msgid " version " msgstr " верÑÐ¸Ñ " -#: src/main.cc:99 +#: src/main.cc:101 #, fuzzy msgid "" "This program is free software; you can redistribute it and/or modify\n" @@ -856,42 +856,42 @@ msgstr "" "along with this program; if not, write to the Free Software\n" "Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n" -#: src/main.cc:113 +#: src/main.cc:115 #, fuzzy msgid "Contact Info:" msgstr "СвÑзь Ñ Ð°Ð²Ñ‚Ð¾Ñ€Ð¾Ð¼: %s\n" -#: src/main.cc:120 +#: src/main.cc:122 #, c-format msgid "Usage: %s [options] URL ...\n" msgstr "ИÑпользование: %s [параметры] URL ...\n" -#: src/main.cc:122 +#: src/main.cc:124 #, c-format msgid " %s [options] -T TORRENT_FILE FILE ...\n" msgstr " %s [параметры] -T TORRENT_FILE FILE ...\n" -#: src/main.cc:125 +#: src/main.cc:127 #, c-format msgid " %s [options] -M METALINK_FILE\n" msgstr " %s [параметры] -M METALINK_FILE\n" -#: src/main.cc:128 +#: src/main.cc:130 msgid "Options:" msgstr "Параметры:" -#: src/main.cc:129 +#: src/main.cc:131 #, fuzzy msgid "" " -d, --dir=DIR The directory to store the downloaded file." msgstr " -d, --dir=DIR Каталог Ð´Ð»Ñ ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ñкачанных файлов." -#: src/main.cc:130 +#: src/main.cc:132 #, fuzzy msgid " -o, --out=FILE The file name of the downloaded file." msgstr " -o, --out=FILE Ð˜Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð° Ð´Ð»Ñ Ñкачанного файла." -#: src/main.cc:131 +#: src/main.cc:133 #, fuzzy msgid "" " -l, --log=LOG The file name of the log file. If '-' is\n" @@ -900,11 +900,11 @@ msgstr "" " -l, --log=LOG Ð˜Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð° Ð´Ð»Ñ Ð»Ð¾Ð³Ð¾Ð². ЕÑли указано \"-\",\n" " логи будут выведены в stdout." -#: src/main.cc:134 +#: src/main.cc:136 msgid " -D, --daemon Run as daemon." msgstr " -D, --daemon ЗапуÑтить в качеÑтве демона." -#: src/main.cc:136 +#: src/main.cc:138 #, fuzzy msgid "" " -s, --split=N Download a file using N connections. N must " @@ -922,7 +922,7 @@ msgstr "" " Ð¡Ð»ÐµÐ´ÑƒÑ Ñтому, aria2 ÑоединÑетÑÑ Ðº каждому URL\n" " иÑÐ¿Ð¾Ð»ÑŒÐ·ÑƒÑ N Ñоединений." -#: src/main.cc:141 +#: src/main.cc:143 #, fuzzy msgid "" " --retry-wait=SEC Set the seconds to wait to retry after an " @@ -936,13 +936,13 @@ msgstr "" "60.\n" " По умолчанию: 5" -#: src/main.cc:144 +#: src/main.cc:146 #, fuzzy msgid " -t, --timeout=SEC Set timeout in seconds. Default: 60" msgstr "" " -t, --timeout=SEC УÑтановить таймаут в Ñекундах. По умолчанию: 60" -#: src/main.cc:145 +#: src/main.cc:147 msgid "" " -m, --max-tries=N Set number of tries. 0 means unlimited.\n" " Default: 5" @@ -950,7 +950,7 @@ msgstr "" " -m, --max-tries=N УÑтановить чиÑло попыток. 0 означает\n" " неограниченное чиÑло. По умолчанию: 5" -#: src/main.cc:153 +#: src/main.cc:155 #, fuzzy msgid "" " --http-proxy=HOST:PORT Use HTTP proxy server. This affects all URLs." @@ -958,21 +958,21 @@ msgstr "" " --http-proxy-user=USER УÑтановить Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ð´Ð»Ñ Ð¿Ñ€Ð¾ÐºÑи HTTP. Это " "влиÑет на вÑе URL." -#: src/main.cc:154 +#: src/main.cc:156 #, fuzzy msgid " --http-user=USER Set HTTP user. This affects all URLs." msgstr "" " --http-user=USER УÑтановить Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ð´Ð»Ñ HTTP. Это влиÑет " "на вÑе URL." -#: src/main.cc:155 +#: src/main.cc:157 #, fuzzy msgid " --http-passwd=PASSWD Set HTTP password. This affects all URLs." msgstr "" " --http-passwd=PASSWD УÑтановить пароль Ð´Ð»Ñ HTTP. Это влиÑет на вÑе " "URL." -#: src/main.cc:156 +#: src/main.cc:158 #, fuzzy msgid "" " --http-proxy-user=USER Set HTTP proxy user. This affects all URLs." @@ -980,7 +980,7 @@ msgstr "" " --http-proxy-user=USER УÑтановить Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ð´Ð»Ñ Ð¿Ñ€Ð¾ÐºÑи HTTP. Это " "влиÑет на вÑе URL." -#: src/main.cc:157 +#: src/main.cc:159 #, fuzzy msgid "" " --http-proxy-passwd=PASSWD Set HTTP proxy password. This affects all URLs." @@ -988,7 +988,7 @@ msgstr "" " --http-proxy-passwd=PASSWD УÑтановить пароль Ð´Ð»Ñ Ð¿Ñ€Ð¾ÐºÑи HTTP. Это влиÑет " "на вÑе URL." -#: src/main.cc:158 +#: src/main.cc:160 msgid "" " --http-proxy-method=METHOD Set the method to use in proxy request.\n" " METHOD is either 'get' or 'tunnel'.\n" @@ -1000,7 +1000,7 @@ msgstr "" " или \"tunnel\".\n" " По умолчанию: tunnel" -#: src/main.cc:161 +#: src/main.cc:163 msgid "" " --http-auth-scheme=SCHEME Set HTTP authentication scheme. Currently, " "basic\n" @@ -1011,13 +1011,13 @@ msgstr "" " момент доÑтупна только Ñхема \"basic\"\n" " По умолчанию: basic" -#: src/main.cc:164 +#: src/main.cc:166 #, fuzzy msgid " --referer=REFERER Set Referer. This affects all URLs." msgstr "" " --referer=REFERER УÑтановить реферер. Это влиÑет на вÑе URL." -#: src/main.cc:165 +#: src/main.cc:167 #, fuzzy msgid "" " --ftp-user=USER Set FTP user. This affects all URLs.\n" @@ -1027,7 +1027,7 @@ msgstr "" "URL.\n" " По умолчанию: anonymous" -#: src/main.cc:167 +#: src/main.cc:169 #, fuzzy msgid "" " --ftp-passwd=PASSWD Set FTP password. This affects all URLs.\n" @@ -1036,7 +1036,7 @@ msgstr "" " --ftp-passwd=PASSWD УÑтановить пароль FTP. Это влиÑет на вÑе URL.\n" " По умолчанию: ARIA2USER@" -#: src/main.cc:169 +#: src/main.cc:171 msgid "" " --ftp-type=TYPE Set FTP transfer type. TYPE is either " "'binary'\n" @@ -1047,11 +1047,11 @@ msgstr "" " или \"binary\", или \"ascii\".\n" " По умолчанию: binary" -#: src/main.cc:172 +#: src/main.cc:174 msgid " -p, --ftp-pasv Use passive mode in FTP." msgstr " -p, --ftp-pasv ИÑпользовать паÑÑивный режим Ð´Ð»Ñ FTP." -#: src/main.cc:173 +#: src/main.cc:175 msgid "" " --ftp-via-http-proxy=METHOD Use HTTP proxy in FTP. METHOD is either 'get' " "or\n" @@ -1063,7 +1063,7 @@ msgstr "" " быть \"get\" или \"tunnel\".\n" " По умолчанию: tunnel" -#: src/main.cc:176 +#: src/main.cc:178 #, fuzzy msgid "" " --lowest-speed-limit=SPEED Close connection if download speed is lower " @@ -1081,7 +1081,7 @@ msgstr "" "60.\n" " По умолчанию: 5" -#: src/main.cc:183 +#: src/main.cc:185 #, fuzzy msgid "" " --max-download-limit=SPEED Set max download speed in bytes per sec.\n" @@ -1094,7 +1094,7 @@ msgstr "" "60.\n" " По умолчанию: 5" -#: src/main.cc:187 +#: src/main.cc:189 #, fuzzy msgid "" " --file-allocation=METHOD Specify file allocation method. METHOD is " @@ -1113,7 +1113,7 @@ msgstr "" "60.\n" " По умолчанию: 5" -#: src/main.cc:193 +#: src/main.cc:195 #, fuzzy msgid "" " --allow-overwrite=true|false If false, aria2 doesn't download a file which\n" @@ -1128,7 +1128,15 @@ msgstr "" " файлы.\n" " По умолчанию: true" -#: src/main.cc:198 +#: src/main.cc:199 +msgid "" +" -Z, --force-sequential Fetch URIs in the command-line sequentially " +"and\n" +" download each URI in a separate session, like\n" +" the usual command-line download utilities." +msgstr "" + +#: src/main.cc:204 #, fuzzy msgid "" " --check-integrity=true|false Check file integrity by validating piece " @@ -1149,7 +1157,7 @@ msgstr "" "60.\n" " По умолчанию: 5" -#: src/main.cc:206 +#: src/main.cc:212 #, fuzzy msgid "" " --realtime-chunk-checksum=true|false Validate chunk checksum while\n" @@ -1165,7 +1173,7 @@ msgstr "" " файлы.\n" " По умолчанию: true" -#: src/main.cc:211 +#: src/main.cc:217 msgid "" " -c, --continue Continue downloading a partially downloaded\n" " file. Use this option to resume a download\n" @@ -1175,15 +1183,15 @@ msgid "" " applicable to http(s)/ftp downloads." msgstr "" -#: src/main.cc:217 +#: src/main.cc:223 msgid " -U, --user-agent=USER_AGENT Set user agent for http(s) downloads." msgstr "" -#: src/main.cc:218 +#: src/main.cc:224 msgid " -n, --no-netrc Disables netrc support." msgstr "" -#: src/main.cc:219 +#: src/main.cc:225 msgid "" " -i, --input-file=FILE Downloads URIs found in FILE. You can specify\n" " multiple URIs for a single entity: separate\n" @@ -1192,7 +1200,7 @@ msgid "" " Reads input from stdin when '-' is specified." msgstr "" -#: src/main.cc:223 +#: src/main.cc:229 #, fuzzy msgid "" " -j, --max-concurrent-downloads=N Set maximum number of concurrent " @@ -1203,13 +1211,13 @@ msgstr "" " -m, --max-tries=N УÑтановить чиÑло попыток. 0 означает\n" " неограниченное чиÑло. По умолчанию: 5" -#: src/main.cc:226 +#: src/main.cc:232 msgid "" " --load-cookies=FILE Load cookies from FILE. The format of FILE is\n" " the same used by Netscape and Mozilla." msgstr "" -#: src/main.cc:229 +#: src/main.cc:235 #, fuzzy msgid "" " -S, --show-files Print file listing of .torrent or .metalink " @@ -1218,7 +1226,7 @@ msgid "" msgstr "" " -S, --show-files ВывеÑти перечиÑленные .torrent файлы и выйти." -#: src/main.cc:231 +#: src/main.cc:237 #, fuzzy msgid "" " --select-file=INDEX... Set file to download by specifing its index.\n" @@ -1240,12 +1248,12 @@ msgstr "" " Также вы можете иÑпользовать тире (\"1-5\").\n" " \",\" и \"-\" могут быть иÑпользованы вмеÑте." -#: src/main.cc:241 +#: src/main.cc:247 #, fuzzy msgid " -T, --torrent-file=TORRENT_FILE The path to the .torrent file." msgstr " -T, --torrent-file=TORRENT_FILE Путь до .torrent-файла." -#: src/main.cc:242 +#: src/main.cc:248 #, fuzzy msgid "" " --follow-torrent=true|false Set to false to prevent aria2 from\n" @@ -1260,7 +1268,7 @@ msgstr "" " файлы.\n" " По умолчанию: true" -#: src/main.cc:246 +#: src/main.cc:252 msgid "" " --direct-file-mapping=true|false Directly read from and write to each file\n" " mentioned in .torrent file.\n" @@ -1270,7 +1278,7 @@ msgstr "" " опиÑанный в .torrent-файл.\n" " По умолчанию: true" -#: src/main.cc:249 +#: src/main.cc:255 #, fuzzy msgid "" " --listen-port=PORT Set TCP port number for BitTorrent downloads.\n" @@ -1278,7 +1286,7 @@ msgid "" msgstr "" " --listen-port=PORT УÑтановить порт Ð´Ð»Ñ Ð¿Ñ€Ð¾ÑÐ»ÑƒÑˆÐ¸Ð²Ð°Ð½Ð¸Ñ ÑоединениÑ." -#: src/main.cc:251 +#: src/main.cc:257 #, fuzzy msgid "" " --max-upload-limit=SPEED Set max upload speed in bytes per sec.\n" @@ -1291,7 +1299,7 @@ msgstr "" "60.\n" " По умолчанию: 5" -#: src/main.cc:255 +#: src/main.cc:261 #, fuzzy msgid "" " --seed-time=MINUTES Specify seeding time in minutes. Also see the\n" @@ -1300,7 +1308,7 @@ msgstr "" " -m, --max-tries=N УÑтановить чиÑло попыток. 0 означает\n" " неограниченное чиÑло. По умолчанию: 5" -#: src/main.cc:257 +#: src/main.cc:263 #, fuzzy msgid "" " --seed-ratio=RATIO Specify share ratio. Seed completed torrents\n" @@ -1317,7 +1325,7 @@ msgstr "" " Ð¡Ð»ÐµÐ´ÑƒÑ Ñтому, aria2 ÑоединÑетÑÑ Ðº каждому URL\n" " иÑÐ¿Ð¾Ð»ÑŒÐ·ÑƒÑ N Ñоединений." -#: src/main.cc:262 +#: src/main.cc:268 msgid "" " --peer-id-prefix=PEERI_ID_PREFIX Specify the prefix of peer ID. The peer ID " "in\n" @@ -1330,12 +1338,12 @@ msgid "" " Default: -aria2-" msgstr "" -#: src/main.cc:271 +#: src/main.cc:277 #, fuzzy msgid " -M, --metalink-file=METALINK_FILE The file path to the .metalink file." msgstr " -M, --metalink-file=METALINK_FILE Путь к .metalink-файлу." -#: src/main.cc:272 +#: src/main.cc:278 #, fuzzy msgid "" " -C, --metalink-servers=NUM_SERVERS The number of servers to connect to\n" @@ -1348,27 +1356,27 @@ msgstr "" "параметр -s.\n" " По умолчанию: 15" -#: src/main.cc:275 +#: src/main.cc:281 #, fuzzy msgid " --metalink-version=VERSION The version of the file to download." msgstr " --metalink-version=VERSION ВерÑÐ¸Ñ Ñ„Ð°Ð¹Ð»Ð° Ð´Ð»Ñ ÑкачиваниÑ." -#: src/main.cc:276 +#: src/main.cc:282 #, fuzzy msgid " --metalink-language=LANGUAGE The language of the file to download." msgstr " --metalink-language=LANGUAGE Язык файла Ð´Ð»Ñ ÑкачиваниÑ." -#: src/main.cc:277 +#: src/main.cc:283 #, fuzzy msgid "" " --metalink-os=OS The operating system of the file to download." msgstr " --metalink-os=OS Ð¦ÐµÐ»ÐµÐ²Ð°Ñ Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ð¾Ð½Ð½Ð°Ñ ÑиÑтема файла." -#: src/main.cc:278 +#: src/main.cc:284 msgid " --metalink-location=LOCATION The location of the prefered server." msgstr "" -#: src/main.cc:279 +#: src/main.cc:285 #, fuzzy msgid "" " --follow-metalink=true|false Set to false to prevent aria2 from\n" @@ -1383,15 +1391,15 @@ msgstr "" " файлы.\n" " По умолчанию: true" -#: src/main.cc:284 +#: src/main.cc:290 msgid " -v, --version Print the version number and exit." msgstr " -v, --version ВывеÑти номер верÑии и выйти." -#: src/main.cc:285 +#: src/main.cc:291 msgid " -h, --help Print this message and exit." msgstr " -h, --help ВывеÑти Ñто Ñообщение и выйти." -#: src/main.cc:288 +#: src/main.cc:294 #, fuzzy msgid "" " You can specify multiple URLs. All URLs must point to the same file\n" @@ -1400,7 +1408,7 @@ msgstr "" " Ð’Ñ‹ можете указать неÑколько URL. Ð’Ñе URL должны указывать на один и тот же\n" " файл, иначе Ñкачивание завершитÑÑ Ð½ÐµÑƒÐ´Ð°Ñ‡ÐµÐ¹." -#: src/main.cc:293 +#: src/main.cc:299 #, fuzzy msgid "" " Specify files in multi-file torrent to download. Use in conjunction with " @@ -1410,70 +1418,78 @@ msgstr "" " Указать файлы Ð´Ð»Ñ ÑÐºÐ°Ñ‡Ð¸Ð²Ð°Ð½Ð¸Ñ Ð¿Ñ€Ð¸ многофайловом torent. ИÑпользуйте вмеÑте\n" " Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¾Ð¼ -T. Этот параметр игнорируетÑÑ Ð¿Ñ€Ð¸ указании --select-file." -#: src/main.cc:297 +#: src/main.cc:303 msgid "Examples:" msgstr "Примеры:" -#: src/main.cc:298 +#: src/main.cc:304 #, fuzzy msgid " Download a file using 1 connection:" msgstr " Скачать файл Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ 1 ÑоединениÑ:" -#: src/main.cc:300 +#: src/main.cc:306 #, fuzzy msgid " Download a file using 2 connections:" msgstr " Скачать файл Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ 2 Ñоединений:" -#: src/main.cc:302 +#: src/main.cc:308 #, fuzzy msgid "" " Download a file using 2 connections, each connects to a different server:" msgstr " Скачать файл Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ 2 Ñоединений к различным Ñерверам:" -#: src/main.cc:304 +#: src/main.cc:310 msgid " You can mix up different protocols:" msgstr " Ð’Ñ‹ можете Ñмешивать различные протоколы:" -#: src/main.cc:308 +#: src/main.cc:312 +msgid " Parameterized URI:" +msgstr "" + +#: src/main.cc:314 +msgid " Parameterized URI. -Z option must be specified:" +msgstr "" + +#: src/main.cc:318 msgid " Download a torrent:" msgstr " Скачать torrent:" -#: src/main.cc:310 +#: src/main.cc:320 #, fuzzy msgid " Download a torrent using a local .torrent file:" msgstr " Скачать torrent Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ локального .torrent-файла:" -#: src/main.cc:312 src/main.cc:325 +#: src/main.cc:322 src/main.cc:335 msgid " Download only selected files:" msgstr " Скачать только выбранные файлы:" -#: src/main.cc:314 +#: src/main.cc:324 msgid " Print file listing of .torrent file:" msgstr " ВывеÑти ÑпиÑок фалов из .torrent" -#: src/main.cc:319 +#: src/main.cc:329 msgid " Metalink downloading:" msgstr " Скачать metalink:" -#: src/main.cc:321 +#: src/main.cc:331 msgid " Download a file using local .metalink file:" msgstr " Скачать файл Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ локального .metalink-файла:" -#: src/main.cc:323 +#: src/main.cc:333 msgid " Metalink downloading with preferences:" msgstr " Скачивание metalink Ñ Ð½Ð°Ñтройками:" -#: src/main.cc:327 +#: src/main.cc:337 #, fuzzy msgid " Download only selected files using index:" msgstr " Скачать только выбранные файлы:" -#: src/main.cc:329 +#: src/main.cc:339 #, fuzzy msgid " Print file listing of .metalink file:" msgstr " ВывеÑти ÑпиÑок фалов из .torrent" -#: src/main.cc:333 +#: src/main.cc:343 #, c-format msgid "Report bugs to %s" msgstr "Ð¡Ð¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ð¾Ð± ошибках направлÑйте на Ð°Ð´Ñ€ÐµÑ %s" diff --git a/src/AlphaNumberDecorator.h b/src/AlphaNumberDecorator.h new file mode 100644 index 00000000..03f9dc7a --- /dev/null +++ b/src/AlphaNumberDecorator.h @@ -0,0 +1,84 @@ +/* */ +#ifndef _D_ALPHA_NUMBER_DECORATOR_H_ +#define _D_ALPHA_NUMBER_DECORATOR_H_ + +#include "NumberDecorator.h" +#include "FatalException.h" + +class AlphaNumberDecorator : public NumberDecorator +{ +private: + + int32_t _width; + + string _zero; + + string widen(const string& s, int32_t width) + { + string t = s; + while(t.size() < (size_t)width) { + t.insert(0, _zero); + } + return t; + } + +public: + AlphaNumberDecorator(int32_t width, bool uppercase = false): + _width(width), _zero(uppercase?"A":"a") {} + + virtual ~AlphaNumberDecorator() {} + + virtual string decorate(int32_t number) + { + if(number < 0) { + throw new FatalException("The number must be greater than 0."); + } + if(number == 0) { + return widen(_zero, _width); + } + int32_t base = 26; + string x; + while(number > 0) { + int32_t r = number%base; + char alpha = _zero[0]+r; + x.insert(0, string(1, alpha)); + number /= base; + } + return widen(x, _width); + } +}; + +#endif // _D_ALPHA_NUMBER_DECORATOR_H_ diff --git a/src/FixedWidthNumberDecorator.h b/src/FixedWidthNumberDecorator.h new file mode 100644 index 00000000..6ee8160d --- /dev/null +++ b/src/FixedWidthNumberDecorator.h @@ -0,0 +1,60 @@ +/* */ +#ifndef _D_FIXED_WIDTH_NUMBER_DECORATOR_H_ +#define _D_FIXED_WIDTH_NUMBER_DECORATOR_H_ + +#include "NumberDecorator.h" +#include "Util.h" + +class FixedWidthNumberDecorator : public NumberDecorator +{ +private: + int32_t _width; +public: + FixedWidthNumberDecorator(int32_t width):_width(width) {} + + virtual ~FixedWidthNumberDecorator() {} + + virtual string decorate(int32_t number) + { + string s = Util::itos(number); + while(s.size() < (size_t)_width) { + s.insert(0, "0"); + } + return s; + } +}; + +#endif // _D_FIXED_WIDTH_NUMBER_DECORATOR_H_ diff --git a/src/Makefile.am b/src/Makefile.am index 0fa8004d..697b4af4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -98,7 +98,17 @@ SRCS = Socket.h\ CookieBoxFactory.cc CookieBoxFactory.h\ HttpHeaderProcessor.cc HttpHeaderProcessor.h\ FileEntry.cc FileEntry.h\ - Platform.cc Platform.h + Platform.cc Platform.h\ + PStringDatum.h\ + PStringSegment.cc PStringSegment.h\ + PStringNumLoop.h\ + PStringSelect.h\ + PStringVisitor.h\ + PStringBuildVisitor.cc PStringBuildVisitor.h\ + ParameterizedStringParser.cc ParameterizedStringParser.h\ + FixedWidthNumberDecorator.h\ + NumberDecorator.h\ + AlphaNumberDecorator.h # debug_new.cpp if ENABLE_MESSAGE_DIGEST diff --git a/src/Makefile.in b/src/Makefile.in index 6e00d78e..cba6ff5d 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -256,8 +256,13 @@ am__libaria2c_a_SOURCES_DIST = Socket.h SocketCore.cc SocketCore.h \ CookieParser.cc CookieParser.h CookieBoxFactory.cc \ CookieBoxFactory.h HttpHeaderProcessor.cc \ HttpHeaderProcessor.h FileEntry.cc FileEntry.h Platform.cc \ - Platform.h ChunkChecksumValidator.cc ChunkChecksumValidator.h \ - IteratableChunkChecksumValidator.cc \ + Platform.h PStringDatum.h PStringSegment.cc PStringSegment.h \ + PStringNumLoop.h PStringSelect.h PStringVisitor.h \ + PStringBuildVisitor.cc PStringBuildVisitor.h \ + ParameterizedStringParser.cc ParameterizedStringParser.h \ + FixedWidthNumberDecorator.h NumberDecorator.h \ + AlphaNumberDecorator.h ChunkChecksumValidator.cc \ + ChunkChecksumValidator.h IteratableChunkChecksumValidator.cc \ IteratableChunkChecksumValidator.h \ IteratableChecksumValidator.cc IteratableChecksumValidator.h \ ChecksumCommand.cc ChecksumCommand.h CheckIntegrityCommand.cc \ @@ -464,7 +469,9 @@ am__objects_12 = SocketCore.$(OBJEXT) Command.$(OBJEXT) \ RealtimeCommand.$(OBJEXT) RequestGroupEntry.$(OBJEXT) \ Cookie.$(OBJEXT) CookieParser.$(OBJEXT) \ CookieBoxFactory.$(OBJEXT) HttpHeaderProcessor.$(OBJEXT) \ - FileEntry.$(OBJEXT) Platform.$(OBJEXT) $(am__objects_1) \ + FileEntry.$(OBJEXT) Platform.$(OBJEXT) \ + PStringSegment.$(OBJEXT) PStringBuildVisitor.$(OBJEXT) \ + ParameterizedStringParser.$(OBJEXT) $(am__objects_1) \ $(am__objects_2) $(am__objects_3) $(am__objects_4) \ $(am__objects_5) $(am__objects_6) $(am__objects_7) \ $(am__objects_8) $(am__objects_9) $(am__objects_10) \ @@ -721,10 +728,15 @@ SRCS = Socket.h SocketCore.cc SocketCore.h Command.cc Command.h \ CookieParser.cc CookieParser.h CookieBoxFactory.cc \ CookieBoxFactory.h HttpHeaderProcessor.cc \ HttpHeaderProcessor.h FileEntry.cc FileEntry.h Platform.cc \ - Platform.h $(am__append_1) $(am__append_2) $(am__append_3) \ - $(am__append_4) $(am__append_5) $(am__append_6) \ - $(am__append_7) $(am__append_8) $(am__append_9) \ - $(am__append_10) $(am__append_11) + Platform.h PStringDatum.h PStringSegment.cc PStringSegment.h \ + PStringNumLoop.h PStringSelect.h PStringVisitor.h \ + PStringBuildVisitor.cc PStringBuildVisitor.h \ + ParameterizedStringParser.cc ParameterizedStringParser.h \ + FixedWidthNumberDecorator.h NumberDecorator.h \ + AlphaNumberDecorator.h $(am__append_1) $(am__append_2) \ + $(am__append_3) $(am__append_4) $(am__append_5) \ + $(am__append_6) $(am__append_7) $(am__append_8) \ + $(am__append_9) $(am__append_10) $(am__append_11) noinst_LIBRARIES = libaria2c.a libaria2c_a_SOURCES = $(SRCS) aria2c_LDADD = libaria2c.a @LIBINTL@ @ALLOCA@ @LIBGNUTLS_LIBS@\ @@ -927,6 +939,9 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Option.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OptionHandlerFactory.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OptionParser.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PStringBuildVisitor.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PStringSegment.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ParameterizedStringParser.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Peer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PeerAbstractCommand.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PeerChokeCommand.Po@am__quote@ diff --git a/src/NumberDecorator.h b/src/NumberDecorator.h new file mode 100644 index 00000000..0f0f2733 --- /dev/null +++ b/src/NumberDecorator.h @@ -0,0 +1,49 @@ +/* */ +#ifndef _D_NUMBER_DECORATOR_H_ +#define _D_NUMBER_DECORATOR_H_ + +#include "common.h" + +class NumberDecorator { +public: + virtual ~NumberDecorator() {} + + virtual string decorate(int32_t number) = 0; +}; + +typedef SharedHandle NumberDecoratorHandle; + +#endif // _D_NUMBER_DECORATOR_H_ diff --git a/src/OptionHandlerFactory.cc b/src/OptionHandlerFactory.cc index 14718731..c3d466d5 100644 --- a/src/OptionHandlerFactory.cc +++ b/src/OptionHandlerFactory.cc @@ -94,6 +94,7 @@ OptionHandlers OptionHandlerFactory::createOptionHandlers() handlers.push_back(new NumberOptionHandler(PREF_MAX_CONCURRENT_DOWNLOADS, 1, 45)); handlers.push_back(new DefaultOptionHandler(PREF_LOAD_COOKIES)); handlers.push_back(new DefaultOptionHandler(PREF_PEER_ID_PREFIX)); + handlers.push_back(new BooleanOptionHandler(PREF_FORCE_SEQUENTIAL)); return handlers; } diff --git a/src/PStringBuildVisitor.cc b/src/PStringBuildVisitor.cc new file mode 100644 index 00000000..7487b45b --- /dev/null +++ b/src/PStringBuildVisitor.cc @@ -0,0 +1,54 @@ +/* */ +#include "PStringBuildVisitor.h" + +void PStringBuildVisitor::hello(PStringSegment* segment) +{ + string uri; + if(_buildQueue.empty()) { + uri += segment->getValue(); + } else { + uri = _buildQueue.front()+segment->getValue(); + } + _buildQueue.push_front(uri); + if(!segment->hasNext()) { + _uris.push_back(uri); + } +} + +void PStringBuildVisitor::goodbye(PStringSegment* segment) +{ + _buildQueue.pop_front(); +} diff --git a/src/PStringBuildVisitor.h b/src/PStringBuildVisitor.h new file mode 100644 index 00000000..4bb01d07 --- /dev/null +++ b/src/PStringBuildVisitor.h @@ -0,0 +1,68 @@ +/* */ +#ifndef _D_P_STRING_BUILD_VISITOR_H_ +#define _D_P_STRING_BUILD_VISITOR_H_ + +#include "PStringSegment.h" + +class PStringBuildVisitor : public PStringVisitor, public PStringSegmentVisitor +{ +private: + + Strings _buildQueue; + + Strings _uris; + +public: + + virtual void hello(PStringSegment* segment); + + virtual void goodbye(PStringSegment* segment); + + const Strings& getURIs() const + { + return _uris; + } + + void reset() + { + _buildQueue.clear(); + _uris.clear(); + } +}; + +typedef SharedHandle PStringBuildVisitorHandle; + +#endif // _D_P_STRING_BUILD_VISITOR_H_ diff --git a/src/PStringDatum.h b/src/PStringDatum.h new file mode 100644 index 00000000..7a000ce2 --- /dev/null +++ b/src/PStringDatum.h @@ -0,0 +1,51 @@ +/* */ +#ifndef _D_P_STRING_DATUM_H_ +#define _D_P_STRING_DATUM_H_ + +#include "common.h" +#include "PStringVisitor.h" + +class PStringDatum { +public: + virtual ~PStringDatum() {} + + virtual void accept(const PStringVisitorHandle& visitor) = 0; +}; + +typedef SharedHandle PStringDatumHandle; +typedef deque PStringData; + +#endif // _D_P_STRING_DATUM_H_ diff --git a/src/PStringNumLoop.h b/src/PStringNumLoop.h new file mode 100644 index 00000000..1717d236 --- /dev/null +++ b/src/PStringNumLoop.h @@ -0,0 +1,100 @@ +/* */ +#ifndef _D_P_STRING_NUM_LOOP_H_ +#define _D_P_STRING_NUM_LOOP_H_ + +#include "PStringDatum.h" +#include "Util.h" +#include "PStringSegment.h" +#include "NumberDecorator.h" + +class PStringNumLoop : public PStringDatum +{ +private: + + int32_t _startValue; + + int32_t _endValue; + + int32_t _step; + + NumberDecoratorHandle _numberDecorator; + + PStringDatumHandle _next; + +public: + PStringNumLoop(int32_t startValue, int32_t endValue, int32_t step, + const NumberDecoratorHandle& nd, + const PStringDatumHandle& next = 0): + _startValue(startValue), + _endValue(endValue), + _step(step), + _numberDecorator(nd), + _next(next) {} + + virtual ~PStringNumLoop() {} + + virtual void accept(const PStringVisitorHandle& visitor) + { + for(int32_t i = _startValue; i <= _endValue; i += _step) { + PStringSegment(_numberDecorator->decorate(i), _next).accept(visitor); + } + } + + PStringDatumHandle getNext() const + { + return _next; + } + + int32_t getStartValue() const + { + return _startValue; + } + + int32_t getEndValue() const + { + return _endValue; + } + + int32_t getStep() const + { + return _step; + } + +}; + +typedef SharedHandle PStringNumLoopHandle; + +#endif // _D_P_STRING_NUM_LOOP_H_ diff --git a/src/PStringSegment.cc b/src/PStringSegment.cc new file mode 100644 index 00000000..28d9796b --- /dev/null +++ b/src/PStringSegment.cc @@ -0,0 +1,49 @@ +/* */ +#include "PStringSegment.h" +#include "FatalException.h" + +void PStringSegment::accept(const PStringVisitorHandle& visitor) +{ + PStringSegmentVisitorHandle v = visitor; + if(v.isNull()) { + throw new FatalException("Class cast exception"); + } + v->hello(this); + if(!_next.isNull()) { + _next->accept(visitor); + } + v->goodbye(this); +} diff --git a/src/PStringSegment.h b/src/PStringSegment.h new file mode 100644 index 00000000..ac35bb81 --- /dev/null +++ b/src/PStringSegment.h @@ -0,0 +1,89 @@ +/* */ +#ifndef _D_P_STRING_SEGMENT_H_ +#define _D_P_STRING_SEGMENT_H_ + +#include "PStringDatum.h" + +class PStringSegmentVisitor; + +typedef SharedHandle PStringSegmentVisitorHandle; + +class PStringSegment : public PStringDatum +{ +private: + + string _value; + + PStringDatumHandle _next; + +public: + PStringSegment(const string& value, const PStringDatumHandle& next = 0): + _value(value), _next(next) {} + + virtual ~PStringSegment() {} + + virtual void accept(const PStringVisitorHandle& visitor); + + const string& getValue() const + { + return _value; + } + + bool hasNext() const + { + return !_next.isNull(); + } + + PStringDatumHandle getNext() const + { + return _next; + } +}; + +typedef SharedHandle PStringSegmentHandle; + +class PStringSegmentVisitor { +public: + virtual ~PStringSegmentVisitor() {} + + virtual void hello(PStringSegment* s) = 0; + + virtual void goodbye(PStringSegment* s) = 0; +}; + +typedef SharedHandle PStringSegmentVisitorHandle; + +#endif // _D_P_STRING_SEGMENT_H_ diff --git a/src/PStringSelect.h b/src/PStringSelect.h new file mode 100644 index 00000000..305ef9d9 --- /dev/null +++ b/src/PStringSelect.h @@ -0,0 +1,76 @@ +/* */ +#ifndef _D_P_STRING_SELECT_H_ +#define _D_P_STRING_SELECT_H_ + +#include "PStringDatum.h" +#include "PStringSegment.h" + +class PStringSelect : public PStringDatum +{ +private: + + Strings _values; + + PStringDatumHandle _next; + +public: + PStringSelect(const Strings& values, const PStringDatumHandle& next = 0): + _values(values), + _next(next) {} + + virtual ~PStringSelect() {} + + virtual void accept(const PStringVisitorHandle& visitor) + { + for(Strings::iterator itr = _values.begin(); itr != _values.end(); ++itr) { + PStringSegment(*itr, _next).accept(visitor); + } + } + + const Strings& getValues() const + { + return _values; + } + + PStringDatumHandle getNext() const + { + return _next; + } +}; + +typedef SharedHandle PStringSelectHandle; + +#endif // _D_P_STRING_SELECT_H_ diff --git a/src/PStringVisitor.h b/src/PStringVisitor.h new file mode 100644 index 00000000..8c8c9807 --- /dev/null +++ b/src/PStringVisitor.h @@ -0,0 +1,47 @@ +/* */ +#ifndef _D_P_STRING_VISITOR_H_ +#define _D_P_STRING_VISITOR_H_ + +#include "common.h" + +class PStringVisitor { +public: + virtual ~PStringVisitor() {} +}; + +typedef SharedHandle PStringVisitorHandle; + +#endif // _D_P_STRING_VISITOR_H_ diff --git a/src/ParameterizedStringParser.cc b/src/ParameterizedStringParser.cc new file mode 100644 index 00000000..4eef3574 --- /dev/null +++ b/src/ParameterizedStringParser.cc @@ -0,0 +1,145 @@ +/* */ +#include "ParameterizedStringParser.h" +#include "FatalException.h" +#include "Util.h" +#include "PStringSegment.h" +#include "PStringSelect.h" +#include "PStringNumLoop.h" +#include "NumberDecorator.h" +#include "FixedWidthNumberDecorator.h" +#include "AlphaNumberDecorator.h" + +PStringDatumHandle ParameterizedStringParser::parse(const string& src) +{ + int32_t offset = 0; + return diggPString(src, offset); +} + +PStringDatumHandle ParameterizedStringParser::diggPString(const string& src, + int32_t& offset) +{ + if(src.size() == (size_t)offset) { + return 0; + } + switch(src[offset]) { + case '[': + return createLoop(src, offset); + case '{': + return createSelect(src, offset); + default: + return createSegment(src, offset); + } +} + +PStringDatumHandle ParameterizedStringParser::createSegment(const string& src, + int32_t& offset) +{ + string::size_type nextDelimiterIndex = src.find_first_of("[{", offset); + if(nextDelimiterIndex == string::npos) { + nextDelimiterIndex = src.size(); + } + string value = src.substr(offset, nextDelimiterIndex-offset); + offset = nextDelimiterIndex; + PStringDatumHandle next = diggPString(src, offset); + return new PStringSegment(value, next); +} + +PStringDatumHandle ParameterizedStringParser::createSelect(const string& src, + int32_t& offset) +{ + ++offset; + string::size_type rightParenIndex = src.find("}", offset); + if(rightParenIndex == string::npos) { + throw new FatalException("Missing '}' in the parameterized string."); + } + Strings values; + Util::slice(values, src.substr(offset, rightParenIndex-offset), ',', true); + if(values.empty()) { + throw new FatalException("Empty {} is not allowed."); + } + offset = rightParenIndex+1; + PStringDatumHandle next = diggPString(src, offset); + return new PStringSelect(values, next); +} + +PStringDatumHandle ParameterizedStringParser::createLoop(const string& src, + int32_t& offset) +{ + ++offset; + string::size_type rightParenIndex = src.find("]", offset); + if(rightParenIndex == string::npos) { + throw new FatalException("Missing ']' in the parameterized string."); + } + string loopStr = src.substr(offset, rightParenIndex-offset); + offset = rightParenIndex+1; + + int32_t step = 1; + string::size_type colonIndex = loopStr.find(":"); + if(colonIndex != string::npos) { + string stepStr = loopStr.substr(colonIndex+1); + if(Util::isNumber(stepStr)) { + step = strtol(stepStr.c_str(), 0, 10); + } else { + throw new FatalException("A step count must be a number."); + } + loopStr.erase(colonIndex); + } + pair range = Util::split(loopStr, "-"); + if(range.first == "" || range.second == "") { + throw new FatalException("Loop range missing."); + } + NumberDecoratorHandle nd = 0; + int32_t start; + int32_t end; + if(Util::isNumber(range.first) && Util::isNumber(range.second)) { + nd = new FixedWidthNumberDecorator(range.first.size()); + start = strtol(range.first.c_str(), 0, 10); + end = strtol(range.second.c_str(), 0, 10); + } else if(Util::isLowercase(range.first) && Util::isLowercase(range.second)) { + nd = new AlphaNumberDecorator(range.first.size()); + start = Util::alphaToNum(range.first); + end = Util::alphaToNum(range.second); + } else if(Util::isUppercase(range.first) && Util::isUppercase(range.second)) { + nd = new AlphaNumberDecorator(range.first.size(), true); + start = Util::alphaToNum(range.first); + end = Util::alphaToNum(range.second); + } else { + throw new FatalException("Invalid loop range."); + } + + PStringDatumHandle next = diggPString(src, offset); + return new PStringNumLoop(start, end, step, nd, next); +} diff --git a/src/ParameterizedStringParser.h b/src/ParameterizedStringParser.h new file mode 100644 index 00000000..10077a7a --- /dev/null +++ b/src/ParameterizedStringParser.h @@ -0,0 +1,56 @@ +/* */ +#ifndef _D_PARAMETERIZED_STRING_PARSER_H_ +#define _D_PARAMETERIZED_STRING_PARSER_H_ + +#include "common.h" +#include "PStringDatum.h" + +class ParameterizedStringParser { +private: + PStringDatumHandle diggPString(const string& src, int32_t& offset); + + PStringDatumHandle createSegment(const string& src, int32_t& offset); + + PStringDatumHandle createLoop(const string& src, int32_t& offset); + + PStringDatumHandle createSelect(const string& src, int32_t& offset); + + +public: + PStringDatumHandle parse(const string& parameterizedUri); +}; + +#endif // _D_PARAMETERIZED_STRING_PARSER_H_ diff --git a/src/RequestInfo.h b/src/RequestInfo.h index 69365963..99f35633 100644 --- a/src/RequestInfo.h +++ b/src/RequestInfo.h @@ -62,6 +62,7 @@ protected: printf(_("\nSome downloads were not complete because of errors." " Check the log.\n" "aria2 will resume download if the transfer is restarted.")); + printf("\n"); } public: RequestInfo(Option* op): diff --git a/src/Util.cc b/src/Util.cc index e5805bb3..bbd31465 100644 --- a/src/Util.cc +++ b/src/Util.cc @@ -694,3 +694,62 @@ void Util::usleep(long microseconds) { #error no usleep function is available (nanosleep?) #endif } + +bool Util::isNumber(const string& what) +{ + if(what.empty()) { + return false; + } + for(uint32_t i = 0; i < what.size(); ++i) { + if(!isdigit(what[i])) { + return false; + } + } + return true; +} + +bool Util::isLowercase(const string& what) +{ + if(what.empty()) { + return false; + } + for(uint32_t i = 0; i < what.size(); ++i) { + if(!('a' <= what[i] && what[i] <= 'z')) { + return false; + } + } + return true; +} + +bool Util::isUppercase(const string& what) +{ + if(what.empty()) { + return false; + } + for(uint32_t i = 0; i < what.size(); ++i) { + if(!('A' <= what[i] && what[i] <= 'Z')) { + return false; + } + } + return true; +} + +int32_t Util::alphaToNum(const string& alphabets) +{ + if(alphabets.empty()) { + return 0; + } + char base; + if(islower(alphabets[0])) { + base = 'a'; + } else { + base = 'A'; + } + int32_t num = 0; + for(uint32_t i = 0; i < alphabets.size(); ++i) { + int32_t v = alphabets[i]-base; + num = num*26+v; + } + return num; +} + diff --git a/src/Util.h b/src/Util.h index 6d733636..66163f2d 100644 --- a/src/Util.h +++ b/src/Util.h @@ -135,6 +135,14 @@ public: static void sleep(long seconds); static void usleep(long microseconds); + + static bool isNumber(const string& what); + + static bool isLowercase(const string& what); + + static bool isUppercase(const string& what); + + static int32_t alphaToNum(const string& alphabets); }; #endif // _D_UTIL_H_ diff --git a/src/main.cc b/src/main.cc index e8ce8aba..4b79ce2c 100644 --- a/src/main.cc +++ b/src/main.cc @@ -57,6 +57,8 @@ #include "a2time.h" #include "Platform.h" #include "prefs.h" +#include "ParameterizedStringParser.h" +#include "PStringBuildVisitor.h" #include #include #include @@ -194,6 +196,10 @@ void showUsage() { " already exists but the corresponding .aria2 file\n" " doesn't exist.\n" " Default: false") << endl; + cout << _(" -Z, --force-sequential Fetch URIs in the command-line sequentially and\n" + " download each URI in a separate session, like\n" + " the usual command-line download utilities.") << endl; + #ifdef ENABLE_MESSAGE_DIGEST cout << _(" --check-integrity=true|false Check file integrity by validating piece hash.\n" " This option only affects in BitTorrent downloads\n" @@ -303,6 +309,10 @@ void showUsage() { cout << " aria2c http://AAA.BBB.CCC/file.zip http://DDD.EEE.FFF/GGG/file.zip" << endl; cout << _(" You can mix up different protocols:") << endl; cout << " aria2c http://AAA.BBB.CCC/file.zip ftp://DDD.EEE.FFF/GGG/file.zip" << endl; + cout << _(" Parameterized URI:") << endl; + cout << " aria2c http://{server1,server2,server3}/file.iso" << endl; + cout << _(" Parameterized URI. -Z option must be specified:") << endl; + cout << " aria2c -Z http://host/file[001-100].img" << endl; #ifdef ENABLE_BITTORRENT cout << endl; cout << _(" Download a torrent:") << endl; @@ -334,6 +344,20 @@ void showUsage() { cout << endl; } +Strings unfoldURI(const Strings& args) +{ + Strings nargs; + ParameterizedStringParser p; + PStringBuildVisitorHandle v = new PStringBuildVisitor(); + for(Strings::const_iterator itr = args.begin(); itr != args.end(); + ++itr) { + v->reset(); + p.parse(*itr)->accept(v); + nargs.insert(nargs.end(), v->getURIs().begin(), v->getURIs().end()); + } + return nargs; +} + int main(int argc, char* argv[]) { #ifdef HAVE_WINSOCK2_H Platform platform; @@ -400,6 +424,7 @@ int main(int argc, char* argv[]) { op->put(PREF_NO_NETRC, V_FALSE); op->put(PREF_MAX_CONCURRENT_DOWNLOADS, "5"); op->put(PREF_DIRECT_DOWNLOAD_TIMEOUT, "15"); + op->put(PREF_FORCE_SEQUENTIAL, V_FALSE); while(1) { int optIndex = 0; int lopt; @@ -432,6 +457,7 @@ int main(int argc, char* argv[]) { { "max-download-limit", required_argument, &lopt, 201 }, { "file-allocation", required_argument, 0, 'a' }, { "allow-overwrite", required_argument, &lopt, 202 }, + { "force-sequential", no_argument, 0, 'Z' }, #ifdef ENABLE_MESSAGE_DIGEST { "check-integrity", required_argument, &lopt, 203 }, { "realtime-chunk-checksum", required_argument, &lopt, 204 }, @@ -472,7 +498,7 @@ int main(int argc, char* argv[]) { { "help", no_argument, NULL, 'h' }, { 0, 0, 0, 0 } }; - c = getopt_long(argc, argv, "Dd:o:l:s:pt:m:vhST:M:C:a:cU:ni:j:", longOpts, &optIndex); + c = getopt_long(argc, argv, "Dd:o:l:s:pt:m:vhST:M:C:a:cU:ni:j:Z", longOpts, &optIndex); if(c == -1) { break; } @@ -639,6 +665,9 @@ int main(int argc, char* argv[]) { case 'j': cmdstream << PREF_MAX_CONCURRENT_DOWNLOADS << "=" << optarg << "\n"; break; + case 'Z': + cmdstream << PREF_FORCE_SEQUENTIAL << "=" << V_TRUE << "\n"; + break; case 'v': showVersion(); exit(EXIT_SUCCESS); @@ -800,7 +829,17 @@ int main(int argc, char* argv[]) { RequestGroups groups; while(flparser->hasNext()) { Strings uris = flparser->next(); - if(!uris.empty()) { + if(uris.size() == 1) { + Strings unfoldedURIs = unfoldURI(uris); + for(Strings::const_iterator itr = unfoldedURIs.begin(); + itr != unfoldedURIs.end(); ++itr) { + Strings xuris; + ncopy(itr, itr+1, op->getAsInt(PREF_SPLIT), + back_inserter(xuris)); + RequestGroupHandle rg = new RequestGroup(xuris, op); + groups.push_back(rg); + } + } else if(uris.size() > 1) { Strings xuris; ncopy(uris.begin(), uris.end(), op->getAsInt(PREF_SPLIT), back_inserter(xuris)); @@ -812,10 +851,25 @@ int main(int argc, char* argv[]) { } else { - Strings xargs; - ncopy(args.begin(), args.end(), op->getAsInt(PREF_SPLIT), - back_inserter(xargs)); - firstReqInfo = new MultiUrlRequestInfo(xargs, op); + + Strings nargs = unfoldURI(args); + if(op->get(PREF_FORCE_SEQUENTIAL) == V_TRUE) { + RequestGroups groups; + for(Strings::const_iterator itr = nargs.begin(); + itr != nargs.end(); ++itr) { + Strings xuris; + ncopy(itr, itr+1, op->getAsInt(PREF_SPLIT), + back_inserter(xuris)); + RequestGroupHandle rg = new RequestGroup(xuris, op); + groups.push_back(rg); + } + firstReqInfo = new MultiUrlRequestInfo(groups, op); + } else { + Strings xargs; + ncopy(nargs.begin(), nargs.end(), op->getAsInt(PREF_SPLIT), + back_inserter(xargs)); + firstReqInfo = new MultiUrlRequestInfo(xargs, op); + } } RequestInfos reqInfos; diff --git a/src/prefs.h b/src/prefs.h index 4f688c20..4ad48643 100644 --- a/src/prefs.h +++ b/src/prefs.h @@ -107,6 +107,8 @@ #define PREF_MAX_CONCURRENT_DOWNLOADS "max-concurrent-downloads" // value: 1*digit #define PREF_DIRECT_DOWNLOAD_TIMEOUT "direct-download-timeout" +// value: +#define PREF_FORCE_SEQUENTIAL "force-sequential" /** * FTP related preferences diff --git a/test/AlphaNumberDecoratorTest.cc b/test/AlphaNumberDecoratorTest.cc new file mode 100644 index 00000000..593ebac2 --- /dev/null +++ b/test/AlphaNumberDecoratorTest.cc @@ -0,0 +1,52 @@ +#include "AlphaNumberDecorator.h" +#include + +class AlphaNumberDecoratorTest:public CppUnit::TestFixture { + + CPPUNIT_TEST_SUITE(AlphaNumberDecoratorTest); + CPPUNIT_TEST(testDecorate); + CPPUNIT_TEST(testDecorate_uppercase); + CPPUNIT_TEST(testDecorate_minus); + CPPUNIT_TEST_SUITE_END(); +private: + +public: + void setUp() { + } + + void testDecorate(); + void testDecorate_uppercase(); + void testDecorate_minus(); +}; + + +CPPUNIT_TEST_SUITE_REGISTRATION( AlphaNumberDecoratorTest ); + +void AlphaNumberDecoratorTest::testDecorate() +{ + CPPUNIT_ASSERT_EQUAL(string("a"), AlphaNumberDecorator(1).decorate(0)); + CPPUNIT_ASSERT_EQUAL(string("z"), AlphaNumberDecorator(1).decorate(25)); + CPPUNIT_ASSERT_EQUAL(string("zz"), AlphaNumberDecorator(1).decorate(675)); // 25*26+25 + CPPUNIT_ASSERT_EQUAL(string("aab"), AlphaNumberDecorator(3).decorate(1)); +} + +void AlphaNumberDecoratorTest::testDecorate_uppercase() +{ + CPPUNIT_ASSERT_EQUAL(string("A"), AlphaNumberDecorator(1, true).decorate(0)); + CPPUNIT_ASSERT_EQUAL(string("Z"), AlphaNumberDecorator(1, true).decorate(25)); + CPPUNIT_ASSERT_EQUAL(string("ZZ"), AlphaNumberDecorator(1, true).decorate(675)); // 25*26+25 + CPPUNIT_ASSERT_EQUAL(string("AAB"), AlphaNumberDecorator(3, true).decorate(1)); +} + +void AlphaNumberDecoratorTest::testDecorate_minus() +{ + try { + AlphaNumberDecorator(1, true).decorate(-1); + CPPUNIT_FAIL("exception must be thrown."); + } catch(FatalException* e) { + cerr << e->getMsg() << endl; + delete e; + } catch(...) { + CPPUNIT_FAIL("FatalException must be thrown."); + } +} diff --git a/test/Makefile.am b/test/Makefile.am index 11ece44b..4d88f52c 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,10 +1,13 @@ TESTS = aria2c check_PROGRAMS = $(TESTS) aria2c_SOURCES = AllTest.cc\ + PStringBuildVisitorTest.cc\ + ParameterizedStringParserTest.cc\ + UtilTest.cc\ + AlphaNumberDecoratorTest.cc\ FileUriListParserTest.cc\ StreamUriListParserTest.cc\ HttpHeaderProcessorTest.cc\ - UtilTest.cc\ CookieBoxTest.cc\ RequestTest.cc\ CookieParserTest.cc\ diff --git a/test/Makefile.in b/test/Makefile.in index 8d54b66a..84b59c80 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -110,10 +110,12 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__EXEEXT_1 = aria2c$(EXEEXT) -am__aria2c_SOURCES_DIST = AllTest.cc FileUriListParserTest.cc \ +am__aria2c_SOURCES_DIST = AllTest.cc PStringBuildVisitorTest.cc \ + ParameterizedStringParserTest.cc UtilTest.cc \ + AlphaNumberDecoratorTest.cc FileUriListParserTest.cc \ StreamUriListParserTest.cc HttpHeaderProcessorTest.cc \ - UtilTest.cc CookieBoxTest.cc RequestTest.cc \ - CookieParserTest.cc HttpRequestTest.cc CookieBoxFactoryTest.cc \ + CookieBoxTest.cc RequestTest.cc CookieParserTest.cc \ + HttpRequestTest.cc CookieBoxFactoryTest.cc \ RequestGroupManTest.cc RequestFactoryTest.cc \ NetrcAuthResolverTest.cc DefaultAuthResolverTest.cc \ OptionHandlerTest.cc SegmentManTest.cc BitfieldManTest.cc \ @@ -193,13 +195,17 @@ am__aria2c_SOURCES_DIST = AllTest.cc FileUriListParserTest.cc \ @ENABLE_METALINK_TRUE@am__objects_3 = MetalinkerTest.$(OBJEXT) \ @ENABLE_METALINK_TRUE@ MetalinkEntryTest.$(OBJEXT) \ @ENABLE_METALINK_TRUE@ Xml2MetalinkProcessorTest.$(OBJEXT) -am_aria2c_OBJECTS = AllTest.$(OBJEXT) FileUriListParserTest.$(OBJEXT) \ +am_aria2c_OBJECTS = AllTest.$(OBJEXT) \ + PStringBuildVisitorTest.$(OBJEXT) \ + ParameterizedStringParserTest.$(OBJEXT) UtilTest.$(OBJEXT) \ + AlphaNumberDecoratorTest.$(OBJEXT) \ + FileUriListParserTest.$(OBJEXT) \ StreamUriListParserTest.$(OBJEXT) \ - HttpHeaderProcessorTest.$(OBJEXT) UtilTest.$(OBJEXT) \ - CookieBoxTest.$(OBJEXT) RequestTest.$(OBJEXT) \ - CookieParserTest.$(OBJEXT) HttpRequestTest.$(OBJEXT) \ - CookieBoxFactoryTest.$(OBJEXT) RequestGroupManTest.$(OBJEXT) \ - RequestFactoryTest.$(OBJEXT) NetrcAuthResolverTest.$(OBJEXT) \ + HttpHeaderProcessorTest.$(OBJEXT) CookieBoxTest.$(OBJEXT) \ + RequestTest.$(OBJEXT) CookieParserTest.$(OBJEXT) \ + HttpRequestTest.$(OBJEXT) CookieBoxFactoryTest.$(OBJEXT) \ + RequestGroupManTest.$(OBJEXT) RequestFactoryTest.$(OBJEXT) \ + NetrcAuthResolverTest.$(OBJEXT) \ DefaultAuthResolverTest.$(OBJEXT) OptionHandlerTest.$(OBJEXT) \ SegmentManTest.$(OBJEXT) BitfieldManTest.$(OBJEXT) \ GlowFileAllocatorTest.$(OBJEXT) NetrcTest.$(OBJEXT) \ @@ -397,10 +403,12 @@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ TESTS = aria2c -aria2c_SOURCES = AllTest.cc FileUriListParserTest.cc \ +aria2c_SOURCES = AllTest.cc PStringBuildVisitorTest.cc \ + ParameterizedStringParserTest.cc UtilTest.cc \ + AlphaNumberDecoratorTest.cc FileUriListParserTest.cc \ StreamUriListParserTest.cc HttpHeaderProcessorTest.cc \ - UtilTest.cc CookieBoxTest.cc RequestTest.cc \ - CookieParserTest.cc HttpRequestTest.cc CookieBoxFactoryTest.cc \ + CookieBoxTest.cc RequestTest.cc CookieParserTest.cc \ + HttpRequestTest.cc CookieBoxFactoryTest.cc \ RequestGroupManTest.cc RequestFactoryTest.cc \ NetrcAuthResolverTest.cc DefaultAuthResolverTest.cc \ OptionHandlerTest.cc SegmentManTest.cc BitfieldManTest.cc \ @@ -474,6 +482,7 @@ distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AllTest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AlphaNumberDecoratorTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AnnounceListTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Base64Test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BitfieldManTest.Po@am__quote@ @@ -533,6 +542,8 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NetrcTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OptionHandlerTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OptionTest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PStringBuildVisitorTest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ParameterizedStringParserTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PeerMessageUtilTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PeerTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RequestFactoryTest.Po@am__quote@ diff --git a/test/PStringBuildVisitorTest.cc b/test/PStringBuildVisitorTest.cc new file mode 100644 index 00000000..a3ff8991 --- /dev/null +++ b/test/PStringBuildVisitorTest.cc @@ -0,0 +1,91 @@ +#include "PStringBuildVisitor.h" +#include "PStringSegment.h" +#include "PStringNumLoop.h" +#include "PStringSelect.h" +#include "FixedWidthNumberDecorator.h" +#include + +class PStringBuildVisitorTest:public CppUnit::TestFixture { + + CPPUNIT_TEST_SUITE(PStringBuildVisitorTest); + CPPUNIT_TEST(testVisit_select); + CPPUNIT_TEST(testVisit_numLoop); + CPPUNIT_TEST(testVisit_select_numLoop); + CPPUNIT_TEST_SUITE_END(); +private: + +public: + void setUp() { + } + + void testVisit_select(); + void testVisit_numLoop(); + void testVisit_select_numLoop(); +}; + + +CPPUNIT_TEST_SUITE_REGISTRATION( PStringBuildVisitorTest ); + +void PStringBuildVisitorTest::testVisit_select() +{ + PStringSegmentHandle segment1 = new PStringSegment("/tango"); + + char* select1data[] = { "alpha", "bravo", "charlie" }; + + PStringSelectHandle select1 = + new PStringSelect(Strings(&select1data[0], &select1data[3]), segment1); + + PStringBuildVisitorHandle v = new PStringBuildVisitor(); + + select1->accept(v); + + CPPUNIT_ASSERT_EQUAL((size_t)3, v->getURIs().size()); + CPPUNIT_ASSERT_EQUAL(string("alpha/tango"), v->getURIs()[0]); + CPPUNIT_ASSERT_EQUAL(string("bravo/tango"), v->getURIs()[1]); + CPPUNIT_ASSERT_EQUAL(string("charlie/tango"), v->getURIs()[2]); +} + +void PStringBuildVisitorTest::testVisit_numLoop() +{ + PStringSegmentHandle segment1 = new PStringSegment("/tango"); + + PStringNumLoopHandle loop1 = + new PStringNumLoop(0, 5, 2, new FixedWidthNumberDecorator(2), segment1); + + PStringBuildVisitorHandle v = new PStringBuildVisitor(); + + loop1->accept(v); + + CPPUNIT_ASSERT_EQUAL((size_t)3, v->getURIs().size()); + CPPUNIT_ASSERT_EQUAL(string("00/tango"), v->getURIs()[0]); + CPPUNIT_ASSERT_EQUAL(string("02/tango"), v->getURIs()[1]); + CPPUNIT_ASSERT_EQUAL(string("04/tango"), v->getURIs()[2]); +} + +void PStringBuildVisitorTest::testVisit_select_numLoop() +{ + PStringSegmentHandle segment1 = new PStringSegment("/tango"); + + char* select1data[] = { "alpha", "bravo", "charlie" }; + + PStringSelectHandle select1 = + new PStringSelect(Strings(&select1data[0], &select1data[3]), segment1); + + PStringNumLoopHandle loop1 = + new PStringNumLoop(0, 5, 2, new FixedWidthNumberDecorator(2), select1); + + PStringBuildVisitorHandle v = new PStringBuildVisitor(); + + loop1->accept(v); + + CPPUNIT_ASSERT_EQUAL((size_t)9, v->getURIs().size()); + CPPUNIT_ASSERT_EQUAL(string("00alpha/tango"), v->getURIs()[0]); + CPPUNIT_ASSERT_EQUAL(string("00bravo/tango"), v->getURIs()[1]); + CPPUNIT_ASSERT_EQUAL(string("00charlie/tango"), v->getURIs()[2]); + CPPUNIT_ASSERT_EQUAL(string("02alpha/tango"), v->getURIs()[3]); + CPPUNIT_ASSERT_EQUAL(string("02bravo/tango"), v->getURIs()[4]); + CPPUNIT_ASSERT_EQUAL(string("02charlie/tango"), v->getURIs()[5]); + CPPUNIT_ASSERT_EQUAL(string("04alpha/tango"), v->getURIs()[6]); + CPPUNIT_ASSERT_EQUAL(string("04bravo/tango"), v->getURIs()[7]); + CPPUNIT_ASSERT_EQUAL(string("04charlie/tango"), v->getURIs()[8]); +} diff --git a/test/ParameterizedStringParserTest.cc b/test/ParameterizedStringParserTest.cc new file mode 100644 index 00000000..558674dd --- /dev/null +++ b/test/ParameterizedStringParserTest.cc @@ -0,0 +1,237 @@ +#include "ParameterizedStringParser.h" +#include "PStringSelect.h" +#include "PStringSegment.h" +#include "PStringNumLoop.h" +#include "FatalException.h" +#include + +class ParameterizedStringParserTest:public CppUnit::TestFixture { + + CPPUNIT_TEST_SUITE(ParameterizedStringParserTest); + CPPUNIT_TEST(testParse_select); + CPPUNIT_TEST(testParse_select_empty); + CPPUNIT_TEST(testParse_select_missingParen); + CPPUNIT_TEST(testParse_segment); + CPPUNIT_TEST(testParse_segment_select); + CPPUNIT_TEST(testParse_loop); + CPPUNIT_TEST(testParse_loop_empty); + CPPUNIT_TEST(testParse_loop_missingParen); + CPPUNIT_TEST(testParse_loop_missingStep); + CPPUNIT_TEST(testParse_loop_missingRange); + CPPUNIT_TEST(testParse_alphaLoop); + CPPUNIT_TEST(testParse_loop_mixedChar); + CPPUNIT_TEST(testParse_loop_mixedCase); + CPPUNIT_TEST(testParse_segment_loop); + CPPUNIT_TEST_SUITE_END(); +private: + +public: + void setUp() { + } + + void testParse_select(); + void testParse_select_empty(); + void testParse_select_missingParen(); + void testParse_segment(); + void testParse_segment_select(); + void testParse_loop(); + void testParse_loop_empty(); + void testParse_loop_missingParen(); + void testParse_loop_missingStep(); + void testParse_loop_missingRange(); + void testParse_alphaLoop(); + void testParse_loop_mixedChar(); + void testParse_loop_mixedCase(); + void testParse_segment_loop(); +}; + + +CPPUNIT_TEST_SUITE_REGISTRATION( ParameterizedStringParserTest ); + +void ParameterizedStringParserTest::testParse_select() +{ + PStringDatumHandle ls = ParameterizedStringParser().parse("{alpha, bravo, charlie}"); + PStringSelectHandle select = ls; + CPPUNIT_ASSERT(!select.isNull()); + + Strings values = select->getValues(); + CPPUNIT_ASSERT_EQUAL((size_t)3, values.size()); + + CPPUNIT_ASSERT_EQUAL(string("alpha"), values[0]); + CPPUNIT_ASSERT_EQUAL(string("bravo"), values[1]); + CPPUNIT_ASSERT_EQUAL(string("charlie"), values[2]); +} + +void ParameterizedStringParserTest::testParse_select_empty() +{ + try { + PStringDatumHandle ls = ParameterizedStringParser().parse("{}"); + CPPUNIT_FAIL("exception must be thrown."); + } catch(FatalException* e) { + cerr << e->getMsg() << endl; + delete e; + } catch(...) { + CPPUNIT_FAIL("unexpected exception thrown."); + } +} + +void ParameterizedStringParserTest::testParse_select_missingParen() +{ + try { + PStringDatumHandle ls = ParameterizedStringParser().parse("{alpha"); + CPPUNIT_FAIL("exception must be thrown."); + } catch(FatalException* e) { + cerr << e->getMsg() << endl; + delete e; + } catch(...) { + CPPUNIT_FAIL("unexpected exception was thrown."); + } +} + +void ParameterizedStringParserTest::testParse_segment() +{ + PStringDatumHandle ls = ParameterizedStringParser().parse("hello world"); + PStringSegmentHandle segment = ls; + CPPUNIT_ASSERT(!segment.isNull()); + CPPUNIT_ASSERT_EQUAL(string("hello world"), segment->getValue()); +} + +void ParameterizedStringParserTest::testParse_segment_select() +{ + PStringDatumHandle ls = ParameterizedStringParser().parse("file:///{alpha, bravo, charlie}/tango"); + + PStringSegmentHandle segment1 = ls; + CPPUNIT_ASSERT(!segment1.isNull()); + CPPUNIT_ASSERT_EQUAL(string("file:///"), segment1->getValue()); + + PStringSelectHandle select1 = segment1->getNext(); + CPPUNIT_ASSERT(!select1.isNull()); + Strings selectValues = select1->getValues(); + CPPUNIT_ASSERT_EQUAL((size_t)3, selectValues.size()); + CPPUNIT_ASSERT_EQUAL(string("alpha"), selectValues[0]); + CPPUNIT_ASSERT_EQUAL(string("bravo"), selectValues[1]); + CPPUNIT_ASSERT_EQUAL(string("charlie"), selectValues[2]); + + PStringSegmentHandle segment2 = select1->getNext(); + CPPUNIT_ASSERT(!segment2.isNull()); + CPPUNIT_ASSERT_EQUAL(string("/tango"), segment2->getValue()); +} + +void ParameterizedStringParserTest::testParse_loop() +{ + PStringDatumHandle ls = ParameterizedStringParser().parse("[1-10:2]"); + + PStringNumLoopHandle loop1 = ls; + CPPUNIT_ASSERT(!loop1.isNull()); + CPPUNIT_ASSERT_EQUAL((int32_t)1, loop1->getStartValue()); + CPPUNIT_ASSERT_EQUAL((int32_t)10, loop1->getEndValue()); + CPPUNIT_ASSERT_EQUAL((int32_t)2, loop1->getStep()); +} + +void ParameterizedStringParserTest::testParse_loop_empty() +{ + try { + PStringDatumHandle ls = ParameterizedStringParser().parse("[]"); + CPPUNIT_FAIL("exception must be thrown."); + } catch(FatalException* e) { + cerr << e->getMsg() << endl; + delete e; + } catch(...) { + CPPUNIT_FAIL("unexpected exception was thrown."); + } +} + +void ParameterizedStringParserTest::testParse_loop_missingParen() +{ + try { + PStringDatumHandle ls = ParameterizedStringParser().parse("["); + CPPUNIT_FAIL("exception must be thrown."); + } catch(FatalException* e) { + cerr << e->getMsg() << endl; + delete e; + } catch(...) { + CPPUNIT_FAIL("unexpected exception was thrown."); + } +} + +void ParameterizedStringParserTest::testParse_loop_missingStep() +{ + try { + PStringDatumHandle ls = ParameterizedStringParser().parse("[1-10:]"); + CPPUNIT_FAIL("exception must be thrown."); + } catch(FatalException* e) { + cerr << e->getMsg() << endl; + delete e; + } catch(...) { + CPPUNIT_FAIL("unexpected exception was thrown."); + } +} + +void ParameterizedStringParserTest::testParse_loop_missingRange() +{ + try { + PStringDatumHandle ls = ParameterizedStringParser().parse("[1-]"); + CPPUNIT_FAIL("exception must be thrown."); + } catch(FatalException* e) { + cerr << e->getMsg() << endl; + delete e; + } catch(...) { + CPPUNIT_FAIL("unexpected exception was thrown."); + } +} + +void ParameterizedStringParserTest::testParse_alphaLoop() +{ + PStringDatumHandle ls = ParameterizedStringParser().parse("[a-z:2]"); + + PStringNumLoopHandle loop1 = ls; + CPPUNIT_ASSERT(!loop1.isNull()); + CPPUNIT_ASSERT_EQUAL((int32_t)0, loop1->getStartValue()); + CPPUNIT_ASSERT_EQUAL((int32_t)25, loop1->getEndValue()); + CPPUNIT_ASSERT_EQUAL((int32_t)2, loop1->getStep()); +} + +void ParameterizedStringParserTest::testParse_loop_mixedChar() +{ + try { + ParameterizedStringParser().parse("[1-z:2]"); + CPPUNIT_FAIL("exception must be thrown."); + } catch(FatalException* e) { + cerr << e->getMsg() << endl; + delete e; + } catch(...) { + CPPUNIT_FAIL("FatalException must be thrown."); + } +} + +void ParameterizedStringParserTest::testParse_loop_mixedCase() +{ + try { + ParameterizedStringParser().parse("[a-Z:2]"); + CPPUNIT_FAIL("exception must be thrown."); + } catch(FatalException* e) { + cerr << e->getMsg() << endl; + delete e; + } catch(...) { + CPPUNIT_FAIL("FatalException must be thrown."); + } +} + +void ParameterizedStringParserTest::testParse_segment_loop() +{ + PStringDatumHandle ls = ParameterizedStringParser().parse("http://server[1-3]/file"); + + PStringSegmentHandle segment1 = ls; + CPPUNIT_ASSERT(!segment1.isNull()); + CPPUNIT_ASSERT_EQUAL(string("http://server"), segment1->getValue()); + + PStringNumLoopHandle loop1 = segment1->getNext(); + CPPUNIT_ASSERT(!loop1.isNull()); + CPPUNIT_ASSERT_EQUAL((int32_t)1, loop1->getStartValue()); + CPPUNIT_ASSERT_EQUAL((int32_t)3, loop1->getEndValue()); + CPPUNIT_ASSERT_EQUAL((int32_t)1, loop1->getStep()); + + PStringSegmentHandle segment2 = loop1->getNext(); + CPPUNIT_ASSERT(!segment2.isNull()); + CPPUNIT_ASSERT_EQUAL(string("/file"), segment2->getValue()); +} diff --git a/test/UtilTest.cc b/test/UtilTest.cc index 765cf53a..a95da794 100644 --- a/test/UtilTest.cc +++ b/test/UtilTest.cc @@ -23,6 +23,10 @@ class UtilTest:public CppUnit::TestFixture { CPPUNIT_TEST(testGetRealSize); CPPUNIT_TEST(testAbbrevSize); CPPUNIT_TEST(testToStream); + CPPUNIT_TEST(testIsNumber); + CPPUNIT_TEST(testIsLowercase); + CPPUNIT_TEST(testIsUppercase); + CPPUNIT_TEST(testAlphaToNum); CPPUNIT_TEST_SUITE_END(); private: @@ -46,6 +50,10 @@ public: void testGetRealSize(); void testAbbrevSize(); void testToStream(); + void testIsNumber(); + void testIsLowercase(); + void testIsUppercase(); + void testAlphaToNum(); }; @@ -317,3 +325,40 @@ void UtilTest::testToStream() "---+---------------------------------------------------------------------------\n"), os.str()); } + +void UtilTest::testIsNumber() +{ + CPPUNIT_ASSERT_EQUAL(true, Util::isNumber("000")); + CPPUNIT_ASSERT_EQUAL(false, Util::isNumber("a")); + CPPUNIT_ASSERT_EQUAL(false, Util::isNumber("0a")); + CPPUNIT_ASSERT_EQUAL(false, Util::isNumber("")); + CPPUNIT_ASSERT_EQUAL(false, Util::isNumber(" ")); +} + +void UtilTest::testIsLowercase() +{ + CPPUNIT_ASSERT_EQUAL(true, Util::isLowercase("alpha")); + CPPUNIT_ASSERT_EQUAL(false, Util::isLowercase("Alpha")); + CPPUNIT_ASSERT_EQUAL(false, Util::isLowercase("1alpha")); + CPPUNIT_ASSERT_EQUAL(false, Util::isLowercase("")); + CPPUNIT_ASSERT_EQUAL(false, Util::isLowercase(" ")); +} + +void UtilTest::testIsUppercase() +{ + CPPUNIT_ASSERT_EQUAL(true, Util::isUppercase("ALPHA")); + CPPUNIT_ASSERT_EQUAL(false, Util::isUppercase("Alpha")); + CPPUNIT_ASSERT_EQUAL(false, Util::isUppercase("1ALPHA")); + CPPUNIT_ASSERT_EQUAL(false, Util::isUppercase("")); + CPPUNIT_ASSERT_EQUAL(false, Util::isUppercase(" ")); +} + +void UtilTest::testAlphaToNum() +{ + CPPUNIT_ASSERT_EQUAL((int32_t)0, Util::alphaToNum("a")); + CPPUNIT_ASSERT_EQUAL((int32_t)0, Util::alphaToNum("aa")); + CPPUNIT_ASSERT_EQUAL((int32_t)1, Util::alphaToNum("b")); + CPPUNIT_ASSERT_EQUAL((int32_t)675, Util::alphaToNum("zz")); // 25*26+25 + CPPUNIT_ASSERT_EQUAL((int32_t)675, Util::alphaToNum("ZZ")); // 25*26+25 + CPPUNIT_ASSERT_EQUAL((int32_t)0, Util::alphaToNum("")); +}