forked from aa9863/reMarkAble
Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
164 additions
and
128 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
## Setup | ||
|
||
If not already | ||
|
||
``` | ||
python -m venv env | ||
``` | ||
|
||
python setup.py develop | ||
|
||
|
||
|
||
## Tests | ||
|
||
``` | ||
pip install pytest | ||
pytest | ||
``` | ||
|
||
Or to stop and capture outputs | ||
|
||
``` | ||
pytest -x -s | ||
``` | ||
|
||
Or Nicer HTML output | ||
|
||
pytest --html=report.html | ||
|
||
Or via setup tools | ||
|
||
``` | ||
python setup.py test | ||
``` | ||
|
||
## Linting | ||
|
||
Using Pylint [Because](https://github.com/PyCQA/pylint/blob/master/CONTRIBUTORS.txt) | ||
|
||
``` | ||
pylint remarkable | ||
``` | ||
|
||
Note on Excluded Messages | ||
|
||
- I dont agree with snake_case for function names. drinkingCamelCase | ||
- W1202 Meh, I can see arguments for doing this for speed in n logs, but prefer consistency | ||
|
||
And as a much nicer HTML | ||
|
||
``` | ||
$ pylint remarkable -f json | pylint-json2html > pylint.html | ||
``` | ||
|
||
## Running | ||
|
||
There is a command line interface through the ```runDMC``` command | ||
|
||
``` | ||
runDMC <input> [-t template] [-d dir for local templates] [-o output file] | ||
``` | ||
|
||
If no output file is specified, we generate <input>.html | ||
|
||
|
||
## Built In Templates | ||
|
||
- EEC Coursework Brief. | ||
|
||
|
||
|
||
## Examples | ||
|
||
Can be found in the examples directory | ||
|
||
|
||
We have an example of a [coursework Brief](examples/CourseworkBrief.md) | ||
Using the built in template | ||
|
||
Render with | ||
|
||
``` | ||
$examples runDMC CourseworkBrief.md -t CourseworkBrief.jinja2 | ||
``` | ||
|
||
|
||
|
||
|
||
## TODO | ||
|
||
Paths / Organisation for the Templates do it | ||
|
||
- templates/ | ||
- template1.jinja | ||
- template2.jinja | ||
|
||
- templates/ | ||
- Type | ||
- template1.jinja | ||
|
||
The second is better for orgnaisation, but a makes the command line clunky. | ||
We could map in the main function though... | ||
|
||
|
||
## Documentation | ||
|
||
Can be found <here> | ||
|
||
Generated with MKDocs | ||
|
||
To regenerate the docs | ||
|
||
~~~ | ||
#Install | ||
$pip install mkdocs | ||
#Build (in the docs directory) | ||
docs$ mkdocs build | ||
#Preview | ||
docs$ mkdocs serve | ||
~~~ | ||
|
||
theme mkdocs-material | ||
|
||
|
||
https://squidfunk.github.io/mkdocs-material/extensions/pymdown/ | ||
|
||
And a really useful set of extenstions | ||
|
||
https://facelessuser.github.io/pymdown-extensions/ |
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,144 +1,53 @@ | ||
# Marking in Markdown | ||
# reMarkAble: Marking in Markdown | ||
|
||
Working Title reMarkAble | ||
> Working Title reMarkAble | ||
> Legacy name Dans Marking Compiler | ||
Legacy name Dans Marking Compiler | ||
Use markdown to generate various forms I have to fill in. | ||
|
||
Use Markdown for the Input (Have a semi stuctured file) | ||
Use Markdown AST to parse | ||
Jinja for output | ||
|
||
|
||
Python commonmark will give me the AST | ||
|
||
## Setup | ||
|
||
If not already | ||
|
||
``` | ||
python -m venv env | ||
``` | ||
|
||
python setup.py develop | ||
|
||
|
||
|
||
## Tests | ||
|
||
``` | ||
pip install pytest | ||
pytest | ||
``` | ||
|
||
Or to stop and capture outputs | ||
|
||
``` | ||
pytest -x -s | ||
``` | ||
|
||
Or Nicer HTML output | ||
|
||
pytest --html=report.html | ||
|
||
Or via setup tools | ||
|
||
``` | ||
python setup.py test | ||
``` | ||
|
||
## Linting | ||
|
||
Using Pylint [Because](https://github.com/PyCQA/pylint/blob/master/CONTRIBUTORS.txt) | ||
|
||
``` | ||
pylint remarkable | ||
``` | ||
|
||
Note on Excludede Messages. | ||
|
||
- I dont agree with snake_case for function names. drinkingCamelCase | ||
- W1202 Meh, I can see arguments for doing this for speed in n logs, but prefer consistency | ||
- No More Nested tables in Word | ||
- Nice formatting of **code** and **maths** | ||
|
||
And as a much nicer HTML | ||
|
||
``` | ||
$ pylint remarkable -f json | pylint-json2html > pylint.html | ||
``` | ||
|
||
## Running | ||
|
||
There is a command line interface through the ```runDMC``` command | ||
|
||
``` | ||
runDMC <input> [-t template] [-d dir for local templates] [-o output file] | ||
``` | ||
|
||
If no output file is specified, we generate <input>.html | ||
|
||
|
||
## Built In Templates | ||
|
||
- EEC Coursework Brief. | ||
|
||
|
||
|
||
## Examples | ||
|
||
Can be found in the examples directory | ||
|
||
|
||
We have an example of a [coursework Brief](examples/CourseworkBrief.md) | ||
Using the built in template | ||
|
||
Render with | ||
|
||
``` | ||
$examples runDMC CourseworkBrief.md -t CourseworkBrief.jinja2 | ||
``` | ||
## Documentation | ||
|
||
Documentation can be found [HERE](docs/) | ||
|
||
Current State of the documents is | ||
|
||
- [x] [Installation](install.md) | ||
- [x] [Tutorial](tutorial.md) | ||
- [ ] Coursework Guide walkthrough | ||
- [ ] Writing your own templates | ||
- [ ] Markdown Cheat Sheet. | ||
- [ ] Rendered Examples | ||
|
||
## TODO | ||
|
||
Paths / Organisation for the Templates do it | ||
# Improvements | ||
|
||
- templates/ | ||
- template1.jinja | ||
- template2.jinja | ||
|
||
- templates/ | ||
- Type | ||
- template1.jinja | ||
|
||
The second is better for orgnaisation, but a makes the command line clunky. | ||
We could map in the main function though... | ||
## Bugs or Undocumented Features? | ||
|
||
Are to be expected, been cobbling this together in my weekends. | ||
|
||
## Documentation | ||
There is an [Issue tracker](https://github.coventry.ac.uk/aa9863/reMarkAble/issues) | ||
please use it. | ||
|
||
Can be found <here> | ||
|
||
Generated with MKDocs | ||
## Contributing | ||
|
||
To regenerate the docs | ||
If you have any: | ||
|
||
~~~ | ||
#Install | ||
$pip install mkdocs | ||
- Ideas for improvement / Feature Requests | ||
- New Templates | ||
- Code contributions | ||
|
||
You are welcome to contribute to the project. The more people who use | ||
it the better. | ||
|
||
#Build (in the docs directory) | ||
docs$ mkdocs build | ||
Either get in touch, submit and issue, or a pull request with your changes. | ||
|
||
#Preview | ||
docs$ mkdocs serve | ||
~~~ | ||
|
||
theme mkdocs-material | ||
|
||
|
||
https://squidfunk.github.io/mkdocs-material/extensions/pymdown/ | ||
|
||
And a really useful set of extenstions | ||
|
||
https://facelessuser.github.io/pymdown-extensions/ |
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