-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
文档::Merge pull request #3 from GalAster/docs
合并::在线文档
- Loading branch information
Showing
7 changed files
with
220 additions
and
38 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
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,36 @@ | ||
# Functions | ||
|
||
LineArt 模块 | ||
|
||
- 模块可单独加载 | ||
|
||
```haskell | ||
$head="https://raw.githubusercontent.com/GalAster/Illusory/master/Packages/Module/"; | ||
Import[$head<>"LineArt.wl"]; | ||
``` | ||
|
||
## LineWeb | ||
|
||
- `LineWeb[img, k:100]` | ||
|
||
### 参数说明 | ||
|
||
- img 类型为 `Image`, 表示需要转化的图片 | ||
- k 类型为 `Integer`, 表示最终结果的线密度 | ||
|
||
### 可选项 | ||
|
||
|
||
|
||
### 返回值 | ||
|
||
|
||
|
||
### 标准示例 | ||
|
||
**测试代码:** | ||
```haskell | ||
Import[] | ||
``` | ||
|
||
**测试输出:** |
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,36 @@ | ||
# Functions | ||
|
||
PolyArt 模块 | ||
|
||
- 模块可单独加载 | ||
|
||
```haskell | ||
$head="https://raw.githubusercontent.com/GalAster/Illusory/master/Packages/Module/"; | ||
Import[$head<>"PolyArt.wl"]; | ||
``` | ||
|
||
## TriPainting | ||
|
||
- `TriPainting[img, k:100]` | ||
|
||
### 参数说明 | ||
|
||
- img 类型为 `Image`, 表示需要转化的图片 | ||
- k 类型为 `Integer`, 表示最终结果的三角形密度 | ||
|
||
### 可选项 | ||
|
||
|
||
|
||
### 返回值 | ||
|
||
|
||
|
||
### 标准示例 | ||
|
||
**测试代码:** | ||
```haskell | ||
Import[] | ||
``` | ||
|
||
**测试输出:** |
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 |
---|---|---|
@@ -1,55 +1,64 @@ | ||
# Editor | ||
|
||
## 文档编写指南 v0.1 | ||
## 文档编写指南 v0.2 | ||
|
||
网页文档使用 Vuepress 编写. | ||
|
||
注意使用 UTF-8 作为字符编码, CRLF 作为换行符. | ||
|
||
使用 Markdown 语法编写文档, SM.MS 作为图床. | ||
使用 Markdown 语法编写文档, [SM.MS](https://sm.ms/) 作为图床. | ||
|
||
暂时 Haskell 模式作为代码高亮. | ||
|
||
## 工作流程 | ||
|
||
### Fork | ||
先 Fork | ||
|
||
寻找没有 Module 文件夹中已经定义的但是文档里没有的函数. | ||
|
||
导入文件包测试输入输出并编写文档. | ||
|
||
### Edit | ||
最后提交 Pull Request | ||
|
||
## 注意事项 | ||
|
||
`Pull Request` 请提交到 `docs` 分支, | ||
|
||
本项目在左边, 自己的项目在右边. | ||
|
||
名称格式为: | ||
|
||
`文档::` 开头, 后面加 `XXX 模块` 作为标题 | ||
|
||
接下来可以加上文档修改理由, 如: | ||
|
||
添加了 XXX 函数的说明, 测试代码或者示例 | ||
|
||
修正了错别字, 语法问题等等. | ||
|
||
|
||
#### New Page | ||
如果要创建新的页面, 那么除了需要创建文件夹与 Readme 文件以外, 还要修改config. | ||
|
||
一般新文件夹的命名与源函数包的名称相同, 且必须要有一个 `Readme.md` 文件作为入口 | ||
|
||
```yaml | ||
Start | ||
Readme.md | ||
Developer.md | ||
Editor.md | ||
``` | ||
|
||
Readme 以 `# Functions` 开头, 其他样式仿照现有文件即可, 你觉得有更美观的写法自创也行. | ||
|
||
一般要求包含**输入值**, **返回值**, 以及**可选项**. | ||
## 常见问题 | ||
|
||
同时修改 `.vuepress/config.js` 中的 `sidebar` 字段: | ||
- 扩展加载失败 | ||
|
||
```JavaScript | ||
{ | ||
title: '简介', | ||
children: [ | ||
'/Start/', | ||
'/Start/Developer.md', | ||
'/Start/Editor.md' | ||
] | ||
} | ||
使用如下代码自动纠正编码: | ||
```haskell | ||
If[$CharacterEncoding=!="UTF-8", | ||
$CharacterEncoding="UTF-8"; | ||
Print[{ | ||
Style["$CharacterEncoding has changed to UTF-8 to avoid problems.",Red], | ||
Style["Because BilibiliLink only works under UTF-8"] | ||
}//TableForm]; | ||
st=OpenAppend[FindFile["init.m"]]; | ||
WriteString[st,"$CharacterEncoding=\"UTF-8\";"]; | ||
Close[st]; | ||
]; | ||
``` | ||
|
||
`title` 是实际显示的标题. | ||
- Github 404 | ||
|
||
### Push | ||
原因未知, 已经报告给上游依赖维护者. |
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,45 @@ | ||
# Editor Advance | ||
|
||
## 工作流程 | ||
|
||
### Fork | ||
|
||
|
||
|
||
### Edit | ||
|
||
|
||
|
||
|
||
#### New Page | ||
如果要创建新的页面, 那么除了需要创建文件夹与 Readme 文件以外, 还要修改config. | ||
|
||
一般新文件夹的命名与源函数包的名称相同, 且必须要有一个 `Readme.md` 文件作为入口 | ||
|
||
```yaml | ||
Start | ||
Readme.md | ||
Developer.md | ||
Editor.md | ||
``` | ||
|
||
Readme 以 `# Functions` 开头, 其他样式仿照现有文件即可, 你觉得有更美观的写法自创也行. | ||
|
||
一般要求包含**输入值**, **返回值**, 以及**可选项**. | ||
|
||
同时修改 `.vuepress/config.js` 中的 `sidebar` 字段: | ||
|
||
```JavaScript | ||
{ | ||
title: '简介', | ||
children: [ | ||
'/Start/', | ||
'/Start/Developer.md', | ||
'/Start/Editor.md' | ||
] | ||
} | ||
``` | ||
|
||
`title` 是实际显示的标题. | ||
|
||
### Push |
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
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,36 @@ | ||
# Functions | ||
|
||
TextArt 模块 | ||
|
||
- 模块可单独加载 | ||
|
||
```haskell | ||
$head="https://raw.githubusercontent.com/GalAster/Illusory/master/Packages/Module/"; | ||
Import[$head<>"TextArt.wl"]; | ||
``` | ||
|
||
## LineWeb | ||
|
||
- `LineWeb[img, k:100]` | ||
|
||
### 参数说明 | ||
|
||
- img 类型为 `Image`, 表示需要转化的图片 | ||
- k 类型为 `Integer`, 表示最终结果的线密度 | ||
|
||
### 可选项 | ||
|
||
|
||
|
||
### 返回值 | ||
|
||
|
||
|
||
### 标准示例 | ||
|
||
**测试代码:** | ||
```haskell | ||
Import[] | ||
``` | ||
|
||
**测试输出:** |