Function
Static Public Summary | ||
public |
CLI(argv: String[], stdout: WritableStream): Promise Entry point of the CLI. |
|
public |
Create a comment list. |
|
public |
Convert the WordPress's post to Markdown. Design and implementation was in reference to the npm to-markdown. |
|
public |
ConvertShortCode(text: *): String Convert the WordPress's shotcode to Markdown. |
|
public |
Download the linked image from Markdown and rewrite the link. |
|
public |
async WordPressXmlToMarkdown(src: String, dest: String, options: CLIOptions): Promise Conver WordPress XML file to Markdown files. |
Static Public
public CLI(argv: String[], stdout: WritableStream): Promise source
import CLI from 'wpxml2md/src/bin/cli.js'
Entry point of the CLI.
Params:
Name | Type | Attribute | Description |
argv | String[] | Arguments of the command line. |
|
stdout | WritableStream | Standard output. |
Test:
public Comment(src: Object[]): String source
import Comment from 'wpxml2md/src/lib/comment.js'
Create a comment list.
Params:
Name | Type | Attribute | Description |
src | Object[] | Comments (wp:comment). |
public Convert(post: String, modes: Modes): String source
import Convert from 'wpxml2md/src/lib/converter.js'
Convert the WordPress's post to Markdown. Design and implementation was in reference to the npm to-markdown.
public ConvertShortCode(text: *): String source
import ConvertShortCode from 'wpxml2md/src/lib/shortcode.js'
Convert the WordPress's shotcode to Markdown.
Params:
Name | Type | Attribute | Description |
text | * |
public async ImageLinkReplacer(markdown: String, dir: String, basename: String, logger: Logger): Promise source
import ImageLinkReplacer from 'wpxml2md/src/lib/image-link-replacer.js'
Download the linked image from Markdown and rewrite the link.
Test:
public async WordPressXmlToMarkdown(src: String, dest: String, options: CLIOptions): Promise source
import WordPressXmlToMarkdown from 'wpxml2md/src/lib/wpxml2md.js'
Conver WordPress XML file to Markdown files.
Params:
Name | Type | Attribute | Description |
src | String | Path of the WordPress XML file. |
|
dest | String | Path of Markdown files output directory. |
|
options | CLIOptions | Options. |