%* const setStart = "START" const clipboard = await tp.system.clipboard() var Sentence = await tp.system.prompt("영단어를 통한 한글 뜻 맞추기입니다. 전체 영어 문장을 입력해주세요", clipboard) var Word = await tp.system.prompt("입력된 문장 중, 어느 영단어에 빈칸을 뚫으시겠습니까?", Sentence+" 중 단어 선택") if (Sentence.includes(Word)) { console.log("문장 내 단어가 있습니다"); } else { return; } var Meaning = await tp.system.prompt("입력된 영단어의 한글 뜻은 무엇입니까?", Word+'의 뜻을 입력하세요') if (Sentence.includes(Word)) { var newSentence = Sentence.replace( Word, `{{c1::${Meaning}::${Word};${Meaning[0]}--}}` ); console.log(newSentence); } let now = new Date(); now.setHours(now.getHours() + 9); let dateString = now.toISOString().replace(/[-T:.Z]/g, '').slice(0, 14); let ankiString = 'Anki ' + dateString.substr(0,8) + '_' +dateString.substr(8,14); await tp.file.rename(ankiString) -%> *** CREATED : <% tp.date.now("YYYY_MM_DD_HHmmss") %> <% setStart %> KOREANKI_VOCA_CLOZE Text: <% newSentence %> Type?: 1 Extra: Title: 문장에 제시된 빈 칸(영어)을 보고, 다음 단어의 뜻(한글)을 맞춰주세요. Category: Unit: Reference: Source: Image: END FILE TAGS: VOCA(ENG to KOR) TARGET DECK: Study English ***