[Tellico-users] how to use DBUS to load table-like values

Robby Stephenson robby at periapsis.org
Wed Nov 13 04:44:00 UTC 2013


On 11/12/2013 10:06 AM, miguel at rozsas.eng.br wrote:
> It is easy to add data to simple fields like text and numbers using
> setEntryValue :
>
> dbus org.kde.tellico /Collections org.kde.tellico.addEntry
> dbus org.kde.tellico /Collections org.kde.tellico.setEntryValue 1
> title "Teste 1"
> qdbus org.kde.tellico /Collections org.kde.tellico.setEntryValue 1 medium "DVD"
> qdbus org.kde.tellico /Collections org.kde.tellico.setEntryValue 1 year "2010"
>
> My question is how to add data to the more complex fields, like tables
> (i.e., cast which has 2 values) or images like in cover ?

Table columns are separated by a double-colon "::". (it's an artifact of 
a long ago decisions, one that I never bothered to change)

You can add table rows with addEntryValue, which appends new rows

qdbus org.kde.tellico /Collections org.kde.tellico.addEntryValue 1 cast 
"name::role"
qdbus org.kde.tellico /Collections org.kde.tellico.addEntryValue 1 cast 
"name2::role2"

Right now, the only way to add images is just as a link, using a file 
(or remote) url

qdbus org.kde.tellico /Collections org.kde.tellico.setEntryValue 1 cover 
  "file:///home/robby/tmp/coverimage.jpg"

You're actually the first person to really ask about using the DBUS 
interface, and ask you can tell, it's not very nice or easy to figure 
out. Let me know of your suggestions and I will do what I can to add them.

Maybe having a "setTableRow" or "addImage" commands would be good.

Robby




More information about the tellico-users mailing list