定制 tjm/wp-to-markdown 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tjm/wp-to-markdown

最新稳定版本:v0.1.1

Composer 安装命令:

composer require tjm/wp-to-markdown

包简介

Convert WordPress posts to markdown files through database connection

README 文档

README

Convert WordPress posts to markdown files, in a format and folder structure friendly to my tjm/wiki.php project. Puts various values in "front-matter" (YAML at top of markdown file). Prefers post_content_filtered field for post content, which is used by JetPack markdown plugin, which I use for my newer posts. Still has problems converting certain post content: Check the results before using on a live site. Can be run repeatedly, will only update files if content has changed. Does not remove posts removed in WordPress.

In addition to posts, also copies media, categories, tags as CSV list, and comments as markdown in a certain structure. I copy the data that I think may be useful for me in a markdown processor version of the WordPress site in question. You'll have to modify the code if you want anything else.

To run, install package, run composer install, then run bin/run at the command line. You must either pass the non-empty values for these arguments:

  1. output destination path
  2. database DSN for PDO (see PDO docs if needed)
  3. database user
  4. database password
  5. database table prefix
  6. ssh id (user@server) if on a remote system

or, better, modify the bin/run file to add those values.

Can also be used in PHP code with (new TJM\WPToMarkdown($opts))(). See src/WPToMarkdown.php for options.

License

SPDX-License-Identifier: 0BSD

统计信息

  • 总下载量: 32
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: 0BSD
  • 更新时间: 2024-08-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固