| title | Bart |
|---|---|
| emoji | 馃彚 |
| colorFrom | gray |
| colorTo | yellow |
| sdk | docker |
| pinned | false |
| license | apache-2.0 |
| short_description | bart |
git clone https://github.com/elkhaff/brat-api
cd brat-api
npx playwright install
npm install
node app.jsGambar:
http://localhost:3000/img?text=Hi!
Video (teks muncul kata per kata):
http://localhost:3000/vid?text=brat+summer
Semua query param opsional, ada default-nya kalau gak diisi:
| Param | Default | Keterangan |
|---|---|---|
text |
brat |
teks yang ditampilkan (gak ada batasan panjang) |
background |
#ffffff |
hex warna background |
color |
#000000 |
hex warna teks |
speed (khusus /vid) |
500 |
ms jeda tiap kata muncul (200-2000) |
hold (khusus /vid) |
1200 |
ms nahan frame terakhir (0-5000) |
Dokumentasi lengkap ada di /docs. Root path / redirect ke https://pomni.cc.cd.
/vidbutuhffmpegterpasang di environment (sudah otomatis di-install lewat Dockerfile).
Request dengan kombinasi parameter yang sama (text/background/color/dst) di-hash pakai SHA256 dan disimpan di folder /cache. Request berikutnya dengan parameter identik langsung diambil dari cache (response header X-Cache: HIT) tanpa perlu generate ulang. Cache otomatis kadaluarsa setelah 1 bulan (dibersihkan otomatis tiap 6 jam).
Dockerfile sudah otomatis install Apple Color Emoji (Linux build) saat build image, supaya emoji di teks brat ke-render dengan benar.