Last active
December 29, 2015 10:19
-
-
Save kyokutyo/7656233 to your computer and use it in GitHub Desktop.
Djangoの管理画面から必要な部分だけ抜き出してCSV形式の文字列を吐くアレ。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ary = []; | |
$('tr').each(function() { | |
var $t = $(this), | |
id = $t.find('td:nth-child(2)').text(), | |
uid = $t.find('td:nth-child(3)').text(), | |
order_datetime = $t.find('td:nth-child(4)').text(), | |
price = $t.find('td:nth-child(9)').text(), | |
buy_user_email = $t.find('td:nth-child(15)').text(), | |
sell_user_domain = $t.find('td:nth-child(16)').text(), | |
order_status = $t.find('td:nth-child(18)').text(), | |
shipped_datetime = $t.find('td:nth-child(19)').text(), | |
sbi_id = $t.find('td:nth-child(20)').text(); | |
ary.push('"' + id + '","' + uid + '","' + order_datetime + '","' + price + '","' + buy_user_email + '","' + sell_user_domain + '","' + order_status + '","' + shipped_datetime + '","' + sbi_id + '"' + "\n"); | |
}); | |
console.log(ary.join('')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment