いつも長くなってしまうので今回は短くコンパクトにいきます。今回はmacOSのqlmanageコマンドです(Windows/Linuxには標準でqlmanageに相当するコマンドはありません)。
今回もこれまでと同じようにデスクトップ上にあるsampleディレクトリを利用します。sampleディレクトリがデスクトップ上にない場合はmkdir ~/Desktop/sampleのようにコマンドラインで作成するか、GUIでフォルダとして作成してください。あとはcd ~/Desktop/sampleのようにコマンドを入力して作成したsampleディレクトリをカレントディレクトリとします。
○qlmanageコマンドのオプション
qlmanageコマンドはqlmanage -hとするか何もパラメーターを指定しない場合にヘルプが表示されます。qlmanageは古くからありますが、ここでは10.6.8と15.6のqlmanageコマンドのヘルプの結果を示します。新しいバージョンではデバッグレベルを指定する-dが削除され、-Fが追加されています。とは言え、ほとんど変化がないのでqlmanageコマンドを古いマシンで上手に利用することもできるかもしれません。(サムネールの大量作成など)
------------------------------------------------------------------------------------------
【MacOS 10.6.8】
Usage: qlmanage [OPTIONS] path...
-h Display this help
-r Force reloading Generators list
-r cache Reset thumbnail disk cache
-m [name ...] Display statistics about quicklookd. Stats names:
* plugins Show the generators list
* server Show quicklookd life information
* memory Show quicklookd memory consumption
* burst Show statistics about the last burst
* threads Show concurrent accesses stats
* other Show other information about quicklookd
-d debugLevel Integer between 1-4
-p Compute previews of the documents
-t Compute thumbnails of the documents
-x Use quicklookd (remote computation)
-i Compute thumbnail in icon mode
-s size Size for the thumbnail
-f factor Scale factor for the thumbnail
-z Display generation performance info (don't display thumbnails)
-o dir Output result in dir (don't display thumbnails or previews)
-c contentType Force the content type used for the documents
-g generator Force the generator to use
------------------------------------------------------------------------------------------
【macOS 15.6】
Usage: qlmanage [OPTIONS] path...
-h Display this help
-r Force reloading Generators list
-r cache Reset thumbnail disk cache
-m [name ...] Display statistics about quicklookd. Stats names:
* plugins Show the generators list
* server Show quicklookd life information
* memory Show quicklookd memory consumption
* burst Show statistics about the last burst
* threads Show concurrent accesses stats
* other Show other information about quicklookd
-p Compute previews of the documents
-t Compute thumbnails of the documents
-x Use quicklookd (remote computation)
-i Compute thumbnail in icon mode
-s size Size for the thumbnail
-f factor Scale factor for the thumbnail
-F factor Scale factor for the thumbnail, draw downscaled and compare to 1x
-z Display generation performance info (don't display thumbnails)
-o dir Output result in dir (don't display thumbnails or previews)
-c contentType Force the content type used for the documents
-g generator Force the generator to use
------------------------------------------------------------------------------------------
定番のmanコマンドでqlmanageのマニュアルを表示すると以下のようになります。
man qlmanage
○プレビューを表示する
それではqlmanageコマンドでファイルのプレビューを表示してみましょう。qlmanageコマンドはいろいろな種類のファイル形式に対応しています。QuickLookでプレビューが表示されるファイルであればqlmanageコマンドでも同様に表示できます。
まずプレーンテキストファイルの内容を表示してみましょう。これはqlmanageの後に-pを指定し、その後にファイル名(ファイルパス)を指定します。以下の例では1.txtのプレビューが表示されます。プレビューウィンドウを閉じるか、コマンドラインでcontrolキーを押してからCキーを押すと表示が消え終了します。
qlmanage -p 1.txt
マイクロソフトワードファイルの場合は以下のようになります。
qlmanage -p 1.docx
エクセルの場合は以下のようになります。場合によってはうまく表示されないこともあります。Pagesであれば問題なく表示されます。
qlmanage -p 1.xlsx
前回やったEPUB形式の場合、内容は表示されずアイコンのサムネールが表示されます。
qlmanage -p 1.epub
○複数ファイルのプレビューを表示する
単一のファイルではなく複数のファイルのプレビューも可能です。コマンドラインなのでワイルドカード等を利用することができます。以下のようにすると拡張子がHEICのファイルがプレビューウィンドウに表示されます。
qlmanage -p *.HEIC
.
![美酵 ビファ クレンズドリング 栄養機能⾷品 30包約30日分 [ 発酵 と マグネシウム の力で 美容と健康をサポートし 満腹感 のある 置き換えダイエット ]](https://m.media-amazon.com/images/I/51FnYyHl-kL._SL500_.jpg)
![明治薬品 シボラナイト2 150粒(30日分) [シリアルナンバー付] [ ダイエットサプリ ブラックジンジャー ポリメトキシフラボン 腹部の脂肪を減らす ]](https://m.media-amazon.com/images/I/41U8wqxGJVL._SL500_.jpg)



![hiritu(ヒリツ) バランスリペアシャンプー&ヘアトリートメント オーロラ [シリーズ最高峰のツヤ] きらめき髪 ツヤ髪 浮き毛パヤ毛抑制 ダメージ毛を集中補修 PPT系洗浄成分 アミノ酸系洗浄成分 毛髪補修成分 カシス&パチュリの香り 香水シャンプー](https://m.media-amazon.com/images/I/41FoHN-YVXL._SL500_.jpg)





