From: Mahn-Soo C. <mah...@gm...> - 2008-07-17 09:46:30
|
You mean, data.plist and data.txt? Fortunately (or unfortunately) I don't use Spotlight at all. Good to know it, though. Thanks again. By the way, would it be useful to provide a command line tool, I mean officially, that converts between Skim supported formats? (Now I have a handy one thanks to your help. ;-)) Best, mahn-soo 2008/7/17 Christiaan Hofman <cmh...@gm...>: > Almost. A PDF bundle saved by Skim contains two more files that are > used by the Spotlight importer. So bundles saved with this script will > have only partial Spotlight support. > > Christiaan > > On 17 Jul 2008, at 9:05 AM, Mahn-Soo Choi wrote: > >> Dear Christiaan, >> >> even better! Now I understand the structure of the PDF bundle. >> >> All the best, >> >> mahn-soo >> >> >> >> 2008/7/16 Christiaan Hofman <cmh...@gm...>: >>> And if you don't like launching Skim you can also use the skimnotes >>> tool. >>> >>> >>> #!/bin/bash >>> >>> file="$1" >>> bundle="${file%.pdf}.pdfd" >>> name="${file##*/}" >>> name="${name%.pdf}" >>> >>> skimnotes="/Applications/Skim.app/Contents/SharedSupport/skimnotes" >>> >>> mkdir "$bundle" >>> cp "$file" "$bundle" >>> "$skimnotes" get -format skim "$file" ${bundle}"/${name}.skim" >>> "$skimnotes" get -format text "$file" ${bundle}"/${name}.txt" >>> "$skimnotes" get -format rtf "$file" ${bundle}"/${name}.rtf" >>> "$skimnotes" remove ${bundle}"/${name}.pdf" >>> >>> >>> Christiaan >>> >>> On 16 Jul 2008, at 11:57 AM, Mahn-Soo Choi wrote: >>> >>>> Dear Christiaan, >>>> >>>> that's exactly I wanted. Thanks a lot! >>>> >>>> Best regards, >>>> >>>> mahn-soo >>>> >>>> >>>> 2008/7/16 Christiaan Hofman <cmh...@gm...>: >>>>> >>>>> On 16 Jul 2008, at 4:41 AM, Mahn-Soo Choi wrote: >>>>> >>>>>> Hello. >>>>>> >>>>>> Is there a simple way to export a PDF to a PDF bundle >>>>>> from command line (without using Skim GUI)? >>>>>> >>>>>> Thanks for any help in advance. >>>>>> >>>>>> mahn-soo >>>>> >>>>> It takes a few lines (or one very long line), but you could do it >>>>> using osascript. If you save the lines below in a script file and >>>>> make >>>>> it executable, you could use it from the command line. >>>>> >>>>> Christiaan >>>>> >>>>> >>>>> #!/bin/bash >>>>> >>>>> file="$1" >>>>> [ ${file:0:1} == "/" ] || file="${PWD}/${file}" >>>>> >>>>> osascript \ >>>>> -e "tell application \"Skim\"" \ >>>>> -e "activate" \ >>>>> -e "open POSIX file \"${file}\"" \ >>>>> -e "save front document in POSIX file \"${file}d\" as \"PDF Bundle >>>>> \"" \ >>>>> -e "end tell" >>>>> >>>>> >> |