id: 0ce90220bce642b5881398e125be54a8
parent_id: 
item_type: 1
item_id: 0e90b4daf3ca4909a4d46646e1d1d0cb
item_updated_time: 1764365027525
title_diff: "[{\"diffs\":[[1,\"用markdown来画流程图\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":14}]"
body_diff: "[{\"diffs\":[[1,\"<html>\\\r\\\n<head>\\\r\\\n  <title>用markdown来画流程图</title>\\\r\\\n  <basefont face=\\\"微软雅黑\\\" size=\\\"2\\\" />\\\r\\\n  <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html;charset=utf-8\\\" />\\\r\\\n  <meta name=\\\"exporter-version\\\" content=\\\"YXBJ Windows/608924 (zh-CN, DDL); Windows/10.0.0 (Win64); EDAMVersion=V2;\\\"/>\\\r\\\n  <style>\\\r\\\n\\tbody, td {\\\r\\\n\\t  font-family: 微软雅黑;\\\r\\\n\\t  font-size: 12pt;\\\r\\\n\\t}\\\r\\\n  </style>\\\r\\\n</head>\\\r\\\n<body>\\\r\\\n<a name=\\\"13335\\\"></a>\\\r\\\n<h1>用markdown来画流程图</h1>\\\r\\\n\\\r\\\n<div><span><div style=\\\"-evernote-webclip:true\\\"><br/><div><div><div><div><h1>用markdown来画流程图</h1><div><div></div></div></div>\\\n\\\n        \\\n        <div>\\\n                    <div>\\\n            作者\\\n            <a href=\\\"http://www.jianshu.com/u/2b784e3c0b18\\\" target=\\\"_blank\\\">Jlan</a>\\\n            \\\n            <a target=\\\"_blank\\\">关注</a>\\\n            \\\n            <div>\\\n              \\\n                2016.09.09 22:38*\\\n              字数 479\\\n            阅读 2376评论 3喜欢 7</div>\\\n          </div>\\\n          \\\n        </div>\\\n        \\\n\\\n        \\\n        <div>\\\n          <p>一直在用markdown（不得不说markdown语法真的太强大太简洁了，效果也太优美，没学过markdown语法的可以自己学下）写东西，知道用markdown可以画出来很性感的流程图，遂决定学下如何用markdown来画流程图。</p>\\\n<h3>代码</h3>\\\n<pre><code>flow\\\nst=&gt;start: Start\\\nop=&gt;operation: Your Operation\\\ncond=&gt;condition: Yes or No?\\\ne=&gt;end\\\nst-&gt;op-&gt;cond\\\ncond(yes)-&gt;e\\\ncond(no)-&gt;op</code></pre>\\\n<hr/>\\\n<h3>效果</h3>\\\n<div>\\\n<div><img src=\\\"用markdown来画流程图_files/1240.png\\\" type=\\\"image/png\\\" data-filename=\\\"1240.png\\\" height=\\\"437\\\" width=\\\"291\\\"/></div><div>深度截图20160909223653.png</div>\\\n</div>\\\n<hr/>\\\n<h3>说明</h3>\\\n<p>这样几行简单的代码就生成了一个优雅的流程图。<br/>流程图大致分为两段，第一段是定义元素，第二段是定义元素之间的走向。</p>\\\n<h4>定义元素的语法</h4>\\\n<pre><code>tag=&gt;type: content:&gt;url</code></pre>\\\n<ul>\\\n<li>tag就是元素名字， </li>\\\n<li>\\\n<p>type是这个元素的类型，有6中类型，分别为：</p>\\\n<blockquote><ul>\\\n<li>start         # 开始</li>\\\n<li>end           # 结束</li>\\\n<li>operation     # 操作</li>\\\n<li>subroutine    # 子程序</li>\\\n<li>condition     # 条件</li>\\\n<li>inputoutput   # 输入或产出</li>\\\n</ul></blockquote>\\\n</li>\\\n<li>\\\n<p>content就是在框框中要写的内容，注意type后的冒号与文本之间一定要有个空格。 </p>\\\n</li>\\\n<li>url是一个连接，与框框中的文本相绑定</li>\\\n</ul>\\\n<h4>连接元素的语法</h4>\\\n<p>用<strong>-&gt;</strong>来连接两个元素，需要注意的是condition类型，因为他有yes和no两个分支，所以要写成</p>\\\n<pre><code>c2(yes)-&gt;io-&gt;e \\\nc2(no)-&gt;op2-&gt;e</code></pre>\\\n<hr/>\\\n<h3>实际应用</h3>\\\n<p>下边献上我的拙作，这是一个爬取某网站的商品评论数据，然后进行情感分析的小项目，有四个模块：获取待爬取商品id，爬取代理，爬取评论，情感分析</p>\\\n<h4>代码</h4>\\\n<pre><code>flow\\\nst=&gt;start: Start|past:&gt;http://www.google.com[blank]\\\ne=&gt;end: End:&gt;http://www.google.com\\\nop1=&gt;operation: get_hotel_ids|past\\\nop2=&gt;operation: get_proxy|current\\\nsub1=&gt;subroutine: get_proxy|current\\\nop3=&gt;operation: save_comment|current\\\nop4=&gt;operation: set_sentiment|current\\\nop5=&gt;operation: set_record|current\\\n\\\ncond1=&gt;condition: ids_remain空?\\\ncond2=&gt;condition: proxy_list空?\\\ncond3=&gt;condition: ids_got空?\\\ncond4=&gt;condition: 爬取成功??\\\ncond5=&gt;condition: ids_remain空?\\\n\\\nio1=&gt;inputoutput: ids-remain\\\nio2=&gt;inputoutput: proxy_list\\\nio3=&gt;inputoutput: ids-got\\\n\\\nst-&gt;op1(right)-&gt;io1-&gt;cond1\\\ncond1(yes)-&gt;sub1-&gt;io2-&gt;cond2\\\ncond2(no)-&gt;op3\\\ncond2(yes)-&gt;sub1\\\ncond1(no)-&gt;op3-&gt;cond4\\\ncond4(yes)-&gt;io3-&gt;cond3\\\ncond4(no)-&gt;io1\\\ncond3(no)-&gt;op4\\\ncond3(yes, right)-&gt;cond5\\\ncond5(yes)-&gt;op5\\\ncond5(no)-&gt;cond3\\\nop5-&gt;e</code></pre>\\\n<h4>效果</h4>\\\n<div>\\\n<div><img src=\\\"用markdown来画流程图_files/1240 [1].png\\\" type=\\\"image/png\\\" data-filename=\\\"1240.png\\\" height=\\\"687\\\" width=\\\"576\\\"/></div><div>流程图.png</div>\\\n</div>\\\n<p>这个流程图有个问题，我希望ids_remain的两个条件都为空，但是markdown语法没法实现我这需求（不知道我这需求是不是有毛病），只能先这样画着了。</p>\\\n<hr/>\\\n<h3>原文</h3>\\\n<p><a href=\\\"http://jlan.me/2016/09/09/%E7%94%A8markdown%E6%9D%A5%E7%94%BB%E6%B5%81%E7%A8%8B%E5%9B%BE/\\\" target=\\\"_blank\\\">http://jlan.me/2016/09/09/%E7%94%A8markdown%E6%9D%A5%E7%94%BB%E6%B5%81%E7%A8%8B%E5%9B%BE/</a></p>\\\n<h3>参考</h3>\\\n\\\n\\\n        </div>\\\n        \\\n\\\n        <div>\\\n          <a href=\\\"http://www.jianshu.com/nb/10715370\\\" target=\\\"_blank\\\">\\\n             markdown\\\n</a>          \\\n          \\\n        </div>\\\n    </div></div></div><br/></div></span>\\\n</div></body></html>\\u0000\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":3905}]"
metadata_diff: {"new":{"id":"0e90b4daf3ca4909a4d46646e1d1d0cb","parent_id":"f67288c3a0be4374b5d532b5dcc3aabc","latitude":"0.00000000","longitude":"0.00000000","altitude":"0.0000","author":"","source_url":"","is_todo":0,"todo_due":0,"todo_completed":0,"source":"joplin-desktop","source_application":"net.cozic.joplin-desktop","application_data":"","order":1764348869660,"user_updated_time":1764345576829,"markup_language":2,"is_shared":0,"share_id":"","conflict_original_id":"","master_key_id":"","user_data":"","deleted_time":1764365027525},"deleted":[]}
encryption_cipher_text: 
encryption_applied: 0
updated_time: 2025-11-28T21:24:56.033Z
created_time: 2025-11-28T21:24:56.033Z
type_: 13