{"id":50,"date":"2023-09-11T15:38:08","date_gmt":"2023-09-11T07:38:08","guid":{"rendered":"http:\/\/blog.pbin.xin\/?p=50"},"modified":"2023-09-11T15:46:51","modified_gmt":"2023-09-11T07:46:51","slug":"%e3%80%90%e5%b7%a5%e5%85%b7%e3%80%91markpresswordpress%e4%bd%bf%e7%94%a8","status":"publish","type":"post","link":"http:\/\/blog.percy.homes\/index.php\/2023\/09\/11\/%e3%80%90%e5%b7%a5%e5%85%b7%e3%80%91markpresswordpress%e4%bd%bf%e7%94%a8\/","title":{"rendered":"\u3010\u5de5\u5177\u3011MarkPress&#038;WordPress\u4f7f\u7528"},"content":{"rendered":"<h1>MarkPress<\/h1>\n<h2>\u4f5c\u7528<\/h2>\n<p>\u4e3aWordPress\u800c\u751f\u7684\u4e00\u4e2a\u521b\u5efa\u548c\u53d1\u5e03\u7684\u4e00\u4e2a\u547d\u4ee4\u884c\u5de5\u5177<\/p>\n<h2>\u5b89\u88c5<\/h2>\n<p><a href=\"https:\/\/github.com\/skywind3000\/markpress\" target=\"_blank\" rel=\"noopener\">github\u6e90\u7801<\/a><\/p>\n<ul>\n<li>\u7b2c\u4e00\u6b65<\/li>\n<\/ul>\n<p>\u4e0b\u5230\u9879\u76ee\u5230\u60f3\u8981\u7684\u76ee\u5f55\u4e0b<\/p>\n<pre><code class=\"bash\">git clone https:\/\/github.com\/skywind3000\/markpress.git ~\/.local\/app\/markpress\n<\/code><\/pre>\n<ul>\n<li>\u7b2c\u4e8c\u6b65<br \/>\n\u628a\u9879\u76ee\u4e2d\u7684 <code>bin<\/code> \u76ee\u5f55\u6dfb\u52a0\u5230\u73af\u5883\u53d8\u91cf\u4e2d<\/li>\n<\/ul>\n<pre><code class=\"bash\">export PATH=\"~\/.local\/app\/markpress\/bin:$PATH\"\n<\/code><\/pre>\n<ul>\n<li>\u7b2c\u4e09\u6b65<br \/>\n\u5b89\u88c5\u4e0a\u8fd0\u884c\u6240\u9700\u5e93<\/li>\n<\/ul>\n<pre><code class=\"bash\">sudo pip install python-wordpress-xmlrpc markdown beautifulsoup4 PySocks\n<\/code><\/pre>\n<p>\u5b89\u88c5\u5b8c\u6210<\/p>\n<h2>\u4f7f\u7528<\/h2>\n<p>\u4ecb\u7ecd\u7b80\u5355\u4f7f\u7528\u65b9\u6cd5\uff0c\u8be6\u60c5\u53ef\u53c2\u8003github\u6559\u7a0b<\/p>\n<p>\u7b2c\u4e00\u6b65\uff0c \u5728 <code>~\/.config\/markpress<\/code> \u521b\u5efa <code>config.ini<\/code><\/p>\n<pre><code class=\"ini\">[default]\ntabsize=4\n\n[0]\nurl=http:\/\/your-wordpress.com\/\nuser=USERNAME\npasswd=PASSWORD\n<\/code><\/pre>\n<p>\u4e0b\u4e00\u6b65\uff0c\u6765\u521b\u5efa\u6587\u7ae0<\/p>\n<pre><code class=\"bash\">markpress -n mypost.md\n<\/code><\/pre>\n<p>\u6253\u5f00\u521b\u5efa\u7684md\u6587\u4ef6\u540e\uff0c\u4f1a\u53d1\u73b0MarkPress\u521b\u5efa\u4e86\u4e00\u4e2a\u5e26\u6709\u5143\u6807\u9898\u7684\u65b0markdown\u6587\u6863<\/p>\n<pre><code>---\nuuid: 47\ntitle:\nstatus: draft\ncategories:\ntags:\nslug:\n---\n<\/code><\/pre>\n<p>WordPress\u670d\u52a1\u5668\u5c06\u4e3a\u6bcf\u4e2a\u65b0\u5e16\u5b50\u5206\u914d\u4e00\u4e2a\u552f\u4e00\u7684uid\uff0c\u5e76\u4f7f\u7528\u5b83\u6765\u6807\u8bc6\u5e16\u5b50\u3002\u73b0\u5728\u4f60\u53ef\u4ee5\u7f16\u8f91mypost\u4e86<\/p>\n<pre><code>---\nuuid: 47\ntitle:\nstatus: draft\ncategories:\ntags:\nslug:\n\n---\n\n#markpress \u4e0a\u4f20\u6d4b\u8bd5\n<\/code><\/pre>\n<p>\u4e0d\u8981\u5fd8\u8bb0\u5c06\u72b6\u6001\u4ece\u8349\u7a3f\u66f4\u6539\u4e3a\u53d1\u5e03\u3002\u6700\u540e\u4f7f\u7528MarkPress\u5c06\u60a8\u7684\u6587\u6863\u66f4\u65b0\u5230\u670d\u52a1\u5668<\/p>\n<pre><code class=\"bash\">markpress -u mypost.md\n<\/code><\/pre>\n<ul>\n<li>END<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>MarkPress \u4f5c\u7528 \u4e3aWordPress\u800c\u751f\u7684\u4e00\u4e2a\u521b\u5efa\u548c\u53d1\u5e03\u7684\u4e00\u4e2a\u547d\u4ee4\u884c\u5de5\u5177 \u5b89\u88c5 github\u6e90\u7801 \u7b2c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,6],"tags":[],"_links":{"self":[{"href":"http:\/\/blog.percy.homes\/index.php\/wp-json\/wp\/v2\/posts\/50"}],"collection":[{"href":"http:\/\/blog.percy.homes\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.percy.homes\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.percy.homes\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.percy.homes\/index.php\/wp-json\/wp\/v2\/comments?post=50"}],"version-history":[{"count":4,"href":"http:\/\/blog.percy.homes\/index.php\/wp-json\/wp\/v2\/posts\/50\/revisions"}],"predecessor-version":[{"id":55,"href":"http:\/\/blog.percy.homes\/index.php\/wp-json\/wp\/v2\/posts\/50\/revisions\/55"}],"wp:attachment":[{"href":"http:\/\/blog.percy.homes\/index.php\/wp-json\/wp\/v2\/media?parent=50"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.percy.homes\/index.php\/wp-json\/wp\/v2\/categories?post=50"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.percy.homes\/index.php\/wp-json\/wp\/v2\/tags?post=50"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}