Browse Source

fix sound tags

main
parent
commit
a2e6e66bcf
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      scripts/query-anki.ts

+ 3
- 2
scripts/query-anki.ts View File

@ -35,7 +35,8 @@ const soundTag = {
};
export async function addSoundTag(query: string, fieldNames: string[]) {
query += ' (' + fieldNames.map((f) => `-${f}:`).join(' OR ') + ')';
query +=
' (' + fieldNames.map((f) => `(-${f}: -${f}:[sound:*)`).join(' OR ') + ')';
const anki = new AnkiConnect();
anki
@ -82,5 +83,5 @@ export async function addSoundTag(query: string, fieldNames: string[]) {
}
if (require.main === module) {
addSoundTag('jp.takoboto', ['SentenceAudio', 'JapaneseAudio']);
addSoundTag('note:jp.takoboto', ['SentenceAudio', 'JapaneseAudio']);
}

Loading…
Cancel
Save