thomascube / vcfconvert Goto Github PK
View Code? Open in Web Editor NEWvCard to LDIF/CSV Converter
Home Page: https://labs.brotherli.ch/vcfconvert/
vCard to LDIF/CSV Converter
Home Page: https://labs.brotherli.ch/vcfconvert/
Problem:
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.
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.
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 286024 bytes) in Contact_Vcard_Parse.php on line 354
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
Would you be willing to set this up for Composer via packagist.org?
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??
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.
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);
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
*(exported from macOS X 10.12 Contacts)
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
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
PHP complains about class name have method with same name;
changed vcard_convert->vcard_convert to __construct
Where in the code do you limit file size to 2m?. I can't find it and want to allow up to 100mb
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
Refactor the converter to accept multiple vcf files being uploaded and processed.
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.