Giter Club home page Giter Club logo

vcfconvert's People

Contributors

marclaporte avatar step- avatar thomascube avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vcfconvert's Issues

multible phone number entries are not converted

Original VCS data set:

BEGIN:VCARD
VERSION:3.0
FN:VN_2 N_2
N:N_2;VN_2;;;
EMAIL;TYPE=INTERNET;TYPE=HOME:[email protected]
EMAIL;TYPE=INTERNET;TYPE=HOME:[email protected]
TEL;TYPE=CELL:+40 111 111111
TEL;TYPE=WORK:+40 222 222223
TEL;TYPE=WORK:+40 333 333333
TEL;TYPE=MAIN:+40 444 444444

ADR;TYPE=HOME:;;0 Strasse xy;Ort xy;;0000;;0 Strasse xy\nOr
t 0000
CATEGORIES:myContacts
END:VCARD

ldif converted data set:

dn: uid=card-id-5e65178b39840,ou=PhoneBook,o=TK,dc=krontob,dc=com
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
objectclass: mozillaOrgPerson
objectclass: evolutionPerson
cn: VN_2 N_2
sn: N_2
uid: card-id-5e65178b39840
givenName: VN_2
mail: [email protected]
mozillaSecondEmail: [email protected]
mobile: +40 111 111111
mozillaHomeStreet: 0 Strasse xy
mozillaHomeLocalityName: Ort xy
mozillaHomePostalCode: 0000
telephoneNumber: +40 333 333333

Problem:

  • just one line of the phone numbers - one entry of the vcf file - is included in the converted ldif data set. The other phone numbers are ignored.
  • The phone number labeled with "MAIN" (and possibly other labels) are ignored.

Change GitHub's website link to HTTPS

Issue

On the repository's about section, the link to the project's website is still using the HTTP protocol. I have tried to use HTTPS in the website and TLS seems to work.

Request

I am kindly requesting the change of the project's website on the repository's settings to use HTTPS, in order to avoid traffic sniffing and other atacks. This simple change will drastically improve the security of users that get to your website through GitHub.

Memory issue for 2600 contacts

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 286024 bytes) in Contact_Vcard_Parse.php on line 354

csv file to *.mab

Hi there! ask for ideas ! I need the script to convert the csv file to *.mab the address for thunderbird can't find it no where or anything

Get via Composer

Would you be willing to set this up for Composer via packagist.org?

Notice: Undefined offset: 1 in C:\*********\Contact_Vcard_Parse.php on line 211

Hi.
I used this script, it works perfectly in the demo provided, but when i moved the files into my libraries folder, and then use it with a custom form input, i get the following error:

Notice: Undefined offset: 1 in C:******\libraries\Contact_Vcard_Parse.php on line 211

I'm using JQuery ajax to post the form and file like so:

var formData = new FormData();
formData.append('file', t[0].files[0]);
formData.append('func', 'convert');
formData.append('uid', uuid);
formData.append('token', token);
formData.append('_accesscode', '');
formData.append('_mailonly', '');
formData.append('_phoneonly', '');

$.ajax({
    url: 'http://locahost/website/index.php',
    type: 'POST',
   data : formData,
 // dataType:'json',
  contentType:false,
  cache:false,
  processData:false,
    success : function(data) {
        console.log(data);   
        return;
   },
    error: function(err){
        serverError();
        return;
    }
})

my php is the like so :

!empty($_POST['_mailonly']), 'phoneonly' => !empty($_POST['_phoneonly']), 'accesscode' => preg_replace('/[^1-9]/', '', $_POST['_accesscode']), )); $fileError = $_FILES['file']['error']; if ( $fileError != UPLOAD_ERR_OK ) { $out['res'] = encodeS( 1 ); echo json_encode( $out); return; } if ( $_FILES['file']['name'] != '' ) { $file_array = explode( ".", $_FILES['file']['name'] ); $extension = end( $file_array ); if ( strtolower($extension) == 'vcf' ) { if ( $conv->fromFile( $_FILES['file']['tmp_name'] ) ) { $temp_data = $conv->toCSV(); if(!temp_data){ $out['res'] = encodeS( 8 ); echo json_encode( $out ); return; } } else { $out['res'] = encodeS( 0 ); echo json_encode( $out ); return; } } else { $out['res'] = encodeS( 5 ); //not supported file echo json_encode( $out ); return; } } else { $out['res'] = encodeS( 4 ); //no file uploaded echo json_encode( $out ); return; } $out['res'] = encodeS( 6 ); // success $out['arr'] = $temp_data; echo json_encode( $out ); return; ?>

Any ideas??

add BOM in CSV output if encoding is UTF-8

When open output UTF-8 CSV file by excel, if the UTF-8 CSV is lack of BOM header , Excel will identify CSV as ISO-8858-1 encoding. The Chinese character inside the Excel will unreadable.

screen-capture

function toCSV($delm="\t", $add_title=true, $encoding=null)
{
    $out = '';
    // add BOM if UTF-8
    if ($encoding == 'UTF-8')
        $out = chr(239) . chr(187) . chr(191);

vCard photos

Attempting to convert vCards* with embedded photos results in no download.

As a workaround, I used the following regex in BBEdit's Find GREP function to strip embedded photos from the problematic vCard before submitting it to vcfconvert.

Find: PHOTO;ENCODING=b;TYPE=JPEG:[=+/a-zA-Z0-9\r\s]*(item[0-9]|CATEGORIES:)
Replace: \1

bbedit_grep_remove_vcard_photos

*(exported from macOS X 10.12 Contacts)

cli skript

Hi Thomas,
on my linux mint 20.1 cinnamon
./vcfconvert.sh
=> /usr/bin/env: »php -qC“: Datei oder Verzeichnis nicht gefunden

then in
vcfconvert.sh
I changed
#!/usr/bin/env php -qC
to
#!/usr/bin/php7.4 -qC
and it runs well.

Thank You for Your great skipt!
Peter

Header line out of sync with data

Hi Thomas,

I recently found your vcfconvert tool when searching for a way to do some work with my Apple Contacts database. I was able to convert some text vcf files, but many of the header labels do not line up properly with the data in the converted output. (And some of the header labels are repeated, which seems really strange.)

I am using OS X Contacts version 7.1 and the command line version of vcfconvert 0.8.7. The vcf file exported by Contacts says is it Vcard Version 3.0.

Is there something I am not doing properly, or is there some known incompatibility? I'd be happy to send (or post) examples if that would be helpful.

Thanks in advance,

Michael

fix __construct

PHP complains about class name have method with same name;
changed vcard_convert->vcard_convert to __construct

File Size

Where in the code do you limit file size to 2m?. I can't find it and want to allow up to 100mb

Unable to convert Job Title and Organization fields

Hi,
My firm requires contact information from iCloud to be converted to CSV format but recently these two fields: Job Title and Organization are not getting converted at all. Any help would be appreciated.
Thanks,
Appy

Settings for Fritzbox csv Import

Hi,

iam trying to convert a vCard to csv by command line to import it into a Fritzbox 7490 with current FRITZ!OS 06.92.
I guessed the Fritzbox needs a semicolon seperated csv with ISO-8859-1 encoding.

So i used this command line:
$ ./vcfconvert.sh -hiv -f csv -d ";" -o fritzbox.csv vCard.vcf
PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; vcard_convert has a deprecated constructor in /home/dchrist/Downloads/vcfconvert/vcard_convert.php on line 57
Detected UTF-8 encoding
Converting output to ISO-8859-1
Wrote 49 cards to fritzbox.csv

When trying to import the fritzbox.csv it cancels with an error. Any hints?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.