-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit a91da03
Showing
46 changed files
with
8,992 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
node_modules | ||
dist | ||
coverage | ||
**/*.d.ts | ||
tests | ||
**/lib/* | ||
|
||
packages/studio-schemas/src/fst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
module.exports = { | ||
root: true, | ||
extends: ['@hai-platform'], | ||
overrides: [ | ||
{ | ||
files: ['*.js', '*.mjs', '*.cjs'], | ||
rules: { | ||
'no-console': [ | ||
'warn', | ||
{ | ||
allow: ['info', 'warn', 'error'], | ||
}, | ||
], | ||
}, | ||
}, | ||
{ | ||
files: ['*.ts', '*.tsx'], | ||
extends: ['@hai-platform/react'], | ||
parserOptions: { | ||
project: ['./apps/**/tsconfig.json'], | ||
tsconfigRootDir: __dirname, | ||
}, | ||
rules: { | ||
'react/prop-types': [2, { ignore: ['children'] }], | ||
'require-await': 'error', | ||
'import/no-extraneous-dependencies': 'off', | ||
'react/require-default-props': 'off', | ||
'react/button-has-type': 'off', | ||
'no-underscore-dangle': 'off', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'class-methods-use-this': 'off', | ||
'prefer-template': 'off', | ||
'import/prefer-default-export': 'off', | ||
'no-console': [ | ||
'warn', | ||
{ | ||
allow: ['info', 'warn', 'error'], | ||
}, | ||
], | ||
}, | ||
}, | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const path = require('path') | ||
const options = require('./.eslintrc') | ||
|
||
module.exports = { | ||
// 这样拆分出来,给 typescript-eslint 减小一些压力,通常能节省 50%+ 的时间 | ||
getModuleEslintConfig: (dirname) => { | ||
const parserOptions = { | ||
project: [path.resolve(dirname, './tsconfig.json')], | ||
tsconfigRootDir: dirname, | ||
} | ||
|
||
options.overrides.forEach((overrideConfig) => { | ||
overrideConfig.parserOptions = parserOptions | ||
}) | ||
return options | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# System | ||
.DS_Store | ||
|
||
# IDE or eidtor | ||
.idea/ | ||
.code/ | ||
|
||
# Dependency directories | ||
node_modules/ | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Package tool | ||
.happypack | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Typescript v1 declaration files | ||
typings/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
|
||
notes | ||
|
||
sync-to-github-*.zip | ||
|
||
tsconfig.tsbuildinfo | ||
|
||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# sync-to-github | ||
|
||
这是一个 Chrome 插件,可以将你的网页内容同步到 github 仓库中,例如与 ChatGPT 的对话。 | ||
|
||
![preview](./docs/preview.gif) | ||
|
||
## 安装和使用 | ||
|
||
在 [releases](https://github.com/aircloud/sync-to-github/releases) 中下载最新的 zip 包,解压缩,通过在 `设置 - 插件 - Load unpacked` 加载对应的文件夹完成安装。 | ||
|
||
初次使用前,请点击右上角“设置”,设置你的 AccessToken、仓库和目录信息。 | ||
|
||
当前支持列表: | ||
|
||
- [ChatGPT](https://chat.openai.com/) | ||
- [ShareGPT](https://sharegpt.com) | ||
|
||
## 新增一个网站 | ||
|
||
- 你可以在 issue 中新增一个 issue,记得添加 `add-a-website` Tag。 | ||
- 如果你是开发者,欢迎你 fork 代码,参考下文"贡献内容",并且通过 `Pull Request` 的方式合并到本项目中。 | ||
|
||
## 贡献内容 | ||
|
||
你可以很方便地新增一个网站支持。 | ||
|
||
1. 在 [converters](apps/chrome-ext/src/converters) 中参考现有项目,新增一个文件夹,用于实现 `BaseConverter`。 | ||
2. 在 [content_script](apps/chrome-ext/src/content_script.ts) 中引入它,新增一个实例。 | ||
3. 在 [manifest.jso](apps/chrome-ext/public/manifest.json) 中的 `content_scripts.matches` 中新增相应的正则匹配。 | ||
|
||
## 潜在的功能 | ||
|
||
这是一个刚刚开启的项目,更多的功能仍然需要完善,包括但不限于: | ||
|
||
- 只在通过检测的网站中显示彩色图标 | ||
- 自动发布版本 | ||
- 同步到插件商店 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('../../.eslintrc.tools').getModuleEslintConfig(__dirname) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"name": "chrome-ext", | ||
"version": "0.1.0", | ||
"private": true, | ||
"scripts": { | ||
"dev": "vite", | ||
"start": "vite", | ||
"build": "tsc && vite build", | ||
"preview": "vite preview" | ||
}, | ||
"type": "module", | ||
"keywords": [ | ||
"chatgpt" | ||
], | ||
"author": "aircloud", | ||
"license": "ISC", | ||
"dependencies": { | ||
"@blueprintjs/colors": "^4.1.15", | ||
"@blueprintjs/core": "^4.16.3", | ||
"@blueprintjs/popover2": "^1.13.3", | ||
"@emotion/react": "^11.10.6", | ||
"@emotion/styled": "^11.10.6", | ||
"@fontsource/roboto": "^4.5.8", | ||
"@mui/icons-material": "^5.11.11", | ||
"@mui/lab": "5.0.0-alpha.123", | ||
"@mui/material": "^5.11.13", | ||
"@octokit-next/core": "^2.7.0", | ||
"@octokit/core": "^4.2.0", | ||
"@types/chrome": "^0.0.224", | ||
"@types/node": "^18.15.3", | ||
"axios": "^1.3.3", | ||
"classnames": "^2.3.2", | ||
"dayjs": "^1.11.7", | ||
"octokit-next": "^1.2.1", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"react-use": "^17.4.0", | ||
"sass": "^1.58.3", | ||
"turndown": "^7.1.1", | ||
"unocss": "^0.50.6" | ||
}, | ||
"devDependencies": { | ||
"@octokit/types": "^9.0.0", | ||
"@types/react": "^18.0.27", | ||
"@types/react-dom": "^18.0.10", | ||
"@vitejs/plugin-react": "^3.1.0", | ||
"typescript": "^4.9.3", | ||
"vite": "^4.1.0" | ||
} | ||
} |
Oops, something went wrong.