Add format description

This commit is contained in:
Mm2PL 2022-04-16 20:41:10 +02:00
parent cdf50700f7
commit bd43f48a94
Signed by: Mm2PL
GPG Key ID: 94AC9B80EFA15ED9
2 changed files with 31 additions and 1 deletions

View File

@ -4,10 +4,12 @@ This is a supplementary repo to the main unofficial documentation. This one cont
## Table of contents
<!-- TOC FILES irc.md -->
<!-- TOC FILES irc.md format.md -->
<!-- TOC START -->
- [IRC](./irc.md#irc)
- [USERNOTICE](./irc.md#usernotice)
- [Announcement](./irc.md#announcement)
- [PRIVMSG](./irc.md#privmsg)
- [Data format](./format.md#data-format)
- [Syntax for examples](./format.md#syntax-for-examples)
<!-- TOC END -->

28
format.md Normal file
View File

@ -0,0 +1,28 @@
# Data format
This project uses markdown as its data storage format. The syntax used is important and wasn't chosen randomly.
## Syntax for examples
<!-- TOC BREAK -->
<!-- The TOC script likes to think headers in code blocks are things it should index -->
~~~markdown
<!-- ExampleName must not contain spaces or special characters and has to begin with a capital letter -->
- `ExampleName`: A comment
```markdown <!-- a language can be added to enable syntax highlighting -->
Data here
```
~~~
Headers also matter from the method name is generated from the text in them, ie:
~~~markdown
# IRC
## PING
- `ExampleUsage`: Example usage of `PING`
```
PING :test
```
~~~
The path for the `Ping` example is `IrcPing`, so the whole function name for Go will be `IrcPingExampleUsage`.