Skip to content
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

slob: make audio work in AARD2 for android and aard2-web (breaks audio in goldendict desktop) #534

Merged
merged 5 commits into from
Nov 19, 2023

Conversation

glowinthedark
Copy link
Contributor

@glowinthedark glowinthedark commented Nov 16, 2023

slob: make audio work in AARD2 for android and aard2-web (!breaks audio in goldendict desktop)

NOTE

  • !! breaks audio in goldendict desktop: goldendict & goldendict-ng; the assumption is that the official AARD2 implementations (android/web) must be taken as the reference implementations, and the parsining that goldendict does is not compliant with the AARD2 spec and simply uses the mechanism and markup used for the other formats, speicifically things like sound://audio.mp3 and absolute links that start with / which are not valid for AARD2

@glowinthedark glowinthedark changed the title slob: make audio work in AARD2 for android and aard2-web (!breaks aud… slob: make audio work in AARD2 for android and aard2-web (!breaks audio in goldendict desktop) Nov 16, 2023
@glowinthedark glowinthedark changed the title slob: make audio work in AARD2 for android and aard2-web (!breaks audio in goldendict desktop) slob: make audio work in AARD2 for android and aard2-web (breaks audio in goldendict desktop) Nov 16, 2023
@ilius
Copy link
Owner

ilius commented Nov 18, 2023

Please add an option for GoldenDict, similar to this:
https://github.com/ilius/pyglossary/blob/master/pyglossary/plugins/stardict.py#L104

@ilius
Copy link
Owner

ilius commented Nov 18, 2023

Run this after adding the option:
https://github.com/ilius/pyglossary/blob/master/scripts/gen.sh

@ilius
Copy link
Owner

ilius commented Nov 18, 2023

Have you tested with Aard2-web?

Also run ruff (as the ci above fails).

@glowinthedark
Copy link
Contributor Author

glowinthedark commented Nov 18, 2023

Have you tested with Aard2-web?

yep, audio works with both aard2-web and android aard2 app

Also run ruff (as the ci above fails).

would be these that need fixing, right? should I fix only those in this pr or all?

# ruff check .
pyglossary/entry_filters.py:261:95: E501 Line too long (137 > 100)
pyglossary/plugins/aard2_slob.py:343:92: E501 Line too long (126 > 100)
pyglossary/plugins/aard2_slob.py:344:92: E501 Line too long (126 > 100)
pyglossary/plugins/babylon_bgl/bgl_text.py:302:4: PIE790 Unnecessary `pass` statement
pyglossary/plugins/dsl/lex.py:295:89: E501 Line too long (132 > 100)
scripts/wiki-formats.py:141:101: E501 Line too long (178 > 100)
Found 6 errors.

update: fixed, now only these two are left acorrding to ruff:

pyglossary/plugins/babylon_bgl/bgl_text.py:302:4: PIE790 Unnecessary `pass` statement
scripts/wiki-formats.py:141:101: E501 Line too long (178 > 100)
Found 2 errors.

should they be left as is?

@ilius
Copy link
Owner

ilius commented Nov 18, 2023

I'm not sure the change in DSL plugin is a good idea.
Can you fix that in the slob writer instead?

pyglossary/entry_filters.py Outdated Show resolved Hide resolved
@ilius
Copy link
Owner

ilius commented Nov 18, 2023

If your problem is only with Aard2, you probably should only change Aard2 plugin and nothing else.
Unless there is a clear bug in another plugin, which should be fixed in another PR.

@glowinthedark
Copy link
Contributor Author

glowinthedark commented Nov 18, 2023

I'm not sure the change in DSL plugin is a good idea. Can you fix that in the slob writer instead?

reverted

@ilius ilius merged commit f5f17a7 into ilius:master Nov 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants