sendword 0.8.7

Simple HTTP webhook to command runner sidecar. Frontend for managing hooks, JSON state for config portability, SQLite for execution history and logs.
Documentation
{% extends "base.html" %}

{% block title %}sendword — {% if is_new %}new script{% else %}{{ filename }}{% endif %}{% endblock %}

{% block crumbs %}
<div class="wf-crumbs">
  <a href="/scripts">SCRIPTS</a><span class="sep">/</span>
  <span aria-current="page">{% if is_new %}NEW{% else %}{{ filename | upper }}{% endif %}</span>
</div>
{% endblock %}

{% block content %}
<div class="wf-f wf-ai-b wf-gap-4 wf-mb-2">
  <h1 class="wf-pagetitle wf-p-0">{% if is_new %}New Script{% else %}{{ filename }}{% endif %}</h1>
</div>

<form method="post" action="{% if is_new %}/scripts/new{% else %}/scripts/{{ filename }}{% endif %}">
  <div class="wf-panel" style="margin-bottom: 20px;">
    <div class="wf-panel-head"><span class="wf-panel-title">{% if is_new %}CREATE SCRIPT{% else %}EDIT SCRIPT{% endif %}</span></div>
    <div class="wf-panel-body">
      <div class="wf-field" style="margin-bottom: 16px;">
        <label for="filename">FILENAME</label>
        <input class="wf-input" type="text" id="filename" name="filename" value="{{ filename }}"
          {% if not is_new %}readonly{% endif %}
          {% if is_new %}required pattern="[a-zA-Z0-9_\-]+(\.[a-zA-Z0-9]+)?"{% endif %}>
      </div>
      <div class="wf-field">
        <label for="content">CONTENT</label>
        <textarea class="wf-textarea" id="content" name="content" rows="24" style="font-family: var(--font-mono); font-size: 13px;" maxlength="1048576">{{ content }}</textarea>
      </div>
    </div>
  </div>

  <div style="display: flex; gap: 12px; justify-content: flex-end;">
    <a class="wf-btn" href="/scripts">CANCEL</a>
    <button type="submit" class="wf-btn primary">{% if is_new %}CREATE{% else %}SAVE{% endif %}</button>
  </div>
</form>

{% if not is_new %}
<form method="post" action="/scripts/{{ filename }}/delete" style="margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--hairline);" onsubmit="return confirm('Delete {{ filename }}?');">
  <div style="display: flex; align-items: center; justify-content: space-between;">
    <span style="color: var(--fg-muted); font-size: 13px;">Permanently delete this script.</span>
    <button type="submit" class="wf-btn sm danger">DELETE SCRIPT</button>
  </div>
</form>
{% endif %}
{% endblock %}