Commit 6fda3308 authored by Martin Kepplinger's avatar Martin Kepplinger
Browse files

pull contacts-importer from upstream repo and create preliminary gitignore

parent 764f1eca
[Desktop Entry]
Name=Contacts Importer
#!/bin/bash -e
# Original Script:
# Adapted for the L5 use case with gnome-contacts
#Selecting a file
FILE=`yad --title "Import Contacts" --text="Select a VCF file to import" --file=`
if [ "$FILE" == "" ]; then
`yad --title "Import Contacts" --text="You did not selected any file"` exit 1
notify-send -t 1000 "Import Contacts" "Importing Contacts from $FILE"
#Name of the database where the contacts will be imported to.
CONTACTDB=$(syncevolution --print-databases | grep "system-address-book"| sed 's#(.*##' | sed 's# ##g' )
#Temp directory to mess with files:
TEMP=$(mktemp -d -t contacts-importer-XXXXXXXXXXXXX-$(date +%Y-%m-%d-%H-%M-%S))
#Some control info to make sure the file is a vcard
MIMETYPE=$(file --mime-type -b $FILE)
if [[ "$MIMETYPE" != "$CONTROL" ]]; then
notify-send -t 1000 "File is not a vcard! Bye!" && exit 1
#Begin importing contacts
cd $TEMP
cat $FILE | awk ' /BEGIN:VCARD/ { ++a; fn=sprintf("card_import_L5_%02d.vcf", a); print "Writing: ", fn } { print $0 >> fn; } ' $1
for f in $TEMP/card_import_L5*
do syncevolution --import ${f%} backend=evolution-contacts database=${CONTACTDB}
if [ $? -eq 0 ]
notify-send "Successful import";
exit 0
notify-send "Error" >&2
exit 1
......@@ -12,6 +12,11 @@ cd atinout
git checkout librem5
make atinout
cp atinout ../bin/
cd ..
echo 'AT+CGDCONT?' | sudo atinout - /dev/ttyUSB1 -
echo "if mobile data is not working, run the following command (ipv4 only)"
echo "echo 'AT+CGDCONT=1,\"IP\"' | sudo atinout - /dev/ttyUSB1 -"
git clone
cp diy-contacts-importer/*.desktop .local/share/applications/
cp diy-contacts-importer/*.sh ./bin/
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment