Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .wxt/eslintrc-auto-import.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"globals": {
"ContentScriptContext": true,
"InvalidMatchPattern": true,
"MatchPattern": true,
"MigrationError": true,
"browser": true,
"createIframeUi": true,
"createIntegratedUi": true,
"createShadowRootUi": true,
"defineAppConfig": true,
"defineBackground": true,
"defineConfig": true,
"defineContentScript": true,
"defineUnlistedScript": true,
"defineWxtPlugin": true,
"fakeBrowser": true,
"injectScript": true,
"storage": true,
"useAppConfig": true
}
}
30 changes: 30 additions & 0 deletions .wxt/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "Bundler",
"noEmit": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"strict": true,
"skipLibCheck": true,
"paths": {
"$lib": ["../src/lib"],
"$lib/*": ["../src/lib/*"],
"@": ["../src"],
"@/*": ["../src/*"],
"~": ["../src"],
"~/*": ["../src/*"],
"@@": [".."],
"@@/*": ["../*"],
"~~": [".."],
"~~/*": ["../*"]
}
},
"include": [
"../**/*",
"./wxt.d.ts"
],
"exclude": ["../.output"]
}
15 changes: 15 additions & 0 deletions .wxt/types/globals.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Generated by wxt
interface ImportMetaEnv {
readonly MANIFEST_VERSION: 2 | 3;
readonly BROWSER: string;
readonly CHROME: boolean;
readonly FIREFOX: boolean;
readonly SAFARI: boolean;
readonly EDGE: boolean;
readonly OPERA: boolean;
readonly COMMAND: "build" | "serve";
readonly ENTRYPOINT: string;
}
interface ImportMeta {
readonly env: ImportMetaEnv
}
81 changes: 81 additions & 0 deletions .wxt/types/i18n.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
// Generated by wxt
import "wxt/browser";

declare module "wxt/browser" {
/**
* See https://developer.chrome.com/docs/extensions/reference/i18n/#method-getMessage
*/
interface GetMessageOptions {
/**
* See https://developer.chrome.com/docs/extensions/reference/i18n/#method-getMessage
*/
escapeLt?: boolean
}

export interface WxtI18n extends I18n.Static {
/**
* The extension or app ID; you might use this string to construct URLs for resources inside the extension. Even unlocalized extensions can use this message.
* Note: You can't use this message in a manifest file.
*
* "<browser.runtime.id>"
*/
getMessage(
messageName: "@@extension_id",
substitutions?: string | string[],
options?: GetMessageOptions,
): string;
/**
* "<browser.i18n.getUiLocale()>"
*/
getMessage(
messageName: "@@ui_locale",
substitutions?: string | string[],
options?: GetMessageOptions,
): string;
/**
* The text direction for the current locale, either "ltr" for left-to-right languages such as English or "rtl" for right-to-left languages such as Japanese.
*
* "<ltr|rtl>"
*/
getMessage(
messageName: "@@bidi_dir",
substitutions?: string | string[],
options?: GetMessageOptions,
): string;
/**
* If the @@bidi_dir is "ltr", then this is "rtl"; otherwise, it's "ltr".
*
* "<rtl|ltr>"
*/
getMessage(
messageName: "@@bidi_reversed_dir",
substitutions?: string | string[],
options?: GetMessageOptions,
): string;
/**
* If the @@bidi_dir is "ltr", then this is "left"; otherwise, it's "right".
*
* "<left|right>"
*/
getMessage(
messageName: "@@bidi_start_edge",
substitutions?: string | string[],
options?: GetMessageOptions,
): string;
/**
* If the @@bidi_dir is "ltr", then this is "right"; otherwise, it's "left".
*
* "<right|left>"
*/
getMessage(
messageName: "@@bidi_end_edge",
substitutions?: string | string[],
options?: GetMessageOptions,
): string;
getMessage(
messageName: "@@extension_id" | "@@ui_locale" | "@@bidi_dir" | "@@bidi_reversed_dir" | "@@bidi_start_edge" | "@@bidi_end_edge",
substitutions?: string | string[],
options?: GetMessageOptions,
): string;
}
}
22 changes: 22 additions & 0 deletions .wxt/types/imports.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Generated by wxt
export {}
declare global {
const ContentScriptContext: typeof import('wxt/client')['ContentScriptContext']
const InvalidMatchPattern: typeof import('wxt/sandbox')['InvalidMatchPattern']
const MatchPattern: typeof import('wxt/sandbox')['MatchPattern']
const MigrationError: typeof import('wxt/storage')['MigrationError']
const browser: typeof import('wxt/browser')['browser']
const createIframeUi: typeof import('wxt/client')['createIframeUi']
const createIntegratedUi: typeof import('wxt/client')['createIntegratedUi']
const createShadowRootUi: typeof import('wxt/client')['createShadowRootUi']
const defineAppConfig: typeof import('wxt/sandbox')['defineAppConfig']
const defineBackground: typeof import('wxt/sandbox')['defineBackground']
const defineConfig: typeof import('wxt')['defineConfig']
const defineContentScript: typeof import('wxt/sandbox')['defineContentScript']
const defineUnlistedScript: typeof import('wxt/sandbox')['defineUnlistedScript']
const defineWxtPlugin: typeof import('wxt/sandbox')['defineWxtPlugin']
const fakeBrowser: typeof import('wxt/testing')['fakeBrowser']
const injectScript: typeof import('wxt/client')['injectScript']
const storage: typeof import('wxt/storage')['storage']
const useAppConfig: typeof import('wxt/client')['useAppConfig']
}
20 changes: 20 additions & 0 deletions .wxt/types/paths.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Generated by wxt
import "wxt/browser";

declare module "wxt/browser" {
export type PublicPath =
| "/"
| "/background.js"
| "/content-scripts/content.js"
| "/icon/128.png"
| "/icon/16.png"
| "/icon/32.png"
| "/icon/48.png"
| "/icon/96.png"
| "/popup.html"
type HtmlPublicPath = Extract<PublicPath, `${string}.html`>
export interface WxtRuntime {
getURL(path: PublicPath): string;
getURL(path: `${HtmlPublicPath}${string}`): string;
}
}
6 changes: 6 additions & 0 deletions .wxt/wxt.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Generated by wxt
/// <reference types="wxt/vite-builder-env" />
/// <reference types="./types/paths.d.ts" />
/// <reference types="./types/i18n.d.ts" />
/// <reference types="./types/globals.d.ts" />
/// <reference types="./types/imports.d.ts" />
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<h1 align="center">WeRead Export</h1>
<div align="center">
一键导出微信读书笔记
一键导出 Markdown 格式微信读书笔记

极简风格

![](https://raw.githubusercontent.com/scarqin/wxread-export/main/wiki/app.png)

Expand All @@ -10,10 +12,12 @@

- [x] 显示带笔记的书籍列表
- [x] 一键导出 markdown 格式划线/评论
- [ ] 自定义导出内容(书籍信息、书籍评分等)
- [ ] 自定义导出格式
- [x] 导出阅读时间
- [ ] 导出笔记图片
- [ ] 图书检索
- [ ] 支持 Firefox、Chrome 商店下载
- [ ] 自定义导出内容(书籍信息、书籍评分等)
- [ ] 自定义导出格式

## 一键导出 markdown 格式划线/评论

Expand All @@ -25,7 +29,7 @@

[链接](https://chrome.google.com/webstore/detail/weread-export/pfdngabomfljjilophohpifglnodhhnh?hl=zh-CN&authuser=0)

需要翻墙,可以自动更新
需要科学上网,可以自动更新

## 2. 手动安装

Expand All @@ -43,7 +47,7 @@ git clone https://github.com/scarqin/wxread-export.git

## API 文档

[在线 API 文档](https://scarfree.w.eolink.com/share/project/api/?groupID=-1&shareCode=65wWvE&shareToken=$2y$10$ZVixV4UGvQ221pgkWRQKOO4Ew~2FYGsXSwPbg.NRZO8i7r6hChj5q7e&shareID=355331)
[在线 API 文档](https://www.eolink.com/share/index?shareCode=65wWvE)
![](https://raw.githubusercontent.com/scarqin/wxread-export/main/wiki/eolink.png)

## 安装依赖
Expand Down
4 changes: 4 additions & 0 deletions component.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://shadcn-svelte.com/schema.json",
"style": "default"
}
14 changes: 14 additions & 0 deletions components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "https://shadcn-svelte.com/schema.json",
"style": "default",
"tailwind": {
"config": "tailwind.config.js",
"css": "src/entrypoints/popup/app.css",
"baseColor": "slate"
},
"aliases": {
"components": "$lib/components",
"utils": "$lib/utils"
},
"typescript": true
}
27 changes: 18 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,24 @@
"check": "svelte-check --tsconfig ./tsconfig.json",
"postinstall": "wxt prepare"
},
"dependencies": {
"@sveltejs/vite-plugin-svelte": "^4.0.1",
"@tsconfig/svelte": "^5.0.4",
"autoprefixer": "^10.4.20",
"postcss": "^8.4.49",
"svelte": "^5.2.3",
"svelte-check": "^4.0.9",
"tailwindcss": "^3.4.15",
"tslib": "^2.8.1",
"typescript": "^5.6.3",
"wxt": "^0.19.16"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^3.0.1",
"@tsconfig/svelte": "^5.0.2",
"svelte": "^4.2.8",
"svelte-check": "^3.6.2",
"tslib": "^2.6.2",
"typescript": "^5.3.3",
"wxt": "^0.17.0",
"mdui": "^1.0.2",
"sirv-cli": "^1.0.0"
"bits-ui": "^0.21.16",
"clsx": "^2.1.1",
"sirv-cli": "^3.0.0",
"tailwind-merge": "^2.5.5",
"tailwind-variants": "^0.3.0",
"@tsconfig/svelte": "^5.0.4"
}
}
Loading