Added support for explanations and screenshots.

development
Shawn Davis 3 years ago
parent 8e42390807
commit 291dcdfd5f
  1. 16
      scripttease/lib/snippets/messages.py

@ -7,6 +7,22 @@ messages = {
'clear;'
],
'echo': 'echo "{{ args[0] }}"',
'explain': "{{ args[0] }}",
'screenshot': [
'{% if output == "md" %}',
"![{% if caption %}{{ caption }}]({{ args[0] }})",
'{% elif output == "rst" %}',
'.. figure:: {{ args[0] }}',
'{% if caption %}\n :alt: {{ caption }}{% endif %}',
'{% if height %}\n :height: {{ height }}{% endif %}',
'{% if width %}\n :width: {{ width }}{% endif %}'
'\n',
'{% else %}',
'<img src="{{ args[0] }}"{% if caption %} alt="{{ caption }}{% endif %}'
'{% if classes %} class={{ classes }}{% endif %}'
'{% if height %} height="{{ height }}{% endif %}{% if width %} width="{{ width }}"{% endif %}>',
'{% endif %}',
],
'slack': [
"curl -X POST -H 'Content-type: application/json' --data",
'{"text": "{{ args[0] }}"}',

Loading…
Cancel
Save