Discord Chat Exporter added the ability to natively export to CSV. This tooling is thankfully no longer necessary :-)
Scrape messages from discord server dumps and parse them into a csv file. More features to come later though
-
Get an html dump from the server you are trying to parse messages from using...
-
Install dappi
pip3 install dappi
- Run the CLI with command line args
dappi -i {path_to_discord_html_export} -o {path_to_csv_output_directory/file_name.csv} -s {boolean | "Sets a flag to show messages in the terminal while they are being parsed"}
- Note: file_name.csv, doesn't need to exist, but the "path_to_csv_output_directory" does!
- Use dappi as a library
from dappi import parser
dappi_parser = parser.Parser(
'frostbite.html', # Html input
'data/messages.csv', # Output Directory
True # Show messages while writing
)
dappi_parser.parse_all_messages_into_single_file()
exit
- Automated tests
- Generate statistics and graphs of user activity from parsed messages?
- Frequency of user messages?
- Sentiment analysis of user messages?
- Other interesting metrics?
- Expose more functionality, I.E Write better docs