terwer / siyuan-plugin-publisher

✈️ Publish articles from siyuan-note to platforms such as Yuque, etc.Free and open source. 将思源笔记的文章发布到语雀等平台,开源免费。
https://publish.terwer.space
MIT License
113 stars 9 forks source link

分享一个SQL表达式用于列出所有已经发表的文档 #795

Closed cesaryuan closed 8 months ago

cesaryuan commented 8 months ago

需要配合挂件 Query 使用

效果:

image

SQL表达式,太长已折叠 ```sql select "((" || id || " '" || blocks.fcontent || "'))" AS __1____pre__文档, CASE WHEN blocks.ial like '%custom-common-Yuque-yaml%' THEN " 语雀" ELSE '' END || CASE WHEN blocks.ial like '%custom-common-Notion-yaml%' THEN " Notion" ELSE '' END || CASE WHEN blocks.ial like '%custom-common-Halo-yaml%' THEN " Halo" ELSE '' END || CASE WHEN blocks.ial like '%custom-github-Hexo-yaml%' THEN " Hexo" ELSE '' END || CASE WHEN blocks.ial like '%custom-github-Hugo-yaml%' THEN " Hugo" ELSE '' END || CASE WHEN blocks.ial like '%custom-github-Jekyll-yaml%' THEN " Jekyll" ELSE '' END || CASE WHEN blocks.ial like '%custom-github-Vuepress-yaml%' THEN " Vuepress" ELSE '' END || CASE WHEN blocks.ial like '%custom-github-Vuepress2-yaml%' THEN " Vuepress2" ELSE '' END || CASE WHEN blocks.ial like '%custom-github-Vitepress-yaml%' THEN " Vitepress" ELSE '' END || CASE WHEN blocks.ial like '%custom-gitlab-Gitlabhexo-yaml%' THEN " Gitlabhexo" ELSE '' END || CASE WHEN blocks.ial like '%custom-gitlab-Gitlabhugo-yaml%' THEN " Gitlabhugo" ELSE '' END || CASE WHEN blocks.ial like '%custom-gitlab-Gitlabjekyll-yaml%' THEN " Gitlabjekyll" ELSE '' END || CASE WHEN blocks.ial like '%custom-gitlab-Gitlabvuepress-yaml%' THEN " Gitlabvuepress" ELSE '' END || CASE WHEN blocks.ial like '%custom-gitlab-Gitlabvuepress2-yaml%' THEN " Gitlabvuepress2" ELSE '' END || CASE WHEN blocks.ial like '%custom-gitlab-Gitlabvitepress-yaml%' THEN " Gitlabvitepress" ELSE '' END || CASE WHEN blocks.ial like '%custom-metaweblog-Cnblogs-yaml%' THEN " 博客园" ELSE '' END || CASE WHEN blocks.ial like '%custom-metaweblog-Typecho-yaml%' THEN " Typecho" ELSE '' END || CASE WHEN blocks.ial like '%custom-wordpress-Wordpress-yaml%' THEN " Wordpress" ELSE '' END || CASE WHEN blocks.ial like '%custom-custom-Zhihu-yaml%' THEN " 知乎" ELSE '' END || CASE WHEN blocks.ial like '%custom-custom-Csdn-yaml%' THEN " CSDN" ELSE '' END || CASE WHEN blocks.ial like '%custom-custom-Wechat-yaml%' THEN " 微信公众号" ELSE '' END || CASE WHEN blocks.ial like '%custom-custom-Jianshu-yaml%' THEN " 简书" ELSE '' END || CASE WHEN blocks.ial like '%custom-custom-Juejin-yaml%' THEN " 掘金" ELSE '' END || CASE WHEN blocks.ial like '%custom-system-Siyuan-yaml%' THEN " 思源笔记" ELSE '' END AS __2____pre__发布平台 from blocks where type = "d" AND ial like "%custom-%-yaml%" ```
terwer commented 8 months ago

需要的可参考