Skip to content

Commit

Permalink
Beginning to flesh out the html docs
Browse files Browse the repository at this point in the history
  • Loading branch information
AsherGlick committed Feb 5, 2024
1 parent 8b4c71c commit b8bfeba
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 5 deletions.
33 changes: 29 additions & 4 deletions xml_converter/doc/map_id/map_id.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,33 @@ applies_to: [Icon, Trail]
xml_fields: [MapID]
protobuf_field: map_id
---
The ID of the map that this object should be displayed on.
The Map which this marker should be displayed on.

Notes
=====
https://blishhud.com/docs/markers/attributes/mapid
Finding the Map ID
==================
Method 1: GameInfo Plugin
---
The GameInfo plugin displays some useful game information on your screen about the character. One of those is the map the character is currently on

Method 2: [Guild Wars 2 Wiki][2] infobox
---
the InfoBox on the right hand side of map wiki pages has a field titled API followed by a number.

For example, the [Gendarran Fields][1] wiki page has the API value of `24`. Gendarran Fields' Map ID is `24`.

![Gendarran Fields InfoBox](./gendarran_fields_infobox.png)


Quirks
======
* Map ID is also stored within the `.trl` files and may overwrite any other Map IDs set earlier in the node.


References
=========
* [BlishHUD MapID Marker Docs](https://blishhud.com/docs/markers/attributes/mapid)
* [TacO Marker Pack Guide](https://www.gw2taco.com/2016/01/how-to-create-your-own-marker-pack.html)


[1]: https://wiki.guildwars2.com/wiki/Gendarran_Fields
[2]: https://wiki.guildwars2.com
3 changes: 3 additions & 0 deletions xml_converter/generators/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ def delete_generated_docs(self, dir_path: str, skip: List[str] = []) -> None:

def load_input_doc(self, dir_path: str) -> None:
for filepath in os.listdir(dir_path):
if not filepath.endswith(".md"):
continue

filepath = os.path.join(dir_path, filepath)
try:
document = frontmatter.load(filepath)
Expand Down
17 changes: 17 additions & 0 deletions xml_converter/generators/web_templates/documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@
border-radius: 3px;
margin: 10px 30px;
}
code {
display: inline-block;
background: #DDD;
padding: 1px 3px 0px 3px;
border: 1px solid #888;
border-radius: 3px;
}

.codehilite code {
width: 100%;
box-sizing: border-box;
}

table.flagbox {
margin-top: -1em;
Expand Down Expand Up @@ -87,7 +99,12 @@
text-align: center;
margin: 10px;
}

.field_wrapper h1 {
border-bottom: 1px solid #777;
}
</style>
<link rel="stylesheet" type="text/css" href="./styles.css">
</head>
<body>
<div class="header">Hello world</div>
Expand Down
2 changes: 1 addition & 1 deletion xml_converter/generators/web_templates/infotable.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ <h3>Examples</h3>{{field_row.example}}<br>
<!-- </div><div class="halfbox"> -->
<h3>Valid XML Values</h3>{{field_row.valid_values_html}}<br>
<!-- </div><div style="clear: both"></div> -->
<h3>Description</h3>{{field_row.description}}<br>
<h1>Description</h1>{{field_row.description}}<br>
<!-- <div style="clear: both"></div><div class="halfbox"> -->
</div>
{% endfor %}
Expand Down
1 change: 1 addition & 0 deletions xml_converter/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ mypy==1.5.1
pyaml==21.10.1
pycodestyle==2.8.0
pyflakes==2.4.0
Pygments==2.17.2
pyrsistent==0.18.1
python-frontmatter==1.0.0
PyYAML==5.1
Expand Down

0 comments on commit b8bfeba

Please sign in to comment.