Ticket #572 (closed defect: fixed)
vconvert does not convert xml-format back to vcard
| Reported by: | felixmoeller | Owned by: | prahal |
|---|---|---|---|
| Priority: | normal | Milestone: | OpenSync 0.40 |
| Component: | OpenSync | Version: | 0.34 |
| Severity: | normal | Keywords: | |
| Cc: | cstender, dfriedrich |
Description
I just tried to convert a vcard to the xml-format:
# vconvert cell32/card.vcf --to-xmlformat --out card.xml // does work # vconvert card.xml --to-vcard30 // does not work
In line 79 of vconvert.c osync_objformat_get_name(sourceformat) gives "plain". After osync_data_set_objformat(data, sourceformat); it is just "".
A little hack enables me to convert to a vcard: ;) Editting in vconvert.c line 311
OSyncObjFormat *dummyformat = osync_objformat_new("plain", "data", &error);
to:
OSyncObjFormat *dummyformat = osync_objformat_new("xmlformat-contact-doc", "data", &error);
and commenting out in opensync/data/opensync_data.c line 120:
if (data->objformat)
osync_objformat_unref(data->objformat);
btw. vconvert is not in the osbs.
Attachments
Change History
comment:1 Changed 4 years ago by cstender
- Status changed from new to assigned
- Milestone set to OpenSync 0.40
comment:2 Changed 4 years ago by cstender
- Cc dfriedrich added
Well, of course this is no solution. The problem is commit r2449. I'm not sure, why Daniel removed this functionality.
comment:4 Changed 4 years ago by felixmoeller
- Version changed from 0.33 to 0.34
Just to keep the ticket up to date. This is still present with 0.34. To be more precise r2779.
comment:5 follow-up: ↓ 6 Changed 4 years ago by cstender
- Owner changed from cstender to dgollub
- Status changed from assigned to new
- Component changed from Plugin: vformat to OpenSync
Daniel, do you know why this was removed with commit r2499? Can we get it back?
comment:6 in reply to: ↑ 5 Changed 4 years ago by dgollub
- Summary changed from vconvert does not voncert xml-format back to vcard to vconvert does not convert xml-format back to vcard
- Milestone changed from 0.40 to 0.38
comment:7 Changed 3 years ago by dgollub
- Milestone changed from 0.38 to 0.40
The commit message is from r2499 is really not helpful at all. There is no format "xmlformat-doc". So i don't see the problem for conversion path like: file -> plain -> xmlformat-$objtype-doc -> xmlformat-$objtype
The only downside i can see, is that file-sync might store by "default" xmlformat-$objtye-doc encasplutated - which will confuse lots of people. OTOH, when people start storing xmlformat on a disk - we have to "SUPPORT" this format very very carefully over several releases. But this should be O.K., when handling different versions with XSLT conversion stylesheets.
Not quite sure if we should support this or not.
I keep this up for discussion for upcoming Developer Meeting:
Pro:
- easy access to XMLFormat and to dump it as plain text file
Con:
- once dumped on disk we have to support all different version of XMLFormat!
Btw. we should introduce a XMLformat compontent in TRAC.
Changed 3 years ago by prahal
-
attachment
reenable_plaintoxmlformatdoc_whilepreserving_filesync.diff
added
This use OSYNC_CONVERTER_DECAP to prevent file-sync from using it by default to store its data.
comment:8 Changed 3 years ago by prahal
- Owner changed from dgollub to prahal
The patch also prevents
comment:9 Changed 3 years ago by prahal
- Status changed from new to closed
- Resolution set to fixed
Applied in http://www.opensync.org/changeset/3649.
comment:10 Changed 23 months ago by sim
decoration Changed 1 year ago by admin
bathtub Changed 1 year ago by admin
solar system Changed 1 year ago by admin
stair parts Changed 1 year ago by admin
solar supply Changed 1 year ago by admin
