You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, many thanks for your contribution.
I create script to auto re-generate cloze text from field for each review
functionrandomTyping(text){varwords=text.split(' ');varchoices=Array.from({length: words.length},()=>Math.random()<0.5);for(vari=1;i<choices.length;i++){if(choices[i]&&choices[i-1]){choices[i]=false;}}for(vari=0;i<words.length;i++){if(choices[i]){words[i]="\{\{c1::"+words[i]+"}}";// Correctly formatted cloze}}returnwords.join(' ');}vargerman='{{German 1}}';// Replace with your actual text or variablevartyping=randomTyping(german);// input: Die Eltern und Kinder essen und sprechen über ihren Tag.// output: Die {{c1::Eltern}} und {{c1::Kinder}} essen {{c1::und}} sprechen über {{c1::ihren}} Tag.
Now I want to use fill-in-black to parse above output, how can I evoke it in <script> block?
I researched and found that can use onBridgeCmd to send message to python backed but don't know how exactly integrated with this add-on.
Could you please help review and suggest solution to support this.
The text was updated successfully, but these errors were encountered:
Hi, many thanks for your contribution.
I create script to auto re-generate cloze text from field for each review
Now I want to use
fill-in-black
to parse above output, how can I evoke it in <script> block?I researched and found that can use
onBridgeCmd
to send message to python backed but don't know how exactly integrated with this add-on.Could you please help review and suggest solution to support this.
The text was updated successfully, but these errors were encountered: