mirror of
https://github.com/enzet/map-machine.git
synced 2025-08-03 08:40:11 +02:00
Update contributing.
This commit is contained in:
parent
52301801cd
commit
0d414553ec
3 changed files with 15 additions and 6 deletions
5
.github/CONTRIBUTING.md
vendored
5
.github/CONTRIBUTING.md
vendored
|
@ -13,6 +13,11 @@ Report a bug
|
|||
|
||||
Please, create an issue with `bug` and `generator` labels.
|
||||
|
||||
Fix a typo in documentation
|
||||
---------------------------
|
||||
|
||||
This action is not that easy as it supposed to be. We use [Moire](http://github.com/enzet/Moire) markup and converter to automatically generate documentation for GitHub, website, and [OpenStreetMap wiki](http://wiki.openstreetmap.org/). That's why editing Markdown files is not allowed. To fix a typo, open corresponding Moire file in `doc` directory (e.g. `doc/readme.moi` for `README.md`), modify it, and run `python map_machine/moire_manager.py`.
|
||||
|
||||
Modify the code
|
||||
---------------
|
||||
|
||||
|
|
|
@ -14,11 +14,9 @@ Please, create an issue with \m {icon} label.
|
|||
|
||||
Please, create an issue with \m {bug} and \m {generator} labels.
|
||||
|
||||
/*
|
||||
\2 {Fix a typo in documentation} {}
|
||||
|
||||
This action is not that easy as it supposed to be. We use \ref {http://github.com/enzet/Moire} {Moire} markup and converter to automatically generate documentation for GitHub, website, and \ref {http://wiki.openstreetmap.org/} {OpenStreetMap wiki}. That's why editing Markdown files is not allowed. To fix a typo, open corresponding Moire file in \m {doc} directory (e.g. \m {doc/readme.moi} for \m {README.md}), modify it, and run \m {map-machine doc} script.
|
||||
*/
|
||||
This action is not that easy as it supposed to be. We use \ref {http://github.com/enzet/Moire} {Moire} markup and converter to automatically generate documentation for GitHub, website, and \ref {http://wiki.openstreetmap.org/} {OpenStreetMap wiki}. That's why editing Markdown files is not allowed. To fix a typo, open corresponding Moire file in \m {doc} directory (e.g. \m {doc/readme.moi} for \m {README.md}), modify it, and run \m {python map_machine/moire_manager.py}.
|
||||
|
||||
\2 {Modify the code} {}
|
||||
|
||||
|
|
|
@ -305,7 +305,13 @@ class MapMachineMarkdown(MapMachineMoire, DefaultMarkdown):
|
|||
return f"<{self.parse(args[0])}>"
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
with Path("doc/readme.moi").open() as input_file:
|
||||
with Path("README.md").open("w+") as output_file:
|
||||
def convert(input_path: Path, output_path: Path) -> None:
|
||||
"""Convert Moire file to Markdown."""
|
||||
with input_path.open() as input_file:
|
||||
with output_path.open("w+") as output_file:
|
||||
output_file.write(MapMachineMarkdown().convert(input_file.read()))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
convert(Path("doc/readme.moi"), Path("README.md"))
|
||||
convert(Path("doc/contributing.moi"), Path(".github/CONTRIBUTING.md"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue