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

Allow for re-use of downloaded files #31

Closed richfromm closed 1 year ago

richfromm commented 1 year ago

Previously, even if you specified an existing directory with --downloads-dir, the file would always be freshly downloaded.

Now do not do this, and re-use the existing file, as long as a file exists with the same name, and the file size matches the Content-Length HTTP response header.

Also wrap the downloads in a progress bar with tqdm

https://github.com/richfromm/slack2discord/issues/26

richfromm commented 1 year ago

Attn @shmulvad @waocats

waocats commented 1 year ago

Looks good to me.

I just thought of something--perhaps an offshoot issue I can make from this. If the user encounters any errors, such as if they don't use the option in #27 and a file is not found, we should add a convenience message to suggest using this option with their previous directory so that they aren't redownloading their files again (under the assumption that it's going to continue where it left off). Thoughts?

richfromm commented 1 year ago

@waocats, good suggestion, see https://github.com/richfromm/slack2discord/pull/31/commits/c13fdaa185c5af37fcba616a99d1ffef29de7cc8

shmulvad commented 1 year ago

LGTM as well. Thank you for your continued maintenance of this piece of software.