nianeyna / ao3downloader

Utility for downloading fanfiction in bulk from the Archive of Our Own
GNU General Public License v3.0
186 stars 16 forks source link

Audio cues #161

Open nianeyna opened 1 month ago

nianeyna commented 1 month ago

I'm blind and was wondering something, when you paste a link and it starts downloading, do you see on the screen 10 percent of x amount of files downloaded? Because for my screen reader it just reads as blank, unless AO3 wants a break.

Hmm, perhaps you could add a sound once the stuff is completely downloaded? That way we don't have to alt tab and check on the download by pressing the up or down arrow, that's how I do it anyway.

Maybe a little tick sound for waiting and another for done?

It couldn't be to loud though and you'd have to be able to turn it on and off for people that don't want it, what do you think?

Originally posted by @audiogamer22 in https://github.com/nianeyna/ao3downloader/discussions/159#discussioncomment-10560591

audiogamer22 commented 1 month ago

Thanks for making this an issue, It needs to be able to be tabbed away from, in other words, if i'm on youtube then the sound/sounds still needs to play.

nianeyna commented 1 month ago

Potential python package for this: https://pypi.org/project/preferredsoundplayer/

audiogamer22 commented 1 month ago

We need an error sound too.

Again, not to harsh but something that tells you it's an error.

The reason is I close the cmd window when I can arrow up and down and read, n,, y and the URLS, those read with no issues BTW, but if there was an error downloading one page, i'd have no idea.

Then again if there's an error the app does seam to close, (I got one after taking away the numbers from the folder and just leaving it as AO3 downloader,) so what do you think?

nianeyna commented 1 month ago

I can arrow up and down and read, n,, y and the URLS

oh ok I think I know what's happening here (if not how to fix it) - in the command line/terminal application, the up and down arrows actually have a specific function of scrolling through your previous inputs (so that you can easily re-do them if you need to repeat commands). That's why the y/n/urls will read for you - those are actually getting printed to the current line in the terminal as you scroll through them. If you were to press enter, it would actually input whatever line you had selected into the program. However, quite naturally this isn't all that useful for you - what you need is to be able to move up and down through the previous inputs AND outputs of the program, not just your own inputs.

If you know of an obvious way to override this default behavior with your screenreader, let me know so I can add it to the readme - otherwise, I'll try to do some research and figure out how to make it work. I know there are blind programmers, there must be a way!

audiogamer22 commented 1 month ago

Yeah but that's only readable once the program is finished downloading all the fics.

I'll ask on r/blind and post a link to my discussion thread.

An app like yt-dlp works just fine, it's fiddly to understand when outputting text but it can be done.

Could it have something to do with you not using the latest version of python? I doubt it but that does seam a bit odd to me, why don't you do that? Surely it would make sense to use the latest programming thing because it would have better features?

audiogamer22 commented 1 month ago

OK, that's done. I'll reply with what they say, if they don't reply to these threads first.

nianeyna commented 1 month ago

Thank you so much!! I really appreciate the legwork you're doing on this.

btw the reason you can't (always) use the newest python version with ao3downloader is that some of my dependencies (specifically lxml - problem child) can take time to update their prebuilt packages after a new version of python comes out, and once they do, I need to specifically update the requirements.txt file to reference those new builds. I try to do it as often as I can, but it's far from an automatic process so I eventually settled on just pinning to the most recent version I've tested and know for sure works.

A more likely culprit than the python version is that ao3downloader isn't quite a standard command-line program, it uses a sort of custom REPL (read eval print loop) that I wrote myself for the purpose. so it's possible that I may have accidentally bypassed an accessibility feature that way.

audiogamer22 commented 1 month ago

I'm not sure if this is answered in your questions but I hear getting page 13, then a couple of secconds later, getting page 14, is there a way to know if stories have been skipped because they've already been downloaded?

I've got a huge number of stories, 14871 to be exact, so far, and it's saying getting page x and that number hasn't moved in quite a while, is that cause the stories are being skipped because I already have them or does it 7batch download all the stuff at the end after getting all the pages?

nianeyna commented 1 month ago

It's tough to say without actually seeing the results you're trying to download and your logs. From what you're saying though, a couple of different things could be going on:

1) if the page number seems to increment unusually quickly, it could be because a lot of works that used to be on that page have since been deleted (this can happen on bookmarks or history pages). Or, as you said, it could be that you already had some of the links so ao3downloader is skipping them to save time.

2) if the page number seems to increment unusually slowly, this could be either a lot of rate limits, or because the downloader encountered a long series (or more than one series) and is working through it.

If you're worried that there have been errors, or if you just want to spot-check that a specific fic was downloaded successfully, I suggest checking out the log visualization. it has a ton of filters that can help you narrow down specific events that did or didn't happen during a download.

audiogamer22 commented 1 month ago

Did you forget I'm blind? lol, or was that a typo? Log visualization I mean.

I answered my own question so was just about to delete it when you replied, I'm quite sure that it was just skipping the stories I already have.

nianeyna commented 1 month ago

OH lmao no, sorry, I just call it the log visualization because it's easier to read than the raw log files 😂 it's not actually pictures, it is fully composed of text fields in an html file. As far as I know there should be no problem using a screen reader on it

audiogamer22 commented 1 month ago

NO worries :)

It's a jsonl file.

I opened it in Firefox... That's a lot of reading, I don't know how you do it but I think everything is running fine.

nianeyna commented 1 month ago

yeah you can use menu option "v" in ao3downloader to convert the jsonl into html which will have column headers and such

audiogamer22 commented 1 month ago

Edited: I made it easier to read.

Ok... So I have a way to navigate using the NVDA screen reader.

Open the ao3.cmd file, choose your options and once everything is downloading, do the following: 1. Make sure you're in object review by pressing the NVDA key and 1 on the numbpad or NVDA plus page down, , depending on what keyboard layout you're using.

  1. Press numbpad 7 to go up a line, or numpad 9 to go down one, you can also use the NVDA key plus your up and down arrows to do the same thing. (Up is what you need to read the lines that are printed to the screen, you have to read going up to see what's last been printed)

I prefer the NVDA up and down arrow way myself as that's just quicker for me but you choose what is easier for you.

Well, that's that done. I think I'll even go as far as deleting my post as I know longer need it.

If you'd like to add that to your next update under a screen reader header I'll read it and let you know what I think.

audiogamer22 commented 1 month ago

I just read the comment about python, ah ok, I understand now.

Keep in mind I know hardly anything about programming but couldn't you write a script that does all that for you? Every time it runs ao3.cmd it checks for it, or perhaps it could check once a week/month or something like that?

If it's possible then yes it would be a bit of work I assume but afterwards you could confidently say your program works with the latest version of python.

I'm not bothered about downloading the older version it's just that I think if people can use the latest and greatest of a thing, they should.

audiogamer22 commented 1 month ago

I think I've just found out a way to see how many fics were downloaded, tell me if I'm wrong but if I use this NVDA reading methedd and arrow up, I hear something like, 43% then a bunch of cymbol signs, after that I hear 32/50 for example.

If that is how many fics have been downloaded, I think that's very useful to add to the blind/screen reader part of your FAQ/readme.

Now I'm not so sure, i've gone through the program a bit and see numbers like that come up quite a bit, it is after that link has finished downloading though so it could be.

If it is, could you make it a bit easier to understand? is that possible, for example, 35 fics out of 50 downloaded.

It's a bit wordy but it tells you exactly what's going on.

audiogamer22 commented 1 month ago

Hey, I just wanted to let you know that I've downloaded all the fics I'm going to need for a long time, so I'll probably remove the program, also now we have a way to read, you might not need the sounds after all, it's up to you of course but if people are enjoying the app without them, I think there'd be no reason to stress yourself out making a new part of the app if blind people now have a way around it.

If you'd like me to try something you've added, in the future, reply to one of my posts and I'll let you know what I think.

Honestly I think an updater would really help your app out, or at least a thing where you can press a key and the website opens up, with a reminder to copy your fics and setting file over but i do understand that is going to be hard to add.

Thanks for making such a great app.