or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
![image alt](https:// "title") | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Syncing
xxxxxxxxxx
Matrix bot querying taginfo in Opsdroid framework
Matrix is a decentralized/federated communication protocol with quite some adoption in our community https://wiki.openstreetmap.org/wiki/Matrix
Opsdroid is open source chatbot framework written in Python.
Motivation
Adding (very simple) taginfo chatbot to our local OSM group and have some fun.
Prior knowledge of Opsdroid - none at all. Actually never ever wrote a single line of python before. And I'm not a coder either, looks like a proper challenge :)
I won't describe Opsdroid in details as it has very good documentation I needed:
skill is basically functionality of a bot which reacts to varios commands, in my case I wanted to trigger bot via &tg command with parameters "key" and "value" e.g. "highway" and "steps" like below … however our matrix room is bridged with xmpp room and it caused issues as & was translated to html entities so I changed it to !tg
!tg highway=track
or for highway combinations
!tg highway=*
or single word for value search
!tg steps
I took sample hello skill and used it as a base; putting it all together was at the end quite a breeze (apart from not knowing python and shooting myself in the foot several times) also their matrix channel #opsdroid-general:matrix.org helped me; it can be found at https://github.com/mahdi1234/opsdroid-taginfo with comments for each action.
How does it look from matrix side then …
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →and from jabber/xmpp side
This was just small PoC, to add all the complexity of taginfo API is maybe future project :)