Skip to content
Snippets Groups Projects
Commit f892820e authored by Philipp Pospischil's avatar Philipp Pospischil
Browse files

chore: initial commit

parents
No related branches found
No related tags found
No related merge requests found
.parcel-cache
dist
node_modules
# Solution for Anki scripting crimes, Part 1: Escape the text box and use npm dependencies on Anki cards
Hi there, did you come here from my blog post [Commiting scripting crimes in Anki, Part 1: Escape the text box and use npm dependencies on Anki cards](https://tapirbug.xyz/en/post/anki-scripting-crimes-part-1).
This repository contains the complete source code that we built together over
the article.
import HanziWriter from "hanzi-writer"
const kanji = document.getElementById("kanji").innerText
console.error("kanji: " + kanji)
const hanziWriterContainer = document.createElement("div")
document.body.appendChild(hanziWriterContainer)
HanziWriter.create(hanziWriterContainer, kanji).animateCharacter()
{
"replacements": {
"Front": "sake",
"Back": "酒"
}
}
\ No newline at end of file
{{FrontSide}}
<hr id="answer">
<div id="kanji">{{Back}}</div>
<script type="module">
import "./animation.js"
</script>
Translate to Kanji please:<br>
{{Front}}
This diff is collapsed.
{
"name": "anki-test",
"version": "1.0.0",
"description": "",
"license": "ISC",
"author": "",
"type": "commonjs",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"hanzi-writer": "^3.7.2"
},
"devDependencies": {
"parcel": "^2.14.4",
"parcel-transformer-anki-tags": "^0.1.2"
},
"@parcel/bundler-default": {
"minBundles": 10000
}
}
{
"extends": "@parcel/config-default",
"transformers": {
"*.html": [ "parcel-transformer-anki-tags", "..." ]
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment