https://github.com/tristanlatr/epytext2rst
Convert epytext markup language to RestructuredText
https://github.com/tristanlatr/epytext2rst
Last synced: 3 months ago
JSON representation
Convert epytext markup language to RestructuredText
- Host: GitHub
- URL: https://github.com/tristanlatr/epytext2rst
- Owner: tristanlatr
- License: gpl-3.0
- Created: 2021-09-01T19:41:05.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-01T20:12:57.000Z (almost 2 years ago)
- Last Synced: 2025-01-12T18:27:13.861Z (4 months ago)
- Language: Python
- Size: 19.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# epytext2rst
This is an updated version of: https://pypi.org/project/epytext2rst/
eyptext2rst is a command line tool to convert epytext markup language in RestructuredText.
Be careful when running this on code, it can do unwanted substitutions, always double check before committing.
### General usage:
```
epytext2rst.py [-h] [-v] [-o OUTPUT] inputpositional arguments:
input input file or directory to convertoptional arguments:
-h, --help show this help message and exit
-v, --verbose show changes
-o OUTPUT, --output-dir OUTPUT directory for output of parsed files
```To convert all python files in a directory just type this:
```
python3 epytext2rst.py mydirectory -o newdirectory
```If you just want to know what would get substituted do this:
```
python epytext2rst.py mydirectory -v
```### Convertion:
`epytext2rst` handles the conversion of the following Epytext components:
Keywords
```
@(param|type|rtype|return|ivar and more) --> :(param|type|rtype|return|ivar)
```
Italics
```
I\{(.*?)\} --> *..*
```
Bold
```
B\{(.*?)\} --> **..**
```
Code
```
C\{(.*?)\} --> ``...``
```
Internal links
```
L\{(.*?)\} --> `...`
```
External links
```
U\{(.*?)\} --> `...`_
```