Skip to content

Instantly share code, notes, and snippets.

@lduboeuf
Last active November 8, 2022 21:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lduboeuf/88682fb6c04ec258448f32f5460d590c to your computer and use it in GitHub Desktop.
Save lduboeuf/88682fb6c04ec258448f32f5460d590c to your computer and use it in GitHub Desktop.
test bashwget
OUT=/home/phablet/Documents/contactsfromnewbackend.csv
sqlite3 -header -csv /home/phablet/.local/share/system/privileged/Contacts/qtcontacts-sqlite/contacts.db "SELECT DisplayLabels.displayLabel,Names.firstName, Names.lastName,PhoneNumbers.phoneNumber, EmailAddresses.emailAddress, Contacts.modified FROM Contacts LEFT JOIN DisplayLabels ON DisplayLabels.contactId = Contacts.contactId LEFT JOIN EmailAddresses ON EmailAddresses.contactId = Contacts.contactId LEFT JOIN Names ON Names.contactId = Contacts.contactId LEFT JOIN Nicknames ON Nicknames.contactId = Contacts.contactId LEFT JOIN PhoneNumbers ON PhoneNumbers.contactId = Contacts.contactId WHERE Contacts.collectionId = 1 ORDER BY Contacts.modified DESC;" > $OUT
echo "Exported contacts from sqlite contact backend to $OUT last modified first, as a csv file (comma separated)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment