foobar2000 v0.9.6.1の復旧・設定メモ

  • User Profile FolderからApplicationInstallFolder(ProgramFiles)配下へ変更 [General] - "Location of Configuration Files" (バックアップを取りやすくするため)
  • SQLite DataBase を利用。Switch [Tools]-[Custom Info]-"Storage Method Selection"
  • タグをDBのみに保存 [Tools]-[Playback Statics Custom]-"Playback Statics Settings"-Database: "only foo_custominfo database"
  • バックアップしてあったSQLiteDB・設定ファイルなどをコピーして上書き。

Last.fmプラグインの登録

  • Last.fm pluginの登録。Last.fm Playerのメニューから[Tool]-[Get Plugin]-[Select Plugins]-[Add]で

Windowsの「既定のブラウザ」にFirefox, Opera, DonutQ, IEなどをトグルで切り換えて変更するVBSスクリプト(http, https, .htm, .html対応版)

「Windowsの「既定のブラウザ」にFirefox, Opera, DonutQ, IEなどをトグルで切り換えるVBSスクリプト」という記事を投稿したのですが、このスクリプトがhttpプロトコルhttpsプロトコルだけにしか対応していなかったので、今回 .htmファイルと.htmlファイルへの関連付けの対応を行いました。

OperaなどがDDEを使う必要がある注意点がありますが、レジストリなどにキーを追加しただけです。


動作は以前と同じで、VBSスクリプトのショートカットをクリックする度に、既定のブラウザがFirefoxOperaDonutQIEFirefox という順番で切り換わって変更される感じ。Safari, Chrome, Sleipnirなどを使っている場合は、スクリプトなどにご自由に加えて下さい。

尚、よくわからずに操作していますので、自己責任で(ぇ

VBSスクリプト

' ブラウザをトグルで切り換えるVBSスクリプト
' ※参考にさせて頂いたページ
' [観] IE が標準のブラウザ(通常使用するブラウザ)に戻らない
' http://watcher.moe-nifty.com/memo/2006/10/ie__2cb2.html
' [観] IE が標準のブラウザ(通常使用するブラウザ)に戻らない ― sleipnir から IE に戻す場合
' http://watcher.moe-nifty.com/memo/2007/07/ie_sleipnir_ie_1528.html
'Windowsの「既定のブラウザ」をワンタッチで切り換えるVBSスクリプト - 雑木林とコンピュータのメモ帳
'http://d.hatena.ne.jp/dolphinkick/20080405/p1
'Windowsの「既定のブラウザ」にFirefox, Opera, DonutQ, IEなどをトグルで切り換えるVBSスクリプト - 雑木林とコンピュータのメモ帳
'http://d.hatena.ne.jp/dolphinkick/20090123/Change_Default_Browser

Option Explicit

Dim objShell
Set objShell = WScript.CreateObject("WScript.Shell")

Dim strRegHttpKey, strRegHttpsKey, strRegMyHtmlfileKey
strRegHttpKey = "HKEY_CLASSES_ROOT\HTTP\"
strRegHttpsKey = "HKEY_CLASSES_ROOT\HTTPS\"
strRegMyHtmlfileKey = "HKEY_CLASSES_ROOT\MyHtmlfile\"

Dim strRegHttpEntry, strRegHttpsEntry, strRegMyHtmlfileEntry
strRegHttpEntry = strRegHttpKey & "shell\"
strRegHttpsEntry = strRegHttpKey & "shell\"
strRegMyHtmlfileEntry = strRegMyHtmlfileKey & "shell\"

Dim nowShell
nowShell = objShell.RegRead(strRegHttpEntry)
WScript.Echo "現在のHTTPのシェルは " & nowShell & " です。"

Select Case nowShell
  Case "Firefox"
    objShell.RegWrite strRegHttpEntry, "DonutQ", "REG_SZ"
    objShell.RegWrite strRegHttpsEntry, "DonutQ", "REG_SZ"
    objShell.RegWrite strRegMyHtmlfileEntry, "DonutQ", "REG_SZ"
  Case "DonutQ"
    objShell.RegWrite strRegHttpEntry, "Opera", "REG_SZ"
    objShell.RegWrite strRegHttpsEntry, "Opera", "REG_SZ"
    objShell.RegWrite strRegMyHtmlfileEntry, "Opera", "REG_SZ"
  Case "Opera"
    objShell.RegWrite strRegHttpEntry, "IE", "REG_SZ"
    objShell.RegWrite strRegHttpsEntry, "IE", "REG_SZ"
    objShell.RegWrite strRegMyHtmlfileEntry, "IE", "REG_SZ"
  Case "IE"
    objShell.RegWrite strRegHttpEntry, "Firefox", "REG_SZ"
    objShell.RegWrite strRegHttpsEntry, "Firefox", "REG_SZ"
    objShell.RegWrite strRegMyHtmlfileEntry, "Firefox", "REG_SZ"
  Case Else
    objShell.RegWrite strRegHttpEntry, "Firefox", "REG_SZ"
    objShell.RegWrite strRegHttpsEntry, "Firefox", "REG_SZ"
    objShell.RegWrite strRegMyHtmlfileEntry, "Firefox", "REG_SZ"
End Select

nowShell = objShell.RegRead(strRegHttpEntry)
WScript.Echo "HTTPのシェルを " & nowShell & " に変更しました。"

事前にレジストリに登録する内容

前提条件の各ブラウザのパスは、以下の通りです。ブラウザをインストールした環境に合わせて変更。

レジストリは新しく"MyHtmlfile"というキーを作っています。従来の設定に戻したい場合には

  • HKEY_CLASSES_ROOT\.htm
  • HKEY_CLASSES_ROOT\.html

のデータを元の値にもどすだけです。
参考までに元の値は以下のようになっているようです。

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.html]
@="MyHtmlfile"
"Content Type"="text/html"
"PerceivedType"="text"

[HKEY_CLASSES_ROOT\.htm]
@="MyHtmlfile"
"Content Type"="text/html"
"PerceivedType"="text"

[HKEY_CLASSES_ROOT\MyHtmlfile]
@="My HTML Document"
[HKEY_CLASSES_ROOT\MyHtmlfile\DefaultIcon]
@="C:\\Program Files\\Internet Explorer\\iexplore.exe,1"
[HKEY_CLASSES_ROOT\MyHtmlfile\shell]
@="Firefox"

[HKEY_CLASSES_ROOT\MyHtmlfile\shell\DonutQ\command]
@="\"D:\\Program Files\\DonutQ\\DonutQ.exe\" \"%1\""

[HKEY_CLASSES_ROOT\MyHtmlfile\shell\Firefox\command]
@="\"D:\\Program Files\\Mozilla Firefox\\firefox.exe\" -requestPending -osint -url \"%1\""
[HKEY_CLASSES_ROOT\MyHtmlfile\shell\Firefox\ddeexec]
@="\"%1\",,0,0,,,,"
[HKEY_CLASSES_ROOT\MyHtmlfile\shell\Firefox\ddeexec\Application]
@="Firefox"
[HKEY_CLASSES_ROOT\MyHtmlfile\shell\Firefox\ddeexec\Topic]
@="WWW_OpenURL"

[HKEY_CLASSES_ROOT\MyHtmlfile\shell\IE\command]
@="\"C:\\Program Files\\Internet Explorer\\iexplore.exe\" \"%1\""

[HKEY_CLASSES_ROOT\MyHtmlfile\shell\Opera\command]
@="\"C:\\Program Files\\Opera\\opera.exe\" \"%1\""
[HKEY_CLASSES_ROOT\MyHtmlfile\shell\Opera\ddeexec]
@="\"%1\""
[HKEY_CLASSES_ROOT\MyHtmlfile\shell\Opera\ddeexec\Application]
@="Opera"
[HKEY_CLASSES_ROOT\MyHtmlfile\shell\Opera\ddeexec\Topic]
@="WWW_OpenURL"

[HKEY_CLASSES_ROOT\HTTP\shell\DonutQ\command]
@="\"D:\\Program Files\\DonutQ\\DonutQ.exe\" %1"
[HKEY_CLASSES_ROOT\HTTP\shell\Firefox\command]
@="D:\\PROGRA~1\\MOZILL~1\\FIREFOX.EXE -requestPending -osint -url \"%1\""
[HKEY_CLASSES_ROOT\HTTP\shell\Opera\command]
@="\"D:\\Program Files\\Opera\\Opera.exe\" \"%1\""
[HKEY_CLASSES_ROOT\HTTP\shell\IE\command]
@="\"C:\\Program Files\\Internet Explorer\\iexplore.exe\" \"%1\""

[HKEY_CLASSES_ROOT\HTTPS\shell\DonutQ\command]
@="\"D:\\Program Files\\DonutQ\\DonutQ.exe\" \"%1\""
[HKEY_CLASSES_ROOT\HTTPS\shell\Firefox\command]
@="D:\\PROGRA~1\\MOZILL~1\\FIREFOX.EXE -requestPending -osint -url \"%1\""
[HKEY_CLASSES_ROOT\HTTPS\shell\Opera\command]
@="\"D:\\Program Files\\Opera\\Opera.exe\" \"%1\""
[HKEY_CLASSES_ROOT\HTTPS\shell\IE\command]
@="\"C:\\Program Files\\Internet Explorer\\iexplore.exe\" \"%1\""


以上です。

Windowsの「既定のブラウザ」にFirefox, Opera, DonutQ, IEなどをトグルで切り換えるVBSスクリプト

※2009/01/25追記 スクリプトを改良した「Windowsの「既定のブラウザ」にFirefox, Opera, DonutQ, IEなどをトグルで切り換えるVBSスクリプト(http, https, .htm, .html対応版)」という記事を投稿しました。


以前、「Windowsの「既定のブラウザ」をワンタッチで切り換えるVBSスクリプト」という記事を書いたのですが、それの焼き直しです。
以前はFirefoxOperaの二つだけだったのでif文を使ったのですが、今回はDonutQ, IEなども使うためにcase文でトグルさせて既定のブラウザを切り換えます。
VBSスクリプトのショートカットをクリックする度に、既定のブラウザがFirefoxOperaDonutQIEFirefox という順番で切り換わる感じ。Safari, Chrome, Sleipnirなどを使っている場合は、スクリプトなどにご自由に加えて下さい。

尚、よくわからずに操作していますので、自己責任で(ぇ

VBSスクリプト

' ブラウザをトグルで切り換えるVBSスクリプト
' ※参考にさせて頂いたページ
' [観] IE が標準のブラウザ(通常使用するブラウザ)に戻らない
' http://watcher.moe-nifty.com/memo/2006/10/ie__2cb2.html
' [観] IE が標準のブラウザ(通常使用するブラウザ)に戻らない ― sleipnir から IE に戻す場合
' http://watcher.moe-nifty.com/memo/2007/07/ie_sleipnir_ie_1528.html
'Windowsの「既定のブラウザ」をワンタッチで切り換えるVBSスクリプト - 雑木林とコンピュータのメモ帳
'http://d.hatena.ne.jp/dolphinkick/20080405/p1

Option Explicit

Dim objShell
Set objShell = WScript.CreateObject("WScript.Shell")

Dim strRegHttpKey, strRegHttpsKey, strRegHttpEntry, strRegHttpsEntry
strRegHttpKey = "HKEY_CLASSES_ROOT\HTTP\"
strRegHttpsKey = "HKEY_CLASSES_ROOT\HTTPS\"
strRegHttpEntry = strRegHttpKey & "shell\"
strRegHttpsEntry = strRegHttpKey & "shell\"

Dim nowShell
nowShell = objShell.RegRead(strRegHttpEntry)
WScript.Echo "現在のHTTPのシェルは " & nowShell & " です。"

Select Case nowShell
  Case "Firefox"
    objShell.RegWrite strRegHttpEntry, "DonutQ", "REG_SZ"
    objShell.RegWrite strRegHttpsEntry, "DonutQ", "REG_SZ"
  Case "DonutQ"
    objShell.RegWrite strRegHttpEntry, "Opera", "REG_SZ"
    objShell.RegWrite strRegHttpsEntry, "Opera", "REG_SZ"
  Case "Opera"
    objShell.RegWrite strRegHttpEntry, "IE", "REG_SZ"
    objShell.RegWrite strRegHttpsEntry, "IE", "REG_SZ"
  Case "IE"
    objShell.RegWrite strRegHttpEntry, "Firefox", "REG_SZ"
    objShell.RegWrite strRegHttpsEntry, "Firefox", "REG_SZ"
  Case Else
    objShell.RegWrite strRegHttpEntry, "Firefox", "REG_SZ"
    objShell.RegWrite strRegHttpsEntry, "Firefox", "REG_SZ"
End Select

nowShell = objShell.RegRead(strRegHttpEntry)
WScript.Echo "HTTPのシェルを " & nowShell & " に変更しました。"

事前にレジストリに登録する内容

前提条件の各ブラウザのパスは、以下の通りです。ブラウザをインストールした環境に合わせて変更。

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\HTTP\shell\DonutQ]
@="DonutQ"
[HKEY_CLASSES_ROOT\HTTP\shell\DonutQ\command]
@="\"D:\\Program Files\\DonutQ\\DonutQ.exe\" %1"

[HKEY_CLASSES_ROOT\HTTP\shell\Firefox]
[HKEY_CLASSES_ROOT\HTTP\shell\Firefox\command]
@="D:\\PROGRA~1\\MOZILL~1\\FIREFOX.EXE -requestPending -osint -url \"%1\""

[HKEY_CLASSES_ROOT\HTTP\shell\Opera]
[HKEY_CLASSES_ROOT\HTTP\shell\Opera\command]
@="\"D:\\Program Files\\Opera\\Opera.exe\" \"%1\""

[HKEY_CLASSES_ROOT\HTTP\shell\IE]
[HKEY_CLASSES_ROOT\HTTP\shell\IE\command]
@="\"C:\\Program Files\\Internet Explorer\\iexplore.exe\" \"%1\""


[HKEY_CLASSES_ROOT\HTTPS\shell\DonutQ]
@="DonutQ"
[HKEY_CLASSES_ROOT\HTTPS\shell\DonutQ\command]
@="\"D:\\Program Files\\DonutQ\\DonutQ.exe\" \"%1\""

[HKEY_CLASSES_ROOT\HTTPS\shell\Firefox]
[HKEY_CLASSES_ROOT\HTTPS\shell\Firefox\command]
@="D:\\PROGRA~1\\MOZILL~1\\FIREFOX.EXE -requestPending -osint -url \"%1\""

[HKEY_CLASSES_ROOT\HTTPS\shell\Opera]
[HKEY_CLASSES_ROOT\HTTPS\shell\Opera\command]
@="\"D:\\Program Files\\Opera\\Opera.exe\" \"%1\""

[HKEY_CLASSES_ROOT\HTTPS\shell\IE]
[HKEY_CLASSES_ROOT\HTTPS\shell\IE\command]
@="\"C:\\Program Files\\Internet Explorer\\iexplore.exe\" \"%1\""


以上です。

ChangeLogメモをWindows/Linux/FirefoxのDropboxで同期をさせ一元管理

現在、以下の環境でそれぞれChangeLogメモを使っています。これをDropboxを使って同期をさせて一元管理させます。(Dropboxでなくても、"Live Mesh"などでもWindowsだけなら構いません)

※尚、お約束ですが作業をされる場合は事前にバックアップを!

Windows XP: xyzzyの"changelogmemo for xyzzy"

  • 環境変数 XYZZYHOMEで指定しているxyzzyの設定ファイル(例: ~/.xyzzy)の中でchangelogmemoのパス(例:~/cl/config.l)を指定している箇所を確認
(require "changelogmemo/main")
;("名前" . "設定ファイル") のリスト(複数指定可)
(setq *cl-config-file-alist*
      '(("changelogmemo" . "~/cl/config.l")))
(setq *cl-file* "~/My Dropbox/ChangeLog")
Firefox: QuickNote拡張

Linux(Ubuntu 8.04 LTS): Emacs

Emacsの設定ファイルでChangeLogのパスをDropboxへ変更してもよかったのですが、コマンド一発で作業が終わるのでシンボリックリンクを使いました。

Firefox: QuickNote拡張


以上です。

*1:~/ChangeLog からリンボリックリンクを張ると、Dropboxで同期を取るとなぜかリンクが切れてChangeLogの実体が二つになってしまったので、~/Dropbox/ChangeLogからリンクを張りました。

*2:2009-02-20追記:シンボリックリンクの同じ過ちを『Dropbox』フォルダ内にないファイルやフォルダを同期 : ライフハッカー[日本版]がしているのでトラックバック

Weave 0.2.98とアカウントの0.3対応

2009/1/9付けでFirefoxの同期アドオンのWeave 0.2.98がリリースされています。

一般にリリースされているバージョン 0.2.7.1以前ではなく、0.2.9以降を使う場合にはWeaveのサーバのアカウントをAPIのバージョン0.3対応にするために、以下のサイトからユーザ名とパスワードを登録して初期化する必要があります。

手順

Mozilla Labs Forum - Weave 0.2.98 (0.3 M2+)
https://labs.mozilla.com/forum/comments.php?DiscussionID=4950 より引用

1) Activate 0.3 support for your Weave account (or set up your own Weave server).
2) Install the XPI.
3) Select "Sign In..." from the Weave menu, and fill in your info (use whatever you like for the passphrase), and log in.
4) Select "Sync Now" from the Weave menu.

  1. Weaveのアカウントの0.3対応の登録 Activate your Weave 0.3 account https://services.mozilla.com/0.3/api/register/activate
  2. Weaveアドオンのインストール http://people.mozilla.com/~cbeard/weave/dist/


以上です。

主な変更点

https://services.mozilla.com/updated/?version=0.2.98

Weave v0.2.98 (January 9th, 2009)

  • Fix a caching problem that resulted in the error "this._tail id null"
  • Catch errors when changing history item IDs (bug 472480)
  • Set GUID when creating history entries
  • Add record parsing functionality to process incoming records as they are coming in (not hooked up yet)
  • Fix a login problem where Weave would report a successful login, when it actually failed
  • Several Fennec UI improvements and fixes
  • History support on Fennec!
  • Fix bug 472853
  • Fix orphaned bookmarks if they are found locally

Weave v0.2.97 (January 6th, 2009)

  • Enable Minefield support (3.2.*)
  • Fix a problem where '0' was considered a valid Places item ID (but it's not)
  • Simplify Engine definition for writing new Engines
  • Sync clients list/names/types

Weave v0.2.96 (January 3rd, 2009)

  • Improved memory performance
  • More careful caching, explicit GCing
  • Create bookmark/history records as they are needed instead of all in one go
  • Fixed problems when syncing bookmark trees (bookmarks would end up jumbled), as well as ordering problems (correct folder but wrong index)
  • Partially re-enabled syncing client guids and names

Firefox3のSQLiteをreindex(とvacuum)をしてみたよ

firefox 3が遅くなった→ SQLite reindexで解決&高速化 - しおそると」や「Firefox 3:placesをVACUUMして劇的に起動が速くなる場合もあるそうです: べつになんでもないこと」を拝見してFirefoxSQLiteファイルをreindex(と以前やったvacuum)を行ってみました。

2009-02-12 Ubuntu 8.04 (Linux)上での結果を追記

先に結果を書いておくと、私の環境では体感速度は変わりませんでした。
※2009-02-17 体感ではなく計測してみました。「FirefoxのSQLiteの圧縮後の速度を、体感じゃなく計測してみたよ。」

環境

  • Windows XP SP3
  • Firefox3.0.5
  • SQLite 3.6.7 (Precompiled Binaries For Windows) A command-line program for accessing and modifing SQLite databases. をダウンロードして、解凍してsqlite3.exeを適当なフォルダに設置。同じフォルダにFirefoxsqliteファイルをコピー

手順

  1. Firefoxを完全に終了させる。タスクマネージャーなどで確認。
  2. Firefoxsqliteファイルをバックアップしておく
  3. sqlite3.exeと同じ場所にFirefoxsqliteファイルをコピー
  4. reindexを実行。コマンドプロンプトから「>sqlite3.exe places.sqlite reindex」を入力。これを各sqliteファイルに対して実行
  5. ついでにvacuumも実行。コマンドプロンプトから「>sqlite3.exe places.sqlite vacuum」を入力。これを各sqliteファイルに対して実行

結果

vacuumの結果、ファイルサイズは以下のように小さくなりました。

  • formhistory.sqlite サイズ 1,043KB→1,040KB -0.3%縮小
  • places.sqlite サイズ 18,760KB→16,600KB -11.5%縮小
  • urlclassifier3.sqlite 41,436KB→33,832KB -18.4%縮小


以上です。参考までに。

2009-02-12 追記 Ubuntu 8.04 TLS (Linux)での"SQLite database browser"による"Compact Database"の実行結果

  • OS: Ubuntu 8.04 TLS
  • Firefox 3.0.6
  • Tool: SQLite database browser (Ubuntuの「アプリケーションの追加と削除」からインストール)のメニューからFile→Compact Databaseを実行

Firefox同士のブックマーク・履歴などはFoxmarks/Weaveで同期しているにもかかわらず、Windows上での実行結果と大きく異なりました。

  • places.sqlite 20.9MB→1.7MB
  • urlclassifier3.sqlite 51.1MB→14.6MB

原因はツールの違い??? 原因はツールの違いではなく、Firefoxの環境(履歴など?)の違いのようです。*1

これ位サイズが違ってくると、Dropboxなどで共有していると同期の速さが違ってきそうです。


参考

firefox 3が遅くなった→ SQLite reindexで解決&高速化 - しおそると
http://www.sio.no-ip.com/mt/shio/archives/2008/10/firefox-3-sqlit.html

Firefox 3:placesをVACUUMして劇的に起動が速くなる場合もあるそうです: べつになんでもないこと
http://puppet.asablo.jp/blog/2009/01/05/4043644

Firefox3でのsqliteファイルをvacuumで整理・最適化してみたよ - 雑木林とコンピュータのメモ帳
http://d.hatena.ne.jp/dolphinkick/20080914/p1

*1:Ubuntu上からWindowsNTFS領域をmountして、Ubuntuの"SQLite database browser"でWindows上のFirefoxSQLiteにCompact Databaseを実行したのですが、Windows上でreindex, vacuumを実行したときと結果に変わりがなかったため。

Weave 0.2.94リリース

1時間ほど前ですが、Weave 0.2.94がリリースされたようです。(バグがあったようで、すぐにバージョン 0.2.95 がリリースされました。)
時間があれば、インストールしてみたいと思います。

Mozilla Labs Forum - Weave 0.2.94 (0.3 M2+)
https://labs.mozilla.com/forum/comments.php?DiscussionID=4907

I've just rolled a new snapshot build of Weave. The differences since the last snapshot (0.2.93) are:

  • Should now catch login errors correctly instead of pretending login went ok.
  • Improved memory performance during sync. Weave will force GC when low on memory. This now enables me to sync all of my bookmarks to my Fennec device in one go (~700 bookmarks in all). It's a small code change but a huge step forward for Fennec support!
  • Due to an oversight in previous snapshots, they will not be auto-updated (because doing so would update everyone, including 0.2 users). This new version will now get updates separately, so you won't need to re-install the extension yourself.

Please note, especially if you haven't used 0.3 before:

  • You need an existing 0.2 account to be able to activate 0.3 support, and once activated you can't revert to 0.2. You may also set up your own server, of course.
  • Although we think 0.3 is already better than 0.2, there are still some pretty rough edges. Please see our 0.3 bug tree and file bugs if you don't see the bug you found.
  • Only bookmarks and history sync are supported. Other data types will follow soon after the holidays.

Setup instructions:

1) Activate 0.3 support for your Weave account.
2) Install the XPI.
3) Select "Sign In..." from the Weave menu, and fill in your info (use whatever you like for the passphrase), and log in.
4) Select "Sync Now" from the Weave menu.

Repeat steps 2-4 on any other machines/profiles you wish to sync.

A quick troubleshooting tip--If syncs are succeeding but you see differences not syncing across machines, you can try to reset the last sync timestamp: go to about:config, search for weave, and reset the bookmarks.lastSync pref. That will cause an initial sync to happen.