Skip to content

Instantly share code, notes, and snippets.

@tuanminh20
Last active April 23, 2017 10:18
Show Gist options
  • Save tuanminh20/83ae227052988573a990a143b9676183 to your computer and use it in GitHub Desktop.
Save tuanminh20/83ae227052988573a990a143b9676183 to your computer and use it in GitHub Desktop.
Go to: http://mina.mazii.net/#/minna; chọn bài; Ctrl+Shift+J; paste; import to Quizlet
// Template term1\tmeaning1;term2\tmeaning2 ...
$(".list-kotoba").map(function(){
var hira = ($(this).find(".item-japanese").html() || "").trim();
var kanji = ($(this).find(".item-roumaji").html() || "").trim();
var meaning = ($(this).find(".item-vietnamese").html() || "").trim();
var hira_meaning = hira + "," + meaning;
var kanji_hira = kanji + "," + hira;
var kanji_hira_meaning = kanji_hira + "\n" + meaning;
if(kanji){return kanji_hira_meaning;} else{return hira_meaning;};
}).get().join(";");
@tuanminh20
Copy link
Author

Export only verbs (hira/meaning version)

$(".list-kotoba").map(function(){
	var hira = ($(this).find(".item-japanese").html() || "").trim();
	var _kanji = ($(this).find(".item-roumaji").html() || "").trim().split("-");
	var kanji = _kanji[0];
	var hanviet = _kanji[1];
	var meaning = ($(this).find(".item-vietnamese").html() || "").trim();

	var hira_meaning = hira + "\t" + meaning;
	var kanji_hira = kanji + "\t" + hira;
	var kanji_hira_hanviet_meaning = kanji_hira + " -" + hanviet + "\n" + meaning;

	if(hira.indexOf("ます") != -1){return hira_meaning};
}).get().join(";");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment