Skip to content

Commit

Permalink
feat:test github action
Browse files Browse the repository at this point in the history
fix:change secret name

Update README.md

更新文档教程,防止小白先登录再打开控制台。

test release with github action

test release with github action

add build plugin

test github action

test github action

update release github action

update release action

fix:update release action

test release action

test release action

test release action

test release action
  • Loading branch information
zhaohongxuan committed May 12, 2022
1 parent d543ad7 commit 98586fa
Show file tree
Hide file tree
Showing 7 changed files with 8,103 additions and 23 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: CI

on:
push:
branches:
- "*"

env:
PLUGIN_NAME: obsidian-weread-plugin

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 16

- name: Build
id: build
run: |
npm install
npm run build
23 changes: 6 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: "14.x"
node-version: 16

- name: Build
id: build
run: |
npm install
npm run build
mkdir ${{ env.PLUGIN_NAME }}
cp main.js manifest.json styles.css ${{ env.PLUGIN_NAME }}
cp ./dist/main.js ./dist/manifest.json ${{ env.PLUGIN_NAME }}
zip -r ${{ env.PLUGIN_NAME }}.zip ${{ env.PLUGIN_NAME }}
ls
echo "::set-output name=tag_name::$(git tag --sort version:refname | tail -n 1)"
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./main.js
asset_path: ./dist/main.js
asset_name: main.js
asset_content_type: text/javascript

Expand All @@ -71,17 +71,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./manifest.json
asset_path: ./dist/manifest.json
asset_name: manifest.json
asset_content_type: application/json

- name: Upload styles.css
id: upload-css
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./styles.css
asset_name: styles.css
asset_content_type: text/css
asset_content_type: application/json
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,5 @@ data.json

# Exclude macOS Finder (System Explorer) View States
.DS_Store
package-lock.json

dist
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Obsidian Weread Plugin

[![](https://github.com/zhaohongxuan/obsidian-weread-plugin/actions/workflows/CI.yml/badge.svg)](https://github.com/zhaohongxuan/obsidian-weread-plugin/actions/workflows/CI.yml)
[![Release Obsidian plugin](https://github.com/zhaohongxuan/obsidian-weread-plugin/actions/workflows/release.yml/badge.svg)](https://github.com/zhaohongxuan/obsidian-weread-plugin/actions/workflows/release.yml)

Obsidian微信读书插件是一个社区插件,用来同步微信读书中所有的高亮文本/划线/以及个人感想,并将这些信息转换为笔记设置到Onbsidian的文件夹中。

## 功能
Expand All @@ -13,11 +16,13 @@ Obsidian微信读书插件是一个社区插件,用来同步微信读书中所
3. 重启Obsidian,或者重新刷新community plugin![](https://cdn.jsdelivr.net/gh/zhaohongxuan/picgo@master/20220512084836.png)
## 使用方法

1. 从r.qq.com扫码登录,控制台获取到Cookie
1. 先打开微信读书(也即r.qq.com),先不要登录,按 `CMD+Option+i`/`Ctrl+Shift+i` 启动网页控制台
2. 点击下图所示的网络(Network)栏目,按 `Ctrl+E`/`CMD+E` 启动网络监控
3. 在微信读书 r.qq.com 扫码登录,控制台获取到Cookie
![](https://cdn.jsdelivr.net/gh/zhaohongxuan/picgo@master/20220511235931.png)
2. 把Cookie内容粘贴到setting框
4. 把Cookie内容粘贴到setting框
![](https://cdn.jsdelivr.net/gh/zhaohongxuan/picgo@master/20220511235704.png)
3. 点击左侧Ribbon上的微信读书按钮,或者command+P(windows ctrl+P)调出Command Pattle 输入Weread 找到`Sync Weread command`即可同步。
5. 点击左侧Ribbon上的微信读书按钮,或者command+P(windows ctrl+P)调出Command Pattle 输入Weread 找到`Sync Weread command`即可同步。

- Ribbon方式
![](https://cdn.jsdelivr.net/gh/zhaohongxuan/picgo@master/20220511235530.png)
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "obsidian-weread-plugin",
"name": "Weread Plugin",
"version": "0.1.1",
"version": "0.1.8",
"minAppVersion": "0.12.0",
"description": "This is obsidian plugin for Tencent weread.",
"author": "hankzhao",
Expand Down
Loading

0 comments on commit 98586fa

Please sign in to comment.