Thorsten Wißmann [Sat, 12 May 2012 14:07:50 +0000 (16:07 +0200)]
Scroll whole list on mouse wheel action
This lets the whole list scroll on mouse action (button 5 and 6) instead
of just moving the selection. This also adds the scroll_speed option
that sets the number of lines the list is scrolled by.
Raphaël Droz [Sun, 20 Jan 2013 16:59:03 +0000 (17:59 +0100)]
autotools update: 2/2: autofiles after `autoreconf -f`
- Used autoconf-2.69, the version in the (currently frozen)
Debian testing: wheezy
- Applied the externalization of gettext (intl/ files are not
part of the repository anymore)
- autoheader pass: significantly reduced config.h.in
Raphaël Droz [Sun, 20 Jan 2013 16:54:28 +0000 (17:54 +0100)]
autotools update: 1/2: main files
* run autoupdate on configure.in
* renamed configure{.in => .ac}
* unbundle libintl: AM_GNU_GETTEXT([external])
* added a couple of files to .gitignore
Raphaël Droz [Sun, 20 Jan 2013 16:20:44 +0000 (17:20 +0100)]
miscellaneous fixes & doc: i18n, custom format and vcard
* converted HOWTO.translating_abook to UTF-8, added a couple of lines
about quickly installing and testing new translations and updated URL
of some po-related softwares.
* fixed a trivial error with custom format strncpy() initialization
* vcard builtin import: removed variables unused since e3aa1d4
* vcard export: set a "PREF" EMAIL field attribute (not [yet]
used by vcard import though)
* vcard libvformat import:
- fixed segfault on 64bits arch where a va_list's NULL sentinel value
must be properly casted [sizeof(int) != sizeof(char *)]
- now really import multivalued fields (better use of libvformat):
VFGP_FIND instead of VFGP_GET + vf_get_next_property()
- use of abook_list instead of strconcat for multivalued fields
(groups and emails)
- no more duplicated phone numbers if one or more *PHONE/FAX is
provided while no HOMEPHONE is available
Raphaël Droz [Sun, 13 Jan 2013 12:31:20 +0000 (13:31 +0100)]
vcard import: fixing the "ADR" field
* cleaner code for vcard_parse_address() (the abook's built-in vcard parser)
* vcard_parse_address() now parses "ADR" w.r.t. rfc6350
* fixed the libvformat-based "ADR" import in a similar way
Raphaël Droz [Wed, 2 Jan 2013 13:56:45 +0000 (14:56 +0100)]
* custom output format: fixes and enhancements
- support for the {groups} placeholder
- support for escaped characters (\n, \t, ...)
- removed the leading empty line from the output
- fix segfaults when an empty or a special format string
was provided
- referenced --outformatstr in --help
- code cleanup: use of built-in ITEM_FIELDS and standard_fields[]
to fetch standard fields numbering
* vcard output: removed the leading empty line
(which is mutt-specific)
* colors: added the has_colors() ncurses check
before actually initializing colors.
* Changelog, RELEASE_NOTES, AUTHORS and THANKS files updated
Raphaël Droz [Wed, 19 Dec 2012 01:55:28 +0000 (02:55 +0100)]
ldif: removed ldif_fix_string()
WARNING: this will change the default output file
encoding when importing a LDIF input!
- An LDIF input of UTF-8 entries is base64-encoded (RFC)
str_parse_line() already supports that pretty well.
- But ldif_fix_string(), present since the initial
CVS revision of abook, forces the conversion of utf-8
wide-chars to latin1.
- And that's why iconv exists
=> so let's drop it unless someone complains for a good reason.
Raphaël Droz [Wed, 19 Dec 2012 01:36:29 +0000 (02:36 +0100)]
ldif: deeply reworked LDIF fields processing!
* import: now relies on item_f*t() only when it's safe
Internal field assignation used to be very wrong what made the
LDIF import unreliable. This is not the case anymore
* import: ability to consider additional aliases of LDIF attributes,
eg: "zip" for "postalcode", "fax" for "facsimiletelephonenumber", ...
* import: multiple emails support (up to 2, naturally)
* import/export: added support for "description" (NOTES),
"anniversary" and "ou" (GROUPS)
* export: replaced the attribute named "xmozillaanyphone" by
the _more standard_ "telephonenumber"
Code has been heavily commented and hopefully opens the way
to a better and more extensible LDIF importer.
The last chunk of that patch is a bit unclear but very simple:
LDIF export got rid of some uneeded indirections: there's no point
in testing LDIF_ITEM_FIELDS and doing ldif_conv_table[] translations.
Iterating over j until ITEM_FIELDS to grab names from
ldif_field_names[j] is enough.
Other than new features, effective changes to LDIF export
brought by this commit are:
* attribute order is changed (eg: the URL attribute will
displayed after MOBILEPHONE)
* no more empty ",mail:" in the "dn:" when no email exists
* export now uses the "telephonenumber" attribute
instead of "xmozillaanyphone" previously
The LDIF import may be (undetectably) slower.
That being said, the results a the below command are now
far more reliable.
$ diff ~/.abook/addressbook
<( ./abook --convert --infile ~/.abook/addressbook --outformat ldif | \
./abook --convert --informat ldif --outformat abook )
Raphaël Droz [Thu, 13 Dec 2012 15:47:00 +0000 (16:47 +0100)]
ldif: support parsing from stdin
ldif parser used to seek in the file handler to grab multi-line
strings, thus creating buggy records when input was stdin.
It now reads-ahead the next line in order to work consistently with
unseekable streams like stdin.
Raphaël Droz [Thu, 13 Dec 2012 16:01:14 +0000 (17:01 +0100)]
ldif: cleanup ldif_convert()
* removed the "dirty hack" about LDIF_ITEM_FIELDS
* removed a useless free() causing segfaults
* don't process "objectclass" fields as we don't do anything about them
Raphaël Droz [Mon, 3 Dec 2012 13:28:58 +0000 (14:28 +0100)]
command-line containing --outformat is less-error prone.
Since --convert isn't mandatory anymore for --outformat to be used
(what was conflicting with --mutt-query), we removed the call to
set_convert_var() in 141acfcc.
We now need to test that one of MODE_CONVERT and MODE_QUERY is 'on'
before allowing the use of --outformat.
$ abook --outformat anyformat < file # won't hang anymore
Raphaël Droz [Tue, 6 Nov 2012 21:56:34 +0000 (22:56 +0100)]
vformat: vCard format can now be used in the context of --mutt-query
eg:
$ abook --mutt-query "Max" --outformat vcard
will only dump abook's entries matching "Max", using the vCard output format.
Raphaël Droz [Tue, 30 Aug 2011 14:27:44 +0000 (16:27 +0200)]
custom output format (3/4): added the --outformatstr option
* Allows the definition of a custom output format using placeholders.
* Registers the two functions: custom_export_database() and custom_print_item()
respectively for e_filters and u_filters.
--outformatstr only applies if --outformat=custom has been specified and
if we are querying the database (presence of the --mutt-query option)
If the first character of --outformatstr is a '!', then each entry
is checked before output: it will be full skipped if any of its fields
among those requested is NULL.
Raphaël Droz [Tue, 30 Aug 2011 14:20:39 +0000 (16:20 +0200)]
custom output format (2/4): item-based and the other database-based output functions
* custom_export_database() takes care of building a field_types pointer
from the format string by calling parse_custom_format().
* custom_export_item() output each entry according to the format string
itself + the associated *field_types.
The default value for custom_format is: "{nick} ({name}): {mobile}"
Raphaël Droz [Tue, 30 Aug 2011 09:53:36 +0000 (11:53 +0200)]
convert (1/1): introduced prototypes for per-item filtering functions.
Filtering and output on a per-entry basis rather than in a main-loop is
needed as soon as we want both query + formatting.
The abook_output_item_filter is aimed to store query-compatible output filters.
For most output formats generate a strict and standard-compliant output and won't
need this.
But the goal is the have a generic customizable format compatible with an
hypothetic --query switch.
As a future example, --mutt-query could be seen as:
--query --format="{email} {name}"
* Select items in the main view by clicking and scrolling
* Go to the edit-form by double-clicking
* Edit fields by clicking on them
* Select tabs by clicking on them
* Return to main view/quit abook by clicking on the first row
* parse_date_string(): don't modify string argument in place, since most
if not all of the time this function is applied on a database entry.
Too prone to dangerous oversight.
* fixed bsdcal export not checking for validity of parsed date.
Cedric Duval [Sat, 5 Aug 2006 12:25:46 +0000 (12:25 +0000)]
* Added a string as translatable (reported by C. Stazzone).
* Updated translation files.
* Added translations for said string for de, fr, it, and sv
(checking with translators that it is ok).
* Really changed pointer for reporting strings bugs.