retitle 406920 ssconvert's --export-options option undocumented
thanks
On Sun, 14 Jan 2007, Reid Priedhorsky wrote:
> I couldn't figure out how to make ssconvert output in tab-separated
> (TSV) format. This would be very handy to me.
ssconvert --export-type Gnumeric_stf:stf_assistant -O 'separator=" "'
foo.gnumeric
will do what you're asking.
I'm retitling this report, as the real problem is that figuring out what
you're supposed to do with --export-options requires reading the
source code, which is obviously not for normal users. ;-)
For those who stumble across this bug before it's documented in the
manpage, see:
if (strcmp (key, "sheet") == 0) {
Sheet *sheet = workbook_sheet_by_name (wb, value);
if (!sheet) {
errtxt = _("There is no such sheet");
goto error;
}
gnm_stf_export_options_sheet_list_add (stfe, sheet);
return FALSE;
}
if (strcmp (key, "eol") == 0) {
const char *eol;
if (g_ascii_strcasecmp ("unix", value) == 0)
eol = "\n";
else if (g_ascii_strcasecmp ("mac", value) == 0)
eol = "\r";
else if (g_ascii_strcasecmp ("windows", value) == 0)
eol = "\r\n";
else {
errtxt = _("eol must be one of unix, mac, and windows");
goto error;
}
g_object_set (G_OBJECT (stfe), "eol", eol, NULL);
return FALSE;
}
if (strcmp (key, "charset") == 0 ||
strcmp (key, "locale") == 0 ||
strcmp (key, "quote") == 0 ||
strcmp (key, "separator") == 0 ||
strcmp (key, "format") == 0 ||
strcmp (key, "transliterate-mode") == 0 ||
strcmp (key, "quoting-mode") == 0 ||
strcmp (key, "quoting-on-whitespace") == 0)
return go_object_set_property
(G_OBJECT (stfe),
key, key, value,
err,
(_("Invalid value for option %s: \"%s\"")));
errtxt = _("Invalid option for stf exporter");
in stf-export.c for the available options.
Don Armstrong
--
Physics is like sex. Sure, it may give some practical results, but
that's not why we do it.
-- Richard Feynman
http://www.donarmstrong.com http://rzlab.ucr.edu
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]