Skip to main content

Discord Chat Exporter (by Tyrrrz) json output parser to typed Pydantic V2 objects (no affiliation with Discord nor Tyrrrz)

Project description

dcx-pd

Discord Chat Exporter (by Tyrrrz) json output parser to typed Pydantic V2 objects

NOTE: This project has no affiliation with Discord nor Tyrrrz. This was made by another person and is unofficial.

Installation

$ pipx install dcx-pd (pipx, recommended) or $ pip install dcx-pd

How to use:

After installation dcx entry point will be available in your shell.

Linux and Mac

Provide list of paths to json files as arguments (space separated):

$ dcx /exports/* # automatically expand the glob via bash/zsh/unix shells
# OR
$ dcx /exports/server1-channel1-1234123412341234.json /exports/server1-channel2-507642999992352779.json
Windows

Provide list of paths to json files as arguments (space separated):

> dcx /exports/server1-channel1-1234123412341234.json /exports/server1-channel2-507642999992352779.json

You will be put in an interactive python interpreter, with pre-set variables export and exports. There's also a better sys.displayhook which will color the output of any object you inspect.

==> Loading 'server1-channel1-1234123412341234.json'...
==> Loading 'server1-channel2-507642999992352779.json'...
==> Loaded 10,250 messages (mem: 176.70MB)
==> (i) Variables export and exports contain exports[0] and the list[dcx.Export] itself respectively
==> Python 3.13.2 (tags/v3.13.2:4f8bb39, Feb  4 2025, 15:23:48) [MSC v.1942 64 bit (AMD64)] on win32
>>>

You can use any python expression to filter through the exports. Filtering mechanisms may be added in future versions, example:

>>> [message for export in exports for message in export.messages if "hello" in message.content].__len__()
4
>>> [message for export in exports for message in export.messages if "hello" in message.content]
[
Message(**{
        "id": 1234123412341234,
        "type": MessageType.REPLY: "Reply",
        "timestamp": <21:47:04.838000+0200 27-04-2024, Sat>,
        "timestamp_edited": None,
        "timestamp_call_ended": None,
        "is_pinned": False,
        "content": "uhhh hello? downloadmoreram.com",
        "author": {
            "color": 0xAA00FF,
            "id": 1234123412341234,
            "name": "example",
            "discriminator": "0000",
            "nickname": "Example",
            "is_bot": False,
            "avatar_url": "/exports/assets/avatar0.png",
            "roles": [],
        },
        "attachments": [],
        "embeds": [],
        "stickers": [],
        "reactions": [],
        "mentions": [],
        "inline_emojis": None,
        "reference": {
            "message_id": 123123123123123123,
            "channel_id": 12345123451234512345,
            "guild_id": 1234561234561234561234,
        },
        "interaction": None,
    }),
]

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

dcx_pd-0.0.4.tar.gz (20.3 kB view details)

Uploaded Source

Built Distribution

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

dcx_pd-0.0.4-py3-none-any.whl (20.1 kB view details)

Uploaded Python 3

File details

Details for the file dcx_pd-0.0.4.tar.gz.

File metadata

  • Download URL: dcx_pd-0.0.4.tar.gz
  • Upload date:
  • Size: 20.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for dcx_pd-0.0.4.tar.gz
Algorithm Hash digest
SHA256 bda4faeef266543d8d4e2beb330e261ee5848614d54389aa6b8efd88b0de8223
MD5 2d3b3b5ec520d1ccbe1adad13b9edff0
BLAKE2b-256 cd8b4d03de2214c1c159d3f85b941f40e7380a8a486f19aa9927cc95752bed44

See more details on using hashes here.

File details

Details for the file dcx_pd-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: dcx_pd-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 20.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for dcx_pd-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 47c6ab1adf9f8314b664f601a3662dc510f7b6ba1c6eb3bc0f6142bf479613f0
MD5 28ddc48b319e4f1ef3fa489637b00c56
BLAKE2b-256 9f7343202e66571a559cbbff765a094ddd5de1384d732655cadb832824e8699d

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