richfromm / slack2discord

A Discord client that imports Slack-exported JSON chat history to Discord channel(s).
GNU General Public License v3.0
8 stars 3 forks source link

implement importing an entire channel at once #8

Closed richfromm closed 2 years ago

richfromm commented 2 years ago

via: --src_dir SRC_DIR [--dest_channel DEST_CHANNEL]

this implicitly assumes that files in the dir are of the form: YYYY-MM-DD.json this allows us to alphabetically sort, and end up parsing the files in date order.

if files are encountered that are not named with that convention, they are skipped.

this is not entirely the same for the single file form of: --src_file SRC_FILE --dest_channel DEST_CHANNEL

in that case, since we are simply supplying a single file, we assume that it is find and valid. if it does not meet the expected format, just log a warning.