aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFiles
2022-06-22In fixup mode, convert all frames to UTF-8HEADmasterSergey Poznyakoff2
* src/idop.c (frame_encoding_is_8bit): Remove. (frame_recode_detect): New function. (idest_ucs4_cvt,fixup_charset): Use frame_recode_detect to decide whether to change frame's encoding and/or charset. * src/main.c: Bail out if --fixup is used together with --charset. * doc/idest.texi: Fix typo.
2017-03-11Version 2.1Sergey Poznyakoff12
2017-01-30Apply --broken-8bit-charset only to frames in 8-bit encoding.Sergey Poznyakoff3
* src/frametab.gperf (decode_qv): Passe frame as the 2nd argument to field_to_string. (text_decode): Likewise. * src/idest.h (idest_ucs4_cvt): Remove. (field_to_string): Change the type of the 2nd argument. * src/idop.c (frame_encoding_is_8bit) (frame_is_genre): New auxiliary functions. (idest_ucs4_cvt): Take frame as the 2nd argument. Do recoding only if the frame's encoding in 8-bit. (add_stringlist): Take frame instead of the isgenre boolean; pass it to idest_ucs4_cvt. All uses changed. (field_to_string): Take frame as the 2nd argument. All uses changed. (fixup_charset): Merge with collect_text_frames.
2016-11-17Keep textual data in UTF-8 internally; provide new options for recodingSergey Poznyakoff9
* libid3tag/tag.c (id3_tag_new): Use conservative default options. * configure.ac: Check for iconv * src/utf8conv.c: New file. * src/Makefile.am (idest_SOURCES): Add new source file. (LDADD): Link with iconv libraries. * src/backup.c (copy_file): Initialize fsize properly. * src/cmdline.opt: New options: --fixup, --broken-8bit-charset, --encoding * src/guile.c: Remove unused functions. * src/frametab.gperf: Use textual_frame_encoding. * src/idest.h: Include locale.h (latin1_option): Remove. (charset,broken_8bit_charset) (textual_frame_encoding,fixup_option): New globals. (idest_conv_mode): New enum (utf8_convert): New proto. * src/idop.c (idest_ucs4_cvt): Hanlde broken_8bit_charset option. (set_tags): Fix-up frames if so requested. * src/main.c (latin1_option): Remove. (textual_frame_encoding,fixup_option): New globals (main): Set locale. * bootstrap: Update. * gnulib: Update. * gnulib.modules: Add localcharset * doc/html.init: Minor change. * doc/idest.texi: Update docs.
2015-11-07Include gnulib as a submodule. Fix testsuite.Sergey Poznyakoff1
Guile 2.x outputs spurious diagnostics to stderr when compiling input files. The only way to disable it is to disable compilation by setting environment variable GUILE_AUTO_COMPILE to 0. However, even if compilation is disabled, Guile still checks whether the compiled file exists and complains on stderr if it is older than the input file. This diagnostics begins with ;;;. Delete this using sed prior to comparing stderr with the expected text. * .gitmodules: Add gnulib * gnulib: New module. * bootstrap: Update from gnulib * gint: Upgrade. * scheme/idest/batch/setlyrics.scm: Fix typo. * src/Makefile.am: Use AM_CPPFLAGS instead of obsolete includes. * tests/atlocal.in: Set GUILE_AUTO_COMPILE=0 * tests/testsuite.at (WITH_GUILE): New macro. * tests/delcomm.at: Use WITH_GUILE. * tests/fmt-shortlist.at: Likewise. * tests/framelist00.at: Likewise. * tests/framelist01.at: Likewise. * tests/framelist02.at: Likewise. * tests/list1.at: Likewise. * tests/list2.at: Likewise. * tests/lyrics00.at: Likewise. * tests/pic00.at: Likewise. * tests/pic01.at: Likewise. * tests/script00.at: Likewise. * tests/script01.at: Likewise. * tests/script02.at: Likewise. * tests/script03.at: Likewise. * tests/script04.at: Likewise. * tests/script05.at: Likewise. * tests/script06.at: Likewise. * tests/script07.at: Likewise. * tests/script08.at: Likewise. * tests/setlyrics.at: Likewise. * tests/setpic.at: Likewise. * tests/settitle.at: Likewise. * tests/shortlist.at: Likewise.
2015-11-05Bugfixes.Sergey Poznyakoff5
1. Fix --convert option so it can be used to remove unnecessary ID3 formats (e.g. --convert=2). 2. Fix processing of unknown frames in Guile code. 3. Fix setpic and pic modules. * scheme/idest/batch/setpic.scm (read-picture): Use binary i/o. * scheme/idest/format/pic.scm (save-picture): Likewise. * scheme/idest/list-modules.scm: Minor changes. * src/frametab.gperf (frame_field_from_rawdata): New function. * src/getopt.m4: Update copyright years. * src/guile.c (set_frame_from_rawdata): Use frame_field_from_rawdata. * src/idest.h (frame_field_from_rawdata): New proto. * src/idop.c (set_tag_options): Always call id3_tag_options.
2011-08-01Finish the docs.Sergey Poznyakoff1
* doc/.gitignore: Update. * doc/idest.texi: Document all new features. * scheme/idest/batch/setlyrics.scm: Update --help output. * scheme/idest/batch/setpic.scm: Likewise. * scheme/idest/format/lyrics.scm: Likewise. * scheme/idest/format/pic.scm: Likewise. * scheme/idest/list-modules.scm: Implement the --which option. * src/guile.c (%idest-package-site-dir) (%idest-version-site-dir) (%idest-guile-site-dir): New functions.
2011-07-31Minor changesSergey Poznyakoff1
* src/editem.c (ed_item_qv_cmp): Use the least of the two qc values for comparison.
2011-07-30Finish the testsuite.Sergey Poznyakoff1
* scheme/Makefile.am: Rewrite. * src/frametab.gperf (frametab_enumerate): Minor fix. * tests/Makefile.am (TESTSUITE_AT): Add new testcases. (EXTRA_DIST): Add idest-32.png and idest-68.png. * tests/testsuite.at: Add new testcases. * tests/atlocal.in (GUILE_VERSION,INSTALL_PROG): New variables. * tests/id3v2: Remove trailing whitespace from USLT. * tests/delcomm.at: New file. * tests/fmt-shortlist.at: New file. * tests/framelist00.at: New file. * tests/framelist01.at: New file. * tests/framelist02.at: New file. * tests/list1.at: New file. * tests/list2.at: New file. * tests/lyrics00.at: New file. * tests/pic00.at: New file. * tests/pic01.at: New file. * tests/script00.at: New file. * tests/script01.at: New file. * tests/script02.at: New file. * tests/script03.at: New file. * tests/script04.at: New file. * tests/script05.at: New file. * tests/script06.at: New file. * tests/script07.at: New file. * tests/script08.at: New file. * tests/setlyrics.at: New file. * tests/setpic.at: New file. * tests/settitle.at: New file. * tests/shortlist.at: New file. * tests/version.at: Remove useless prereq.
2011-07-29Add more tests.Sergey Poznyakoff3
* src/idest.h (source_vopt): New extern. (guess_file_tag_options): New proto. * src/idop.c (parse_ed_items): Use only commas as separators. (set_tag_options,guess_file_tag_options): New function. (find_matching_frame): Use the above functions. (del_tags): make sure tag version remains unchanged, unless requested so on the command line. * src/main.c (source_vopt): New variable. (main): Set source_vopt. * tests/Makefile.am: Add new testcases. * tests/testsuite.at: Add new testcases. * tests/copy-v1-00.at: New testcase. * tests/copy-v12-00.at: New testcase. * tests/copy-v2-00.at: New testcase. * tests/del-all-v1.at: New testcase. * tests/del-all-v12.at: New testcase. * tests/del-all-v2.at: New testcase. * tests/del-frame-v1.at: New testcase. * tests/del-frame-v2.at: New testcase. * tests/set-v1-01.at: New testcase. * tests/set-v2-01.at: New testcase.
2011-07-29Add testsuiteSergey Poznyakoff6
* Makefile.am (SUBDIRS): Add tests * configure.ac: Initialize testsuite. * src/cmdline.opt (get_options): Bugfix. * src/frametab.gperf: Use condesc instead of descr, which is reserved. * src/getopt.m4: Fix version output. * src/guile.c: Bugfixes. * src/main.c (guile_argv): Declare here, instead of in guile.c. * tests/Makefile.am: New file. * tests/testsuite.at: New file. * tests/.gitignore: New file. * tests/Makefile.am: New file. * tests/atlocal.in: New file. * tests/genfile.c: New file. * tests/id3v1: New file. * tests/id3v1-2: New file. * tests/id3v2: New file. * tests/idest-32.png: New file. * tests/idest-68.png: New file. * tests/info-v1-00.at: New file. * tests/info-v12-00.at: New file. * tests/info-v2-00.at: New file. * tests/query-v1-00.at: New file. * tests/query-v1-01.at: New file. * tests/query-v2-00.at: New file. * tests/query-v2-01.at: New file. * tests/query-v2-02.at: New file. * tests/query-v2-03.at: New file. * tests/query-v2-04.at: New file. * tests/set-v1-00.at: New file. * tests/set-v2-00.at: New file. * tests/version.at: New file.
2011-07-27Add full support for APIC frames.Sergey Poznyakoff2
* src/frametab.gperf: Support APIC. * src/idop.c (field_binary_from_string): Accept lowercase hex digits. * scheme/idest/batch/setpic.scm: New batch. * scheme/idest/format/pic.scm: Use named elements.
2011-07-26Various improvements.Sergey Poznyakoff5
* src/Makefile.am: Initialize MAINTAINERCLEANFILES. * src/cmdline.opt: New options: --prepend-load-path and --no-init-files. * src/guile.c (no_init_files_option): New variable. (guile_load): Bail out on error. (load_path_prepend): Rewrite. (load_path_append): New function. (user_load_path_list): Replace with user_path_list (array). (guile_add_load_path): Second arg indicates which list to modify. (flush_user_load_path): Argument indicates which list to flush. (load_startup_file): Don't touch load path. It is done elsewhere. (guile_init): Set up load path. Call load_startup_file unless no_init_files_option is set. * src/idest.h (no_init_files_option): New extern. (guile_add_load_path): Change signature. * src/main.c (main): Fix coredump.
2011-07-26Improve batch/format interface.Sergey Poznyakoff1
* scheme/batch.scm: Rewrite using idest-load-module * scheme/format.scm: Likewise. * scheme/idest/batch/setlyrics.scm: New file. * scheme/idest/format/framelist.scm: Define idest-init * scheme/idest/format/help.scm: Likewise. * scheme/idest/format/lyrics.scm: Likewise. * scheme/idest/load-module.scm: New file.
2011-07-25Implement --batch option (a generalization of --format).Sergey Poznyakoff4
* NEWS: Update * doc/idest.texi: Update. * scheme/Makefile.am (EXTRA_DIST,site_DATA): Add batch.scm (dist-hook): Exclude backup files. * scheme/batch.scm: New file. * scheme/idest/batch/help.scm: New file. * scheme/idest/format/help.scm: Use list-modules. * scheme/idest/format/shortlist.scm: Fix typo. * scheme/idest/list-modules.scm: New file (from scheme/idest/format/help.scm). * src/cmdline.opt: Remove the --function option. New option --batch. * src/guile.c (guile_function,guile_script): Remove. (load_closure): Remove struct. (load_handler,load_handler_path): data points to char **. (guile_load): Change signature: filename is superfluous, use argv[0] instead. All callers updated. * src/idest.h (ed_list,guile_script,guile_function): Remove. * src/main.c (dry_run_option,batch_name): New variables. (set_guile_argv): New function. (main): Handle batch_name and dry_run_option.
2011-07-25Implement `--format help', which shows a list of existing formats.Sergey Poznyakoff1
* scheme/idest/format/help.scm: New module. * scheme/idest/format/framelist.scm: Define description for use by --format help * scheme/idest/format/lyrics.scm: Likewise. * scheme/idest/format/shortlist.scm: Likewise. * src/guile.c: Change priority of directory in load path: VERSION_SITE is placed before PKG_SITE, but after user-defined directories.
2011-07-23Implement new formats: framelist & lyrics.Sergey Poznyakoff4
* scheme/format.scm: Set actual format script name as argv[0] * src/cmdline.opt <format>: Use `stop' to stop argument processing. * src/getopt.m4 (GETOPT): New local variable `stop'. * scheme/idest/format/framelist.scm: New file. * scheme/idest/format/lyrics.scm: New file.
2011-07-23BugfixesSergey Poznyakoff2
* src/cmdline.opt (get_options): Prevent coredump on argc==optind. * src/guile.c (flush_user_load_path): Prevent coredump on user_load_path_list == NULL.
2011-07-20Implement --format option.Sergey Poznyakoff6
* Makefile.am (SUBDIRS): Add scheme (conditionally). * configure.ac (IDEST_COND_GUILE): New condition. * examples/dry-run.scm: Move to scheme. * examples/Makefile.am: Update. * src/Makefile.am (AM_CPPFLAGS): Add VERSION_SITE. * src/cmdline.opt: New options --format and --load-path. * src/editem.c (str_split_col): Remove static qualifier. * src/guile.c (guile_add_load_path): New function. (load_startup_file): Flush user additions to the load path. Add VERSION_SITE at the beginning. * src/idest.h (list_supported_frames) (str_split_col,guile_add_load_path): New protos. * src/main.c (format_name): New global. (main): Handle --format option. * scheme/dry-run.scm: New file (from examples) * scheme/format.scm: New file. * scheme/idest/format/shortlist.scm: New file.
2011-07-19UpdateSergey Poznyakoff1
2011-07-18Update docs. Accept --filter option with --list-frames.Sergey Poznyakoff2
2011-07-17Minor changes.Sergey Poznyakoff2
2011-07-17Bugfix.Sergey Poznyakoff1
* src/guile.c: Exit with code 1 if the file fails to load.
2011-07-17New option: --list-framesSergey Poznyakoff4
* NEWS: Update. * src/cmdline.opt: New option --list-frames (-L) * src/frametab.gperf: Use %global-table option. (frametab_enumerate): New function. * src/idest.h (frametab_enumerate): New proto. * src/main.c: Implement --list-frames.
2011-07-17Support for URL frames.Sergey Poznyakoff1
* src/frametab.gperf: Add URL frames. Return meaningful error codes.
2011-07-17Fix some warnings.Sergey Poznyakoff5
2011-07-17New feature: copy tags between files.Sergey Poznyakoff5
* NEWS: Update. * src/cmdline.opt: New option --copy. Call parse_filter_items instead of parse_ed_items. * src/editem.c (ed_list_locate): New function. * src/idest.h (source_file, source_tag): New externs. (input_list_locate,parse_ed_items): Remove. (parse_filter_items): New proto. (ed_list_locate): New proto. * src/idop.c (filter_list): New list. (input_list_locate): Remove. Use ed_list_locate with a proper first argument. All uses updated. (parse_ed_items): Take 2 args. (parse_filter_items): New function. (input_list_init): Rename to filter_list_init. Operate on filter list. (output_list_print): Operate on filter_list. (copy_source_tags): New static function. (set_tags): Call copy_source_tags. (del_tags): Operate on filter_list. * src/main.c (source_file,source_tag): New variables. (main): Read source tags if --copy is requested.
2011-07-17Improve error reporting in Guile.Sergey Poznyakoff1
2011-07-17Handle unsupported frames in Scheme code graciously.Sergey Poznyakoff4
* src/frametab.gperf (encode_field): Rename to frame_field_from_string. Handle ID3_FIELD_TYPE_INT32PLUS and ID3_FIELD_TYPE_BINARYDATA. * src/guile.c (idest_rawdata): New global symbol. (frame_to_scm): Handle frames for which no frametab is defined. (scm_to_tag): Handle frames in raw format. * src/idest.h (field_binary_from_string) (field_binary_to_string) (frame_field_from_string): New protos. * src/idop.c (field_binary_to_string): New function. (field_binary_from_string): New function. (field_to_string): Handle ID3_FIELD_TYPE_INT32PLUS and ID3_FIELD_TYPE_BINARYDATA.
2011-07-17BugfixSergey Poznyakoff1
* src/idop.c (output_list_print): Fix coredump on empty output list.
2011-07-17Accept optional "display names" in query mode.Sergey Poznyakoff1
* NEWS: Update. * src/editem.c: Extend frame spec syntax.
2011-07-17Implement a shortcut for --set mode.Sergey Poznyakoff1
* src/cmdline.opt: If MODE_MOD is set, accept assignments before file list. * NEWS: Update.
2011-07-16Implement the USLT frame.Sergey Poznyakoff1
2011-07-16Major rewrite.Sergey Poznyakoff9
* src/idest.h (ed_item): Remove union, leave only value instead. <ref>: New member. (describe_option,verbose_option,all_frames): New externs. (set_frame_value): Return int. (IDEST_OK,IDEST_ERR_*): New constants. (_idest_errstr, _idest_nerrs): New externs. (idest_frame_cmp_t,idest_frame_encoder_t) (idest_frame_decoder_t): New typedefs. (idest_frametab): New struct. (idest_frame_lookup) (find_matching_frame): New protos. (ed_list_add_item) (ed_list_print,ed_list_add_assignment) (ed_list_clear,ed_item_matches_frame) (ed_item_set_comment_fields): Remove. (qv_free,input_list_locate) (parse_ed_items): New protos. * src/idop.c: Rewrite. * src/.gitignore: Add src/frametab.c * src/Makefile.am (idest_SOURCES): Add editem.c and frametab.c (BUILT_SOURCES): Add frametab.c (.gperf.c): New rule (GPERF_FLAGS): New variable. * src/editem.c: New source. * src/frametab.gperf: New source. * src/cmdline.opt: Use input_list_add_assignment in --set handler. * src/guile.c (frame_to_scm,scm_to_tag): Rewrite using the new logic.
2011-07-13Get rid of argmatch.Sergey Poznyakoff5
* gnulib.modules: Remove argmatch. * src/backup.c: Remove unused include. * src/idest.h: Remove unused include. (frame_id): Rename to frame_to_item_id. (ed_item_set_comment_fields): New proto. * src/main.c (item_ids, item_names) (item_frames) (item_id,frame_id) (ed_item_find): Remove. (item_table, item_count): New variables. (name_to_item_info) (frame_id_to_item_info) (frame_to_item_id): New functions.
2011-07-13BugfixesSergey Poznyakoff2
* src/idest.h (ED_ITEM_CONCAT): New constant. (ed_item)<flags>: New member. * src/main.c (_ed_list_new_item0): Always allocate name. (ed_list_new_item): Fix erroneous allocation of content description (bug is hit when a qualified comment is followed by a comma. (ed_list_add_item): Discontinue concatenation of frames with the same ID. The old code is still around, it can be enabled by setting te ED_ITEM_CONCAT flag in the ed_item.
2011-07-12Bugfix.Sergey Poznyakoff1
* src/main.c (ed_list_clear): Don't free lang and condesc, to avoid coredump on subsequent iterations of show_tags. (ed_list_add_item): Print [condesc] prefix only if the comment request was unqualified.
2011-07-12Improve Guile startup files loading sequence.Sergey Poznyakoff1
* src/guile.c (make_file_name): New file. (try_file): Remove. (load_startup_file): Pass in the command line the list of files which were to be tried after the file being loaded. * doc/idest.texi: Update.
2011-07-12Change ID3 version handling.Sergey Poznyakoff4
* src/cmdline.opt: New option --default-id-version. The --convert and --id-version take version list as their argument. * src/idest.h (IDEST_ID3V_1) (IDEST_ID3V_2): New constants. (default_version_option): New extern. * src/idop.c (set_tags): Don't alter version_option. Unless none of version_option, default_version_option or convert_version is set, preserve existing file structure. Create new tags according to the settings of default_version_option. * src/main.c (main): Set default value for default_version_option. * NEWS: Document changes. * doc/idest.texi: Update.
2011-07-12Minor change.Sergey Poznyakoff1
* src/guile.c (stringlinst_to_scm): Rename to stringlist_to_scm (fix typo). Don't use obstack, rely on pure Scheme approach. * gnulib.modules: Remove obstack and save-cwd.
2011-07-12Various fixes.Sergey Poznyakoff3
* src/guile.c (idest-readonly): Initialize to #t. (field_to_scm): Return SCM_EOL if field is NULL. * src/main.c (ed_list_add_item): Always prepend content description. * src/getopt.m4: Update copyright years. * doc/idest.texi: Document all recent changes. * examples/list1.scm: New file. * examples/list2.scm: New file. * examples/shortlist.scm: New file. * examples/title.scm: New file. * examples/Makefile.am: New file. * Makefile.am: Add examples. * configure.ac: Likewise.
2011-07-12Fix terminology. Use "content descriptor" (or condesc) throughout the code ↵Sergey Poznyakoff4
and docs.
2011-07-12Accept comment content descriptors in --delete.Sergey Poznyakoff3
* src/idest.h (ed_item_matches_frame): New proto. * src/idop.c (del_tags): Use ed_item_matches_frame to find matching frames. * src/main.c (ed_item_matches_frame): Remove static qualifier. * NEWS, doc/idest.texi: Update.
2011-07-12New option --describe. Accept content descriptors in -q args.Sergey Poznyakoff3
* src/cmdline.opt: New option --describe * src/main.c (describe_option): New variable. (str_split_col): New function, (ed_list_new_item): Rewrite. (ed_item_matches_frame): New function, (ed_list_add_item): Honor describe_option. (ed_list_add_assignment): Use ed_list_new_item. (ed_list_print): Minor change. * NEWS: Updated * doc/idest.texi: Updated.
2011-07-11BugfixSergey Poznyakoff1
2011-07-11Change Scheme representation of frame lists.Sergey Poznyakoff2
* doc/idest.texi: Update * src/guile.c (field_to_scm): Support all conversions, except ID3_FIELD_TYPE_BINARYDATA. (frame_to_scm): Rewrite taking into account new frame list format. (scm_to_tag): Likewise. (setval): Remove. * src/idop.c (set_frame_value): Accept any frame type.
2011-07-11Minor fixSergey Poznyakoff1
2011-07-11Accept language and class specs when setting comment fields.Sergey Poznyakoff3
* src/idest.h (set_frame_value): Change signature. * src/idop.c (set_frame_value): Change signature. Set lang and class for comment fields, if supplied. (update_frame): New function. Introduces special handling for comment fields. (set_tags): Call update_frame. * src/main.c (ed_list_add_assignment): Accept language and class specs for comment fields (--set comment:lang:class=value). * NEWS: Update.
2011-07-11Include comment classes (short descriptions) to the output.Sergey Poznyakoff3
* src/idest.h (ed_item): New members lang & class. (field_to_string): New proto. (ed_list_add_item): Change signature. * src/idop.c (add_stringlist): Change signature. Optionally return the total length of strings added to the list. All uses changed. (field_to_string): New function. (ed_item_set_comment_fields): New function. * src/main.c (ed_list_add_item): Add comment classes.
2011-07-10Guile scripts can access and modify command line arguments.Sergey Poznyakoff4
* NEWS: Update. * src/cmdline.opt (--script): Stop argument processing. * src/guile.c (guile_argv): New variable. (guile_load): Take command line arguments as the 3rd argument. All uses updated. (guile_init): Allow the script to alter command line arguments. * src/idest.h (guile_argv): New proto. (guile_init): Change signature. * src/main.c (main): Call guile_init before checking argc.

Return to:

Send suggestions and report system problems to the System administrator.