-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port downloadaudio to Anki 2.1 #95
Conversation
2to3 -wn -f urllib .
2to3 -wn -f import -f imports -f imports2 .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't quite understand this change.
Yes, AudioDownloader.init sets its url.
But that is called before this. So url gots set to "" after it got set in the old line 37?
(Honest question. I thought it worked before.)
Thanks. |
Oh, there is one change i should do before i release these: |
One more point: |
The bug in All the rest of the downloaders treat The property setter for |
Thanks for the credit and for the add-on. It really makes a difference on my study. |
Did you really see any problems without turning |
It was called when I was testing.
Em 30 de nov de 2016 9:57 AM, "ospalh" <[email protected]> escreveu:
… Did you really see any problems without turning url into a property?
Because the line you pointed to should *not* be called for
WiktionaryDownloader/wiktionary.py, because that reimplements
maybe_get_icon(), the function you pointed to.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#95 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAjYUV-lrBLeO0z__Un-9VNzOT1EE-gBks5rDWSXgaJpZM4K_i66>
.
|
Maybe you could run it without that commit and see what you get.
Em 30 de nov de 2016 10:04 AM, "Marcio Mazza" <[email protected]>
escreveu:
… It was called when I was testing.
Em 30 de nov de 2016 9:57 AM, "ospalh" ***@***.***>
escreveu:
> Did you really see any problems without turning url into a property?
> Because the line you pointed to should *not* be called for
> WiktionaryDownloader/wiktionary.py, because that reimplements
> maybe_get_icon(), the function you pointed to.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#95 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AAjYUV-lrBLeO0z__Un-9VNzOT1EE-gBks5rDWSXgaJpZM4K_i66>
> .
>
|
Well, i can’t run it with Anki 2.1/Python3, and with Anki 2.0/Python 2 it is fetching the wiktionary site icon. |
Yes... I found it difficult to set up Anki 2.1.
If you want any help, I'm here.
Em 30 de nov de 2016 10:13 AM, "ospalh" <[email protected]> escreveu:
… Well, i can’t
<https://ospalh.github.io/anki-addons/2016/11/30/Python_3.html> run it
with Anki 2.1/Python3, and with Anki 2.0/Python 2 it is fetching the
wiktionary site icon.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#95 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAjYUezGHp-OWTRFZHTUWc-y3Mfq5DLEks5rDWhPgaJpZM4K_i66>
.
|
What I did
I completely port the Download Audio add-on until I couldn't find any bug.
I did not test other add-ons, but incidentally made these broad changes to all codebase:
2to3
fixesI used these references as guides:
Please note that I do not know PyQt and this is the first time I see Anki's or this repo's source, so mistakes are expected. I tried my best though, to make at least downloadaudio work.
Points I suggest you revise
BeautifulSoup
constructor, especially the occurences ofBeautifulSoup(text, 'html.parser')
. Maybe they should use another parser.