From a7064616341a569c6766ea2ae0543418b10da209 Mon Sep 17 00:00:00 2001 From: gnat Date: Sat, 14 Sep 2024 05:30:39 -0700 Subject: [PATCH] add vim buffers stats route --- src/lib/router.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/lib/router.py b/src/lib/router.py index 706715c..5130299 100644 --- a/src/lib/router.py +++ b/src/lib/router.py @@ -150,6 +150,17 @@ routes = [ """) ) ), + Route( + lambda request: request.path == '/stats/what-vim-buffers-does-it-have-open', + [Method.GET], + lambda *_: Response( + ResponseCode.OK, + {'Content-type': 'text/html'}, + page("vim bufs", """ + $[cat ./files/stats/vim-bufs | xargs -I% echo %'
'] + """) + ) + ), Route( lambda request: request.path == '/stats', [Method.GET],