twitter archive to json

  • /*
     * @title twitter archive to json
     * @description Twitterアーカイブのindex.htmlでやってください.出力するJSONの時間的順序はテキトーなので自分で何とかしてください.
     * @include http://*
     * @license MIT License
     * @require Twitter Archive
     */
    (function(){
    var a=[],cnt = 0;
    tweet_index.forEach(function(e){
    var src=document.createElement('script');
    src.src=e.file_name;
    src.onload=function(){ 
     a.push.apply(a,Grailbird.data[e.var_name].reverse());
     if(++cnt >= tweet_index.length) location.href=window.URL.createObjectURL(new Blob([JSON.stringify(a)],{type:'text.html'}));
    };
    document.body.appendChild(src);
    });
    })();
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2013/03/12 14:03:55 - 2013-03-12