Add mimetype and interpretation helper utils to public API

Bug #586524 reported by Mikkel Kamstrup Erlandsen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zeitgeist Framework
Fix Released
Medium
Markus Korn
libzeitgeist
Fix Released
Undecided
Unassigned

Bug Description

See linked branch

Related branches

Changed in zeitgeist:
assignee: nobody → Michal Hruby (mhr3)
importance: Undecided → Medium
status: New → Triaged
milestone: none → 0.3.4
Changed in zeitgeist:
milestone: 0.3.4 → 0.4.1
Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

It may be worthwhile to point at Michal Hruby's datahub rewritten in Vala. This uses the mimetype->interpretation mappings from libzeitgeist which are more full featured than the ones we have inside the Zeitgeist Python codebase.

The work is at: lp:~mhr3/zeitgeist/datahub-vala

Changed in zeitgeist:
milestone: 0.4.1 → 0.5.1
Revision history for this message
Seif Lotfy (seif) wrote :

@Mikkel can we have this map somehow in a public API then. It wouldn't be bad to allow apps to just send in the mimetype of their document and we then attach the type to it :)

Revision history for this message
Markus Korn (thekorn) wrote :

no, please don't add this extra level of complexity. This is definitely something the client should take care of.

About the original intention of this bugreport:
The only way to solve this is to define a mapping format (let's say some json based format) which describes the mimetype->interpretation mapping and translate this into python code/vala during build time of zg or libzg.
That's IMHO the only way to get something like this into core zg. As long as we don't have this clients can still use the ctypes wrapper around libzg trick I posted on the merge proposal.

Revision history for this message
Seif Lotfy (seif) wrote : Re: [Bug 586524] Re: Add mimetype and interpretation helper utils to public API

+1 :)
Lets create the jason crap then

On Sat, Aug 7, 2010 at 1:38 PM, Markus Korn <email address hidden> wrote:

> no, please don't add this extra level of complexity. This is definitely
> something the client should take care of.
>
> About the original intention of this bugreport:
> The only way to solve this is to define a mapping format (let's say some
> json based format) which describes the mimetype->interpretation mapping and
> translate this into python code/vala during build time of zg or libzg.
> That's IMHO the only way to get something like this into core zg. As long
> as we don't have this clients can still use the ctypes wrapper around libzg
> trick I posted on the merge proposal.
>
> --
> Add mimetype and interpretation helper utils to public API
> https://bugs.launchpad.net/bugs/586524
> You received this bug notification because you are subscribed to The
> Zeitgeist Project.
>
> Status in Zeitgeist Framework: Triaged
>
> Bug description:
> See linked branch
>
>
>

--
This is me doing some advertisement for my blog http://seilo.geekyogre.com

Revision history for this message
Seif Lotfy (seif) wrote :

@markus I think the python-zeitgeist bindings should do the work of mapping the mimetype -> interpretation before inserting. What do you think?

Revision history for this message
Markus Korn (thekorn) wrote :

Okidoki, I had a hard time thinking about this *again*, and although I still don't like the idea of having the mapping logic in zeitgeist itself, I see the usefulness of such feature for some clients.

But I've a few requirements:
   * the code should go into a new module, like zeitgeist.mimetype_helpers and should *never* be loaded in zeitgeist.datamodel
   * we should adapt the definition and logic from what libzeitgeist has now
   * this needs also a converter tool in libzeitgeist to convert the python mappings into C ones, similar to the solution for the ontology and the symbols. This way we only have one place where we define the mappings.

Revision history for this message
Seif Lotfy (seif) wrote :

thekorn +1

Revision history for this message
Markus Korn (thekorn) wrote :

I'm taking over the python part of the story now, Michal agreed on doing the libzeitgeist part once we released a zeitgeist.mimetypes modul

Changed in zeitgeist:
assignee: Michal Hruby (mhr3) → Markus Korn (thekorn)
Markus Korn (thekorn)
Changed in zeitgeist:
status: Triaged → In Progress
Markus Korn (thekorn)
Changed in zeitgeist:
status: In Progress → Fix Released
Changed in libzeitgeist:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.