From eba25f8307d6266b31664dc81eef78fdbd565f41 Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Fri, 10 Feb 2023 12:08:20 +0800 Subject: [PATCH 01/13] Update python script to write content into index.html --- packages/readabilityjs/test/index.html | 448 ++++++++++ packages/readabilityjs/test/view.html | 1114 ------------------------ packages/readabilityjs/test/view.py | 11 +- 3 files changed, 455 insertions(+), 1118 deletions(-) create mode 100644 packages/readabilityjs/test/index.html delete mode 100644 packages/readabilityjs/test/view.html diff --git a/packages/readabilityjs/test/index.html b/packages/readabilityjs/test/index.html new file mode 100644 index 000000000..dd62bc2d6 --- /dev/null +++ b/packages/readabilityjs/test/index.html @@ -0,0 +1,448 @@ + + + + + + + + + + + + + + + + +
+ + + +
+ + + diff --git a/packages/readabilityjs/test/view.html b/packages/readabilityjs/test/view.html deleted file mode 100644 index 6575cc16a..000000000 --- a/packages/readabilityjs/test/view.html +++ /dev/null @@ -1,1114 +0,0 @@ - - - - - - - - - - - - - -
- - - -
- - diff --git a/packages/readabilityjs/test/view.py b/packages/readabilityjs/test/view.py index c8bd7bf2a..ffd718727 100644 --- a/packages/readabilityjs/test/view.py +++ b/packages/readabilityjs/test/view.py @@ -6,7 +6,8 @@ from os.path import isfile, join testdirs = [f for f in listdir( "test-pages") if not isfile(join("test-pages", f))] -print(""" +file = open("index.html", "w") +file.write(""" @@ -24,7 +25,7 @@ print(""" """) for testdir in testdirs: - print(f""" + file.write(f"""
  • {testdir}
    [source] [readability] @@ -33,11 +34,11 @@ for testdir in testdirs: """) -print(""" +file.write(""" - @@ -47,3 +48,5 @@ print(""" """) + +file.close() From 15d417410edb559714d9d8dd3f2bec0aed61352d Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Fri, 10 Feb 2023 12:40:12 +0800 Subject: [PATCH 02/13] Add GitHub action to generate static html for readability and distiller test pages --- .github/workflows/static.yml | 64 +++++++++++++++++++ .../test/{view.py => generate_static.py} | 0 2 files changed, 64 insertions(+) create mode 100644 .github/workflows/static.yml rename packages/readabilityjs/test/{view.py => generate_static.py} (100%) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml new file mode 100644 index 000000000..9ded17ecd --- /dev/null +++ b/.github/workflows/static.yml @@ -0,0 +1,64 @@ +# Simple workflow for generating and deploying static html in readability folder to GitHub Pages +name: Deploy static content to Pages + +on: + push: + branches: ["main"] + + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + generate-distiller-output: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Go + uses: actions/setup-go@v3 + with: + go-version: 1.19 + - name: Generate distiller output for readability + run: | + go get github.com/omnivore-app/go-domdistiller + for f in packages/readabilityjs/test/test-pages/*/source.html; do + echo "Processing $f file..." + go-domdistiller -input $f -output $f.distiller.html + done + generate-static: + needs: generate-distiller-output + runs-on: ubuntu-latest + steps: + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: 3.9 + - name: Generate static html + run: | + cd packages/readabilityjs/test + python generate_static.py + deploy: + needs: generate-static + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Setup Pages + uses: actions/configure-pages@v3 + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + path: 'packages/readabilityjs/test/index.html' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1 + diff --git a/packages/readabilityjs/test/view.py b/packages/readabilityjs/test/generate_static.py similarity index 100% rename from packages/readabilityjs/test/view.py rename to packages/readabilityjs/test/generate_static.py From 22479cb8a65d4502ebc373cef8896a5ad61f618e Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Fri, 10 Feb 2023 12:51:59 +0800 Subject: [PATCH 03/13] Fix bug in action --- .github/workflows/static.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 9ded17ecd..5d2b37d6c 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -3,7 +3,15 @@ name: Deploy static content to Pages on: push: - branches: ["main"] + branches: + - main + paths-ignore: + - 'apple/**' + pull_request: + branches: + - main + paths-ignore: + - 'apple/**' workflow_dispatch: @@ -28,10 +36,10 @@ jobs: go-version: 1.19 - name: Generate distiller output for readability run: | - go get github.com/omnivore-app/go-domdistiller - for f in packages/readabilityjs/test/test-pages/*/source.html; do + go install github.com/omnivore-app/go-domdistiller@latest + for f in packages/readabilityjs/test/test-pages/*; do echo "Processing $f file..." - go-domdistiller -input $f -output $f.distiller.html + go-domdistiller file -i $f/source.html -o $f/distiller.html done generate-static: needs: generate-distiller-output From f02c1434b0170027f3b56390a7aa24afd1edf45b Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Fri, 10 Feb 2023 12:57:27 +0800 Subject: [PATCH 04/13] Skip newsletters for now --- .github/workflows/static.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 5d2b37d6c..589410a2a 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -39,6 +39,10 @@ jobs: go install github.com/omnivore-app/go-domdistiller@latest for f in packages/readabilityjs/test/test-pages/*; do echo "Processing $f file..." + # skip newsletters for now + if [ "$f" = "packages/readabilityjs/test/test-pages/newsletters" ]; then + continue + fi go-domdistiller file -i $f/source.html -o $f/distiller.html done generate-static: From 76b8ae558b1f2957d122173f55f514aa111cd7f2 Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Fri, 10 Feb 2023 13:02:05 +0800 Subject: [PATCH 05/13] Check out code in deploy job --- .github/workflows/static.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 589410a2a..63107b1c9 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -25,7 +25,7 @@ concurrency: cancel-in-progress: true jobs: - generate-distiller-output: + generate-static: runs-on: ubuntu-latest steps: - name: Checkout @@ -45,10 +45,6 @@ jobs: fi go-domdistiller file -i $f/source.html -o $f/distiller.html done - generate-static: - needs: generate-distiller-output - runs-on: ubuntu-latest - steps: - name: Setup Python uses: actions/setup-python@v4 with: @@ -64,6 +60,8 @@ jobs: url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v3 - name: Setup Pages uses: actions/configure-pages@v3 - name: Upload artifact From 167ca204b2aeb1593536b0ca686d023b88273510 Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Fri, 10 Feb 2023 13:11:02 +0800 Subject: [PATCH 06/13] Remove trigger on pull request --- .github/workflows/static.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 63107b1c9..cd7d35498 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -7,11 +7,6 @@ on: - main paths-ignore: - 'apple/**' - pull_request: - branches: - - main - paths-ignore: - - 'apple/**' workflow_dispatch: From 989ff56e139e039444f844710a5233be62e7b913 Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Fri, 10 Feb 2023 13:12:13 +0800 Subject: [PATCH 07/13] Only check out readability folder --- .github/workflows/static.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index cd7d35498..de9e945c6 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -5,8 +5,8 @@ on: push: branches: - main - paths-ignore: - - 'apple/**' + paths: + - 'packages/readabilityjs/**' workflow_dispatch: From 3c4a847c255d2dc9f49009692b390af49543a0a5 Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Fri, 10 Feb 2023 13:21:15 +0800 Subject: [PATCH 08/13] Add job to commit changes and push --- .github/workflows/static.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index de9e945c6..af09c83a3 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -48,6 +48,15 @@ jobs: run: | cd packages/readabilityjs/test python generate_static.py + - name: Commit changes and push + uses: EndBug/add-and-commit@v9 + with: + push: true + branch: ${{ github.ref }} + message: 'Update generated html' + add: '.' + author_name: 'GitHub Actions' + author_email: 'github-actions[bot]@users.noreply.github.com' deploy: needs: generate-static environment: From 083b1c6675cbab9a255e74b917cd71d4174e53ee Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Fri, 10 Feb 2023 13:49:32 +0800 Subject: [PATCH 09/13] Split the action into two steps --- .github/workflows/run-distiller.yml | 47 +++++++++++++++++++++++++++++ .github/workflows/static.yml | 42 +------------------------- 2 files changed, 48 insertions(+), 41 deletions(-) create mode 100644 .github/workflows/run-distiller.yml diff --git a/.github/workflows/run-distiller.yml b/.github/workflows/run-distiller.yml new file mode 100644 index 000000000..cbd86d147 --- /dev/null +++ b/.github/workflows/run-distiller.yml @@ -0,0 +1,47 @@ +name: Run DomDistiller on test pages + +on: + pull_request: + branches: + - main + paths: + - 'packages/readabilityjs/test/test-pages/**' + + workflow_dispatch: + +jobs: + run-distiller: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Go + uses: actions/setup-go@v3 + with: + go-version: 1.19 + - name: Generate distiller output for readability + run: | + go install github.com/omnivore-app/go-domdistiller@latest + for f in packages/readabilityjs/test/test-pages/*; do + echo "Processing $f file..." + # skip newsletters for now + if [ "$f" = "packages/readabilityjs/test/test-pages/newsletters" ]; then + continue + fi + go-domdistiller file -i $f/source.html -o $f/distiller.html + done + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: 3.9 + - name: Generate static html + run: | + cd packages/readabilityjs/test + python generate_static.py + - name: Commit changes and push + uses: EndBug/add-and-commit@v9 + with: + push: true + branch: ${{ github.ref }} + message: 'Update generated html' + add: '.' diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index af09c83a3..7848ffc3c 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -1,4 +1,3 @@ -# Simple workflow for generating and deploying static html in readability folder to GitHub Pages name: Deploy static content to Pages on: @@ -6,7 +5,7 @@ on: branches: - main paths: - - 'packages/readabilityjs/**' + - 'packages/readabilityjs/test/index.html' workflow_dispatch: @@ -20,45 +19,7 @@ concurrency: cancel-in-progress: true jobs: - generate-static: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Setup Go - uses: actions/setup-go@v3 - with: - go-version: 1.19 - - name: Generate distiller output for readability - run: | - go install github.com/omnivore-app/go-domdistiller@latest - for f in packages/readabilityjs/test/test-pages/*; do - echo "Processing $f file..." - # skip newsletters for now - if [ "$f" = "packages/readabilityjs/test/test-pages/newsletters" ]; then - continue - fi - go-domdistiller file -i $f/source.html -o $f/distiller.html - done - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: 3.9 - - name: Generate static html - run: | - cd packages/readabilityjs/test - python generate_static.py - - name: Commit changes and push - uses: EndBug/add-and-commit@v9 - with: - push: true - branch: ${{ github.ref }} - message: 'Update generated html' - add: '.' - author_name: 'GitHub Actions' - author_email: 'github-actions[bot]@users.noreply.github.com' deploy: - needs: generate-static environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} @@ -75,4 +36,3 @@ jobs: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v1 - From 6b4c34bec150742cbd0fe5fedc6c7879ee62609d Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Fri, 10 Feb 2023 13:57:21 +0800 Subject: [PATCH 10/13] Add wechat test page --- packages/readabilityjs/Readability.js | 2 - .../test-pages/wechat/expected-metadata.json | 12 + .../test/test-pages/wechat/expected.html | 387 +++ .../test/test-pages/wechat/source.html | 2969 +++++++++++++++++ .../test/test-pages/wechat/url.txt | 1 + 5 files changed, 3369 insertions(+), 2 deletions(-) create mode 100644 packages/readabilityjs/test/test-pages/wechat/expected-metadata.json create mode 100644 packages/readabilityjs/test/test-pages/wechat/expected.html create mode 100644 packages/readabilityjs/test/test-pages/wechat/source.html create mode 100644 packages/readabilityjs/test/test-pages/wechat/url.txt diff --git a/packages/readabilityjs/Readability.js b/packages/readabilityjs/Readability.js index 74a6870bd..8e1a5e1ae 100644 --- a/packages/readabilityjs/Readability.js +++ b/packages/readabilityjs/Readability.js @@ -2975,8 +2975,6 @@ Readability.prototype = { const byline = metadata.byline || this._articleByline; const [author, publishedAt] = extractPublishedDateFromAuthor(byline); - this.log("Grabbed: " + articleContent.innerHTML); - this._postProcessContent(articleContent); // If we haven't found an excerpt in the article's metadata, use the article's diff --git a/packages/readabilityjs/test/test-pages/wechat/expected-metadata.json b/packages/readabilityjs/test/test-pages/wechat/expected-metadata.json new file mode 100644 index 000000000..8f3a46590 --- /dev/null +++ b/packages/readabilityjs/test/test-pages/wechat/expected-metadata.json @@ -0,0 +1,12 @@ +{ + "title": "全平台开源免费稍后读利器,且可与Obsidian联用!", + "byline": "赵传文", + "dir": null, + "excerpt": "十分优秀!", + "siteName": "Weixin Official Accounts Platform", + "siteIcon": "http://res.wx.qq.com/a/wx_fed/assets/res/NTI4MWU5.ico", + "previewImage": "https://mmbiz.qpic.cn/mmbiz_jpg/PR2BLDgtAWQfpRtQeRNMaEvjArqCicrIWjpibM4eh4lcTshZBaS4tWaJlfw0jAUaUia1aIRhibdUmicToDsdKLXTwbQ/0?wx_fmt=jpeg", + "publishedDate": "2023-01-10T00:00:00.000Z", + "language": "English", + "readerable": false +} diff --git a/packages/readabilityjs/test/test-pages/wechat/expected.html b/packages/readabilityjs/test/test-pages/wechat/expected.html new file mode 100644 index 000000000..9bb732b73 --- /dev/null +++ b/packages/readabilityjs/test/test-pages/wechat/expected.html @@ -0,0 +1,387 @@ +
    +
    +
    + 点击上方蓝字Image关注维客笔记 +
    +
    + 分享最实用的利器 | 探索解决问题的简单方案
    +
    +
    大家好,我是来自1037号森林的BCS!
    +
    +

    + 01 引言 +

    +

    我很看好的一款稍后读利器!

    +

    很期待它的后续更新!

    +

    + 02 它是谁 +

    +

    名曰Omnivore +

    +
    + Image +
    图一:初见
    +
    +

    软件和插件获取方式在文末

    +

    + 03 它有何特点 +

    +

    下面我先根据官网的展示,给大家介绍它的各种特点

    +
    + Image +
    图二:稍详细的介绍
    +
    +
      +
    • +
      免费
      +
    • +
    • +
      开源
      +
    • +
    • +
      稍后读
      +
    • +
    • +
      可保存网页、newsletter订阅、文档等
      +
    • +
    • +
      保存之后,可进行高亮和注释
      +
    • +
    • +
      全端同步(win/macos/安卓/ios/ipados)
      +
    • +
    • +
      再补一条:可与Obsidian联通
      +
    • +
    +

    继续看图

    +
    + Image +
    图三:欣赏一下,此图来自官网
    +
    +
      +
    • +
      效果还是不错的吧
      +
    • +
    +
    + Image +
    图四:剪藏后的阅读效果
    +
    +
      +
    • +
      剪藏进入Omnivore之后,Omnivore会格式化网页,去除广告等不相关的元素,给你一个干净&舒适的阅读界面
      +
    • +
    +
    + Image +
    图五:链接保存
    +
    +
      +
    • +
      随时随地保存链接并进行阅读,无需担心原网页被删除哈
      +
    • +
    +
    + Image +
    图六:Newsletter
    +
    +
      +
    • +
      可以将你订阅的newsletter直接发送到Omnivore库中,随时阅读
      +
    • +
    +
    + Image +
    图七:你的阅读完全由你自己掌控
    +
    +
      +
    • +
      读你想读的,可通过标签、过滤器和完全索引的文本搜索,保持阅读的有序性
      +
    • +
    +
    + Image +
    图八:为键盘党准备了一波
    +
    +
      +
    • +
      支持全键盘操作
      +
    • +
    • +
      支持集成知识库软件和笔记软件(Logseq&Webhooks&Readwise,这是目前官方文档里给的三个软件,竟然没有Obsidian🤣)
      +
    • +
    +
    +

    不过,请放心,Ob也有方案搞定,不难😋

    +
    +

    什么?!你还想听书??

    +

    这不就来了~

    +
    + Image +
    图九:听
    +
    +
      +
    • +
      ios党又要开心了,我试了,文本转语音真的很逼真
      +
    • +
    +

    要不给大家听一段?

    +
    + +
    +
      +
    • +
      这里还要多说一句,支持选择语言(中英文都支持)、语速以及人声,一个个大大的赞
      +
    • +
    +

    + 04 它如何使用 +

    +

    很简单哈

    +
      +
    • +
      +

      为了方便各位小伙伴边用边学,这里先放上官方网址https://omnivore.app/login

      +
      +
    • +
    • +
      +

      注册,至于你想选哪个邮箱,随意

      +
      +
    • +
    +
    + Image +
    图十:注册
    +
    +
    +
    +
    +
    +
    +
    +
      +
    • +
      完事之后,登录,来到下图界面Omnivoer的Library
      +
    • +
    +
    + Image +
    图十一:Omnivoer Library
    +
    +
    +
    +
    +
    +
    +
    +
      +
    • +
      剪藏,共有两种方式
      +
    • +
    +

    + 第一种:粘贴网页链接,见下图Add link +

    +
    + Image +
    图十二:add link
    +
    +

    给个链接,剪藏试试:https://mp.weixin.qq.com/s/bc2dhFa1tCUoExeMzZCv3A

    +

    我的剪藏效果如下:

    +
    + Image +
    图十三:剪藏效果
    +
    +
    +
    +
    +
    +
    +
    +

    + 第二种:安装Omnivoer浏览器插件,打开网页所在页面,然后点击插件图标,即可完成剪藏,十分方便 +

    +
    + Image +
    图十四:插件
    +
    +

    如果你没有网络条件,建议使用edge,因为edge浏览器插件商店有此插件,且不需要特殊网络条件。

    +
    +
    +

    edge浏览器有多么优秀,我之前也说过!👉

    + +
    +
    +
      +
    • +
      移动端
      +
    • +
    +
      +
    1. +
      +

      对于ios用户,直接在ios应用商店检索下载,安装即可

      +
      +
    2. +
    3. +
      +

      对于安卓用户,安装包在文末获取吧

      +
      +
    4. +
    +

    另外,对于安卓版本,目前还处于pre-rlease

    +
    + Image +
    图十五:客户端
    +
    +
    +
    +
    +
    +
    +
    +
      +
    1. +
      移动端(ios)如何剪藏文章:在浏览器中打开网页,点击下方的分享按钮,在弹出的对话框中找到Omnivore图标,单机一下即可保存。(在这之前,还要在ios safari安装一下此插件哈)
      +
    2. +
    +
    + Image +
    图十六:Omnivore ios safari扩展
    +
    +
    +

    剪藏之后,至于如何管理和怎样阅读,每个小伙伴都有自己独特的方法,这里我就不做过多介绍了!

    +
    +

    + 05 Omnivore与Obsidian +

    +
    +

    先让我感叹一下:Ob有各种插件开发大佬,还有什么功能是它实现不了的,好好用Ob(是你用,而不是你被Ob耽误了)吧,真的能解决你的各种需求!

    +
    +
      +
    • +
      + 插件名称:obsidian-omnivore +
      +
    • +
    • +
      + 贡献者:如下 +
      +
    • +
    +
    + Image +
    图十七
    +
    +
      +
    • +
      +

      + 插件功能:将Omnivore中的文章,包括高亮和注释同步到Ob库中 +

      +
      +
    • +
    • +
      +

      + 如何配置? +

      +
      +
    • +
    +
      +
    1. +
      此插件暂未上架,在文末获取
      +
    2. +
    3. +
      安装并启用插件
      +
    4. +
    5. +
      在Ob库里创建一个文件夹专门用于存放从Omnivore中导入的内容
      +
    6. +
    7. +
      打开插件选项设置界面,我的初步配置如下
      +
    8. +
    +
    + Image +
    图十八
    +
    +

    API Keys的获取方式:打开网页版Omnivore,点击右上角,即可看到API keys

    +
    + Image +
    图十九
    +
    +

    然后你需要点下图的create

    +
    + Image +
    图二十
    +
    +

    创建之后并复制

    +

    最后粘贴到图十八的api key处就行。

    +

    参考图十八的配置完成之后,接下来就是运行了

    +
      +
    • +
      在Ob中,我们打开命令面板(ctrl+P),然后输入Omnivore
      +
    • +
    +
    + Image +
    图二十一
    +
    +

    两个同步命令,随便点,然后就同步过来了

    +
    + Image +
    图二十二
    +
    +

    + 06 有何问题 +

    +
      +
    • +
      剪藏的微信公众号推文,竟然没有图片(试了一个英文newsletter是有图片的)
      +
    • +
    • +
      文章标题是中文时,如图二十二所示,标题会变成数字+字母
      +
    • +
    +

    + 07 写在最后 +

    +
      +
    • +
      很不错的稍后读APP,期待后续更新
      +
    • +
    • +
      为简悦和Cubox而担忧
      +
    • +
    +
    +

    都是十分优秀的产品,期待你们都发展的更好吧!

    +
    +
    +
    +
    感谢关注/点赞/分享
    +
    + A better you, A bigger world! +
    +
    +
    +

    上一篇记录 | 解决简悦剪藏的两个Bug!下一篇Obsidian极简日记配置教程 +

    +
    +
    \ No newline at end of file diff --git a/packages/readabilityjs/test/test-pages/wechat/source.html b/packages/readabilityjs/test/test-pages/wechat/source.html new file mode 100644 index 000000000..2ee21cac6 --- /dev/null +++ b/packages/readabilityjs/test/test-pages/wechat/source.html @@ -0,0 +1,2969 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 全平台开源免费稍后读利器,且可与Obsidian联用! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    +

    + 全平台开源免费稍后读利器,且可与Obsidian联用! +

    +
    + 赵传文 维客笔记 + 2023-01-10 07:07 Posted on 湖北 +
    + +
    +
    + 点击上方蓝字Image关注维客笔记 +
    +
    +
    +
    +
    + 分享最实用的利器 | 探索解决问题的简单方案
    +
    +
    +
    +
    +
    + 大家好,我是来自1037号森林的BCS! +
    +
    +

    + 01 引言 +

    +

    + 我很看好的一款稍后读利器! +

    +

    + 很期待它的后续更新! +

    +

    + 02 它是谁 +

    +

    + 名曰Omnivore +

    +
    + Image +
    + 图一:初见 +
    +
    +

    + (软件和插件获取方式在文末) +

    +

    + 03 它有何特点 +

    +

    + 下面我先根据官网的展示,给大家介绍它的各种特点 +

    +
    + Image +
    + 图二:稍详细的介绍 +
    +
    +
      +
    • +
      + 免费 +
      +
    • +
    • +
      + 开源 +
      +
    • +
    • +
      + 稍后读 +
      +
    • +
    • +
      + 可保存网页、newsletter订阅、文档等 +
      +
    • +
    • +
      + 保存之后,可进行高亮和注释 +
      +
    • +
    • +
      + 全端同步(win/macos/安卓/ios/ipados) +
      +
    • +
    • +
      + 再补一条:可与Obsidian联通 +
      +
    • +
    +

    + 继续看图 +

    +
    + Image +
    + 图三:欣赏一下,此图来自官网 +
    +
    +
      +
    • +
      + 效果还是不错的吧 +
      +
    • +
    +
    +
    +
    +
    +
    +
    +
    + Image +
    + 图四:剪藏后的阅读效果 +
    +
    +
      +
    • +
      + 剪藏进入Omnivore之后,Omnivore会格式化网页,去除广告等不相关的元素,给你一个干净&舒适的阅读界面 +
      +
    • +
    +
    +
    +
    +
    +
    +
    +
    + Image +
    + 图五:链接保存 +
    +
    +
      +
    • +
      + 随时随地保存链接并进行阅读,无需担心原网页被删除哈 +
      +
    • +
    +
    +
    +
    +
    +
    +
    +
    + Image +
    + 图六:Newsletter +
    +
    +
      +
    • +
      + 可以将你订阅的newsletter直接发送到Omnivore库中,随时阅读 +
      +
    • +
    +
    +
    +
    +
    +
    +
    +
    + Image +
    + 图七:你的阅读完全由你自己掌控 +
    +
    +
      +
    • +
      + 读你想读的,可通过标签、过滤器和完全索引的文本搜索,保持阅读的有序性 +
      +
    • +
    +
    +
    +
    +
    +
    +
    +
    + Image +
    + 图八:为键盘党准备了一波 +
    +
    +
      +
    • +
      + 支持全键盘操作 +
      +
    • +
    • +
      + 支持集成知识库软件和笔记软件(Logseq&Webhooks&Readwise,这是目前官方文档里给的三个软件,竟然没有Obsidian🤣) +
      +
    • +
    +
    +

    + 不过,请放心,Ob也有方案搞定,不难😋 +

    +
    +

    +
    +

    +

    +
    +

    +

    + 什么?!你还想听书?? +

    +

    + 这不就来了~ +

    +
    + Image +
    + 图九:听 +
    +
    +
      +
    • +
      + ios党又要开心了,我试了,文本转语音真的很逼真 +
      +
    • +
    +

    + 要不给大家听一段? +

    +
    + +
    + +
    + +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    +

    + 视频加载失败,请刷新页面再试 +

    Refresh +
    +
    +
    +
    +
    +

    +
    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
      +
    • +
      + 这里还要多说一句,支持选择语言(中英文都支持)、语速以及人声,一个个大大的赞 +
      +
    • +
    +

    + 04 它如何使用 +

    +

    + 很简单哈 +

    +
      +
    • +
      +

      + 为了方便各位小伙伴边用边学,这里先放上官方网址https://omnivore.app/login +

      +
      +
    • +
    • +
      +

      + 注册,至于你想选哪个邮箱,随意 +

      +
      +
    • +
    +
    + Image +
    + 图十:注册 +
    +
    +
    +
    +
    +
    +
    +
    +
      +
    • +
      + 完事之后,登录,来到下图界面Omnivoer的Library +
      +
    • +
    +
    + Image +
    + 图十一:Omnivoer Library +
    +
    +
    +
    +
    +
    +
    +
    +
      +
    • +
      + 剪藏,共有两种方式 +
      +
    • +
    +

    + 第一种:粘贴网页链接,见下图Add link +

    +
    + Image +
    + 图十二:add link +
    +
    +

    + 给个链接,剪藏试试:https://mp.weixin.qq.com/s/bc2dhFa1tCUoExeMzZCv3A +

    +

    + 我的剪藏效果如下: +

    +
    + Image +
    + 图十三:剪藏效果 +
    +
    +
    +
    +
    +
    +
    +
    +

    + 第二种:安装Omnivoer浏览器插件,打开网页所在页面,然后点击插件图标,即可完成剪藏,十分方便 +

    +
    + Image +
    + 图十四:插件 +
    +
    +

    + 如果你没有网络条件,建议使用edge,因为edge浏览器插件商店有此插件,且不需要特殊网络条件。 +

    +
    +
    +

    + edge浏览器有多么优秀,我之前也说过!👉 +

    + +
    +
    +

    +
    +

    +

    +
    +

    +
      +
    • +
      + 移动端 +
      +
    • +
    +
      +
    1. +
      +

      + 对于ios用户,直接在ios应用商店检索下载,安装即可 +

      +
      +
    2. +
    3. +
      +

      + 对于安卓用户,安装包在文末获取吧 +

      +
      +
    4. +
    +

    + 另外,对于安卓版本,目前还处于pre-rlease +

    +
    + Image +
    + 图十五:客户端 +
    +
    +
    +
    +
    +
    +
    +
    +
      +
    1. +
      + 移动端(ios)如何剪藏文章:在浏览器中打开网页,点击下方的分享按钮,在弹出的对话框中找到Omnivore图标,单机一下即可保存。(在这之前,还要在ios safari安装一下此插件哈) +
      +
    2. +
    +
    + Image +
    + 图十六:Omnivore ios safari扩展 +
    +
    +
    +

    + 剪藏之后,至于如何管理和怎样阅读,每个小伙伴都有自己独特的方法,这里我就不做过多介绍了! +

    +
    +

    + 05 Omnivore与Obsidian +

    +
    +

    + 先让我感叹一下:Ob有各种插件开发大佬,还有什么功能是它实现不了的,好好用Ob(是你用,而不是你被Ob耽误了)吧,真的能解决你的各种需求! +

    +
    +
      +
    • +
      + 插件名称:obsidian-omnivore +
      +
    • +
    • +
      + 贡献者:如下 +
      +
    • +
    +
    + Image +
    + 图十七 +
    +
    +
      +
    • +
      +

      + 插件功能:将Omnivore中的文章,包括高亮和注释同步到Ob库中 +

      +
      +
    • +
    • +
      +

      + 如何配置? +

      +
      +
    • +
    +
      +
    1. +
      + 此插件暂未上架,在文末获取 +
      +
    2. +
    3. +
      + 安装并启用插件 +
      +
    4. +
    5. +
      + 在Ob库里创建一个文件夹专门用于存放从Omnivore中导入的内容 +
      +
    6. +
    7. +
      + 打开插件选项设置界面,我的初步配置如下 +
      +
    8. +
    +
    + Image +
    + 图十八 +
    +
    +

    + API Keys的获取方式:打开网页版Omnivore,点击右上角,即可看到API keys +

    +
    + Image +
    + 图十九 +
    +
    +

    + 然后你需要点下图的create +

    +
    + Image +
    + 图二十 +
    +
    +

    + 创建之后并复制 +

    +

    + 最后粘贴到图十八的api key处就行。 +

    +

    + 参考图十八的配置完成之后,接下来就是运行了 +

    +
      +
    • +
      + 在Ob中,我们打开命令面板(ctrl+P),然后输入Omnivore +
      +
    • +
    +
    + Image +
    + 图二十一 +
    +
    +

    + 两个同步命令,随便点,然后就同步过来了 +

    +
    + Image +
    + 图二十二 +
    +
    +

    + 06 有何问题 +

    +
      +
    • +
      + 剪藏的微信公众号推文,竟然没有图片(试了一个英文newsletter是有图片的) +
      +
    • +
    • +
      + 文章标题是中文时,如图二十二所示,标题会变成数字+字母 +
      +
    • +
    +

    + 07 写在最后 +

    +
      +
    • +
      + 很不错的稍后读APP,期待后续更新 +
      +
    • +
    • +
      + 为简悦和Cubox而担忧 +
      +
    • +
    +
    +

    + 都是十分优秀的产品,期待你们都发展的更好吧! +

    +
    +
    +

    +
    +

    +

    +
    +

    +

    + 插件&软件获取方式:请关注维客笔记微信公众号,在公众号后台聊天窗口回复20230110 +

    +

    +
    +

    +
    +
    +
    +
    +
    + 感谢关注/点赞/分享 +
    +
    + A better you, A bigger world! +
    +

    +
    + +
    + +
    + +
    +
    +
    + 收录于合集 #利器 +
     38 +
    +
    + 上一篇记录 | 解决简悦剪藏的两个Bug!下一篇Obsidian极简日记配置教程 +
    +
    +
    +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +
    + +
    +
    +
    + +
    + +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +

    + Scan to Follow +

    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + + diff --git a/packages/readabilityjs/test/test-pages/wechat/url.txt b/packages/readabilityjs/test/test-pages/wechat/url.txt new file mode 100644 index 000000000..2ad9b0c2d --- /dev/null +++ b/packages/readabilityjs/test/test-pages/wechat/url.txt @@ -0,0 +1 @@ +https://mp.weixin.qq.com/s/GOPZJy6e9JADeDN2M9rv8w \ No newline at end of file From 05380145fb2e730550a273b26bd9562da5f0fb1e Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Fri, 10 Feb 2023 15:22:19 +0800 Subject: [PATCH 11/13] Add branch reference --- .github/workflows/run-distiller.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run-distiller.yml b/.github/workflows/run-distiller.yml index cbd86d147..3a78bf1f2 100644 --- a/.github/workflows/run-distiller.yml +++ b/.github/workflows/run-distiller.yml @@ -15,6 +15,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + with: + ref: ${{ github.head_ref }} - name: Setup Go uses: actions/setup-go@v3 with: @@ -41,7 +43,6 @@ jobs: - name: Commit changes and push uses: EndBug/add-and-commit@v9 with: - push: true - branch: ${{ github.ref }} - message: 'Update generated html' add: '.' + message: 'Update generated html' + push: true From f7ba1dddfaeb51f2d8261b87da62748bf4bf776c Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Fri, 10 Feb 2023 15:26:10 +0800 Subject: [PATCH 12/13] Add pr event --- .github/workflows/run-distiller.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-distiller.yml b/.github/workflows/run-distiller.yml index 3a78bf1f2..f329efc8e 100644 --- a/.github/workflows/run-distiller.yml +++ b/.github/workflows/run-distiller.yml @@ -16,7 +16,8 @@ jobs: - name: Checkout uses: actions/checkout@v3 with: - ref: ${{ github.head_ref }} + repository: ${{ github.event.pull_request.head.repo.full_name }} + ref: ${{ github.event.pull_request.head.ref }} - name: Setup Go uses: actions/setup-go@v3 with: From 2f32b01a610467c6c182bed244d42e2d561089b6 Mon Sep 17 00:00:00 2001 From: sywhb Date: Fri, 10 Feb 2023 07:46:02 +0000 Subject: [PATCH 13/13] Update generated html --- packages/readabilityjs/test/index.html | 686 +++++++++--------- .../test/test-pages/wechat/distiller.html | 151 ++++ 2 files changed, 497 insertions(+), 340 deletions(-) create mode 100644 packages/readabilityjs/test/test-pages/wechat/distiller.html diff --git a/packages/readabilityjs/test/index.html b/packages/readabilityjs/test/index.html index dd62bc2d6..c4f1ec163 100644 --- a/packages/readabilityjs/test/index.html +++ b/packages/readabilityjs/test/index.html @@ -14,10 +14,148 @@ diff --git a/packages/readabilityjs/test/test-pages/wechat/distiller.html b/packages/readabilityjs/test/test-pages/wechat/distiller.html new file mode 100644 index 000000000..c1a0a4bb9 --- /dev/null +++ b/packages/readabilityjs/test/test-pages/wechat/distiller.html @@ -0,0 +1,151 @@ +
    + Original + 2023-01-10 07:07 Posted on 湖北 +
    + 收录于合集 +
    + 点击上方蓝字
    Image
    关注维客笔记 +
    + 分享最实用的利器 | 探索解决问题的简单方案
    +
    + 大家好,我是来自1037号森林的BCS! +

    + 01 引言 +

    + 我很看好的一款稍后读利器! +

    + 很期待它的后续更新! +

    + 02 它是谁 +

    + 名曰Omnivore +

    Image
    图一:初见

    + (软件和插件获取方式在文末) +

    + 03 它有何特点 +

    + 下面我先根据官网的展示,给大家介绍它的各种特点 +

    Image
    图二:稍详细的介绍
    • + 免费 +
    • + 开源 +
    • + 稍后读 +
    • + 可保存网页、newsletter订阅、文档等 +
    • + 保存之后,可进行高亮和注释 +
    • + 全端同步(win/macos/安卓/ios/ipados) +
    • + 再补一条:可与Obsidian联通 +

    + 继续看图 +

    Image
    图三:欣赏一下,此图来自官网
    • + 效果还是不错的吧 +
    Image
    图四:剪藏后的阅读效果
    • + 剪藏进入Omnivore之后,Omnivore会格式化网页,去除广告等不相关的元素,给你一个干净&舒适的阅读界面 +
    Image
    图五:链接保存
    • + 随时随地保存链接并进行阅读,无需担心原网页被删除哈 +
    Image
    图六:Newsletter
    • + 可以将你订阅的newsletter直接发送到Omnivore库中,随时阅读 +
    Image
    图七:你的阅读完全由你自己掌控
    • + 读你想读的,可通过标签、过滤器和完全索引的文本搜索,保持阅读的有序性 +
    Image
    图八:为键盘党准备了一波
    • + 支持全键盘操作 +
    • + 支持集成知识库软件和笔记软件(Logseq&Webhooks&Readwise,这是目前官方文档里给的三个软件,竟然没有Obsidian🤣) +

    + 不过,请放心,Ob也有方案搞定,不难😋 +

    + 什么?!你还想听书?? +

    + 这不就来了~ +

    Image
    图九:听
    • + ios党又要开心了,我试了,文本转语音真的很逼真 +

    + 要不给大家听一段? +

    + 视频加载失败,请刷新页面再试 +

    • + 移动端 +
    1. +

      + 对于ios用户,直接在ios应用商店检索下载,安装即可 +

      +
    2. +

      + 对于安卓用户,安装包在文末获取吧 +

      +

    + 另外,对于安卓版本,目前还处于pre-rlease +

    Image
    图十五:客户端
    1. + 移动端(ios)如何剪藏文章:在浏览器中打开网页,点击下方的分享按钮,在弹出的对话框中找到Omnivore图标,单机一下即可保存。(在这之前,还要在ios safari安装一下此插件哈) +
    Image
    图十六:Omnivore ios safari扩展

    + 剪藏之后,至于如何管理和怎样阅读,每个小伙伴都有自己独特的方法,这里我就不做过多介绍了! +

    + 05 Omnivore与Obsidian +

    + 先让我感叹一下:Ob有各种插件开发大佬,还有什么功能是它实现不了的,好好用Ob(是你用,而不是你被Ob耽误了)吧,真的能解决你的各种需求! +

    • + 插件名称:obsidian-omnivore +
    • + 贡献者:如下 +
    Image
    图十七
    • +

      + 插件功能:将Omnivore中的文章,包括高亮和注释同步到Ob库中 +

      +
    • +

      + 如何配置? +

      +
    1. + 此插件暂未上架,在文末获取 +
    2. + 安装并启用插件 +
    3. + 在Ob库里创建一个文件夹专门用于存放从Omnivore中导入的内容 +
    4. + 打开插件选项设置界面,我的初步配置如下 +
    Image
    图十八

    + API Keys的获取方式:打开网页版Omnivore,点击右上角,即可看到API keys +

    Image
    图十九

    + 然后你需要点下图的create +

    Image
    图二十

    + 创建之后并复制 +

    + 最后粘贴到图十八的api key处就行。 +

    + 参考图十八的配置完成之后,接下来就是运行了 +

    • + 在Ob中,我们打开命令面板(ctrl+P),然后输入Omnivore +
    Image
    图二十一

    + 两个同步命令,随便点,然后就同步过来了 +

    Image
    图二十二

    + 06 有何问题 +

    • + 剪藏的微信公众号推文,竟然没有图片(试了一个英文newsletter是有图片的) +
    • + 文章标题是中文时,如图二十二所示,标题会变成数字+字母 +

    + 07 写在最后 +

    • + 很不错的稍后读APP,期待后续更新 +
    • + 为简悦和Cubox而担忧 +

    + 都是十分优秀的产品,期待你们都发展的更好吧! +

    + 插件&软件获取方式:请关注维客笔记微信公众号,在公众号后台聊天窗口回复20230110 +

    + 感谢关注/点赞/分享 +
    + A better you, A bigger world! +
    + 收录于合集 #利器 +
     38 +
    + 上一篇记录 | 解决简悦剪藏的两个Bug!下一篇Obsidian极简日记配置教程 +

    + Scan to Follow +

    \ No newline at end of file