Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some suggestions re error checking #12

Open
tonysutherland opened this issue Oct 19, 2021 · 3 comments
Open

Some suggestions re error checking #12

tonysutherland opened this issue Oct 19, 2021 · 3 comments

Comments

@tonysutherland
Copy link

Firstly, let me thank you for posting this code and providing a very useful little tool to work with vcards and vcf files. Your efforts have been greatly appreciated.
Basically, worked as advertised, except generated various errors when trying to save the vcard files.
This was due to the name of the file being created from the vcard entry - and the particular vcard entries that I had were valid, but they contained a range of additional characters which the operating system (ubuntu) under python would not accept - and an unhandled exception was raised.
All fine.
I then fixed the program to handle my situation, basically by sanitising the creation of the filename under which to save the vcard.
The sanitisation removed invalid characters which would cause a crash, as replace with an underscore.
I also decided to remove spaces and replace with an underscore, since it does make working with the files from the command line a whole bit easier (and it is better for archiving etc etc). Obviously, doing this is optional.
I placed this, as well as defining the vcard file extension as a command line parameter and adding to the name, all in their own function and changed the calls in the main program
I can post the changed program as a pull request if you are interested (if I can work out what to do - never done this before).
Thanks once again.
Tony

@mbideau
Copy link
Owner

mbideau commented Oct 22, 2021

Hey @tonysutherland,

Thank you very much for your feedback, it is very much appreciated ❤️
And yes, please, post a Pull Request, I would be happy to merge it 👍

I have planed to improve the quality of this code (by a lot), it is long overdue, but I still have other projects (that I am currently releasing) that have a higher priority for me.
May be in a few weeks / months.
Your PR would be another steps towards that goal.

Thank you again.

Best regards,

@tonysutherland
Copy link
Author

OK, let me try to work out how to do a pull request properly and I will get the code up to you soon. I hope it goes OK - if not, I will let you know.

@mbideau
Copy link
Owner

mbideau commented Oct 23, 2021

Yes, thanks.
In short: click fork, do a git clone, make changes, git commit, git push, click PullRequest 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants