mark-deco-cli 0.2.1 → 0.4.0

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # mark-deco-cli
2
2
 
3
- Command-line interface for [mark-deco](https://npmjs.com/package/mark-deco) enhanced markdown processor with plugin support for oEmbed, Amazon cards, and more.
3
+ Command-line interface for [mark-deco](https://github.com/kekyo/mark-deco) Markdown to HTML conversion processor.
4
4
 
5
5
  ## Installation
6
6
 
@@ -89,47 +89,14 @@ You can use a JSON configuration file to set default options:
89
89
 
90
90
  ## Supported Features
91
91
 
92
- - **Frontmatter**: YAML frontmatter extraction and processing
93
- - **GitHub Flavored Markdown**: Tables, task lists, strikethrough, and more
94
- - **oEmbed**: Automatic embedding of YouTube, Twitter, and other oEmbed providers
95
- - **Amazon Cards**: Rich cards for Amazon product links
96
- - **Mermaid Diagrams**: Flowcharts, sequence diagrams, and more
97
- - **Hierarchical Heading IDs**: Automatic generation of structured heading IDs
98
- - **Responsive Images**: Automatic responsive image handling
99
-
100
- ## Plugin Support
101
-
102
- ### oEmbed Plugin
103
- Automatically converts URLs from supported providers into rich embeds:
104
- - YouTube videos
105
- - Twitter posts
106
- - Instagram posts
107
- - And many more oEmbed providers
108
-
109
- ### Card Plugin
110
- Creates rich cards for supported URLs:
111
- - Amazon product links
112
- - General webpage cards
113
-
114
- ### Mermaid Plugin
115
- Renders Mermaid diagrams from code blocks:
116
- ```markdown
117
- ```mermaid
118
- graph TD
119
- A[Start] --> B[Process]
120
- B --> C[End]
121
- ```
122
- ```
123
-
124
- ## Development
125
-
126
- This CLI is part of the mark-deco monorepo. To contribute:
127
-
128
- 1. Clone the repository
129
- 2. Install dependencies: `npm install`
130
- 3. Build the project: `npm run build`
131
- 4. Run tests: `npm test`
92
+ - Frontmatter: YAML frontmatter extraction and processing
93
+ - GitHub Flavored Markdown: Tables, task lists, strikethrough, and more
94
+ - oEmbed: Automatic embedding of YouTube, Twitter, and other oEmbed providers
95
+ - Amazon Cards: Rich cards for Amazon product links
96
+ - Mermaid Diagrams: Flowcharts, sequence diagrams, and more
97
+ - Hierarchical Heading IDs: Automatic generation of structured heading IDs
98
+ - Responsive Images: Automatic responsive image handling
132
99
 
133
100
  ## License
134
101
 
135
- MIT License - see LICENSE file for details.
102
+ Under MIT.
package/dist/cli.cjs CHANGED
@@ -32449,23 +32449,13 @@ function setupProcessor(config) {
32449
32449
  );
32450
32450
  const enabledPlugins = config.noPlugins ? [] : Array.isArray(config.plugins) ? config.plugins : ["oembed", "card", "mermaid"];
32451
32451
  if (enabledPlugins.includes("oembed") && config.oembed?.enabled !== false) {
32452
- plugins.push(It(th, {
32453
- fetcher,
32454
- logger,
32455
- timeout: config.oembed?.timeout || 5e3
32456
- }));
32452
+ plugins.push(It(th, {}));
32457
32453
  }
32458
32454
  if (enabledPlugins.includes("card") && config.card?.enabled !== false) {
32459
- plugins.push(Ht({
32460
- fetcher,
32461
- logger,
32462
- amazonAssociateId: config.card?.amazonAssociateId
32463
- }));
32455
+ plugins.push(Ht({}));
32464
32456
  }
32465
32457
  if (enabledPlugins.includes("mermaid") && config.mermaid?.enabled !== false) {
32466
- plugins.push(Nt({
32467
- theme: config.mermaid?.theme || "default"
32468
- }));
32458
+ plugins.push(Nt({}));
32469
32459
  }
32470
32460
  return xt({
32471
32461
  plugins,
@@ -32475,7 +32465,7 @@ function setupProcessor(config) {
32475
32465
  }
32476
32466
  const program = new commander.Command();
32477
32467
  async function main() {
32478
- program.name("mark-deco-cli").description("MarkDeco - markdown processor").version("0.2.1");
32468
+ program.name("mark-deco-cli").description("MarkDeco - Markdown to HTML conversion processor.\nCopyright (c) Kouji Matsui (@kekyo@mi.kekyo.net)").version("0.4.0");
32479
32469
  program.option("-i, --input <file>", "Input markdown file (default: stdin)").option("-o, --output <file>", "Output HTML file (default: stdout)").option("-c, --config <file>", "Configuration file path").option("-p, --plugins [plugins...]", "Enable specific plugins (oembed, card, mermaid)").option("--no-plugins", "Disable all default plugins").option("--unique-id-prefix <prefix>", "Prefix for unique IDs", "section").option("--hierarchical-heading-id", "Use hierarchical heading IDs", true).option("--content-based-heading-id", "Use content-based heading IDs", false).option("--frontmatter-output <file>", "Output frontmatter as JSON to specified file").option("--heading-tree-output <file>", "Output heading tree as JSON to specified file").action(async (options2) => {
32480
32470
  try {
32481
32471
  const config = await loadConfig(options2.config);
@@ -32483,8 +32473,8 @@ async function main() {
32483
32473
  const markdown = await readInput(options2.input);
32484
32474
  const processor = setupProcessor(mergedOptions);
32485
32475
  const result = await processor.process(markdown, options2.uniqueIdPrefix || "section", {
32486
- useHierarchicalHeadingId: options2.hierarchicalHeadingId,
32487
- useContentStringHeaderId: options2.contentBasedHeadingId
32476
+ useHierarchicalHeadingId: options2.hierarchicalHeadingId ?? true,
32477
+ useContentStringHeaderId: options2.contentBasedHeadingId ?? false
32488
32478
  });
32489
32479
  await writeOutput(result.html, options2.output);
32490
32480
  if (options2.frontmatterOutput) {