Code Monkey home page Code Monkey logo

telegram-contact-to-vcard's Introduction

Convert Telegram Contacts to VCard

TLDR: convert the html exported file of telegram contacts to an importable vcard file

It was a foggy evening. All looked fine. I had no idea of the disaster ahead.

Calmly, I descended the cab, and went ahead my usual road. Something felt wrong, but I shrugged the feeling and went on.

A podcast seemed appropriate, and I went in my purse to take out the phone.

O_O

It was not there.NOT. I looked and looked and looked. It was not.

Thanks to a miracle called "Find My Iphone", I found my iphone. Shattered and bent and shredded, at the side of the autobahn. Sitting there alone for about 10 minutes. How many cars had run over my precious darling? What could have been her last thoughts, doing everything she could to tell me where she was, for the last time...

I was not much worried. Everything is synced, I told myself. Be rational.

Went home, began setting up a new phone, and then, I knew, OH THE PAIN

Where are my contacts? Where are they? I saw someone crazily running in the house, screaming in agony. I put away my silly phone problems and went to help, only to see myself in the mirror. Cliche, right?

Hope was not lost. I logged in the icloud, and feeeeeeeeeew. There they were, my dear contacts,

BUT

BUT

BUT

synced last a few years ago. Oooo

So I held my head up, and exported my contacts via Telegram. I was happy. Not the best option, but at least most of my treasure was restored, right?

Well, sort of

The format was not readable by my phone, so I sat, dug and wrote the script

VOILA

And here is my newly prepared v-card file to import in the new phone. I enjoyed. You can too

How to?

  • clone the repository

    • git clone https://github.com/fmmajd/telegram-contact-to-vcard
  • put the whole exported folder's content in the data folder, i.e.: you have a data/lists/contacts.html file

  • run docker container make up

  • run main.go file i the bash

    • first go into the container bash: make bash
    • then run: go run main.go
    • if you want to have a contact named 'Deleted Account' with all deleted account numbers of telegram, add a --add-deleted argument when running: go run main.go --add-deleted
  • voila. your file is ready at data/res.cvf

telegram-contact-to-vcard's People

Contributors

fmmajd avatar

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.