We have moved to a new Sailfish OS Forum. Please start new discussions there.
0

whatsapp contacts export

asked 2016-10-11 12:03:20 +0300

muchasuerte gravatar image

updated 2016-10-12 01:08:42 +0300

I have a problem I can't import the contact from whatsapp to jolla contats db, so I'm thinking to a dirty way export all data from /data/data/com.whatsapp/databases/wa.db there is a table 'wa_contacts' that brings all info that I want.

How import it on jolla contacts? there is a command line tool or python api? or I have to manually edit the jolla-contacts db (/home/nemo/.local/share/system//privileged/Contacts/qtcontacts-sqlite/contacts.db)?

I found contacts-tool but just to show not to import:

Usage: contacts-tool [OPTIONS] COMMAND

where COMMAND is one of:
list [sync-target]   - lists all contacts, optionally specified by sync-target type
search <search-text> - searches for contacts with details containing search-text
details <ID...>      - lists details for contacts matching the supplied ID list
links <ID...>        - lists links for contacts matching the supplied ID list
delete <ID...>       - removes contacts matching the supplied ID list
dump [ID...]         - displays contact details in debug format
help                 - show this command summary
version              - show the application version
edit retag flag offensive close delete

Comments

How about you convert your export to vcf and import that the traditional way (GUI)?

chemist ( 2016-10-11 12:05:55 +0300 )edit

yes, I think is the safe and fast way, I'm writing a python script to export in vcf. the only problem is avoid duplicated contacts maybe using contacts-tool I can create vcf just for missing contacts

muchasuerte ( 2016-10-11 12:21:05 +0300 )edit

People should recognize duplicates on import and either merge or link them automagically.

chemist ( 2016-10-11 14:31:33 +0300 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2016-10-11 19:44:50 +0300

muchasuerte gravatar image

updated 2016-10-12 01:09:35 +0300

I have attached a file used to export as vcf the missing whatsapp contants. download export.py.txt as export.py

below the steps:

1. force stop to whatsapp (so it sync all data on wp.db)
2. scp export.py nemo@<jolla-ip>:
3. ssh login to jolla mobile: 
4. mkdir /home/namo/wp_export/vcf; cd /home/namo/wp_export
5. cp export.py /home/namo/wp_export
6. devel-su
7. cp /data/data/com.whatsapp/databases/wa.db
/home/namo/wp_export
8. chown nemo: /home/namo/wp_export/wa.db
9. (exit from devel-su, now you can restart whatsapp )
10. chmod +x export.py && ./export.py
11. import vcf one by one or use "vcf/all_in_one.vcf" using google contacts (jolla won't support more the one vcs for file)
12. rm -rf /home/namo/wp_export

export.py.txt

I suggest to use google contacts to import the vcf it is easy to discover duplicate contacts

edit flag offensive delete publish link more

Comments

I advice against google contacts, anything "off"-device will set flags I had a huge mess with imports from elsewhere and exporting it to eg BT or make backups

chemist ( 2016-10-12 11:52:40 +0300 )edit

I'm lazy, I don't want import a vcf file one by one also jolla don't allow multiple vcard entry for file, through google contact I was able to import just one file and manage the duplicate contacts

muchasuerte ( 2016-10-12 12:34:37 +0300 )edit

SFOS exports an all.vcf with all your contacts in one file and also allows to import that file, it actually has no import-folder feature to import multiple vcf files... you have to put all files into one vcf to import them - so the import seems to be picky about the format I guess

chemist ( 2016-10-12 17:04:38 +0300 )edit
Login/Signup to Answer

Question tools

Follow
1 follower

Stats

Asked: 2016-10-11 12:03:20 +0300

Seen: 1,339 times

Last updated: Oct 12 '16