Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jinzcdev committed Jul 29, 2022
1 parent dcec4c1 commit fdbc0e2
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 18 deletions.
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
- Directly click on the problem to see the problem description.

> :star: **Note:**
> - You can specify the path of the workspace folder to store the problem files by updating the setting `pintia.workspaceFolder`. The default value is:**$HOME/.pintia/codes**.
> - You can specify the path of the workspace folder to store the problem files by updating the setting `pintia.workspaceFolder`. The default value is:**\$HOME/.pintia/codes**.
> - You can change the default language by triggering the command: `Pintia: Change Default Language`.
---
Expand Down Expand Up @@ -86,28 +86,36 @@ And then click `Test custom sample` to quickly test your code.
---

## 2. Settings
## 2. Usage

Use `Ctrl+P` (in Windows) or `Command+P` (in Mac) to open the command panel and enter `pintia` for quick access to the `Pintia Extension`'s related commands.

<p align="center">
<img src="https://gitee.com/jinzcdev/vscode-pintia/raw/main/docs/imgs/commands.png" alt="Command Palette" />
</p>

## 3. Settings

| Setting Name | Description | Default Value |
| ------------------------- | ------------------------------------------------------------ | ------------------ |
| `pintia.showLocked` | Specify to show the locked problem sets or not. (Some problem sets require verification of the user's reader code before they can be submitted) | `true` |
| `pintia.defaultLanguage` | Specify the default language used to solve the problem. Supported languages are: `C (gcc)`,`C++ (g++)`,`C (clang)`,`C++ (clang++)`,`Java (javac)`,`Python (python2)`,`Python (python3)`,`Ruby (ruby)`,`Bash (bash)`,`Plaintext (cat)`,`CommonLisp (sbcl)`,`Pascal (fpc)`,`Go (go)`,`Haskell (ghc)`,`Lua (lua)`,`Lua (luajit)`,`C# (mcs)`,`JavaScript (node)`,`OCaml (ocamlc)`,`PHP (php)`,`Perl (perl)`,`AWK (awk)`,`D (dmd)`,`Racket (racket)`,`Vala (valac)`,`Visual Basic (vbnc)`,`Kotlin (kotlinc)`,`Swift (swiftc)`,`Objective-C (gcc)`,`Fortran95 (gfortran)`,`Octave (octave-cli)`,`R (R)`,`ASM (nasm.sh)`,`Rust (rustc)`,`Scala (scalac)`,`Python (pypy3)`,`SQL (SQL)` | `C++ (g++)` |
| `pintia.defaultLanguage` | Specify the default language used to solve the problem. Supported languages are: `C (gcc)`, `C++ (g++)`, `C (clang)`, `C++ (clang++)`, `Java (javac)`, `Python (python2)`, `Python (python3)`, `Ruby (ruby)`, `Bash (bash)`, `Plaintext (cat)`, `CommonLisp (sbcl)`, `Pascal (fpc)`, `Go (go)`, `Haskell (ghc)`, `Lua (lua)`, `Lua (luajit)`, `C# (mcs)`, `JavaScript (node)`, `OCaml (ocamlc)`, `PHP (php)`, `Perl (perl)`, `AWK (awk)`, `D (dmd)`, `Racket (racket)`, `Vala (valac)`, `Visual Basic (vbnc)`, `Kotlin (kotlinc)`, `Swift (swiftc)`, `Objective-C (gcc)`, `Fortran95 (gfortran)`, `Octave (octave-cli)`, `R (R)`, `ASM (nasm. sh)`, `Rust (rustc)`, `Scala (scalac)`, `Python (pypy3)`, `SQL (SQL)` | `C++ (g++)` |
| `pintia.workspaceFolder` | Specify the path of the workspace folder to store the problem files. | `""` |
| `pintia.enableStatusBar` | Specify whether the Pintia status bar will be shown or not. | `true` |
| `pintia.editor.shortcuts` | Specify the customized shortcuts in editors. Supported values are: `submit`, `test`. | `["submit", "test"]` |
| `pintia.paging.pageSize` | Whether to page the problem list when the problem set is too large. It is not paged when pageSize is 0. | `100` |
| `pintia.autoCheckIn` | Specify whether to check in Pintia's education supermarket or not when the Pintia Extension is activated. | `false` |

## 3. Want Help?
## 4. Want Help?

When you meet any problem, you can check out the [Troubleshooting](https://github.com/jinzcdev/vscode-pintia/wiki/Troubleshooting) and [FAQ](https://github.com/jinzcdev/vscode-pintia/wiki/FAQ) first.

If your problem still cannot be addressed, feel free to [file an issue](https://github.com/jinzcdev/vscode-pintia/issues/new/choose).

## 4. Release Notes
## 5. Release Notes

Refer to [CHANGELOG](https://github.com/jinzcdev/vscode-pintia/blob/main/CHANGELOG.md) | [中文文档](https://github.com/jinzcdev/vscode-pintia/blob/main/docs/CHANGELOG_zh-CN.md)

## 5. Acknowledgement
## 6. Acknowledgement

- The design of the `Pintia Extension` references the design of the [LeetCode](https://marketplace.visualstudio.com/items?itemName=LeetCode.vscode-leetcode) in many of its features.
26 changes: 15 additions & 11 deletions docs/README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

> :star: **注意:**
>
> - 您可以通过修改配置项 `pintia.workspaceFolder` 来指定存储题目文件的工作区路径。默认值为**$HOME/.pintia/codes**
> - 您可以通过修改配置项 `pintia.workspaceFolder` 来指定存储题目文件的工作区路径。默认值为**\$HOME/.pintia/codes**
>
> - 您可以通过 `Pintia: Change Default Language` 命令来改变默认语言,使用`Ctrl+P` (in Windows) 或 `Command+P` (in Mac)打开命令面板
Expand Down Expand Up @@ -81,39 +81,43 @@
</p>


- 您可以把您的代码放在`@pintia code=start``@pintia code=end`之间(在编辑区中输入`ptacode`来快速添加)
- 另外,您可以把您的**自定义测试样例**放在`@pintia test=start``@pintia test=end`之间(输入`ptatest`可以快速添加),并点击`Test custom sample` 以快速测试您的代码。
- 您可以把您的代码放在 `@pintia code=start``@pintia code=end` 之间(在编辑区中输入 `ptacode` 来快速添加)
- 另外,您可以把您的**自定义测试样例**放在 `@pintia test=start``@pintia test=end` 之间(输入 `ptatest` 可以快速添加),并点击 `Test custom sample` 以快速测试您的代码。

> :star: **Note:** 在点击`submit``test`提交你的代码时,只有在包裹在`@pintia code=start``@pintia code=end`之间的代码会被提交给 Pintia 判题器。
> :star: **Note:** 在点击 `submit``test` 提交你的代码时,只有在包裹在 `@pintia code=start``@pintia code=end` 之间的代码会被提交给 Pintia 判题器。
---

## 2. 使用
## 2. 插件使用

您能通过
使用 `Ctrl+P` (in Windows) 或 `Command+P` (in Mac)打开命令面板并输入 `pintia` 可快速使用插件的相关命令。

## 2. 插件配置项
<p align="center">
<img src="https://gitee.com/jinzcdev/vscode-pintia/raw/main/docs/imgs/commands.png" alt="命令面板" />
</p>

## 3. 插件配置项

| 设置名称 | 描述 | 默认值 |
| ------------------------- | ------------------------------------------------------------ | ---------------- |
| `pintia.showLocked` | 指定是否显示锁定的问题(一些题目集需要验证用户的**读者码**后方可提交) | `true` |
| `pintia.defaultLanguage` | 指定用于解题的默认语言。支持的语言有`C (gcc)`,`C++ (g++)`,`C (clang)`,`C++ (clang++)`,`Java (javac)`,`Python (python2)`,`Python (python3)``Ruby (ruby)` `Bash (bash)`,`Plaintext (cat)`,`CommonLisp (sbcl)`,`Pascal (fpc)`,`Go (go)`,`Haskell (ghc)`,`Lua (lua)`,`Lua (luajit)`,`C# (mcs)` `JavaScript (node)`,`OCaml (ocamlc)`,`PHP (php)`,`Perl (perl)`,`AWK (awk)`,`D (dmd)`,`Racket (racket)`,`Vala (valac)`,`Visual Basic (vbnc)` `Kotlin (kotlinc)`,`Swift (swiftc)`,`Objective-C (gcc)`,`Fortran95 (gfortran)`,`Octave (octave-cli)`,`R (R)`, `ASM (nasm. sh)`,`Rust (rustc)`,`Scala (scalac)`,`Python (pypy3)`,`SQL (SQL)` | `C++ (g++)` |
| `pintia.defaultLanguage` | 指定用于解题的默认语言。支持的语言有`C (gcc)`, `C++ (g++)`, `C (clang)`, `C++ (clang++)`, `Java (javac)`, `Python (python2)`, `Python (python3)`, `Ruby (ruby)`, `Bash (bash)`, `Plaintext (cat)`, `CommonLisp (sbcl)`, `Pascal (fpc)`, `Go (go)`, `Haskell (ghc)`, `Lua (lua)`, `Lua (luajit)`, `C# (mcs)`, `JavaScript (node)`, `OCaml (ocamlc)`, `PHP (php)`, `Perl (perl)`, `AWK (awk)`, `D (dmd)`, `Racket (racket)`, `Vala (valac)`, `Visual Basic (vbnc)`, `Kotlin (kotlinc)`, `Swift (swiftc)`, `Objective-C (gcc)`, `Fortran95 (gfortran)`, `Octave (octave-cli)`, `R (R)`, `ASM (nasm. sh)`, `Rust (rustc)`, `Scala (scalac)`, `Python (pypy3)`, `SQL (SQL)` | `C++ (g++)` |
| `pintia.workspaceFolder` | 指定工作区文件夹的路径,以存储代码文件 | `""` |
| `pintia.enableStatusBar` | 指定是否显示Pintia状态栏 | `true` |
| `pintia.editor.shortcuts` | 指定编辑器中的自定义快捷方式。目前仅支持`submit`, `test` | `["提交","测试"]` |
| `pintia.paging.pageSize` | 当问题集过大时,是否对问题列表进行分页。当pageSize为0表示不分页 | `100` |
| `pintia.autoCheckIn` | 指定当Pintia插件被激活时,是否自动签到Pintia的教育商店 | `false` |

## 3. 需要帮助?
## 4. 需要帮助?

在遇到任何问题时,您可以先查看[故障排除](https://github.com/jinzcdev/vscode-pintia/wiki/Troubleshooting)[常见问题](https://github.com/jinzcdev/vscode-pintia/wiki/FAQ)

如果您的问题仍然无法解决,可随时[创建一个新的Issue](https://github.com/jinzcdev/vscode-pintia/issues/new/choose)

## 4. 更新日志
## 5. 更新日志

请参考 [CHANGELOG](https://github.com/jinzcdev/vscode-pintia/blob/main/CHANGELOG.md) | [中文文档](https://github.com/jinzcdev/vscode-pintia/blob/main/docs/CHANGELOG_zh-CN.md)

## 5. 鸣谢
## 6. 鸣谢

- Pintia Extension 的功能设计参考了[LeetCode](https://marketplace.visualstudio.com/items?itemName=LeetCode.vscode-leetcode)
Binary file added docs/imgs/commands.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/commands/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export async function checkedInStatus(): Promise<boolean> {
}
} catch (error: any) {
ptaChannel.appendLine(error.toString());
promptForOpenOutputChannel("Failed to check in. Please open the output channel for details.", DialogType.error);
promptForOpenOutputChannel("Failed to get the status of checkin. Please open the output channel for details.", DialogType.error);
}
return false;
}
Expand Down

0 comments on commit fdbc0e2

Please sign in to comment.