Action

Make Proxy File

Posted by ernstwi, Last update over 1 year ago

Part of a workflow for editing drafts in an external editor (Mac only).

See GitHub README for details.

Steps

  • script

    (function() {
        let bookmark = Bookmark.findOrCreate("proxy-files");
        let fm = FileManager.createForBookmark(bookmark);
    
        // TODO: Get file extension from draft
        if (!fm.writeString(`/${draft.uuid}.md`, draft.content)) {
            alert("Error: Couldn't write file");
            return;
        }
    
        let file = `${fm.basePath}/${draft.uuid}.md`;
        app.setClipboard(file);
    })();
    

Options

  • After Success Default
    Notification Info
    Log Level Info
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.