ver1.1をsubmit
pdicoのver1.1をiTunes ConnectにSubmitしました。
今回追加した機能は、次の通り。
(以下の機能はReview中の機能のため、すぐにはご利用いただけない点にご注意ください。)
辞書グループ機能
以前、このBlogへのコメントでいただいていたリクエストを受けての修正です。
用途別に辞書ファイルのグループ(例えば、英語辞書グループ、ドイツ語辞書グループなど)を事前に作成して、切り替えられる機能です。
詳細画面における文字サイズ変更
これも、AppStoreでリクエストいただいた機能です。
詳細画面(検索結果のリスト表示から、訳語を選択すると移動する画面)にて、文字のサイズを変更できるように修正しました。
詳細画面で選択した文字からから検索できるボタンの追加
詳細画面にて、文字を選択(コピーのために、長押しした状態)して、選択->検索のボタンを押すと、選択範囲から新たに辞書検索できます。
辞書の区別を行うための色ラベル表示
いくつか辞書を登録していると、どの辞書の単語かわからなくなると思いますので、参考情報として、辞書ごとに色を設定できるようにしました。リスト表示画面や、詳細画面で辞書ごとに設定した色ラベルが表示されます。
と、機能を書いてみても言葉では説明しづらいので、またAppStoreに出る頃にではデモ動画を準備したいと思います。
iTunes Connectメンテナンス
iTunes Connectのメンテナンスで、以前ご紹介したScriptがそのままでは使えなくなったので、修正方法のご紹介。
http://d.hatena.ne.jp/kkatsuyoshi/20100111/1263220233
AppSales-Mobileの変更内容より...
http://github.com/omz/AppSales-Mobile/commit/cbaa5a19834fea092a49841281c0ef5a3bcf4f76
"11.xx.xx"を"17.xx.xx"に変更すれば良さそうだったので変更したらうまく動きました。
require 'rubygems' require 'mechanize' #################### #itunes conncetアカウント $id = 'foo' $pass = 'bar' #################### def login(agent) login_page = agent.get("https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa") login_form = login_page.forms[0] login_form['theAccountName'] = $id login_form['theAccountPW'] = $pass home = agent.submit(login_form) end def checkAndSave(filename, body) original = String.new filename i = 1 while true do if(File.exist?(filename)) then f = open filename s = f.read f.close if(s == body) then return end filename = "#{original}.#{i}" i += 1 else f = open(filename, "wb") f.write body f.close end end end def download(agent) sales_page = agent.get("https://itts.apple.com/cgi-bin/WebObjects/Piano.woa") sales_form = sales_page.forms[1] sales_form['17.9']='Summary' sales_form['17.11'] = 'Daily' sales_form['hiddenSubmitTypeName'] = 'ShowDropDown' download_page = agent.submit(sales_form) download_form = download_page.forms[1] download_form.field_with(:name => '17.13.1').options.each do |option| download_form['17.9']='Summary' download_form['17.11'] = 'Daily' download_form['17.13.1'] = option.value download_form['hiddenSubmitTypeName'] = 'Download' download_form['download'] = 'Download' filename = "#{option.text.gsub('/', '_').downcase}.txt" body = agent.submit(download_form).body checkAndSave(filename, body) end sales_page = agent.get("https://itts.apple.com/cgi-bin/WebObjects/Piano.woa") sales_form = sales_page.forms[1] sales_form['17.9']='Summary' sales_form['17.11'] = 'Weekly' sales_form['hiddenSubmitTypeName'] = 'ShowDropDown' download_page = agent.submit(sales_form) download_form = download_page.forms[1] download_form.field_with(:name => '17.15.1').options.each do |option| download_form['17.9']='Summary' download_form['17.11'] = 'Weekly' download_form['17.15.1'] = option.value download_form['hiddenSubmitTypeName'] = 'Download' download_form['download'] = 'Download' filename = "#{option.text.gsub('/', '_').downcase}.txt" body = agent.submit(download_form).body checkAndSave(filename, body) end end agent = WWW::Mechanize.new login agent download agent
AppSalesへの過去の売り上げ情報の取り込み
AppSales-Mobileに先日のRubyスクリプトでPCでバックアップしたファイルを取り込むためのコードを書いてみました。
1. AppSales-MobileのClasses/Controller/ReportManager.mの40行目あたりに次のコードを入れる。
NSString *path = [[NSBundle mainBundle] resourcePath]; NSArray *filenames_ = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:path error:NULL]; for (NSString *filename in filenames_) { if (![[filename pathExtension] isEqual:@"txt"]){ continue; } NSString *fullPath = [path stringByAppendingPathComponent:filename]; NSString *text = [NSString stringWithContentsOfFile:fullPath encoding:NSUTF8StringEncoding error:NULL]; Day* day = [[Day alloc] initWithCSV:text]; if([filename length] == 14){ //MM_DD_YYYY.txt day.name = [NSString stringWithFormat:@"%@/%@/%@", [filename substringWithRange:NSMakeRange(0, 2)], [filename substringWithRange:NSMakeRange(3, 2)], [filename substringWithRange:NSMakeRange(6, 4)] ]; }else{ //MM_DD_YYYY to MM_DD_YYYY.txt day.name = [NSString stringWithFormat:@"%@/%@/%@", [filename substringWithRange:NSMakeRange(14, 2)], [filename substringWithRange:NSMakeRange(17, 2)], [filename substringWithRange:NSMakeRange(20, 4)] ]; day.isWeek = YES; } NSString *f = [[self docPath] stringByAppendingPathComponent:[day proposedFilename]]; [NSKeyedArchiver archiveRootObject:day toFile:f]; }
2. Resourcesにバックアップしたtxtをコピー。
3. 変更済みのAppSales-Mobileでいったん立ち上げる -> AppSales-MobileのDay形式のファイルがDocumentsディレクトリに作成されます
4. 変更されたAppSales-Mobileに、通常版のAppSales-Mobileを上書きして利用する
という手順で、いい感じにAppSales-Mobileを使えるかなぁ。
iTunes ConnectからSalesを取得するスクリプト
売り上げ推移を毎日記録しておきたいなぁと思ったので、iphoneアプリで稼げるのかさんで公開されているRubyスクリプトベースで、iTunes ConnectからSalesを取得するRubyスクリプトを自分用に作り直してみました。
AppSales-Mobileで見やすくiPhoneでチェックできるのですが、まぁ、自己満足みたいなものです。
特徴としては、
- 今のiTunes Connectの今(2010/01/11)の構成に対応
- リストからすべてのDaily/Weeklyのレポートをいったん取得
- ダウンロード済みのファイルと内容の差異を確認して、異なればファイルに保存
するようにしたので、毎日実行しなくても大丈夫なはず。
require 'rubygems' require 'mechanize' #################### #itunes conncetアカウント $id = 'foo' $pass = 'bar' #################### def login(agent) login_page = agent.get("https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa") login_form = login_page.forms[0] login_form['theAccountName'] = $id login_form['theAccountPW'] = $pass home = agent.submit(login_form) end def checkAndSave(filename, body) original = String.new filename i = 1 while true do if(File.exist?(filename)) then f = open filename s = f.read f.close if(s == body) then return end filename = "#{original}.#{i}" i += 1 else f = open(filename, "wb") f.write body f.close end end end def download(agent) sales_page = agent.get("https://itts.apple.com/cgi-bin/WebObjects/Piano.woa") sales_form = sales_page.forms[1] sales_form['11.9']='Summary' sales_form['11.11'] = 'Daily' sales_form['hiddenSubmitTypeName'] = 'ShowDropDown' download_page = agent.submit(sales_form) download_form = download_page.forms[1] download_form.field_with(:name => '11.13.1').options.each do |option| download_form['11.9']='Summary' download_form['11.11'] = 'Daily' download_form['11.13.1'] = option.value download_form['hiddenSubmitTypeName'] = 'Download' download_form['download'] = 'Download' filename = "#{option.text.gsub('/', '_').downcase}.txt" body = agent.submit(download_form).body checkAndSave(filename, body) end sales_page = agent.get("https://itts.apple.com/cgi-bin/WebObjects/Piano.woa") sales_form = sales_page.forms[1] sales_form['11.9']='Summary' sales_form['11.11'] = 'Weekly' sales_form['hiddenSubmitTypeName'] = 'ShowDropDown' download_page = agent.submit(sales_form) download_form = download_page.forms[1] download_form.field_with(:name => '11.15.1').options.each do |option| download_form['11.9']='Summary' download_form['11.11'] = 'Weekly' download_form['11.15.1'] = option.value download_form['hiddenSubmitTypeName'] = 'Download' download_form['download'] = 'Download' filename = "#{option.text.gsub('/', '_').downcase}.txt" body = agent.submit(download_form).body checkAndSave(filename, body) end end agent = WWW::Mechanize.new login agent download agent
$id = 'foo', $pass = 'bar'に自分のアカウントを設定し、事前に保存対象のディレクトリにcdして使ってください。また、事前にgemでMechanizeをインストールする必要があります。手元のWindows(Cygwin), Mac環境で動作しました。
PDIC Users Pageさんの英和,和英,英英辞典
辞書の追加方法で簡単に紹介させていただいた,PDIC Users Pageさんの辞書を試しました.
PDIC形式で,英和(PDEJ2005),和英(PDEDICT)そして,英英(PDWD1913)辞典を公開されています.
気づいた注意点:
- 大文字/小文字を区別します.
- 和英で「りんご」や「リンゴ」では引けず「林檎」で引く必要があった(pdicoの仕様で見出し語前方一致でのみ検索するため)
あけましておめでとうございます。
年末にSubmitしたpdicoのver1.0.1へのバージョンアップが無事にReady for Saleになりました。
Date | User | Status |
---|---|---|
December 31, 2009 13:54 | Apple | Ready for Sale |
December 29, 2009 10:28 | Apple | In Review |
December 28, 2009 20:43 | kkatsuyoshi | Waiting For Review |
(*日時はいずれもPST)
前回はSubmitから5日間でReady for Sale, 今回はマイナーバージョンアップのためか、3日程度で通過しました。
今回のSubmitでわかったことは...
- 大晦日も稼働日
- バージョンアップすると、古い方の(今回の場合ver1.0)Recent Activityが消える(Reviewにかかった日数などの情報が見れなくなる)
- 売れてないアプリでも、区別せずレビューしてもらえる(多分)