fix: changing image filename exported to anki to use only lowercase#707
fix: changing image filename exported to anki to use only lowercase#707marcomachado wants to merge 1 commit into
Conversation
|
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: ***@***.***>
|
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 |
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.