« 2014年2月 | トップページ | 2014年4月 »

[AppleScripts]GoogleMapのURLからAdobe Bridge用のGPS用の値を作る【v4新しいGoogleMapのURL対応】

GoogleMapのURLからBridge用のGPS用の値を作る

第4弾
新しいGoogleMapのURL

Website_image20140330_225111


↑この@マークがあるタイプのURLに対応しました…と

elevationが加わったので、海抜も入れてあります

Website_image20140330_225523

出来上がったXMPファイルは
ブリッジから使います

Website_image20140330_225511


まぁ
自分ようだかんね笑


(*
GoogleMap2BridgeV4.0.scpt
2014年 新しくなったGoogleMapURL
まだ作りかけですが
なんとか動作はする
時間があれば後日ちゃんと書き直したい
*)

-----------設定項目
(*
True 著作を有している
False 著作フリー又は無し
*)
set theRights to "True" as «class utf8»
-----著作情報の掲載してあるWEBページ
set theWebStatement to "http://creativecommons.org/licenses/by-nc-nd/4.0/deed.ja" as «class utf8»
------著作権情報
set theDcRights to "Creative Commons Attribution-NonCommercial-NoDerivatives 4.0" as «class utf8»
-----使用にともなう制限について
set theUsageTerms to "商用利用はお問い合わせ下さい" as «class utf8»
-----作成者WEB
set theCiUrlWork to "https://force4u.cocolog-nifty.com/" as «class utf8»





-----------------------------ここから本処理
-----ファイル名初期化
set theXmpFileName to "" as text
-----検索語句初期化
set theSearchTXT to ""
--------------デフォルトアンサー用にシドニー・オペラハウスのURL
set theOrgGoogleMapUrl to "https://www.google.com/maps/place/%E3%82%AA%E3%83%9A%E3%83%A9%E3%83%8F%E3%82%A6%E3%82%B9/@-33.856731,151.215133,17z/data=!3m1!4b1!4m2!3m1!1s0x6b12ae665e892fdd:0x3133f8d75a1ac251" as «class utf8»
--------------URLをペーストするダイアログを出す
display dialog "GoogleMapURLをペーストしてください" default answer the theOrgGoogleMapUrl with icon 1 with title "GoogleMapURLをペーストしてください" default button 1
--------------リザルトをリスト形式で格納
copy the result as list to {the theOrgGoogleMapUrl, BottPressNo}
--------------テキスト形式に変更
set theOrgGoogleMapUrl to theOrgGoogleMapUrl as text
--------------区切りを/にしてリスト形式で取得
set AppleScript's text item delimiters to {"/"}
set listGoogleMapUrl to every text item of theOrgGoogleMapUrl as list
--------------区切りを戻す
set AppleScript's text item delimiters to {""}
----/////---------追加した処理
--------------検索語句のある場合
if theOrgGoogleMapUrl contains "/search/" then
set theSearchTXT to do shell script "echo " & quoted form of theOrgGoogleMapUrl & "| awk -F \"search/\" '{print($2)}' |awk -F \"/\" '{print($1)}' " as «class utf8»
set theSearchTXT to my doDecodeURL(theSearchTXT) as «class utf8»
end if
--------------プレイスの場合
if theOrgGoogleMapUrl contains "/place/" then
set theSearchTXT to do shell script "echo " & quoted form of theOrgGoogleMapUrl & "| awk -F \"place/\" '{print($2)}' |awk -F \"/\" '{print($1)}' " as «class utf8»
set theSearchTXT to my doDecodeURL(theSearchTXT) as «class utf8»
end if

if theOrgGoogleMapUrl does not contain "@" then
display alert "新しいGoogleMapURLではありません"
error "URLに@が含まれていません" number -128
end if


--------------リピートで繰り返し回数分でリストから取得する部位を変更するための変数
set numLine to 1 as number
repeat
try
--------------リスト取得
set theLineData to (item numLine of listGoogleMapUrl) as text
--------------取得したリストに@があった場合
if theLineData contains "@" then
--------------取得結果をテキストに変更
set theGoogleLlNoList to theLineData as text
--------------区切り文字をカンマにしてリストにする
set AppleScript's text item delimiters to {","}
set listGoogleLlNoList to every text item of theGoogleLlNoList as list
--------------区切りを戻す
set AppleScript's text item delimiters to {""}
--------------theLatitude値を取り出す
set theLatitude to item 1 of listGoogleLlNoList as text
set theLatitude to doReplace(theLatitude, "@", "")
if theLatitude contains "-" then
set theLatitude to doReplace(theLatitude, "-", "")
end if
--------------theLongitude値を取り出す
set theLongitude to item 2 of listGoogleLlNoList as text
if theLongitude contains "-" then
set theLongitude to doReplace(theLongitude, "-", "")
end if
--------------標高を取り出す
set theSrtm to item 3 of listGoogleLlNoList as text
set theSrtm to doReplace(theSrtm, "z", "")
--------------theLatitude60進数の処理
-----整数部のみ取り出す
set theIntegerLatitude to theLatitude div 1 as string
-----小数点以下を処理する
set theLatitude to (text 2 thru 8 of (((theLatitude mod 1) as string) & "000000") as string)
-----整数部と小数点以下を結合
set theLatitude to theIntegerLatitude & theLatitude
-----60進数処理
set theDecimalLatitudeA to (((theLatitude as number) - (theIntegerLatitude as number)) as number) * 60
------整数部を確定
set theIntegerDecimalLatitudeA to theDecimalLatitudeA div 1 as integer
-----小数点以下を確定
set theDecimalLatitudeB to (((theDecimalLatitudeA as number) - (theIntegerDecimalLatitudeA as number)) as number) * 100 as integer
---修正されたゼロサプレス処理
set theIntegerLatitude to doZeroSuppress(theIntegerLatitude)
set theIntegerDecimalLatitudeA to doZeroSuppress(theIntegerDecimalLatitudeA)
set theDecimalLatitudeB to doZeroSuppress(theDecimalLatitudeB)
-----値がマイナスなら 南緯 マイナスが無ければ 北緯
if (item 1 of listGoogleLlNoList) contains "-" then
set theLatitude to theIntegerLatitude & "," & theIntegerDecimalLatitudeA & "." & theDecimalLatitudeB & "S" as «class utf8»
else
set theLatitude to theIntegerLatitude & "," & theIntegerDecimalLatitudeA & "." & theDecimalLatitudeB & "N" as «class utf8»
end if
--------------Longitude60進数の処理
set theIntegerLongitude to theLongitude div 1 as string
set theLongitude to (text 2 thru 8 of (((theLongitude mod 1) as string) & "000000") as string)
set theLongitude to theIntegerLongitude & theLongitude
set theDecimalLongitudeA to (((theLongitude as number) - (theIntegerLongitude as number)) as number) * 60
set theIntegerDecimalLongitudeA to theDecimalLongitudeA div 1 as integer
set theDecimalLongitudeB to (((theDecimalLongitudeA as number) - (theIntegerDecimalLongitudeA as number)) as number) * 100 as integer
---修正されたゼロサプレス処理
set theIntegerLongitude to doZeroSuppress(theIntegerLongitude)
set theIntegerDecimalLongitudeA to doZeroSuppress(theIntegerDecimalLongitudeA)
set theDecimalLongitudeB to doZeroSuppress(theDecimalLongitudeB)
-----値がマイナスなら 西経 マイナスが無ければ 東経
if (item 2 of listGoogleLlNoList) contains "-" then
set theLongitude to theIntegerLongitude & "," & theIntegerDecimalLongitudeA & "." & theDecimalLongitudeB & "W" as «class utf8»
else
set theLongitude to theIntegerLongitude & "," & theIntegerDecimalLongitudeA & "." & theDecimalLongitudeB & "E" as «class utf8»
end if
end if
on error
exit repeat
end try
set numLine to numLine + 1 as number
end repeat


--------------ダイアログ用に改行を入れて整形しておく
set tneAns to theLatitude & "\n" & theLongitude & "\n" & theSrtm & "m"
--------------出来上がりデータをダイアログで表示
display dialog "Bridge用のGPSの値です" default answer the tneAns with icon 1 with title "Adobe Bridge GPS" default button 1 buttons {"XMPファイルも作る", " 終了 "}

--------------XMPファイルも作る場合の始まり
if button returned of the result is "XMPファイルも作る" then
--------------XMPファイルとBridgeの関連づけの確認
do shell script "date > /tmp/ApplicationChk.xmp"
set theTmpXmpFile to (the path to startup disk as string) & "tmp:ApplicationChk.xmp" as alias
set theFileInfo to default application of (info for theTmpXmpFile) as string
--------------Bridgeが未インストールの可能性のエラー制御
if (theFileInfo contains "Bridge") is false then
display alert "XMPファイルがAdobe Bridgeに関連づけられていません"
--------------XMPファイル作成の本処理のはじまり
else if (theFileInfo contains "Bridge") is true then
--------------XMPファイルの保存先ディレクトリを取得
set theSaveXmpPath to (the path to application support from user domain as text) & "Adobe:XMP:Metadata Templates:"
--------------検索語句の有無
if theSearchTXT is "" then
--------------検索語句が無い場合はファイル名を日付にするため日付の処理
set theDateTime to (do shell script "date +'%Y%m%d_%H%M%S'" as string)
set theXmpFileName to (theLatitude & "_" & theLongitude & "_" & theDateTime & ".xmp") as «class utf8»
set theXmpFileName to my doReplace(theXmpFileName, ",", ".") as «class utf8»
set theGooogleMapQ to theLatitude & " " & theLongitude
else
set theXmpFileName to (theSearchTXT & ".xmp") as «class utf8»
end if
-----------------------------------------------ここからXMPファイルの作成
-------------XMPファイルの最初の1行
set theXMPline to "<?xpacket begin=\"\" id=\"W5M0MpCehiHzreSzNTczkc9d\"?>\n" as «class utf8»
-------------XMPファイル
set theXMPline to theXMPline & "<x:xmpmeta xmlns:x=\"adobe:ns:meta/\" x:xmptk=\"Adobe XMP Core 5.3-c011 66.145661, 2012/02/06-14:56:27\">\n" as «class utf8»
-------------宣言
set theXMPline to theXMPline & "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n" as «class utf8»
set theXMPline to theXMPline & "<rdf:Description rdf:about=\"\"\n" as «class utf8»
set theXMPline to theXMPline & " xmlns:xmpRights=\"http://ns.adobe.com/xap/1.0/rights/\"\n" as «class utf8»
set theXMPline to theXMPline & " xmpRights:WebStatement=\"" & theWebStatement & "\"\n" as «class utf8»
set theXMPline to theXMPline & " xmpRights:Marked=\"" & theRights & "\"\n" as «class utf8»
-------------Description
set theXMPline to theXMPline & " xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\n" as «class utf8»
set theXMPline to theXMPline & " xmlns:photoshop=\"http://ns.adobe.com/photoshop/1.0/\"\n" as «class utf8»
set theXMPline to theXMPline & " xmlns:Iptc4xmpCore=\"http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/\"\n" as «class utf8»
set theXMPline to theXMPline & " xmlns:Iptc4xmpExt=\"http://iptc.org/std/Iptc4xmpExt/2008-02-29/\"\n" as «class utf8»
set theXMPline to theXMPline & " xmlns:exif=\"http://ns.adobe.com/exif/1.0/\"\n" as «class utf8»
-------------photoshop
set theXMPline to theXMPline & " photoshop:Instructions=\"" & theXmpFileName & "\"\n" as «class utf8»
-------------Iptc4xmpCore
set theXMPline to theXMPline & " Iptc4xmpCore:Location=\"" & theXmpFileName & "\"\n" as «class utf8»
-------------exif:
set theXMPline to theXMPline & " exif:GPSLatitude=\"" & theLatitude & "\"\n" as «class utf8»
set theXMPline to theXMPline & " exif:GPSProcessingMethod=\"MANUAL\"\n" as «class utf8»
set theXMPline to theXMPline & " exif:GPSAltitude=\"" & theSrtm & " m\"\n" as «class utf8»
set theXMPline to theXMPline & " exif:GPSLongitude=\"" & theLongitude & "\">\n" as «class utf8»
-------------dc
set theXMPline to theXMPline & " <dc:subject>\n" as «class utf8»
set theXMPline to theXMPline & " <rdf:Bag>\n" as «class utf8»
set theXMPline to theXMPline & " <rdf:li>" & theXmpFileName & "</rdf:li>\n" as «class utf8»
set theXMPline to theXMPline & " </rdf:Bag>\n" as «class utf8»
set theXMPline to theXMPline & " </dc:subject>\n" as «class utf8»
-------------Iptc4xmpExt
set theXMPline to theXMPline & " <Iptc4xmpExt:LocationShown>\n" as «class utf8»
set theXMPline to theXMPline & " <rdf:Bag>\n" as «class utf8»
set theXMPline to theXMPline & " <rdf:li\n" as «class utf8»
set theXMPline to theXMPline & " Iptc4xmpExt:Sublocation=\"" & theXmpFileName & "\"/>\n" as «class utf8»
set theXMPline to theXMPline & " </rdf:Bag>\n" as «class utf8»
set theXMPline to theXMPline & " </Iptc4xmpExt:LocationShown>\n" as «class utf8»
-------------著作情報...
set theXMPline to theXMPline & "<dc:rights>\n" as «class utf8»
set theXMPline to theXMPline & "<rdf:Alt>\n" as «class utf8»
set theXMPline to theXMPline & "<rdf:li xml:lang=\"x-default\">" & theDcRights & "</rdf:li>\n" as «class utf8»
set theXMPline to theXMPline & "</rdf:Alt>\n" as «class utf8»
set theXMPline to theXMPline & "</dc:rights>\n" as «class utf8»
set theXMPline to theXMPline & "<xmpRights:UsageTerms>\n" as «class utf8»
set theXMPline to theXMPline & "<rdf:Alt>\n" as «class utf8»
set theXMPline to theXMPline & "<rdf:li xml:lang=\"x-default\">" & theUsageTerms & "</rdf:li>\n" as «class utf8»
set theXMPline to theXMPline & "</rdf:Alt>\n" as «class utf8»
set theXMPline to theXMPline & "</xmpRights:UsageTerms>\n" as «class utf8»
----------ITPCCORE
set theXMPline to theXMPline & "<Iptc4xmpCore:CreatorContactInfo\n" as «class utf8»
set theXMPline to theXMPline & " Iptc4xmpCore:CiUrlWork=\"" & theCiUrlWork & "\"/>\n" as «class utf8»
-------------XMPの終了
set theXMPline to theXMPline & " </rdf:Description>\n" as «class utf8»
set theXMPline to theXMPline & " </rdf:RDF>\n" as «class utf8»
set theXMPline to theXMPline & "</x:xmpmeta>\n" as «class utf8»
set theXMPline to theXMPline & "<?xpacket end=\"w\"?>\n" as «class utf8»
--------------ファイルを作る
tell application "Finder"
try
make new file at (theSaveXmpPath) with properties {name:theXmpFileName}
set aliasXmlFileAlias to (theSaveXmpPath & theXmpFileName) as alias
set theXmlFileAlias to aliasXmlFileAlias as text
set numFileChk to 1
on error
-----すでにファイルがあった場合に別名にする
make new file at (theSaveXmpPath) with properties {name:(theDateTime & "_" & theXmpFileName)}
set aliasXmlFileAlias to (theSaveXmpPath & (theDateTime & "_" & theXmpFileName)) as alias
set theXmlFileAlias to aliasXmlFileAlias as text
set numFileChk to 2
try
delete (theSaveXmpPath & theXmpFileName) as alias
end try
end try
end tell
-----------検索語句がファイル名の場合の処理
if numFileChk is 1 then
try
set theData to open for access file theXmlFileAlias with write permission
write theXMPline to theData as «class utf8»
close theData
on error
------書き込みに失敗したらシェルでの書き込みを試す
do shell script "echo " & quoted form of theXMPline & " >> " & quoted form of (POSIX path of theXmlFileAlias)
end try
---------日付け付きのファイル名に鳴った場合
else if numFileChk is 2 then
set theData to open for access file theXmlFileAlias with write permission
write theXMPline to theData as «class utf8»
close theData
end if
-------------出来上がったXMPファイルにラベルを塗って保存したフォルダを開く
tell application "Finder"

set file type of aliasXmlFileAlias to "XML "
set creator type of aliasXmlFileAlias to "Brdg"
set label index of aliasXmlFileAlias to 4
open folder theSaveXmpPath
activate
end tell
end if
else if button returned of the result is "終了" then
end if



--------------------------------------------------#ここからサブルーチン
--------////////文字の置き換えのサブルーチン
to doReplace(theText, orgStr, newStr)
set oldDelim to AppleScript's text item delimiters
set AppleScript's text item delimiters to orgStr
set tmpList to every text item of theText
set AppleScript's text item delimiters to newStr
set tmpStr to tmpList as text
set AppleScript's text item delimiters to oldDelim
return tmpStr
end doReplace

--------////////URLデコードのサブルーチン(エラー避けに置き換えてからデコード)
on doDecodeURL(theUrlEncodeText)
set theUrlEncodeText to my doReplace(theUrlEncodeText, "¥n", "") as «class utf8»
set theUrlEncodeText to my doReplace(theUrlEncodeText, "\\n", "") as «class utf8»

set theUrlEncodeText to my doReplace(theUrlEncodeText, "¥r", "") as «class utf8»
set theUrlEncodeText to my doReplace(theUrlEncodeText, "\\r", "") as «class utf8»

set theUrlEncodeText to my doReplace(theUrlEncodeText, return, "") as «class utf8»
set theUrlEncodeText to my doReplace(theUrlEncodeText, "\\", "¥") as «class utf8»

set theUrlEncodeText to my doReplace(theUrlEncodeText, "'", "\\'") as «class utf8»
set theUrlEncodeText to my doReplace(theUrlEncodeText, "\"", "\\\"") as «class utf8»
set theUrlEncodeText to my doReplace(theUrlEncodeText, "`", "\\`") as «class utf8»
set theScpt to ("echo \"<?php print(urldecode('" & theUrlEncodeText & "'));?>\" | php")
return do shell script theScpt as «class utf8»
end doDecodeURL

--------////////ゼロサプレスのサブルーチン
to doZeroSuppress(n)
if n < 10 then
return "0" & n
else
return n as text
end if
end doZeroSuppress

「GoogleMap2BridgeV4.0.rtf」をダウンロード

「GoogleMap2BridgeV4.0.scpt.zip」をダウンロード


|

Capturebox

Capturebox


|

DeltaWalker

比較
編集
保存が出来る
有料ならではの高機能


DeltaWalker for Mac OS X: Compare/Merge Files, Synchronize Folders; Two and Three-Way

UIが今風で好感

|

[Sequences]表紙を残して、表紙以外のページを全て削除する

Adobe Community: PDFの一括処理


そんなに難しくないですね。
ページ番号についてのAcrobatの仕様
最初(最小)のページ番号が『0』な事さえわかっていれば大丈夫でしょう

バッチ処理を使います
JavaScriptで
var numDocPages = (this.numPages) - 1;
this.deletePages({nStart: 1,nEnd: numDocPages });

実行するだけのシンプルなもの

表紙が0
ページ数から1引いた数が最後のページ番号となります

Acrobat (Japan)
ジャパンフォーラム > Acrobat (Japan) > Discussions
PDFの一括処理


「Sequences.zip」をダウンロード

|

osxutils

osxutils


「osxutils1.7.pkg.zip」をダウンロード


内包されるコマンドは以下
/usr/local/bin

インストールされる
cpath
getfcomment
geticon
google
hfsdata
lsmac
mkalias
osxutils
rcmac
setfcomment
setfctypes
setfflags
seticon
setlabel
setsuffix
setvolume
trash
wiki
wsupdate

cpath(1) BSD General Commands Manual cpath(1)

NAME
cpath -- Copies current working directory path to the MacOS clipboard

SYNOPSIS
cpath [-vh]

DESCRIPTION
cpath will copy the path returned by the getcwd() function into the MacOS clipboard.
It is more convenient than:

# pwd | pbcopy

because it doesn't copy any newline character, which means you can paste the copied
path into a terminal application without trying to execute it.

-v Prints version and author.

-h Prints help/usage.

FILES
/usr/local/bin/cpath

SEE ALSO
lsmac(1), setfctypes(1), setfflags(1), mkalias(1), setsuffix(1), SetFile(1),
setfcomment(1)

Darwin May 5, 2014 Darwin

-------------------------------------------------------------------------------


getfcomment(1) BSD General Commands Manual getfcomment(1)

NAME
getfcomment -- Print Mac OS comment for file

SYNOPSIS
getfcomment [-vhpc] file ...

DESCRIPTION
getfcomment is a command line program which prints out the Mac OS comment on a file
passed as an argument.

getfcomment supports the following flags:

-p Name of file will be printed before each comment

-c Output Mac OS Classic Desktop Database comment instead of Mac OS X Finder
comment

-v Print version and exit

-h Print help and exit

FILES
/usr/local/bin/getfcomment

SEE ALSO
geticon(1), fileinfo(1), hfsdata(1)

Darwin May 5, 2014 Darwin

-------------------------------------------------------------------------------

geticon(1) BSD General Commands Manual geticon(1)

NAME
geticon -- Get the icon of a Mac OS X file.

SYNOPSIS
geticon [-vh] [-t type] [-o outputfile] file

DESCRIPTION
geticon is a command line utility for extracting the icon from a Mac OS X file or
folder. The default behaviour is to extract the icon to the current working direc-
tory in .icns format. This can be overridden using the -t and -o options described
below.

A list of flags and their descriptions:

-o Allows you to designate a path where the icon file will be created

-t Allows you to specify what format you want to extract the icon to. Valid
values are icns, png, gif, tiff and jpeg.

-v Prints version and author

-h Prints short help/usage string

FILES
/usr/local/bin/geticon

SEE ALSO
seticon(1), GetFileInfo(1), lsmac(1), fileinfo(1)

Darwin May 5, 2014 Darwin

-------------------------------------------------------------------------------

NAME
google -- start Google search from the command line in MacOS X.

SYNOPSIS
google [-i] searchword ...

DESCRIPTION
google is a very small and simple program that enables you to open a browser window
with a google query from the command line. You can pass the search words as multi-
ple arguments or as a single argument within brackets.

An example of typical usage would be:

# google The Stuff That I need to look up

or, alternatively

# google 'The Stuff That I need to look up'

google supports the following options:

-i Search for images

Please direct queries to Sveinbjorn Thordarson .

FILES
/usr/local/bin/google

Darwin May 5, 2014 Darwin


-------------------------------------------------------------------------------

hfsdata(1) BSD General Commands Manual hfsdata(1)

NAME
hfsdata -- retrieve Mac meta-data for a file or folder

SYNOPSIS
hfsdata [-vhxAcmatrRsSdDTCklLoOe] file

DESCRIPTION
hfsdata is a command line tool to get all sorts of miscellaneous HFS or Mac OS-spe-
cific meta-data for a given file. You can specify the exact meta-data you want to
be printed as output by using one of these flags:

-e Prints the path of the file pointed to by a given alias

-x Prints whether file's suffix is hidden by the Finder or not

-A Prints the name of the file's preferred application for opening

-c Prints date created in standard format

-m Prints date modified in standard format

-a Prints date accessed in standard format

-t Prints date attribute was modified in standard format

-r Prints logical resource fork size in bytes

-R Prints physical resource fork size in bytes

-s Prints total logical size of all forks in bytes

-S Prints total physical size of all forks in bytes

-d Prints logical data fork size in bytes

-D Prints physical data fork size in bytes

-T Prints the file's 4-character type code

-C Prints the file's 4-character creator code

-k Prints the file's 'Kind', as it appears in the Finder

-l Prints the file's label as a number (i.e. 0-8)

-L Prints the file's label as a name (e.g. Green)

-o Prints the file's Mac OS X Finder comment

-O Prints the file's Mac OS 9 Desktop Database comment

-v Prints hfsdata program version and exits

-h Prints help

FILES
/usr/local/bin/hfsdata

SEE ALSO
geticon(1), fileinfo(1), getfcomment(1), lsmac(1), setfflags(1), setfctypes(1),
GetFileInfo(1)

Darwin May 5, 2014 Darwin


-------------------------------------------------------------------------------
lsmac(1) BSD General Commands Manual lsmac(1)

NAME
lsmac -- list files in directory and associated Mac meta-data

SYNOPSIS
lsmac [-vhsboapl] directory

DESCRIPTION
lsmac is an ls-like utility for listing the files contained in a given directory on
a HFS or HFS+ volume and the MacOS meta-data associated with them. The output is
akin to that of the ls long view. Each line follows the format below:

[Finder flags] [file type] [creator type] [size] [name or path]

The Finder flags of each file are displayed as a sequence of six characters. Each
character indicates whether one of the following flags are set:

I File has the Invisible flag set

C File has the Custom Icon flag set

L File is Name Locked (i.e. it is a system file)

B File has the Bundle bit flag set

A File has the Alias flag set

S File has the Stationery flag set

An '-' indicates that a flag is not set. For example, a file with none of the
Finder flags set would be listed as '------' while a file with all the flags set
would be listed as 'ICLBAS'.

lsmac accepts the following options:

-v Prints version and author and then exits

-h Prints help

-L Prepends the MacOS Label name of the file in question to each output line

-f[fork]
Specify which forks to count when calculating file size. You can specify
fork as 'rsrc', 'data' or 'both' (minus quote marks).

-b Display file size in bytes (i.e. 12977128 bytes)

-o Omit folders when listing directory contents

-F Only list folders when listing directory contents

-a Display all files, including files with the . prefix.

-p Display full file paths instead of file names

-Q Display file name or path within quotation marks (").

-l When listing file size, use physical size instead of logical size.

Please direct queries to Sveinbjorn Thordarson .

FILES
/usr/local/bin/lsmac

SEE ALSO
ls(1), setfctypes(1) GetFileInfo(1) setsuffix(1), mkalias(1) cpath(1), SetFile(1),
setfflags(1),

Darwin May 5, 2014 Darwin

-------------------------------------------------------------------------------


mkalias(1) BSD General Commands Manual mkalias(1)

NAME
mkalias -- Create MacOS Finder aliases

SYNOPSIS
mkalias [-vhctr] [source-file] [target-alias]

DESCRIPTION
mkalias is similar to ln but creates MacOS Finder aliases instead of UNIX file sys-
tem links. The alias created is identical to aliases created manually using the
Finder. The alias gets the source file's custom icon and File and Creator type, and
has the kIsAlias and kHasCustomIcon Finder flags set.

The following options are accepted:

-r Make the alias relative instead of absolute. See http://devel-
oper.apple.com/technotes/tn/tn1188.html for why this is useful

-c Omit copying source file's icon to target alias

-t Source file's type and creator are not applied to the alias

-v Print version and author

-h Print help

FILES
/usr/local/bin/mkalias

SEE ALSO
ln(1), lsmac(1), setfctypes(1), setfflags(1), cpath(1), setsuffix(1),
setfcomment(1),

Darwin May 5, 2014 Darwin

-------------------------------------------------------------------------------

rcmac(1) BSD General Commands Manual rcmac(1)

NAME
rcmac -- recursively lists all files in a hierarchy in the style of lsmac

SYNOPSIS
rcmac [directory]

DESCRIPTION
rcmac descends into directory structures and lists every single non-directory file
within the structure in the style of 'lsmac'. See the lsmac(1) man page for
details. The program accepts only one argument, which must be the path of a direc-
tory to descend into.

FILES
/usr/local/bin/rcmac

SEE ALSO
lsmac(1), fileinfo(1), GetFileInfo(1),

Darwin May 5, 2014 Darwin


-------------------------------------------------------------------------------
setfcomment(1) BSD General Commands Manual setfcomment(1)

NAME
setfcomment -- set MacOS Finder comments of files and folders.

SYNOPSIS
setfcomment [-vhns] [-c -comment] file ...

DESCRIPTION
setfcomment is a utility for setting MacOS Finder comments of files and folders.
This is done by sending the MacOS X Finder the appropriate type of Apple Event, or
if MacOS 9 Finder comment setting is enabled, by modifying the Desktop Database file
using File Manager APIs. Typical would usage would be:

setfcomment -c 'This is my comment' myfile.txt

The following options are supported:

-c -[comment]
Specifies the string you wish to set as Finder comment. This parameter is
required.

-n Omit setting MacOS 9 Finder comment. If this flag is set, the comments set
with setfcomment will not be visible in the MacOS 9 Finder.

-s Silent mode. setfcomment sends no output to STDOUT confirming that the com-
ment for each input file has been successfully set.

-v Prints version and author and then exits

-h Prints help

Please direct queries to Sveinbjorn Thordarson .

FILES
/usr/local/bin/setfcomment

SEE ALSO
SetFile(1), GetFileInfo(1), setlabel(1), seticon(1), setfflags(1), setsuffix(1)
lsmac(1),

Darwin May 5, 2014 Darwin


-------------------------------------------------------------------------------

setfctypes(1) BSD General Commands Manual setfctypes(1)

NAME
setfctypes -- set heritage MacOS File and Creator types.

SYNOPSIS
setfctypes [-vhs] [-f -filetype] [-c -creator] file ...

DESCRIPTION
setfctypes is a utility for setting the heritage MacOS File Type and Creator Type of
files. It's very simple to use and is about twice as fast as Apple's SetFile(1)
command. An example of typical usage would be:

setfctypes -f TEXT -c ttxt myfile.txt

It is not neccesary to specify both the -f and -c options.

setfctypes accepts the following options:

-v Prints version and author and then exits

-h Prints help

-s Silent mode. No errors or problems are reported.

-c Followed by a four character string specifying Creator type.

-f Followed by a four character string specifying File type.

Please direct queries to Sveinbjorn Thordarson .

FILES
/usr/local/bin/setfctypes

SEE ALSO
lsmac(1), SetFile(1), GetFileInfo(1), setlabel(1), seticon(1), setfcomment(1),
setfflags(1), setsuffix(1)

Darwin May 5, 2014 Darwin


-------------------------------------------------------------------------------
setfflags(1) BSD General Commands Manual setfflags(1)

NAME
setfflags -- Set the MacOS Finder flags of files

SYNOPSIS
setfflags [-vhmp] [-c bool] [-s bool] [-l bool] [-b bool] [-i bool] [-a bool] file
...

DESCRIPTION
setfflags is a command line program for altering the MacOS Finder flags of files
and/or folders. You must specify at least one flag to be set or unset using the
following options:

-c Has Custom Icon

-s Is Stationery

-l Is Name Locked

-b Has Bundle Bit

-i Is Invisible

-a Is Alias

The specification of each of the above must be followed by a boolean value, i.e.
"true"/"false" or 1/0. Here's an example of typical usage. Let's say we want to
set a file's Invisibility flag:

# setfflags -i true /path/to/file

Using numbers instead of string to specify the boolean value is also permitted.
Here we set the invisibility flag and unset the custom icon flag.

# setfflags -i 1 -c 0 /path/to/file

If you have any questions, please direct them to Sveinbjorn Thordarson
.

FILES
/usr/local/bin/setfflags

SEE ALSO
SetFile(1), GetFileInfo(1), setfcomment(1), setsuffix(1), setlabel(1), seticon(1),
lsmac(1)

Darwin May 5, 2014 Darwin


-------------------------------------------------------------------------------
seticon(1) BSD General Commands Manual seticon(1)

NAME
seticon -- Set icon of Mac OS X files.

SYNOPSIS
seticon [-vhd] [source] [file ...]

DESCRIPTION
seticon is a utility for setting a custom icon on Mac OS X files and folders via the
command line. The first argument to seticon is the source file, i.e. the file with
the icon you wish to apply to other file(s). Any arguments after the first should
be files which you wish to give the custom icon to.

Please note that this need not be an .icns file -- see the -d option for using an
.icns file as a source. seticon defaults to retrieving the actual icon of the file
in question.

Typical usage would look like this:

seticon sourcefile file1 file2

The example above would result in the icon of sourcefile being applied to the files
file1 and file2 as custom icons.

seticon supports the following options:

-d Use the data of the source file as icon instead of the source file's actual
icon.

-v Print version and author

-h Print a short help text on program usage

FILES
/usr/local/bin/seticon

SEE ALSO
geticon(1), lsmac(1), fileinfo(1), setfflags(1), setlabel(1), SetFile(1),

Darwin May 5, 2014 Darwin

-------------------------------------------------------------------------------
setlabel(1) BSD General Commands Manual setlabel(1)

NAME
setlabel -- set MacOS Finder label of files and folders.

SYNOPSIS
setlabel [-vhs] Label file ...

DESCRIPTION
setlabel is a utility for setting the MacOS Finder label of files and folders. This
is done by modifying the meta-data flag fields in the HFS file record. The avail-
able labels (case sensitive) are:

None Red Orange Yellow Green Blue Purple Gray

An example of typical usage would be:

setlabel Gray myfile.txt

The following options are supported:

-v Prints version and author and then exits

-h Prints help

-s Silent mode. No output list or error reports are printed.

Please direct queries to Sveinbjorn Thordarson .

FILES
/usr/local/bin/setlabel

SEE ALSO
SetFile(1), GetFileInfo(1), setfflags(1), setsuffix(1) lsmac(1), setfcomment(1),
setfctypes(1),

Darwin May 5, 2014 Darwin

-------------------------------------------------------------------------------
setsuffix(1) BSD General Commands Manual setsuffix(1)

NAME
setsuffix -- Program to set, remove and replace filename suffices.

SYNOPSIS
setsuffix [-vhsefar] [-l length] [-x suffix] [file ...]

DESCRIPTION
setsuffix can be used to set, change and remove filename suffices. Suffices are
used by MacOS X to identify files and determined what application to employ when
opening them.

setsuffix accepts the following options:

-x -[suffix]
Use the -x option to specify the suffix you want added, without the leading
dot (".")

-l -[length]
Sets the max number of characters that can constitute a valid suffix.
setsuffix defaults to 4, so without this specification it will ignore all
suffices longer than 4 characters.

-s Silent mode. Only critical errors or invalid usage errors are printed to
stdout.

-e Ignore files that already have a suffix.

-f Ignore folders.

-a Instead of replacing previous file suffix, add it.

-r Remove file suffix. If this option is specified, all other options apart
from -l are ignored.

FILES
/usr/local/bin/setsuffix

SEE ALSO
lsmac(1), setfctypes(1), mkalias(1), cpath(1)

Darwin May 5, 2014 Darwin

-------------------------------------------------------------------------------
setvolume(1) BSD General Commands Manual setvolume(1)

NAME
setvolume -- Sets global Mac OS X sound output volume

SYNOPSIS
setvolume [0-100]

DESCRIPTION
setvolume is a command line tool for controlling the global Mac OS X sound output
voluem. It accepts a single number, from 0 (silent) to 100 (maximum volume).

FILES
/usr/local/bin/setvolume

SEE ALSO
lsmac(1), setfctypes(1), setfflags(1), mkalias(1), setsuffix(1), SetFile(1),
setfcomment(1), wsupdate(1,) seticon(1,) geticon(1)

Darwin May 5, 2014 Darwin

-------------------------------------------------------------------------------
trash(1) BSD General Commands Manual trash(1)

NAME
trash -- Moves files to the Trash

SYNOPSIS
trash [file] ...

DESCRIPTION
trash is akin to the 'rm' command but instead of unlinking files it moves them into
the MacOS Trash in the user's home directory. It behaves in a similar way to the
Finder in this respect, since files are renamed to 'File copy 1' and so forth if
they already exist in the Trash.

FILES
/usr/local/bin/trash

SEE ALSO
lsmac(1), setfctypes(1), setfflags(1), mkalias(1), setsuffix(1), SetFile(1),
setfcomment(1), wsupdate(1)

Darwin May 5, 2014 Darwin


-------------------------------------------------------------------------------

wiki(1) BSD General Commands Manual wiki(1)

NAME
wiki -- search Wikipedia from the command line

SYNOPSIS
wiki [search words] [...]

DESCRIPTION
wiki is a command line program to search the Wikipedia. All arguments following the
command will be counted as search terms. A browser window will open with the rele-
vant Wikipedia results.

FILES
/usr/local/bin/wiki

SEE ALSO
google(1)

Darwin May 5, 2014 Darwin


-------------------------------------------------------------------------------
wsupdate(1) BSD General Commands Manual wsupdate(1)

NAME
wsupdate -- report file system change to Mac OS X

SYNOPSIS
wsupdate [-vh] file ...

DESCRIPTION
wsupdate is a simple command line tool to execute the NSWorkspace method 'note-
FileSystemChanged'. This will make the Finder update its open windows. If no argu-
ments are given, the system will receive a general notification. If files are spec-
ified, these particular locations will be updated.

Please direct queries to Sveinbjorn Thordarson .

FILES
/usr/local/bin/wsupdate

Darwin May 5, 2014 Darwin

|

シンプルなデータは良いデータ


ustwo - PPP


アクセシブル設定の読み上げ順なんかにも影響がありますから
普段から習慣づけたいですね

http://ustwo.com/ppp/

|

TVK ファンキー・トマト オープニング曲 Spyro Gyra - Jubilee


Spyro Gyra - Jubilee - YouTube


Spyro Gyra - Jubilee

|

Windowsのエクセルで等倍出力しているのに縮小されてしまう

まだ、確認中で
確証は無いのですが、自分用メモ

Windowsのエクセルで等倍出力しているのに縮小されてしまう場合
基本的には
プリンターに依存して縮小率が違う

等倍設定はしておく
2

例えば
このような四角を書いておく
1

プリンターで出力してサイズを量ると9.5cmぐらいに出力されてしまう


まぁ、こんな感じの事が起こっているのではないか?

Website_image20140302_204900


プリンターのPPDファイル
プリンター設定ファイルの記述は例としては以下のような記述になっています


Website_image20140302_205026

ImageableAreaはメーカー指定だったりしますので
変更するのは自己責任となります

エクセルで等倍で「紙出力」したい場合、縮小されてしまう場合は
PPDファイルのプリンター余白調べて計算しておき
拡大出力がテットリ早いが
PDFに出力してから印刷が硬い
(アクロバットのPPDファイルはPageSize=ImageableAreaの余白0になっている)

|

ECMerge Pro


Ellié Computing Merge - Advanced Comparison/Diff/Merge Tool

JAVAベースなので
ユーザーインターフェイスには好みが別れますが
3画面利用出来るのは便利な場面があるかな


|

« 2014年2月 | トップページ | 2014年4月 »