-
Notifications
You must be signed in to change notification settings - Fork 9
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
1 parent
4ebeead
commit a20f032
Showing
5 changed files
with
100 additions
and
3 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 @@ | ||
- `pattern`: | ||
|
||
file pattern to convert | ||
|
||
**required**: True | ||
**default**: `**/*.md` | ||
|
||
- `output_dir`: | ||
|
||
dir to store converted markdown | ||
|
||
**required**: True | ||
**default**: `_md2zhihu` | ||
|
||
- `md_branch`: | ||
|
||
The branch name to push converted markdown to. A build overrides previous built branch. If you want to persist the built markdowns, merge this branch. | ||
|
||
**required**: True | ||
**default**: `_md2zhihu/md` | ||
|
||
- `asset_branch`: | ||
|
||
The branch name in which assets are stored. | ||
|
||
**required**: True | ||
**default**: `_md2zhihu/asset` | ||
|
||
- `target_platform`: | ||
|
||
The platform that the converted markdown should be compatible to. | ||
Currently supported platforms are zhihu, wechat, weibo, simple. `simple` converts almost everything to images and removes most text styles. E.g. inline code block is converted to normal text. | ||
|
||
**required**: True | ||
**default**: `zhihu` | ||
|
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,21 @@ | ||
#!/usr/bin/env python | ||
# coding: utf-8 | ||
|
||
import yaml | ||
|
||
with open("action.yml", 'r') as f: | ||
cont = f.read() | ||
|
||
y = yaml.load(cont) | ||
|
||
with open("action-doc.md", 'w') as f: | ||
|
||
for k, v in y['inputs'].items(): | ||
f.write("- `{k}`:".format(k=k)) | ||
f.write("\n") | ||
f.write("\n") | ||
f.write(" {description}\n".format(description=v['description'].strip())) | ||
f.write("\n") | ||
f.write(" **required**: {required}\n **default**: `{default}`".format(**v)) | ||
f.write("\n") | ||
f.write("\n") |
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,2 +1,2 @@ | ||
__version__ = "0.1.26" | ||
__version__ = "0.4" | ||
__name__ = "md2zhihu" |