Skip to main content

Provides functionality to read messaging/chat application exports.

Project description

pychatlib

Provides functionality to read messenger/chat application exports.

Installation

pip install pychatlib

Usage

Suppose you have exported your group conversation in LINE to a .txt file (which is what LINE does when exporting). If you want to read the .txt file into Python, you can use the following commands.

from chatlib.line import LineChatData
line = LineChatData("E:/my_line_export.txt")

The resulting object has following attributes:

  • database: this is the most interesting attribute. It contains the data of the conversation. In its current form, it is simply a list of four lists:

    • _date_time: denotes time of a record
    • _sender: denotes a sender, or a person that is involved in the creation of the record
    • _event: denotes an event, i.e. a record which is not a chat, e.g. when someone joins the group or unsent a message.
    • _message: denotes the chat.
  • n_entry: how many records are listed.

  • start_date: earliest record's time.

  • end_date: most recent record's time.

  • participants: set of all sender names in the group. If someone is in the group but does not have their name recorded on the export file at all, their name will not be here.

Information regarding metadata of the object can be obtained via

print(line)

which will display whatever is available out of these things (not all applications provide these info on their export file):

  • What application exports the file
  • When the file is exported
  • What name is the personal/group/room chat
  • How many records are available

Applications

Currently this package is able to read these applications' exports:

  • WhatsApp
  • LINE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pychatlib-0.2.0.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pychatlib-0.2.0-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file pychatlib-0.2.0.tar.gz.

File metadata

  • Download URL: pychatlib-0.2.0.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.5.0.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5

File hashes

Hashes for pychatlib-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f2e0389998fa3b7be4dc4afc8ba8fa4a03f5d72a14ea857ec446fdb48af1d352
MD5 92e826b08cd38738082437efbbe37e26
BLAKE2b-256 3fb944f78424fa962e0329eff5808892011ad0b8277a0c1a53521549a0a5bcd1

See more details on using hashes here.

File details

Details for the file pychatlib-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pychatlib-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.5.0.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5

File hashes

Hashes for pychatlib-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a0b77aedbe29904d4b478ecf609f37d7251a627c0b77a7811e36115eca5ec9e9
MD5 63cae535fe381a7e1cbfc7b8e4975572
BLAKE2b-256 8b7d0b85a54ab59f6183fed3b9cf43fc352595ddcdd5c9823f3f47eb5ea40115

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page