Skip to content

Instantly share code, notes, and snippets.

@jasonappah
Last active December 15, 2022 21:02
Show Gist options
  • Save jasonappah/8d7f34db0f730e0b0d62e583a40ec92f to your computer and use it in GitHub Desktop.
Save jasonappah/8d7f34db0f730e0b0d62e583a40ec92f to your computer and use it in GitHub Desktop.
Import Quizlet sets into Anki
// 12-15-2022 - lazy attempt at yeeting a quizlet deck into a format i can import into anki :)
// to use, copy this into your browser's console and run it.
// as soon as you run it, be sure to focus the tab so the copy to clipboard actually works
// then paste output into a text file and profit
setTimeout(() => navigator.clipboard.writeText(Array.from(document.getElementsByClassName("SetPageTerm-content")).reduce((acc, curr)=>{
const [qEl, aEl] = curr.children
acc += `${qEl.innerText}; "${aEl.innerHTML.replaceAll('"', '""')}"
`
return acc
}, ``)), 3000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment