yanki 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bin/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- var Y=Object.defineProperty;var m=(e,t)=>Y(e,"name",{value:t,configurable:!0});import{y as J,u as h,k as T,i as D,l as I,b as U,c as L,f as M,s as z,g as H}from"../sync-CNwtrBlB.js";import s from"chalk";import{globby as j}from"globby";import F from"node:fs/promises";import W from"node:path";import q from"node:os";import B from"yargs";import{hideBin as G}from"yargs/helpers";import"rehype-mathjax";import"rehype-parse";import"node:crypto";var K="0.4.0";const N=process?.versions?.node!==void 0,d={verbose:!1,log(...e){if(!this.verbose)return;const t=s.gray("[Log]");N?console.warn(t,...e):console.log(t,...e)},logPrefixed(e,...t){this.info(s.blue(`[${e}]`),...t)},info(...e){if(!this.verbose)return;const t=s.green("[Info]");N?console.warn(t,...e):console.info(t,...e)},infoPrefixed(e,...t){this.info(s.blue(`[${e}]`),...t)},warn(...e){console.warn(s.yellow("[Warning]"),...e)},warnPrefixed(e,...t){this.warn(s.blue(`[${e}]`),...t)},error(...e){console.error(s.red("[Error]"),...e)},errorPrefixed(e,...t){this.error(s.blue(`[${e}]`),...t)}},y={"anki-auto-launch":{alias:"l",default:!1,describe:"Attempt to open the Anki desktop app if it's not already running. (Experimental, macOS only.)",type:"boolean"}},b={"anki-web":{alias:"w",default:!0,describe:'Automatically sync any changes to AnkiWeb after Yanki has finished syncing locally. If false, only local Anki data is updated and you must manually invoke a sync to AnkiWeb. This is the equivalent of pushing the "sync" button in the Anki app.',type:"boolean"}},w={"anki-connect":{default:"http://127.0.0.1:8765",describe:"Host and port of the Anki-Connect server. The default is usually fine. See the Anki-Connect documentation for more information.",type:"string"}},v={verbose:{default:!1,describe:"Enable verbose logging.",type:"boolean"}};function g(e){return{json:{default:!1,describe:e,type:"boolean"}}}m(g,"jsonOption");const S={"dry-run":{alias:"d",default:!1,describe:"Run without making any changes to the Anki database. See a report of what would have been done.",type:"boolean"}};function A(e){return{namespace:{alias:"n",default:J,describe:e,type:"string"}}}m(A,"namespaceOption");const x=q.homedir();function Q(e){if(typeof e!="string")throw new TypeError(`Expected a string, got ${typeof e}`);return x?e.replace(/^~(?=$|\/|\\)/,x):e}m(Q,"untildify");const k=m(e=>{const{code:t}=e.cause;throw t==="ECONNREFUSED"&&(d.error("Failed to connect to Anki. Make sure Anki is running and AnkiConnect is installed."),process.exitCode=1,process.exit()),e instanceof Error?e:new Error("Unknown error")},"ankiNotRunningErrorHandler"),R=B(G(process.argv));await R.scriptName("yanki").usage("$0 [command]","Run a Yanki command. Defaults to `sync` if a command is not provided.").command(["$0 <directory> [options]","sync <directory> [options]"],"Perform a one-way synchronization from a local directory of Markdown files to the Anki database. Any Markdown files in subdirectories are included as well.",e=>e.positional("directory",{demandOption:!0,describe:"The path to the local directory of Markdown files to sync.",type:"string"}).option(S).option(A("Advanced option for managing multiple Yanki synchronization groups. Case insensitive. See the readme for more information.")).option(w).option(y).option(b).option("manage-filenames",{alias:"m",choices:["off","prompt","response"],default:"off",describe:'Rename local note files to match their content. Useful if you want to feel have semantically reasonable note file names without managing them by hand. The `"prompt"` option will attempt to create the filename based on the "front" of the card, while `"response"` will prioritize the "back", "Cloze", or "type in the answer" portions of the card. Truncation, sanitization, and deduplication are taken care of.',type:"string"}).option("max-filename-length",{default:void 0,defaultDescription:"60",describe:"If `manage-filenames` is enabled, this option specifies the maximum length of the filename in characters.",type:"number"}).option(g("Output the sync report as JSON.")).option(v),async({ankiAutoLaunch:e,ankiConnect:t,ankiWeb:i,directory:o,dryRun:a,json:r,manageFilenames:n,maxFilenameLength:p,namespace:f,recursive:c=!0,verbose:u})=>{d.verbose=u;const l=Q(o),E=c?`${l}/**/*.md`:`${l}/*.md`,C=await j(E,{absolute:!0});if(C.length===0){d.error(`No Markdown files found in "${l}".`),process.exitCode=1;return}n==="off"&&p!==void 0&&d.warn("Ignoring `max-filename-length` option because `manage-filenames` is not enabled.");const{host:$,port:P}=h(t),O=await T(C,{ankiConnectOptions:{autoLaunch:e,host:$,port:P},ankiWeb:i,dryRun:a,manageFilenames:n,maxFilenameLength:p,namespace:f}).catch(k);r?(process.stdout.write(JSON.stringify(O,void 0,2)),process.stdout.write(`
2
+ var Y=Object.defineProperty;var m=(e,t)=>Y(e,"name",{value:t,configurable:!0});import{y as J,u as h,k as T,i as D,l as I,b as U,c as L,f as M,s as z,g as H}from"../sync-CNwtrBlB.js";import s from"chalk";import{globby as j}from"globby";import F from"node:fs/promises";import W from"node:path";import q from"node:os";import B from"yargs";import{hideBin as G}from"yargs/helpers";import"rehype-mathjax";import"rehype-parse";import"node:crypto";var K="0.4.1";const N=process?.versions?.node!==void 0,d={verbose:!1,log(...e){if(!this.verbose)return;const t=s.gray("[Log]");N?console.warn(t,...e):console.log(t,...e)},logPrefixed(e,...t){this.info(s.blue(`[${e}]`),...t)},info(...e){if(!this.verbose)return;const t=s.green("[Info]");N?console.warn(t,...e):console.info(t,...e)},infoPrefixed(e,...t){this.info(s.blue(`[${e}]`),...t)},warn(...e){console.warn(s.yellow("[Warning]"),...e)},warnPrefixed(e,...t){this.warn(s.blue(`[${e}]`),...t)},error(...e){console.error(s.red("[Error]"),...e)},errorPrefixed(e,...t){this.error(s.blue(`[${e}]`),...t)}},y={"anki-auto-launch":{alias:"l",default:!1,describe:"Attempt to open the Anki desktop app if it's not already running. (Experimental, macOS only.)",type:"boolean"}},b={"anki-web":{alias:"w",default:!0,describe:'Automatically sync any changes to AnkiWeb after Yanki has finished syncing locally. If false, only local Anki data is updated and you must manually invoke a sync to AnkiWeb. This is the equivalent of pushing the "sync" button in the Anki app.',type:"boolean"}},w={"anki-connect":{default:"http://127.0.0.1:8765",describe:"Host and port of the Anki-Connect server. The default is usually fine. See the Anki-Connect documentation for more information.",type:"string"}},v={verbose:{default:!1,describe:"Enable verbose logging.",type:"boolean"}};function g(e){return{json:{default:!1,describe:e,type:"boolean"}}}m(g,"jsonOption");const S={"dry-run":{alias:"d",default:!1,describe:"Run without making any changes to the Anki database. See a report of what would have been done.",type:"boolean"}};function A(e){return{namespace:{alias:"n",default:J,describe:e,type:"string"}}}m(A,"namespaceOption");const x=q.homedir();function Q(e){if(typeof e!="string")throw new TypeError(`Expected a string, got ${typeof e}`);return x?e.replace(/^~(?=$|\/|\\)/,x):e}m(Q,"untildify");const k=m(e=>{const{code:t}=e.cause;throw t==="ECONNREFUSED"&&(d.error("Failed to connect to Anki. Make sure Anki is running and AnkiConnect is installed."),process.exitCode=1,process.exit()),e instanceof Error?e:new Error("Unknown error")},"ankiNotRunningErrorHandler"),R=B(G(process.argv));await R.scriptName("yanki").usage("$0 [command]","Run a Yanki command. Defaults to `sync` if a command is not provided.").command(["$0 <directory> [options]","sync <directory> [options]"],"Perform a one-way synchronization from a local directory of Markdown files to the Anki database. Any Markdown files in subdirectories are included as well.",e=>e.positional("directory",{demandOption:!0,describe:"The path to the local directory of Markdown files to sync.",type:"string"}).option(S).option(A("Advanced option for managing multiple Yanki synchronization groups. Case insensitive. See the readme for more information.")).option(w).option(y).option(b).option("manage-filenames",{alias:"m",choices:["off","prompt","response"],default:"off",describe:'Rename local note files to match their content. Useful if you want to feel have semantically reasonable note file names without managing them by hand. The `"prompt"` option will attempt to create the filename based on the "front" of the card, while `"response"` will prioritize the "back", "Cloze", or "type in the answer" portions of the card. Truncation, sanitization, and deduplication are taken care of.',type:"string"}).option("max-filename-length",{default:void 0,defaultDescription:"60",describe:"If `manage-filenames` is enabled, this option specifies the maximum length of the filename in characters.",type:"number"}).option(g("Output the sync report as JSON.")).option(v),async({ankiAutoLaunch:e,ankiConnect:t,ankiWeb:i,directory:o,dryRun:a,json:r,manageFilenames:n,maxFilenameLength:p,namespace:f,recursive:c=!0,verbose:u})=>{d.verbose=u;const l=Q(o),E=c?`${l}/**/*.md`:`${l}/*.md`,C=await j(E,{absolute:!0});if(C.length===0){d.error(`No Markdown files found in "${l}".`),process.exitCode=1;return}n==="off"&&p!==void 0&&d.warn("Ignoring `max-filename-length` option because `manage-filenames` is not enabled.");const{host:$,port:P}=h(t),O=await T(C,{ankiConnectOptions:{autoLaunch:e,host:$,port:P},ankiWeb:i,dryRun:a,manageFilenames:n,maxFilenameLength:p,namespace:f}).catch(k);r?(process.stdout.write(JSON.stringify(O,void 0,2)),process.stdout.write(`
3
3
  `)):(process.stderr.write(D(O,u)),process.stderr.write(`
4
4
  `))}).command("list [options]","Utility command to list Yanki-created notes in the Anki database.",e=>e.option(A("Advanced option to list notes in a specific namespace. Case insensitive. Notes from the default internal namespace are listed by default. Pass `'*'` to list all Yanki-created notes in the Anki database.")).options(w).options(y).option(g("Output the list of notes as JSON to stdout.")),async({ankiAutoLaunch:e,ankiConnect:t,json:i,namespace:o})=>{const{host:a,port:r}=h(t),n=await I({ankiConnectOptions:{autoLaunch:e,host:a,port:r},namespace:o}).catch(k);i?(process.stdout.write(JSON.stringify(n,void 0,2)),process.stdout.write(`
5
5
  `)):(process.stdout.write(U(n)),process.stdout.write(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yanki",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "type": "module",
5
5
  "description": "An ultra-simple CLI tool and TypeScript library for syncing Markdown to Anki flashcards.",
6
6
  "repository": {
@@ -61,7 +61,7 @@
61
61
  "yargs": "^17.7.2"
62
62
  },
63
63
  "devDependencies": {
64
- "@kitschpatrol/shared-config": "^4.7.1",
64
+ "@kitschpatrol/shared-config": "^4.7.2",
65
65
  "@shikijs/rehype": "^1.6.4",
66
66
  "bumpp": "^9.4.1",
67
67
  "deepmerge-ts": "^7.0.3",
@@ -92,10 +92,10 @@
92
92
  "unist-builder": "^4.0.0",
93
93
  "unist-util-visit": "^5.0.0",
94
94
  "untildify": "^5.0.0",
95
- "vite": "^5.3.0",
95
+ "vite": "^5.3.1",
96
96
  "vitest": "^1.6.0",
97
97
  "yaml": "^2.4.5",
98
- "yanki-connect": "^1.0.4"
98
+ "yanki-connect": "^1.0.5"
99
99
  },
100
100
  "publishConfig": {
101
101
  "access": "public"
package/readme.md CHANGED
@@ -46,7 +46,7 @@
46
46
 
47
47
  Yanki simply syncs a folder of Markdown notes to Anki. The primary novelty of its approach is in how Markdown is translated into Anki notes. The **structure** of a Markdown note determines the **type** of Anki note it becomes, so no extra syntax or Anki-specific markup is required — just pure Markdown.
48
48
 
49
- This library leverages the [`yanki-connect`](https://github.com/kitschpatrol/yanki-connect) library, and powers the [`yanki-obsidian`](https://github.com/kitschpatrol/yanki-obsidian) plugin.
49
+ This library leverages the [`yanki-connect`](https://github.com/kitschpatrol/yanki-connect) library, and powers the [`yanki-obsidian`](https://github.com/kitschpatrol/yanki-obsidian) Obsidian plugin.
50
50
 
51
51
  The "Y" prefix in "Yanki" is in the "Yet another" naming tradition; a nod to Anki's robust and occasionally duplicative ecosystem of third-party tools. (Also, appropriately, Yankī are a variety of [truant youth](https://en.wikipedia.org/wiki/Yankee#/media/File:ヤンキー.jpg).)
52
52
 
@@ -319,19 +319,19 @@ yanki sync <directory> [options]
319
319
  | ------------------- | ------------------------------------------------------------------------ | -------- |
320
320
  | `directory` | The path to the local directory of Markdown files to sync. _(Required.)_ | `string` |
321
321
 
322
- | Option | Alias | Argument | Description | Type | Default |
323
- | ----------------------- | ----- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ------------------------- |
324
- | `--dry-run` | `-d` | | Run without making any changes to the Anki database. See a report of what would have been done. | `boolean` | `false` |
325
- | `--namespace` | `-n` | | Advanced option for managing multiple Yanki synchronization groups. Case insensitive. See the readme for more information. | `string` | `"Yanki"` |
326
- | `--anki-connect` | | | Host and port of the Anki-Connect server. The default is usually fine. See the Anki-Connect documentation for more information. | `string` | `"http://127.0.0.1:8765"` |
327
- | `--anki-auto-launch` | `-l` | | Attempt to open the Anki desktop app if it's not already running. (Experimental, macOS only.) | `boolean` | `false` |
328
- | `--anki-web` | `-w` | | Automatically sync any changes to AnkiWeb after Yanki has finished syncing locally. If false, only local Anki data is updated and you must manually invoke a sync to AnkiWeb. This is the equivalent of pushing the "sync" button in the Anki app. | `boolean` | `true` |
329
- | `--manage-filenames` | `-m` | | Rename local note files to match their content. Useful if you want to feel have semantically reasonable note file names without managing them by hand. The `"prompt"` option will attempt to create the filename based on the "front" of the card, while `"response"` will prioritize the "back", "Cloze", or "type in the answer" portions of the card. Truncation, sanitization, and deduplication are taken care of. | `string` | `"off"` |
330
- | `--max-filename-length` | | `[number]` | If `manage-filenames` is enabled, this option specifies the maximum length of the filename in characters. | | `60` |
331
- | `--json` | | | Output the sync report as JSON. | `boolean` | `false` |
332
- | `--verbose` | | | Enable verbose logging. | `boolean` | `false` |
333
- | `--help` | `-h` | | Show help | `boolean` | |
334
- | `--version` | `-v` | | Show version number | `boolean` | |
322
+ | Option | Description | Type | Default |
323
+ | ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- | ------------------------- |
324
+ | `--dry-run`<br>`-d` | Run without making any changes to the Anki database. See a report of what would have been done. | `boolean` | `false` |
325
+ | `--namespace`<br>`-n` | Advanced option for managing multiple Yanki synchronization groups. Case insensitive. See the readme for more information. | `string` | `"Yanki"` |
326
+ | `--anki-connect` | Host and port of the Anki-Connect server. The default is usually fine. See the Anki-Connect documentation for more information. | `string` | `"http://127.0.0.1:8765"` |
327
+ | `--anki-auto-launch`<br>`-l` | Attempt to open the Anki desktop app if it's not already running. (Experimental, macOS only.) | `boolean` | `false` |
328
+ | `--anki-web`<br>`-w` | Automatically sync any changes to AnkiWeb after Yanki has finished syncing locally. If false, only local Anki data is updated and you must manually invoke a sync to AnkiWeb. This is the equivalent of pushing the "sync" button in the Anki app. | `boolean` | `true` |
329
+ | `--manage-filenames`<br>`-m` | Rename local note files to match their content. Useful if you want to feel have semantically reasonable note file names without managing them by hand. The `"prompt"` option will attempt to create the filename based on the "front" of the card, while `"response"` will prioritize the "back", "Cloze", or "type in the answer" portions of the card. Truncation, sanitization, and deduplication are taken care of. | `"off"` `"prompt"` `"response"` | `"off"` |
330
+ | `--max-filename-length` | If `manage-filenames` is enabled, this option specifies the maximum length of the filename in characters. | `number` | `60` |
331
+ | `--json` | Output the sync report as JSON. | `boolean` | `false` |
332
+ | `--verbose` | Enable verbose logging. | `boolean` | `false` |
333
+ | `--help`<br>`-h` | Show help | `boolean` | |
334
+ | `--version`<br>`-v` | Show version number | `boolean` | |
335
335
 
336
336
  #### Subcommand: `yanki list`
337
337
 
@@ -343,14 +343,14 @@ Usage:
343
343
  yanki list [options]
344
344
  ```
345
345
 
346
- | Option | Alias | Description | Type | Default |
347
- | -------------------- | ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ------------------------- |
348
- | `--namespace` | `-n` | Advanced option to list notes in a specific namespace. Case insensitive. Notes from the default internal namespace are listed by default. Pass `'*'` to list all Yanki-created notes in the Anki database. | `string` | `"Yanki"` |
349
- | `--anki-connect` | | Host and port of the Anki-Connect server. The default is usually fine. See the Anki-Connect documentation for more information. | `string` | `"http://127.0.0.1:8765"` |
350
- | `--anki-auto-launch` | `-l` | Attempt to open the Anki desktop app if it's not already running. (Experimental, macOS only.) | `boolean` | `false` |
351
- | `--json` | | Output the list of notes as JSON to stdout. | `boolean` | `false` |
352
- | `--help` | `-h` | Show help | `boolean` | |
353
- | `--version` | `-v` | Show version number | `boolean` | |
346
+ | Option | Description | Type | Default |
347
+ | ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ------------------------- |
348
+ | `--namespace`<br>`-n` | Advanced option to list notes in a specific namespace. Case insensitive. Notes from the default internal namespace are listed by default. Pass `'*'` to list all Yanki-created notes in the Anki database. | `string` | `"Yanki"` |
349
+ | `--anki-connect` | Host and port of the Anki-Connect server. The default is usually fine. See the Anki-Connect documentation for more information. | `string` | `"http://127.0.0.1:8765"` |
350
+ | `--anki-auto-launch`<br>`-l` | Attempt to open the Anki desktop app if it's not already running. (Experimental, macOS only.) | `boolean` | `false` |
351
+ | `--json` | Output the list of notes as JSON to stdout. | `boolean` | `false` |
352
+ | `--help`<br>`-h` | Show help | `boolean` | |
353
+ | `--version`<br>`-v` | Show version number | `boolean` | |
354
354
 
355
355
  #### Subcommand: `yanki delete`
356
356
 
@@ -362,17 +362,17 @@ Usage:
362
362
  yanki delete [options]
363
363
  ```
364
364
 
365
- | Option | Alias | Description | Type | Default |
366
- | -------------------- | ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ------------------------- |
367
- | `--dry-run` | `-d` | Run without making any changes to the Anki database. See a report of what would have been done. | `boolean` | `false` |
368
- | `--namespace` | `-n` | Advanced option to list notes in a specific namespace. Case insensitive. Notes from the default internal namespace are listed by default. If you've synced notes to multiple namespaces, Pass `'*'` to delete all Yanki-created notes in the Anki database. | `string` | `"Yanki"` |
369
- | `--anki-connect` | | Host and port of the Anki-Connect server. The default is usually fine. See the Anki-Connect documentation for more information. | `string` | `"http://127.0.0.1:8765"` |
370
- | `--anki-auto-launch` | `-l` | Attempt to open the Anki desktop app if it's not already running. (Experimental, macOS only.) | `boolean` | `false` |
371
- | `--anki-web` | `-w` | Automatically sync any changes to AnkiWeb after Yanki has finished syncing locally. If false, only local Anki data is updated and you must manually invoke a sync to AnkiWeb. This is the equivalent of pushing the "sync" button in the Anki app. | `boolean` | `true` |
372
- | `--json` | | Output the list of deleted notes as JSON to stdout. | `boolean` | `false` |
373
- | `--verbose` | | Enable verbose logging. | `boolean` | `false` |
374
- | `--help` | `-h` | Show help | `boolean` | |
375
- | `--version` | `-v` | Show version number | `boolean` | |
365
+ | Option | Description | Type | Default |
366
+ | ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ------------------------- |
367
+ | `--dry-run`<br>`-d` | Run without making any changes to the Anki database. See a report of what would have been done. | `boolean` | `false` |
368
+ | `--namespace`<br>`-n` | Advanced option to list notes in a specific namespace. Case insensitive. Notes from the default internal namespace are listed by default. If you've synced notes to multiple namespaces, Pass `'*'` to delete all Yanki-created notes in the Anki database. | `string` | `"Yanki"` |
369
+ | `--anki-connect` | Host and port of the Anki-Connect server. The default is usually fine. See the Anki-Connect documentation for more information. | `string` | `"http://127.0.0.1:8765"` |
370
+ | `--anki-auto-launch`<br>`-l` | Attempt to open the Anki desktop app if it's not already running. (Experimental, macOS only.) | `boolean` | `false` |
371
+ | `--anki-web`<br>`-w` | Automatically sync any changes to AnkiWeb after Yanki has finished syncing locally. If false, only local Anki data is updated and you must manually invoke a sync to AnkiWeb. This is the equivalent of pushing the "sync" button in the Anki app. | `boolean` | `true` |
372
+ | `--json` | Output the list of deleted notes as JSON to stdout. | `boolean` | `false` |
373
+ | `--verbose` | Enable verbose logging. | `boolean` | `false` |
374
+ | `--help`<br>`-h` | Show help | `boolean` | |
375
+ | `--version`<br>`-v` | Show version number | `boolean` | |
376
376
 
377
377
  #### Subcommand: `yanki style`
378
378
 
@@ -384,17 +384,17 @@ Usage:
384
384
  yanki style [options]
385
385
  ```
386
386
 
387
- | Option | Alias | Description | Type | Default |
388
- | -------------------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ------------------------- |
389
- | `--dry-run` | `-d` | Run without making any changes to the Anki database. See a report of what would have been done. | `boolean` | `false` |
390
- | `--css` | `-c` | Path to the CSS stylesheet to set for all Yanki-created notes. If not provided, the default Anki stylesheet is used. | `string` | |
391
- | `--anki-connect` | | Host and port of the Anki-Connect server. The default is usually fine. See the Anki-Connect documentation for more information. | `string` | `"http://127.0.0.1:8765"` |
392
- | `--anki-auto-launch` | `-l` | Attempt to open the Anki desktop app if it's not already running. (Experimental, macOS only.) | `boolean` | `false` |
393
- | `--anki-web` | `-w` | Automatically sync any changes to AnkiWeb after Yanki has finished syncing locally. If false, only local Anki data is updated and you must manually invoke a sync to AnkiWeb. This is the equivalent of pushing the "sync" button in the Anki app. | `boolean` | `true` |
394
- | `--json` | | Output the list of updated note types / models as JSON to stdout. | `boolean` | `false` |
395
- | `--verbose` | | Enable verbose logging. | `boolean` | `false` |
396
- | `--help` | `-h` | Show help | `boolean` | |
397
- | `--version` | `-v` | Show version number | `boolean` | |
387
+ | Option | Description | Type | Default |
388
+ | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ------------------------- |
389
+ | `--dry-run`<br>`-d` | Run without making any changes to the Anki database. See a report of what would have been done. | `boolean` | `false` |
390
+ | `--css`<br>`-c` | Path to the CSS stylesheet to set for all Yanki-created notes. If not provided, the default Anki stylesheet is used. | `string` | |
391
+ | `--anki-connect` | Host and port of the Anki-Connect server. The default is usually fine. See the Anki-Connect documentation for more information. | `string` | `"http://127.0.0.1:8765"` |
392
+ | `--anki-auto-launch`<br>`-l` | Attempt to open the Anki desktop app if it's not already running. (Experimental, macOS only.) | `boolean` | `false` |
393
+ | `--anki-web`<br>`-w` | Automatically sync any changes to AnkiWeb after Yanki has finished syncing locally. If false, only local Anki data is updated and you must manually invoke a sync to AnkiWeb. This is the equivalent of pushing the "sync" button in the Anki app. | `boolean` | `true` |
394
+ | `--json` | Output the list of updated note types / models as JSON to stdout. | `boolean` | `false` |
395
+ | `--verbose` | Enable verbose logging. | `boolean` | `false` |
396
+ | `--help`<br>`-h` | Show help | `boolean` | |
397
+ | `--version`<br>`-v` | Show version number | `boolean` | |
398
398
 
399
399
  <!-- /cli-help -->
400
400