Skip to content

Commit 127d77b

Browse files
committed
friends
1 parent 6fd3b7a commit 127d77b

4 files changed

Lines changed: 36 additions & 1 deletion

File tree

md/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@
5858
3. [查找指定文件格式文件](查找指定文件格式文件.md)
5959
4. [使用Python实现群发邮件功能](自动群发邮件.md)
6060
5. [xls批量转化为xlsx](xls批量转化为xlsx.md)
61+
6. [获取指定文件路径下文件修改时间](获取指定文件路径下文件修改时间.md)
62+
7. [计算指定日期当月最后一天的日期和该月天数](计算指定日期当月最后一天的日期和该月天数.md)
6163

6264

6365
#### 七、字符串、正则和爬虫

md/嵌套数组完全展开.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ title: 嵌套数组完全展开
33
tags: list,recursion,numpy
44
---
55

6+
### 嵌套数组完全展开
7+
68
对于如下数组:
79

810
```

rst/ch02/02_flatten.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
=======
2-
数组完全展开
2+
2.2 数组完全展开
33
=======
44
对于如下数组:
55

rst/md2rst.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
def auto_md2rst(input_file,output_file):
3+
try:
4+
my_key = 'NrtpV6kD5BdVxJ2R20eBqgCHK6heTjEMxtWSWENeZ9HdKUj5Ew3aCpodMCPPwLeH'
5+
6+
7+
import cloudconvert
8+
api = cloudconvert.Api(my_key)
9+
process = api.createProcess({
10+
"inputformat": "md",
11+
"outputformat": "rst"
12+
})
13+
14+
process.start({
15+
"input": "upload",
16+
"file": open(input_file, 'rb'),
17+
"filename":""
18+
})
19+
20+
process.refresh() # fetch status from API
21+
process.wait() # wait until conversion completed
22+
print(process['message']) # access process data
23+
24+
process.download(output_file)
25+
26+
print("OK")
27+
except Exception as e:
28+
print(e)
29+
30+
31+
auto_md2rst('./md/keras入门例子.md','./rst/keras入门例子.rst')

0 commit comments

Comments
 (0)