Active Topics

 


Reply
Thread Tools
Community Council | Posts: 4,920 | Thanked: 12,867 times | Joined on May 2012 @ Southerrn Finland
#1
I am trying to find a way to import my SMS'es from my N9 to my new Jolla device. By looking around the device I see that it's got a tracker DB just like N9 has, in /home/nemo/.cache/tracker/
Hence, I'd believe SMS'es are stored in tracker the same way that N9 handles them.

Now, on N9 I can get my SMS'es via tracker query: tracker-sparql -q "select nielainTextContent(?d) where {?d a nmo:SMSMessage}"

The same thing on Jolla device, however, returns nothing:

[nemo@localhost ~]$ tracker-sparql -q "select nielainTextContent(?d) where {?d a nmo:SMSMessage}"
Results:
None

[nemo@localhost ~]$


On N9 when I grep SMS from the used classes I get the hit for it:

~ $
~ $ tracker-sparql -q "SELECT DISTINCT ?o WHERE { ?s rdf:type ?o . }" | grep SMS
http://www.semanticdesktop.org/ontol...nmo#SMSMessage
~ $


And on Jolla it seems to be unused:

[nemo@localhost ~]$
[nemo@localhost ~]$ tracker-sparql -q "SELECT DISTINCT ?o WHERE { ?s rdf:type ?o . }" | grep SMS
[nemo@localhost ~]$


Now, how would I get to my messages on Jolla?
 

The Following 5 Users Say Thank You to juiceme For This Useful Post:
merlin1991's Avatar
Posts: 125 | Thanked: 1,142 times | Joined on Feb 2010 @ Austria
#2
The access layer for messages isn't tracker but libcommhistory, tracker just happens to be the storage engine on the N9

libcommhistory is part of the nemo middleware layer so it can be used on Sailfish aswell, see https://github.com/nemomobile/libcommhistory/

I've started working on an Harmattan exporter (to CSV) and Sailfish importer, the exporter is finished, but the importer isn't there yet.
The code lives on github: https://github.com/merlin1991/Harmattan-SMS-Boat

EDIT: since not everyone has a working scratchbox installation, here's a built binary:
http://cdnm.at/~christian/Harmattan-SMS-Boat/smsExport (use save link as)
__________________
"Fog is neither water nor air, it's something between." Merlin

Last edited by merlin1991; 2013-12-02 at 17:09. Reason: added build link
 

The Following 24 Users Say Thank You to merlin1991 For This Useful Post:
Community Council | Posts: 4,920 | Thanked: 12,867 times | Joined on May 2012 @ Southerrn Finland
#3
Originally Posted by merlin1991 View Post
I've started working on an Harmattan exporter (to CSV) and Sailfish importer, the exporter is finished, but the importer isn't there yet.
The code lives on github: https://github.com/merlin1991/Harmattan-SMS-Boat
Okay, so I am missing some dependencies...?

Code:
[sbox-HARMATTAN_ARMEL: ~/Harmattan-SMS-Boat/n9Export] > qmake
/scratchbox/tools/bin/misc_runner: : No such file or directory
/scratchbox/tools/bin/misc_runner: : No such file or directory
/scratchbox/tools/bin/misc_runner: : No such file or directory
[sbox-HARMATTAN_ARMEL: ~/Harmattan-SMS-Boat/n9Export] > 
[sbox-HARMATTAN_ARMEL: ~/Harmattan-SMS-Boat/n9Export] > make
g++ -c -pipe -g -D_REENTRANT -Wall -W -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/targets/HARMATTAN_ARMEL/usr/share/qt4/mkspecs/linux-g++-maemo -I. -I/targets/HARMATTAN_ARMEL/usr/include/qt4/QtCore -I/targets/HARMATTAN_ARMEL/usr/include/qt4/QtGui -I/targets/HARMATTAN_ARMEL/usr/include/qt4 -I. -o smsEx.o smsEx.cpp
smsEx.cpp:5: fatal error: CommHistory/SyncSMSModel: No such file or directory
compilation terminated.
make: *** [smsEx.o] Error 1
[sbox-HARMATTAN_ARMEL: ~/Harmattan-SMS-Boat/n9Export] >
 

The Following User Says Thank You to juiceme For This Useful Post:
merlin1991's Avatar
Posts: 125 | Thanked: 1,142 times | Joined on Feb 2010 @ Austria
#4
Originally Posted by juiceme View Post
Okay, so I am missing some dependencies...?
You need libcommhistory-dev which isn't installed by default, I'll add it to the readme
__________________
"Fog is neither water nor air, it's something between." Merlin

Last edited by merlin1991; 2013-12-02 at 18:41.
 

The Following 2 Users Say Thank You to merlin1991 For This Useful Post:
miqu's Avatar
Posts: 33 | Thanked: 28 times | Joined on Mar 2011 @ Finland
#5
Nice Merlin1991,

Back in the day, I actually transferred all my messages from my N900 to my N9. So now there are well over 20000 messages on my N9. I think this time I will not import them as the database gets a bit large because of that import.

Unless some of you guys tells me to put Jolla to the test.
 

The Following 2 Users Say Thank You to miqu For This Useful Post:
Posts: 4 | Thanked: 45 times | Joined on Dec 2013
#6
I maintain the messaging stack for Jolla, so there are some pointers I can give here..

Originally Posted by merlin1991 View Post
The access layer for messages isn't tracker but libcommhistory, tracker just happens to be the storage engine on the N9

libcommhistory is part of the nemo middleware layer so it can be used on Sailfish aswell, see https://github.com/nemomobile/libcommhistory/

I've started working on an Harmattan exporter (to CSV) and Sailfish importer, the exporter is finished, but the importer isn't there yet.
The code lives on github: https://github.com/merlin1991/Harmattan-SMS-Boat
Correct. Nemo and Sailfish use libcommhistory (as did the N9), but we use a sqlite database instead of tracker. libcommhistory has an import/export tool for backup, but I would strongly recommend not using that between a N9 and Jolla. Things will break. I'd love to get some good text-based import/export tools in there instead. VMessage support would be especially interesting.

Your CSV exporter looks like a great start. For importing, use /org/freedesktop/Telepathy/Account/ring/tel/account0 as the localUid. Use a GroupModel to create one group per unique phone number, and then an EventModel to create events. Make sure to set the right groupId on events.

I wouldn't recommend trying to import IM messages from the N9.

Originally Posted by miqu
Back in the day, I actually transferred all my messages from my N900 to my N9. So now there are well over 20000 messages on my N9. I think this time I will not import them as the database gets a bit large because of that import.

Unless some of you guys tells me to put Jolla to the test.
Please don't - Performance will get really bad right now. There are changes going into the next update(s) that make it fast for several hundred thousand messages, but right now it's pretty bad.
 

The Following 28 Users Say Thank You to jbrooks For This Useful Post:
merlin1991's Avatar
Posts: 125 | Thanked: 1,142 times | Joined on Feb 2010 @ Austria
#7
Originally Posted by jbrooks View Post
I'd love to get some good text-based import/export tools in there instead. VMessage support would be especially interesting.
I'd love to implement a proper transfer format instead of my selfinvented abuse of the term "CSV".

But apart from a wikipedia entry which tells me that vMessage is specified by IrDA and that the format is most likely in their IrMC standards set I've found nothing about the format.
And as usual one gets the standard only for a fee, which is 100$ in this case, so not an option for me.
__________________
"Fog is neither water nor air, it's something between." Merlin
 

The Following 4 Users Say Thank You to merlin1991 For This Useful Post:
Posts: 4 | Thanked: 45 times | Joined on Dec 2013
#8
Originally Posted by merlin1991 View Post
I'd love to implement a proper transfer format instead of my selfinvented abuse of the term "CSV".

But apart from a wikipedia entry which tells me that vMessage is specified by IrDA and that the format is most likely in their IrMC standards set I've found nothing about the format.
And as usual one gets the standard only for a fee, which is 100$ in this case, so not an option for me.
http://www.pday.com.cn/technology/ir.../IrMC_v1p1.pdf section 9.9.2 (page 79, or 91 in the pdf) has the definition. Although now that I look around, there's not much support for vmsg anywhere except perhaps in bluetooth.

I'd stick with the CSV for now - no reason to make it complicated. Although if you ever get bored and want to implement vmsg import/export in libcommhistory..
 

The Following 3 Users Say Thank You to jbrooks For This Useful Post:
Posts: 32 | Thanked: 33 times | Joined on Sep 2012 @ Toulouse, France
#9
What would be good (but quite more complex than just import/export) is to synchronize SMS with an email account.

There is an app for Android that does that on gmail and even if it is google-only, the principle is good.

SMS could just be exported/imported to an IMAP folder. MMS could also with multimedia content as attachment.
 
Community Council | Posts: 4,920 | Thanked: 12,867 times | Joined on May 2012 @ Southerrn Finland
#10
Originally Posted by merlin1991 View Post
I'd love to implement a proper transfer format instead of my selfinvented abuse of the term "CSV".
CSV is okay I guess but XML would be pretty nice too.
Nowdays I would not worry about the ML overhead, trying to squeeze data into too little containers is pointless on the age of memory abundance we are living
 

The Following User Says Thank You to juiceme For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 11:22.