linelog2py
linelog2py is a library to import LINE Chat History to Python.
Overview
This is a library to help you import LINE chat history files for text analysis, etc. It supports the input of a text file which can be output from the LINE talk room settings screen -> Other Settings -> Export Chat History. The language setting of LINE must be set to either English or Japanese when outputting the file.
Requirement
- Python 3.7.15 or later required
Installation
You can install it via PyPI.
# PyPI
$ pip install linelog2py
Usage
Reading a file via Reader will output a list of Message.
from linelog2py import *
file = './line_history.txt'
messages = Reader.readFile(file)
for message in messages:
print(message)
You can run the example program as follows:
$ python example/main.py
Documentation
Message
Properties
-
time: datetimeDate and time the message was sent -
username: strUser's display name -
textlines: List[str]List of message sentences -
kind: CategoryCategory of the message (Text, Sticker, etc.)
Methods
-
def addMessage(self, text: str) -> NoneAdd line to the sentences list -
def asList(self) -> List[str]Output contents as list
Category
Members
- NONE
- TEXT
- IMAGE
- MOVIE
- STAMP
- FILE
- CALL
- CALL_CANCELLED
- CALL_MISSED
- CONTACT
- UNSENT
- POLL
Methods
def fromLabel(cls, label: str)GenerateCateoryfrom label string.
Reader
Methods
def readFile(file: str) -> List[Message]Read a file from the path and return a list ofMessage.
Copyright and License Information
Copyright (c) 2022 Yuji Sasaki. All rights reserved.
This software is released under the MIT License, see LICENSE.
Contact
If you have any questions or comments about linelog2py, please feel free to contact me via Email: yuji@sasaki.dev or Twitter: https://twitter.com/yujisasaki89 This project is hosted at https://github.com/jyu0414/linelog2py
Metadata
Release files for linelog2py 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| linelog2py-0.1.6.tar.gz | 4.8 kB | Without provenance | Details for linelog2py-0.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| linelog2py-0.1.6-py3-none-any.whl | Python 3 | none | any | Details for linelog2py-0.1.6-py3-none-any.whl |
Total release size: 10.4 kB
Release files / linelog2py-0.1.6.tar.gz
| Download URL | linelog2py-0.1.6.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c661b2c1e52d88a2ff77933c63b425ad18ed04d3ddbb22d75b775c52185edc29
|
|
BLAKE2b-256 checksum How to use checksums |
b2eb4a9db6ca702c68e9b7def2f1120eefabeaab4a31ddaed5ee1578f5849788
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Release files / linelog2py-0.1.6-py3-none-any.whl
| Download URL | linelog2py-0.1.6-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5ff7c461c2ce0b09e5776e75073ee77b2d58d4b4fa38e46578f319fbfe5175e0
|
|
BLAKE2b-256 checksum How to use checksums |
6860cf6f4a413ee741a47fd836a3496815873454bacd5ef48f4d3c35dfeb7f5e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Security for linelog2py 0.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.