Can AnkiConnect receive Base64s? it cant receive things other than alphanumerics, thx

hi,

i almost finished writing a macro for mindmanager, just halt in the step to send hyper links to ankiconnect.

but mingmanager’s node’s hyperlinks are like:
mj-map:///C:\Users\xxxx\Documents\My%20Maps\Map2.mmap#oid={6053CDE9-BFD7-4E13-BBB0-575A7A8D9BA5}

for the front and back text, which are mostly alphanumerics, this worked great.
but the hyperlink part NEVER works. and i am not too sure how to get error from ankiconnect to confirm it.

previously pass text to other script is troublesome too, so solved by encoding base64 then decoding when receive.

plase help
thanks

when success, i do see the “response text”, but when it fails, nothing happens. i didn’t get the failed response.

i saw the error now:
Response: {“result”: null, “error”: “Invalid control character at: line 1 column 137 (char 136)”}

so i guess it’s the “hyperlink” part contain some special characters.
would like to see how deal /w this.
thanks

i (asked gpt4) to wrote a python to send that link to ankiconnect as some card’s front,
it worked.
so may be i just need to re-write everything,
using mm’s macro to pass to python to ankiconnect…

if no better solution.
thx

hi, for a mindmanager script that send note type, deck name, front and back (assume basic) to anki connect,
if i directly include the text of hyperlink “mj-map:///\ws001\cell00y\0-i\s-z0\uniform\uids\2023\2023-05\2x\U230525T005033-MM2AK\mm2ak.mmap#oid={59C1B1CA-F27C-428C-B384-98BD863122CC}”, anki connect will return fail.

but if i encode64 into bWotbWFwOi8vL3dzMDAxXGNlbGwwMHkvMC1pL3Mtemg4L3VuaWZvcm0vdWlkcy8yMDIzLzIwMjMtMDUvMngvVTUyMTI1VDAwNTAzMy1NTDJBSy9tbTJhay5tbWFwI29pZD17NTlDMUIxQ0EtRjI3Qy00MThDLUIzODQtOThCRDg2MzEyMkNDfQ==
then it can send.

obviously it is anki connect who cant accept those kind of text.

dont think others will change for me,
i guess my best bet is to encode my hyperlinks into base64,
and then when it appear in anki, i’ll use some decoder to copy/paste decode.

no joy…

thanks

hi, gpt4 sort out for me,
it tried remove new line characters, slashs etc.
finially the link could be passed to ankiconnect (at the moment).

so i guess it’s ok. thanks

yes, it is.

esp the new line, the \ etc.