fix: changing image filename exported to anki to use only lowercase - #707
Open
marcomachado wants to merge 1 commit into
Open
fix: changing image filename exported to anki to use only lowercase#707marcomachado wants to merge 1 commit into
marcomachado wants to merge 1 commit into
Conversation
Collaborator
|
Does it still work with older versions of Anki? Ie if I use this new code
but I have an older version of Anki, will Anki still show the image?
…On Sun, Jul 19, 2026 at 7:33 AM Marco André Machado < ***@***.***> wrote:
Closes #701 <#701>
This PR changes the Anki export image filename prefix from uppercase
LUTE_TERM_ to lowercase lute_term_ to ensure compatibility with newer
versions of Anki.
- Updated handle_image in lute/ankiexport/field_mapping.py to generate
the image prefix in lowercase (lute_term_). Both the HTML reference and the
stored filename parameter will now be sent to Anki in lowercase.
- Updated unit and integration tests to verify the lowercase prefix
and swapped payload execution order.
------------------------------
You can view, comment on, or merge this pull request online at:
#707
Commit Summary
- 0b85576
<0b85576>
fix: changing image filename exported to anki to use only lowercase
File Changes
(5 files <https://github.com/LuteOrg/lute-v3/pull/707/files>)
- *M* lute/ankiexport/field_mapping.py
<https://github.com/LuteOrg/lute-v3/pull/707/files#diff-c6045d1840d28c878129a1dd35eec15286fc0154a7c42676f9c3b73315d86e8e>
(2)
- *M* lute/static/js/lute-anki.js
<https://github.com/LuteOrg/lute-v3/pull/707/files#diff-45100b4714320104bf7102c4866e83caa5f12d91d090e2fe6d4872c8ea063c62>
(4)
- *M* tests/integration/ankiexport/test_smoke_anki_export.py
<https://github.com/LuteOrg/lute-v3/pull/707/files#diff-3f9a05d1c5fa54b837a1ee6f96205fea4a74936bf54392b43bab8fa0868c9a3f>
(4)
- *M* tests/unit/ankiexport/test_field_mapping.py
<https://github.com/LuteOrg/lute-v3/pull/707/files#diff-aa5facc2a67afea2a089857c6ad2b8f01aed587d4ffedece0a8690128428e54c>
(26)
- *M* tests/unit/ankiexport/test_service.py
<https://github.com/LuteOrg/lute-v3/pull/707/files#diff-4d1e4c3a92bc1bdcad1f92874679c24b51959fdd58d2a24aa2278e5f8fe2d09e>
(4)
Patch Links:
- https://github.com/LuteOrg/lute-v3/pull/707.patch
- https://github.com/LuteOrg/lute-v3/pull/707.diff
—
Reply to this email directly, view it on GitHub
<#707?email_source=notifications&email_token=AAMPWDP2BVG33HW2ZQNCFZL5FTL2VA5CNFSNUABEM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UF42DAOBWGEZDOOJQGWTHEZLBONXW5KTTOVRHGY3SNFRGKZFFMV3GK3TUVRTG633UMVZF6Y3MNFRWW>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMPWDMBYOWW6N2KCXBTMCD5FTL2VAVCNFSNUABFKJSXA33TNF2G64TZHM3DQOJRGA4DEMJVHNEXG43VMU5TIOJSGMYDMOJXGAZ2C5QC>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/AAMPWDJR2VWDP5LOOSC6IPL5FTL2VA5CNFSNUABEM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UF42DAOBWGEZDOOJQGWTHEZLBONXW5KTTOVRHGY3SNFRGKZFFMV3GK3TUVJTG633UMVZF62LPOM>
and Android
<https://github.com/notifications/mobile/android/AAMPWDOE4UZ5IDOB7Y5LPH35FTL2VA5CNFSNUABEM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UF42DAOBWGEZDOOJQGWTHEZLBONXW5KTTOVRHGY3SNFRGKZFFMV3GK3TUVZTG633UMVZF6YLOMRZG62LE>.
Download it today!
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Contributor
Author
|
Yes! I think so, but, in fact, I didn't test it Anki now defines a default way to saved images filenames instead of rely it to other applications (like Lute which decided to use upper case) But old cards are already exported and configured using upper case, both in card (img src) and image file in filesystem If a user uses an older version of anki and creates a new card: Anki will rely of Lute to define filename for images and a card will be generated using lowercase |
Contributor
Author
|
Tests: For new files:
Alternatives scenarios:
For old files: Anki don't change already saved cards and files |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #701
This PR changes the Anki export image filename prefix from uppercase LUTE_TERM_ to lowercase lute_term_ to ensure compatibility with newer versions of Anki.