Commit aec8bb34 authored by Josh Coalson's avatar Josh Coalson

rename metaflac's --import-picture to --import-picture-from for consistency with other options

parent 989f2670
This diff is collapsed.
......@@ -1233,8 +1233,8 @@
</tr>
<tr>
<td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
<a name="metaflac_shorthand_import_picture" />
<span class="argument">--import-picture=SPECIFICATION</span>
<a name="metaflac_shorthand_import_picture_from" />
<span class="argument">--import-picture-from=SPECIFICATION</span>
</td>
<td>
Import a picture and store it in a <a href="format.html#def_PICTURE"><span class="code">PICTURE</span></a> metadata block. See the <span class="commandname">flac</span> option <span class="argument"><a href="#flac_options_picture">--picture</a></span> for an explanation of the <span class="argument">SPECIFICATION</span> syntax.
......
......@@ -301,9 +301,9 @@ manpage.1: manpage.sgml
</listitem>
</varlistentry>
<varlistentry>
<term><option>--import-picture</option>=<replaceable>SPECIFICATION</replaceable></term>
<term><option>--import-picture-from</option>=<replaceable>SPECIFICATION</replaceable></term>
<listitem>
<para>Import a picture and store it in a PICTURE metadata block. More than one --import-picture command can be specified. The SPECIFICATION is a string whose parts are separated by | (pipe) characters. Some parts may be left empty to invoke default values. The format of SPECIFICATION is</para>
<para>Import a picture and store it in a PICTURE metadata block. More than one --import-picture-from command can be specified. The SPECIFICATION is a string whose parts are separated by | (pipe) characters. Some parts may be left empty to invoke default values. The format of SPECIFICATION is</para>
<para>[TYPE]|MIME-TYPE|[DESCRIPTION]|[WIDTHxHEIGHTxDEPTH[/COLORS]]|FILE</para>
<para>TYPE is optional; it is a number from one of:</para>
<para>0: Other</para>
......
......@@ -359,7 +359,7 @@ FLAC__bool do_shorthand_operation(const char *filename, FLAC__bool prefix_with_f
case OP__EXPORT_CUESHEET_TO:
ok = do_shorthand_operation__cuesheet(filename, chain, operation, needs_write);
break;
case OP__IMPORT_PICTURE:
case OP__IMPORT_PICTURE_FROM:
case OP__EXPORT_PICTURE_TO:
ok = do_shorthand_operation__picture(filename, chain, operation, needs_write);
break;
......
......@@ -42,7 +42,7 @@ FLAC__bool do_shorthand_operation__picture(const char *filename, FLAC__Metadata_
FLAC__metadata_iterator_init(iterator, chain);
switch(operation->type) {
case OP__IMPORT_PICTURE:
case OP__IMPORT_PICTURE_FROM:
ok = import_pic_from(filename, &picture, operation->argument.specification.value, needs_write);
if(ok) {
/* append PICTURE block */
......
......@@ -72,7 +72,7 @@ struct share__option long_options_[] = {
{ "export-tags-to", 1, 0, 0 },
{ "import-cuesheet-from", 1, 0, 0 },
{ "export-cuesheet-to", 1, 0, 0 },
{ "import-picture", 1, 0, 0 },
{ "import-picture-from", 1, 0, 0 },
{ "export-picture-to", 1, 0, 0 },
{ "add-seekpoint", 1, 0, 0 },
{ "add-replay-gain", 0, 0, 0 },
......@@ -275,7 +275,7 @@ void free_options(CommandLineOptions *options)
if(0 != op->argument.import_cuesheet_from.filename)
free(op->argument.import_cuesheet_from.filename);
break;
case OP__IMPORT_PICTURE:
case OP__IMPORT_PICTURE_FROM:
if(0 != op->argument.specification.value)
free(op->argument.specification.value);
break;
......@@ -559,8 +559,8 @@ FLAC__bool parse_option(int option_index, const char *option_argument, CommandLi
ok = false;
}
}
else if(0 == strcmp(opt, "import-picture")) {
op = append_shorthand_operation(options, OP__IMPORT_PICTURE);
else if(0 == strcmp(opt, "import-picture-from")) {
op = append_shorthand_operation(options, OP__IMPORT_PICTURE_FROM);
FLAC__ASSERT(0 != option_argument);
if(!parse_string(option_argument, &(op->argument.specification.value))) {
fprintf(stderr, "ERROR (--%s): missing specification\n", opt);
......
......@@ -60,7 +60,7 @@ typedef enum {
OP__EXPORT_VC_TO,
OP__IMPORT_CUESHEET_FROM,
OP__EXPORT_CUESHEET_TO,
OP__IMPORT_PICTURE,
OP__IMPORT_PICTURE_FROM,
OP__EXPORT_PICTURE_TO,
OP__ADD_SEEKPOINT,
OP__ADD_REPLAY_GAIN,
......
......@@ -149,10 +149,10 @@ int long_usage(const char *message, ...)
fprintf(out, "--export-cuesheet-to=FILE Export CUESHEET block to a cuesheet file, suitable\n");
fprintf(out, " for use by CD authoring software. Use '-' for stdout.\n");
fprintf(out, " Only one FLAC file may be specified on the command line.\n");
fprintf(out, "--import-picture=SPECIFICATION Import a picture and store it in a PICTURE block.\n");
fprintf(out, " The SPECIFICATION is a string whose parts are separated\n");
fprintf(out, " by | characters. Some parts may be left empty to invoke\n");
fprintf(out, " default values. The specification format is:\n");
fprintf(out, "--import-picture-from=SPECIFICATION Import a picture and store it in a PICTURE\n");
fprintf(out, " block. The SPECIFICATION is a string whose parts are\n");
fprintf(out, " separated by | characters. Some parts may be left empty\n");
fprintf(out, " to invoke default values. The specification format is:\n");
fprintf(out, " [TYPE]|MIME-TYPE|[DESCRIPTION]|[WIDTHxHEIGHTxDEPTH[/COLORS]]|FILE\n");
fprintf(out, " TYPE is optional; it is a number from one of:\n");
fprintf(out, " 0: Other\n");
......
......@@ -320,18 +320,18 @@ for f in \
1.gif \
2.gif \
; do
run_metaflac --import-picture="|image/gif|$f||pictures/$f" $flacfile
run_metaflac --import-picture-from="|image/gif|$f||pictures/$f" $flacfile
check_flac
metaflac_test "case$ncase" "--import-picture" "--list"
metaflac_test "case$ncase" "--import-picture-from" "--list"
ncase=`expr $ncase + 1`
done
for f in \
0.jpg \
4.jpg \
; do
run_metaflac --import-picture="4|image/jpeg|$f||pictures/$f" $flacfile
run_metaflac --import-picture-from="4|image/jpeg|$f||pictures/$f" $flacfile
check_flac
metaflac_test "case$ncase" "--import-picture" "--list"
metaflac_test "case$ncase" "--import-picture-from" "--list"
ncase=`expr $ncase + 1`
done
for f in \
......@@ -345,9 +345,9 @@ for f in \
7.png \
8.png \
; do
run_metaflac --import-picture="5|image/png|$f||pictures/$f" $flacfile
run_metaflac --import-picture-from="5|image/png|$f||pictures/$f" $flacfile
check_flac
metaflac_test "case$ncase" "--import-picture" "--list"
metaflac_test "case$ncase" "--import-picture-from" "--list"
ncase=`expr $ncase + 1`
done
[ $ncase = 60 ] || die "expected case# to be 60"
......@@ -369,12 +369,12 @@ rm -f $fn
run_metaflac --remove --block-type=PICTURE $flacfile
check_flac
metaflac_test case60 "--remove --block-type=PICTURE" "--list"
run_metaflac --import-picture="1|image/png|standard_icon|32x32x24|pictures/0.png" $flacfile
run_metaflac --import-picture-from="1|image/png|standard_icon|32x32x24|pictures/0.png" $flacfile
check_flac
metaflac_test case61 "--import-picture" "--list"
run_metaflac --import-picture="2|image/png|icon|64x64x24|pictures/1.png" $flacfile
metaflac_test case61 "--import-picture-from" "--list"
run_metaflac --import-picture-from="2|image/png|icon|64x64x24|pictures/1.png" $flacfile
check_flac
metaflac_test case62 "--import-picture" "--list"
metaflac_test case62 "--import-picture-from" "--list"
# UNKNOWN blocks
echo -n "Testing FLAC file with unknown metadata... "
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment