khard icon indicating copy to clipboard operation
khard copied to clipboard

move / copy / show multiple contacts at once

Open Tonus1 opened this issue 4 years ago • 2 comments

Hi, I do not know any python so do not know if it would be difficult : Can we have the possibility to select multiples indexes to move / copy / show multiple contacts at once ?

Like that :

Select contact to Copy
Address book: default
Index    Name                                Phone                        E-Mail                                  
1        A
2        B
3        C
4        L
5        H
6        R
7        K
8        U
9        P
10       L
11       L
Enter Index (q to quit):1,4,7-8

Tonus1 avatar Jan 08 '20 03:01 Tonus1

This sounds like a nice idea, I will look into it but it might take some time until I come to it.

lucc avatar Jan 08 '20 07:01 lucc

I believe it's this code

    # get the source vcard, which to copy or move
    source_vcard = choose_vcard_from_list(
        "Select contact to {}".format(action.title()), vcard_list)
    if source_vcard is None:
        sys.exit("Found no contact")
    else:
        print("{} contact {} from address book {}".format(
            action.title(), source_vcard, source_vcard.address_book))

between lines 1144 to 1151.

It's a long time I'm thinking about learning some python... If I find some time and energy I will give it a try !

Tonus1 avatar Jan 08 '20 16:01 Tonus1