mediawiki-client-tools / mediawiki-dump-generator

Python 3 tools for downloading and preserving wikis
https://github.com/mediawiki-client-tools/mediawiki-scraper
GNU General Public License v3.0
89 stars 14 forks source link

Delay messsage overwites filename #121

Closed robkam closed 1 year ago

robkam commented 1 year ago

When downloading images the delay message overwites the filename of the file being downloaded. There's no list of filenames scrolling upwards. 2023-01-27_182239

robkam commented 1 year ago

It's still listing the images on the same line (animated screen grab).

robkam commented 1 year ago

2023-02-15_222435

yzqzss commented 1 year ago

It's still listing the images on the same line (animated screen grab).

There is no easy way to update the characters in the previous lines in the terminal unless you do a full screen reset/clear. :-)

robkam commented 1 year ago

It scrolls the terminal screen lines okay when it's fetching the XML.

yzqzss commented 1 year ago

2023-02-15_222435

Do you mean that the Using API:Allimages to get the list of images message is printed repeatedly?:

yzqzss commented 1 year ago

Q1: When downloading images the delay message overwites the filename of the file being downloaded. Q2: There's no list of filenames scrolling upwards.

Sorry, I only noticed the PR title and picture before. (Q1)

For Q2, I found it a bit annoying before that the image names kept printing on the terminal, so if the process of downloading didn't get errors, it would keep reusing the last line (\r).

If any error occurs during the download of an image, it will print the error with \n (new line). This leaves error messages on the terminal instead of being overwhelmed by the list of useless image names.

robkam commented 1 year ago

If any error occurs during the download of an image, it will print the error with \n (new line). This leaves error messages on the terminal instead of being overwhelmed by the list of useless image names.

Okay, that's fine. However the currently being fetched file name is unreadable because the message about the delay overwrites it.

yzqzss commented 1 year ago

Okay, that's fine. However the currently being fetched file name is unreadable because the message about the delay overwrites it.

Some space has been reserved for the delay message, so now at least it won't overwrite the filename when it starts to delay. (Of course, after 0.5~1s, it will still overwrite the filename, which is expected)

see: 638c4df