GithubHelp home page GithubHelp logo

jjh4450 / telegramcontract2vcard Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 195 KB

make telegram contacts to vCard

Home Page: https://pypi.org/project/TelegramContract2vCard/

Python 100.00%
contracts telegram vcard vcf

telegramcontract2vcard's Introduction

TelegramContract2vCard

make telegram contacts to vCard

install

pip install TelegramContract2vCard

Usage

  1. Export your telegram contacts to contacts.html or result.json(download step is below)
  2. get path of contacts.html or result.json file
  3. Run this script
from TelegramContract2vCard import html2vcf, json2vcf, html2dict, json2dict, dict2vcf
# make html or json to vcf
# use path from step 2
html2vcf('./contacts.html')
json2vcf('./result.json')

# you can also make html or json to vcf with custom name and custom path
html2vcf('contacts.html', 'custom_name', 'your/path/to/save/vcf')
json2vcf('result.json', 'custom_name', 'your/path/to/save/vcf')

# make json and html to dict
html2dict('contacts.html')
json2dict('result.json')
#result is like this
# {name: {phone: phone_number, date: date}, ...}

# make dict that is made by html or json to vcf
contract = html2dict('contacts.html')
dict2vcf(contract)
#or
dict2vcf(contract, 'custom_name', 'your/path/to/save/vcf')
  1. You will get contacts.vcf
  2. Import contacts.vcf to your phone
  3. Enjoy!

download contacts.html or result.json

  1. Open Telegram Desktop
  2. Click Settings
    step1

  1. Click Advanced
    step1

  1. Click Export Telegram Data
    step1

  1. Click Export contacts
    you can choose HTML or JSON below Export contacts
    step1
  2. you will get contacts.html or result.json in your download folder

Note

  1. This script is tested on Windows 11 and Telegram Desktop 4.8.10

telegramcontract2vcard's People

Contributors

jjh4450 avatar

Watchers

 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.