RawGithubURL基于Python实现,用于获取GitHub资源文件的真实访问地址和自动转换Markdown文档中相对路径的资源引用,支持外网访问
Project description
Get Github Resource Real URL
1、GitHub文件在线访问地址
https://github.com/zhuifengshen/AppSetting/blob/master/settingview.PNG
2、添加获取真实访问地址的参数
https://github.com/zhuifengshen/AppSetting/blob/master/settingview.PNG?raw=true
3、返回文件在GitHub上的真实访问地址
https://raw.githubusercontent.com/zhuifengshen/AppSetting/master/settingview.PNG
4、非master分支的情况
https://github.com/zhuifengshen/zhangchuzhao/blob/gh-pages/img/home-bg-o.jpg
https://raw.githubusercontent.com/zhuifengshen/zhangchuzhao/gh-pages/img/home-bg-o.jpg
5、常见Markown文档示例
picture reference
![mind_mapping1](images/xmind1.png) # 相对路径图片资源,需要替换
![mind_mapping](http://images/xmind.png) # 完整路径图片资源,不需要替换
![mind_mapping](images/xmind.png)
![mind_mapping](https://images/xmind.png)
file reference
[parse_xmind.py](example/parse_xmind.py) # 相对路径文件资源,需要替换
[parse_xmind.py](http://example/parse_xmind.py) # 完整文件资源路径,不需要替换
[parse_xmind.py](example/parse_xmind.py)
[parse_xmind.py](https://example/parse_xmind.py)
6、Markdown文档中通过相对路径引用项目中的图片资源
![mind_mapping](images/xmind.png) # 替换前
![mind_mapping](https://raw.githubusercontent.com/zhuifengshen/xmind/master/images/xmind.png) # 替换后
7、Markdown文档中通过相对路径引用项目中的文件资源
[parse_xmind.py](example/parse_xmind.py) # 替换前
[parse_xmind.py](https://github.com/zhuifengshen/xmind/blob/master/example/parse_xmind.py) # 替换后
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for RawGithubURL-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b704322cdfa317d7892aae7ceffadb91216a20c91bcc327ae1cdba072ebd99b3 |
|
MD5 | 210171d0e2f06925c032e80284c17ae2 |
|
BLAKE2b-256 | d20cb24a4665ade1d289e3f6b5f6a9db1281f50850d42157e07e785318eb5396 |