URLコマンド
URLコマンドを使うと、macOSとiOSのほかのアプリからiA Writerを開き、起動時に特定の操作を実行できます。
たとえば、テキストの断片を新しいiA Writerの書類に変換できます。URLコマンドは、iA Writerの既定設定の一部を変更する用途にも使えます。
概要
特別なURLを組み立てることで、iA Writerにコマンドを渡せます:
ia-writer://command?parameter1=value1¶meter2=value2
x-callback-url
すべてのコマンドは x-callback-url に対応しています:
ia-writer://x-callback-url/command?x-parameter1=x-value1¶meter1=value1¶meter2=value2
一部のコマンドは x-success でパラメータを返します。
認証
プライバシーとセキュリティのため、x-callback-urlでデータを変更または返却するコマンドには auth-token パラメータが必要です。認証トークンはiCloud経由で全デバイスに同期されます。認証トークンの確認場所は次のとおりです:
- On Mac: iA Writer → Preferences → General → URL Commands → Manage.
- On iOS: Library → Settings → URL Commands.
データ型
- String
- パーセントエンコード済み。エンコード前で4,000文字以下。
- Library Path
- パーセントエンコード済み。
/File.txtは、既定の場所(iCloudまたはローカル)にあるファイルを指します。Ideas: File.txtは、Ideasという名前のカスタムLibrary Locationにあるファイルを指します。From Other Apps: File.txtはiOSで利用できます。- LibraryとOrganizerのコンテクストメニューでパスをコピーできます。
- Boolean
trueまたはfalseのいずれかです。- Author
- パーセントエンコード済み。たとえば
AIやChatGPTです。
Interface Commands
Open a screen in iA Writer.
open command
Opens Editor with an existing document if found, or a new empty document.
Parameters
path- Library Path. Required.
edit- Boolean。任意。iOSとiPadOSのみ対応。既定は
false。trueにするとキーボードが表示されます。 new-window- Boolean。任意。macOSのみ対応。既定は
false。trueにすると書類を新しいウィンドウで開きます。
Return parameters on x-success
None.
new command
Opens Editor with a new document.
Parameters
path- Library Path。任意。作成するファイルのパス。省略すると、既定の場所のルートに作成されます。パスがディレクトリを指す場合は、ファイル名が自動的に付けられます。ファイルを指す場合は、プレーンテキストの拡張子が必要です。そうでない場合、そのパスは無視されます。提案されたファイル名は使用されますが、既存ファイルを上書きしないように調整されます。
text- String。任意。ファイル内容。
edit- Boolean. Optional. Supported only on iOS and iPadOS.
falseby default. Iftrue, keyboard will be shown. new-window- Boolean. Optional. Supported only on macOS.
falseby default. Iftrue, will open the document in a new window. author- Author。任意。
Return parameters on x-success
なし。
quick-search command
Opens Quick Search with a given query.
Parameters
query- String. Optional.
Return parameters on x-success
None.
Data Commands
Silenty read and write data.
read command
Reads and returns files contents.
Parameters
auth-token- String. Required.
path- Library Path. Required. Path to the file to read.
Return parameters on x-success
path- Library Path. Path to the file.
text- String. File text.
write command
Creates or modifies an existing file and returns file contents.
Parameters
auth-token- String. Required.
path- Library Path. Required.
text- String. Optional.
mode- String. Optional.
createDefault. Adjusts last path component to avoid replacing an existing file.replaceReplaces an existing file.addAdd the given text to an existing file; creates a file if it doesn’t exist.patchDetects differences between the and file contents andtext, and attributes edits toauthor, if provided.add-location- String. Optional. Used only when
modeisappend. beginningAdd text at the beginning of a file.endDefault. Add text at the end of a file.add-padding- String. Optional. Used only when
modeisappend. sentenceAdd text as a sentence.lineDefault. Add text as a line.paragraphDefault. Add text as a paragraph.author- Author. Optional.
Return parameters on x-success
path- Library Path. Path to the file that was created or modified.
text- String. File contents after writing.
version command
Returns iA Writer app version and URL scheme version.
Parameters
None.
Return parameters on x-success
scheme-version- String. URL scheme version.
app-version- String. App version.
Version History
- 1
- Initial release.
- 2
- Fixed
writecommand parameterappend-padding. It was inverted in version 1: padding was appended withfalse, and not appended withtrue. - 3
- Changed
writecommand withmode=appendto create a file if it doesn’t exist. - 4
- Added
openandnewcommand parameternew-window. - Changed
opencommand to open a new empty file if file atpathis not found. - Changed
writecommand to create target folder if it doesn’t exist. - Renamed Path data type to Library Path, and updated the data type format. Old format is deprecated.
- 5
- Added
authorparameter support towritecommand. - 6
- Added
authorparameter support tonewcommand. - Adjusted
writecommand withmode=append - Renamed
mode=appendtomode=add,append-locationtoadd-locationandappend-paddingtoadd-padding. - Added support for
add-paddingvaluessentenceandline.paragraphremains default. - Added
writecommandmode=patch. - Adjusted
readcommand to avoid returning authorship.
ヘルプ
FAQ
よくある質問への回答をまとめました。人それぞれ事情は違っても、寄せられる質問には共通点があります。
トラブルシューティング
iA Writer の動作が思った通りでないときに試せることをまとめました。
バックアップと復元
文書の進捗を失ったり、あの段落を消さなければよかったと思っても大丈夫です。
iCloud
iA Writer はストレージサービスを問いませんが、多くのデバイスで最も快適に使えるのは iCloud です。
旧バージョンのアプリ
可能な限り、macOS と iOS の iA Writer Classic、および Android 版 Writer 1.5.2 のトラブルシューティング手順をここにまとめています。
バージョン履歴
私たちのアプリの歴史を、バージョンごと、プラットフォームごと、アップデートごとにたどれます。
アクセシビリティ
私たちは、できるだけ多くの人に製品を楽しんでもらいたいと考えています。