![]() My whole family is very much into all things japanese (including, of course, manga and anime). Six Days of Cocoa: Day Two Day Two: code-name iChibi I hope Gus can fix it in an upcoming release of VoodooPad :-). "tell button 3 of dialog 'Web Export' to perform action") but that strikes me as even more of a hack. There is probably a way to dismiss the dialog using AppleScript and accessibility (e.g. I don’t like the heavy-handed “quit” approach because I may be working in other VoodooPad documents, and don’t want them to disappear even if they are auto-saved (thanks, VoodooPad!). You have to manually dismiss this dialog, or use AppleScript to tell VoodooPad to quit. The build script activates VoodooPad (brings it forward) and leaves the Web Export dialog active. You can download iChibi’s Help document (VoodooPad format) and use it as a starting point for your Help document. Tip: in the Page Info, check “Skip on Export” for those two files since they are not needed by the Help Viewer. "/Developer/Applications/Utilities/Help Indexer.app/Contents/MacOS/Help Indexer" "$VPWebExportOutputDirectory"Help/" usr/bin/hiutil -create "$VPWebExportOutputDirectory"Help/" -file "$VPWebExportOutputDirectory"Help/Help.helpindex" # Replace AppleIcon comment in index.html with appropriate value Perl -pi -e 's///' "$VPWebExportOutputDirectory/index.html" # Replace AppleTitle comment in index.html with appropriate value This page will be run as a shell script with a few interesting environment variables, notably $VPWebExportOutputDirectory. These will be used postflight script below. The only notable addition I made was to add two comments in the section: This is your basic html page, with extra markup for the actual page content ( $page$). This page overrides the Export Module selection in the Web Export function. VoodooPad’s Web Export behavior can be overriden by specially-named pages: Those are all handled by VoodooPad using built-in scripts. In this Xcode build script, there is nothing about setting the AppleTitle or the AppleIcon, nor is there any Help Indexer. What this does is delete the current Help folder, and re-generate it using AppleScript to tell VoodooPad to export the proper document to the Help folder. ![]() (You will want to replace the name and path of your VoodooPad Help document and output folder, of course.) e "web export to \"$HELP_FOLDER\" with properties " \ Osascript -e "tell application \"VoodooPad Pro\"" \ # Clean folder, so we don't have extra junk in there ![]() HELP_FOLDER="$TARGET_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH/English.lproj/Help/" # Set to whatever you have as CFBundleHelpBook in your ist You can use it too, just add a new “Run Script” phase to your target: I sometimes run these scripts in Release builds only, because I don’t want to waste any time in the compile-link-debug cycle of a Debug build. In order to make sure that when I release software, I ship the latest of everything I like to add build phases to Xcode and have it perform all these tasks automatically. Drag-and-drop your Help folder to Help Indexer ( /Developer/Applications/Utilities/Help Indexer.app), to auto-generate the index.Open the main page of your document and insert the appropriate AppleTitle and AppleIcon tags.Export the document to your Help folder.If you write all your documentation in VoodooPad, you must follow these steps to create a valid Help folder to integrate in your application: Excellent! I could now overcome the blank page and start writing some documentation. VoodooPad even has a web export module, which can create a set of pages that are compatible with Apple Help. I really like VoodooPad for its ability to quickly transfer ideas from my head to some kind of structured document, which I am free to revise later. I’m a big fan of using the right tool for the right job, and I also found myself suffering from “blank page syndrome” when it came time to write initial documentation for iChibi.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |