Coder Social home page Coder Social logo

telegrampostsperday's Introduction

Telegram to IRC log converter

Originally this project was supposed to be a simple tool to generate some statistics about telegram chats. But then I decided that this problem is already solved by pisg, and wrote a tool to convert telegram chats to IRC (specifically irssi) style logs.

Running it

  1. Install requirements pip install -r requirements.txt
  2. Create a config.json file, like so:
    {
        "api_id": 000,
        "api_hash": "abcd1234"
    }
    
  3. Run python3 convert_to_irssi_logs.py
    • From there, it will ask for your phone number to log you in, and you'll get a telegram auth code sent to you.
    • Then, on your first time running it, it will ask which chats you want to generate logs for.
    • (On future runs, you can pass the "skip" argument to skip these questions. i.e. python3 convert_to_irssi_logs.py skip)
  4. Run pisg to generate the pretty output files, which will appear in the pisg_output/ directory

Hints and tips:

  • You can add your own pisg config to the pisg.cfg file.
  • Extra user data can be added to irclogs_cache/data_store.json to the "user_extra_data" dictionary, with the key as the user ID, and then key=value for the things you would like to set in the generated users.cfg. This is useful for overriding real names that Telegram will serve up.
  • It can be handy to add a symbolic link from pisg_output/ to some web directory.

telegrampostsperday's People

Contributors

spanglelabs 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.