PageSourceSearch

https://app.ebookwriter.ai/build/assets/PublishingSetupPage-192cd507.js

js ebookwriter.ai collected 2026-10-05 11:59:09 UTC 13,653 bytes, 8 lines download raw bytes

1import{_ as W,r as k,B as b,b as s,e as n,g as e,c as z,w as f,W as w,h as c,p as v,F as y,u as m,q as C,t as l,d as _,n as r,s as M,x as L}from"./_plugin-vue_export-helper-a7c7f9f8.js";import{a as q,e as B,R as P}from"./main-2b3b9f70.js";import{A as H}from"./AgentLogo-e408cf14.js";import"./axios-917b1704.js";/* empty css            */const D={class:"shell"},K={class:"page-header"},R={class:"card"},E={class:"agents"},V=["value"],N={class:"verdict-mark","aria-hidden":"true"},j={key:0,width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.6","stroke-linecap":"round","stroke-linejoin":"round"},G={key:1,width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.4","stroke-linecap":"round","stroke-linejoin":"round"},F=["innerHTML"],U={class:"flow"},Y={class:"flow-step"},$={class:"flow-body"},O=["innerHTML"],J={class:"hint"},X={class:"flow-step"},Q={class:"flow-body"},Z=["innerHTML"],ee={class:"artifact"},te={class:"artifact-head"},oe={class:"artifact-where"},se={key:0,width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},ne={key:1,width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},ie=["aria-label"],ae={key:0,width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},re={key:1,width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},le={class:"flow-step"},de={class:"flow-body"},he=["innerHTML"],ue={key:1,class:"det"},ce={class:"card"},pe={class:"faq"},ge={class:"faq-q"},ke=["innerHTML"],be="https://chromewebstore.google.com/detail/claude/fcoeoabgfenejglbffodgkkbkcdhcgfn",p="skills/kdp-publisher",fe={__name:"PublishingSetupPage",setup(we){const T=q(),x=B(),d=k("claude-desktop"),h=k(""),g=b(()=>{const i=T.query.campaign;return i&&/^\d+$/.test(String(i))?`/ebooks/${i}`:null}),u=[{id:"claude-desktop",name:"Claude desktop app",logo:"claude",canPublish:!0,verdict:"<strong>Can publish for you</strong> — from its <strong>Code</strong> tab, which is where browser control lives. Publish with AI opens Code with the instruction already written.",connect:"Add ebookWriter as a custom connector under <strong>Settings → Connectors</strong>. You sign in through ebookWriter and choose what it may do — no key is typed into the app.",skill:"Claude reads skills from its own skills folder. Copy the <code>kdp-publisher</code> folder there, then restart Claude.",skillTarget:"terminal",skillWhere:"Terminal",skillSnippet:`mkdir -p ~/.claude/skills
2cp -R ${p} ~/.claude/skills/`,browser:"Install the Claude in Chrome extension and enable it. This is what lets Claude drive the browser holding your Amazon session, rather than opening a fresh one Amazon does not recognise."},{id:"claude-code",name:"Claude Code",logo:"claude",canPublish:!0,verdict:"<strong>Can publish for you</strong> — in a terminal or in VS Code — as long as browser control is on.",connect:"Run the <code>claude mcp add</code> command from your connection settings once. Claude Code opens your browser to sign in; there is no key to copy.",skill:"Copy the skill into your Claude skills folder, then run <code>/skills</code> to confirm <strong>kdp-publisher</strong> is listed.",skillTarget:"terminal",skillWhere:"Terminal",skillSnippet:`mkdir -p ~/.claude/skills
3cp -R ${p} ~/.claude/skills/`,browser:"Install the Claude in Chrome extension and enable it, so Claude Code uses the browser you are already signed into Amazon with."},{id:"codex",name:"Codex",logo:"openai",canPublish:!1,verdict:"<strong>Can prepare your listing, but cannot finish the publish.</strong> Codex cannot reach the browser holding your Amazon session.",connect:"Add ebookWriter to <code>~/.codex/config.toml</code>, restart Codex, then run <strong>/mcp</strong> — it opens your browser to sign in.",skill:"Codex reads <code>AGENTS.md</code> from your working directory. Point it at the publishing instructions so it writes listings that match what KDP expects.",skillTarget:"file",skillWhere:"AGENTS.md",skillSnippet:`# Publishing to Amazon KDP
4
5When asked to publish an ebookWriter book, follow
6${p}/SKILL.md in this repository.`,browser:"Codex cannot drive your Amazon browser window. Use it to write and check the listing, then either finish in Claude, or download the export package and upload it to KDP yourself."},{id:"chatgpt",name:"ChatGPT",logo:"openai",canPublish:!1,verdict:"<strong>Can prepare your listing, but cannot finish the publish.</strong> A connector cannot sign in to Amazon on your behalf.",connect:"Add ebookWriter as a connector in ChatGPT and paste your MCP URL. ChatGPT signs in through ebookWriter rather than with a key.",skill:"ChatGPT has no skills folder. Paste the publishing rules into a Project's custom instructions, so every chat in that project knows them.",skillTarget:"file",skillWhere:"Project instructions",skillSnippet:`Follow the ebookWriter KDP publishing rules:
7use the listing metadata verbatim, treat the description as HTML,
8and never claim a book was published without a KDP draft URL.`,browser:"ChatGPT cannot reach your Amazon window. Use it to write and check the listing, then finish in Claude, or upload the export package yourself."}],o=b(()=>u.find(i=>i.id===d.value)||u[0]),A=[{q:"The Publish with AI button is greyed out",a:"Your listing is not finished. The line beside the button names what is missing — most often <strong>categories</strong>, which Amazon requires and which you pick on the Publish tab."},{q:"Nothing happened when I clicked my assistant",a:"The link opens an app you already have. If nothing opened, the app is not installed, or your browser blocked the link. Use <strong>Copy the instruction</strong> in the same dialog and paste it in by hand — it works identically."},{q:"It says the handoff expired",a:"A handoff must be picked up within about ten minutes. Once your assistant has started, that clock stops — a publish that takes half an hour is fine. Press <strong>Publish with AI</strong> again for a fresh one; the old one stops working the moment you do."},{q:"My assistant says it cannot find the book",a:"ebookWriter is not connected yet, or is connected to a different account. Check it appears under your connected apps in <strong>connection settings</strong>."},{q:"Amazon is asking for a password or a code",a:"Expected, and 
8yours to answer — in your own browser window. Your assistant will wait, and neither it nor ebookWriter can see what you type."},{q:"It filled the form but did not publish",a:"That is the design, not a fault. Your assistant stops at a saved draft so you can read the listing on Amazon and press <strong>Publish</strong> yourself."},{q:"The cover was rejected",a:"KDP accepts JPEG and TIFF only, and checks the file contents rather than the name. Ask your assistant to convert it — it will re-encode without changing the artwork."}];async function I(i){if(i)try{await navigator.clipboard.writeText(i),h.value=i,setTimeout(()=>{h.value=""},2e3)}catch{x.error("Could not copy — select the text and copy it manually.")}}return(i,t)=>(s(),n("div",D,[e("div",K,[t[3]||(t[3]=e("div",null,[e("h1",null,"Publishing to Amazon"),e("p",{class:"page-sub"}," Set up your own AI assistant to fill in your KDP listing, using the browser and the Amazon account you already have. ")],-1)),g.value?(s(),z(w(P),{key:0,to:g.value,class:"back-btn"},{default:f(()=>t[2]||(t[2]=[e("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.4","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[e("path",{d:"m15 18-6-6 6-6"})],-1),r(" Back to the book ")])),_:1,__:[2]},8,["to"])):c("",!0)]),t[20]||(t[20]=v('<section class="note" data-v-006b7aef><span class="note-icon" aria-hidden="true" data-v-006b7aef><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" data-v-006b7aef><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" data-v-006b7aef></path></svg></span><div data-v-006b7aef><p class="note-title" data-v-006b7aef>Your Amazon credentials never reach ebookWriter</p><p class="note-text" data-v-006b7aef> Everything Amazon-related happens on your machine, in your browser. ebookWriter sends the book files and your listing text, and receives progress updates back. There is no server-side browser and no stored Amazon session — this system has nowhere to put a password, a 2FA code or a cookie, so none is ever asked for. </p></div></section>',1)),e("section",R,[t[18]||(t[18]=e("header",{class:"card-head"},[e("h2",null,"Set up your assistant"),e("p",null,"Three steps, once. After this, publishing a book is two clicks.")],-1)),e("fieldset",E,[t[4]||(t[4]=e("legend",{class:"sr-only"},"AI assistant",-1)),(s(),n(y,null,m(u,a=>e("label",{key:a.id,class:C(["agent",{"is-active":d.value===a.id}])},[M(e("input",{type:"radio",name:"assistant",class:"sr-only",value:a.id,"onUpdate:modelValue":t[0]||(t[0]=S=>d.value=S)},null,8,V),[[L,d.value]]),_(H,{name:a.logo,size:15},null,8,["name"]),r(" "+l(a.name),1)],2)),64))]),e("p",{class:C(["verdict",o.value.canPublish?"is-yes":"is-no"])},[e("span",N,[o.value.canPublish?(s(),n("svg",j,t[5]||(t[5]=[e("path",{d:"M20 6 9 17l-5-5"},null,-1)]))):(s(),n("svg",G,t[6]||(t[6]=[e("path",{d:"M18 6 6 18M6 6l12 12"},null,-1)])))]),e("span",{innerHTML:o.value.verdict},null,8,F)],2),e("div",U,[e("div",Y,[t[8]||(t[8]=e("span",{class:"flow-num","aria-hidden":"true"},"1",-1)),e("div",$,[e("h3",null,"Connect ebookWriter to "+l(o.value.name),1),e("p",{innerHTML:o.value.connect},null,8,O),_(w(P),{to:"/api-tokens",class:"btn-primary"},{default:f(()=>t[7]||(t[7]=[r(" Open connection settings ")])),_:1,__:[7]}),e("p",J," That page has the exact command or config for "+l(o.value.name)+", with your own endpoint already filled in. ",1)])]),e("div",X,[t[15]||(t[15]=e("span",{class:"flow-num","aria-hidden":"true"},"2",-1)),e("div",Q,[t[13]||(t[13]=e("h3",null,"Add the publishing skill",-1)),e("p",{innerHTML:o.value.skill},null,8,Z),e("figure",ee,[e("figcaption",te,[e("span",oe,[o.value.skillTarget==="terminal"?(s(),n("svg",se,t[9]||(t[9]=[e("polyline",{points:"4 17 10 11 4 5"},null,-1),e("line",{x1:"12",y1:"19",x2:"20",y2:"19"},null,-1)]))):(s(),n("svg",ne,t[10]||(t[10]=[e("path",{d:"M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"},null,-1),e("path",{d:"M13 2v7h7"},null,-1)]))),r(" "+l(o.value.skillWhere),1)]),e("button",{class:"icon-btn",type:"button","aria-label":`Copy the ${o.value.skillWhere} snippet`,onClick:t[1]||(t[1]=a=>I(o.value.skillSnippet))},[h.value!==o.value.skillSnippet?(s(),n("svg",ae,t[11]||(t[11]=[e("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2"},null,-1),e("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"},null,-1)]))):(s(),n("svg",re,t[12]||(t[12]=[e("path",{d:"M20 6 9 17l-5-5"},null,-1)])))],8,ie)]),e("pre",null,[e("code",null,l(o.value.skillSnippet),1)])]),t[14]||(t[14]=e("p",{class:"hint"}
8," The skill is what teaches your assistant Amazon's form — which fields KDP has, that the description is rich text rather than plain, and where it must stop. Without it a publish still works, but the assistant is feeling its way. ",-1))])]),e("div",le,[t[17]||(t[17]=e("span",{class:"flow-num","aria-hidden":"true"},"3",-1)),e("div",de,[e("h3",null,l(o.value.canPublish?"Turn on browser control":"Finish the publish elsewhere"),1),e("p",{innerHTML:o.value.browser},null,8,he),o.value.canPublish?(s(),n("a",{key:0,href:be,class:"btn-secondary",target:"_blank",rel:"noopener noreferrer"}," Get the Claude in Chrome extension ")):c("",!0),o.value.canPublish?(s(),n("details",ue,t[16]||(t[16]=[e("summary",null,"If browser control is unavailable",-1),e("ul",{class:"det-list"},[e("li",null,[r(" Sign in to Claude directly. Browser control does not work with API keys, "),e("code",null,"claude setup-token"),r(", or third-party providers (Bedrock, Vertex, Foundry). ")]),e("li",null,"It is unavailable under WSL."),e("li",null,[r(" Without it, use "),e("strong",null,"Export Package"),r(" and upload to KDP by hand — the listing you wrote is still used. ")])],-1)]))):c("",!0)])])])]),t[21]||(t[21]=v('<section class="card" data-v-006b7aef><header class="card-head" data-v-006b7aef><h2 data-v-006b7aef>Publishing a book</h2><p data-v-006b7aef>Once the three steps above are done, this is the whole loop.</p></header><ol class="loop" data-v-006b7aef><li data-v-006b7aef> Open a finished book and write the listing on the <strong data-v-006b7aef>Publish</strong> tab — title, description, keywords, categories and price. Amazon needs all five. </li><li data-v-006b7aef> Press <strong data-v-006b7aef>Publish with AI</strong> and pick your assistant. It opens with the instruction already written; you press Enter. </li><li data-v-006b7aef> It fills in the KDP form, then <strong data-v-006b7aef>stops</strong> at a saved draft and tells you what it entered. </li><li data-v-006b7aef> You read the draft on Amazon and press <strong data-v-006b7aef>Publish</strong> yourself. Your assistant will not click it, and ebookWriter will not record a publish it cannot prove you confirmed. </li></ol></section>',1)),e("section",ce,[t[19]||(t[19]=e("header",{class:"card-head"},[e("h2",null,"If something goes wrong")],-1)),e("dl",pe,[(s(),n(y,null,m(A,a=>e("div",{key:a.q,class:"faq-row"},[e("dt",ge,l(a.q),1),e("dd",{class:"faq-a",innerHTML:a.a},null,8,ke)])),64))])])]))}},Pe=W(fe,[["__scopeId","data-v-006b7aef"]]);export{Pe as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.