Compare commits
1 Commits
main
...
archive-pa
Author | SHA1 | Date | |
---|---|---|---|
ba49325c23 |
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -1,3 +0,0 @@
|
|||||||
[submodule "public"]
|
|
||||||
path = public
|
|
||||||
url = https://gitea.balki.me/balki/blog-op
|
|
19
Makefile
19
Makefile
@ -1,21 +1,14 @@
|
|||||||
ASCIINEMA_VERSION=3.8.0
|
|
||||||
|
|
||||||
.PHONY: update-bootstrap
|
.PHONY: update-bootstrap
|
||||||
update-bootstrap:
|
update-bootstrap:
|
||||||
curl -L "https://cdn.jsdelivr.net/npm/bootstrap@5/dist/css/bootstrap.min.css" -o static/assets/bootstrap.min.css
|
curl -L "https://cdn.jsdelivr.net/npm/bootstrap@5/dist/css/bootstrap.min.css" -o assets/bootstrap.min.css
|
||||||
curl -L "https://cdn.jsdelivr.net/npm/bootstrap@5/dist/js/bootstrap.min.js" -o static/assets/bootstrap.min.js
|
curl -L "https://cdn.jsdelivr.net/npm/bootstrap@5/dist/js/bootstrap.min.js" -o assets/bootstrap.min.js
|
||||||
|
|
||||||
.PHONY: update-asciinema
|
.PHONY: build
|
||||||
update-asciinema:
|
build:
|
||||||
curl -L "https://github.com/asciinema/asciinema-player/releases/download/v$(ASCIINEMA_VERSION)/asciinema-player.css" -o static/assets/asciinema-player.css
|
./build.sh
|
||||||
curl -L "https://github.com/asciinema/asciinema-player/releases/download/v$(ASCIINEMA_VERSION)/asciinema-player.min.js" -o static/assets/asciinema-player.min.js
|
|
||||||
|
|
||||||
.PHONY: deploy
|
.PHONY: deploy
|
||||||
deploy:
|
deploy:
|
||||||
rsync -av public desk:/var/www/balki.me
|
rsync -av dist desk:/var/www/balki.me
|
||||||
|
|
||||||
build:
|
|
||||||
hugo --logLevel debug
|
|
||||||
|
|
||||||
serve:
|
|
||||||
hugo server -D --bind "0.0.0.0" --navigateToChanged
|
|
||||||
|
19
README.md
19
README.md
@ -1,18 +1 @@
|
|||||||
# Source of balki.me
|
# Again blog
|
||||||
|
|
||||||
## Asciinema
|
|
||||||
|
|
||||||
Followed instructions from here: https://jenciso.github.io/blog/embedding-asciinema-cast-in-your-hugo-site/
|
|
||||||
|
|
||||||
Asciinema uses wasm which needs CSP unsafe-eval. Ref: https://www.aaron-powell.com/posts/2019-11-27-using-webassembly-with-csp-headers/
|
|
||||||
|
|
||||||
## Submodule for generated output
|
|
||||||
|
|
||||||
Tracking hugo generated output in git enables to see differences easily before pushing. Also helpful to compare differences after hugo version upgrade.
|
|
||||||
Below commands help to add a public url for the web UI and also private ssh url for pushing
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git submodule add https://gitea.balki.me/balki/blog-op public
|
|
||||||
cd public
|
|
||||||
git config remote.origin.url gitea:balki/blog-op
|
|
||||||
```
|
|
||||||
|
6
assets/bootstrap.min.css
vendored
Normal file
6
assets/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
7
assets/bootstrap.min.js
vendored
Normal file
7
assets/bootstrap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
18
build.sh
Executable file
18
build.sh
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
# copy assets
|
||||||
|
cp -r assets/ dist/
|
||||||
|
|
||||||
|
make_page() {
|
||||||
|
name="$1"
|
||||||
|
title="$2"
|
||||||
|
cp templates/index.tmpl.html "build/$name.html"
|
||||||
|
sed -i "s/<title>/&$title/" "build/$name.html"
|
||||||
|
pandoc "pages/$name.md" > "build/$name-content.html"
|
||||||
|
sed -i "/<main>/r build/$name-content.html" "build/$name.html"
|
||||||
|
cp "build/$name.html" dist/
|
||||||
|
}
|
||||||
|
|
||||||
|
make_page index Home
|
||||||
|
make_page stuff Stuff
|
||||||
|
|
3
build/index-content.html
Normal file
3
build/index-content.html
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<p>Welcome to my site!</p>
|
||||||
|
<p>I am Balakrishnan Balasubramanian (a) balki. Nothing much here.
|
||||||
|
Checkout the nav bar above for interesting stuff.</p>
|
38
build/index.html
Normal file
38
build/index.html
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline' data: ;">
|
||||||
|
<meta http-equiv="refresh" content="5000" >
|
||||||
|
|
||||||
|
<title>Home</title>
|
||||||
|
|
||||||
|
<!-- Diable favicon requests: https://stackoverflow.com/a/13416784 -->
|
||||||
|
<link rel="icon" href="data:;base64,iVBORw0KGgo=">
|
||||||
|
<link href="assets/bootstrap.min.css" rel="stylesheet" >
|
||||||
|
|
||||||
|
<script src="assets/bootstrap.min.js" defer></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<ul class="nav">
|
||||||
|
<li class="nav-item"><a class="nav-link" href="/"> Home </a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="https://blog.balki.me"> Blog </a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="/stuff.html"> Stuff </a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="https://gitea.balki.me/balki/blog"> Source </a></li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<div class="container" >
|
||||||
|
<main>
|
||||||
|
<p>Welcome to my site!</p>
|
||||||
|
<p>I am Balakrishnan Balasubramanian (a) balki. Nothing much here.
|
||||||
|
Checkout the nav bar above for interesting stuff.</p>
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
61
build/stuff-content.html
Normal file
61
build/stuff-content.html
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
<h1 id="some-cool-stuff-i-built">Some cool stuff I built</h1>
|
||||||
|
<h2 id="vimtabdiff">vimtabdiff</h2>
|
||||||
|
<p>Simple python script to see diff off two directories with diff of
|
||||||
|
each file in a vim tab. Typically used to replace
|
||||||
|
<code>git difftool</code></p>
|
||||||
|
<div class="table">
|
||||||
|
<table>
|
||||||
|
<tbody>
|
||||||
|
<tr class="odd">
|
||||||
|
<td style="text-align: left;">Project</td>
|
||||||
|
<td style="text-align: left;">vimtabdiff</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="even">
|
||||||
|
<td style="text-align: left;">Tags</td>
|
||||||
|
<td style="text-align: left;">#python, #vim, #git</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="odd">
|
||||||
|
<td style="text-align: left;">Github</td>
|
||||||
|
<td style="text-align: left;"><a
|
||||||
|
href="https://github.com/balki/vimtabdiff"
|
||||||
|
class="uri">https://github.com/balki/vimtabdiff</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="even">
|
||||||
|
<td style="text-align: left;">Gitea</td>
|
||||||
|
<td style="text-align: left;"><a
|
||||||
|
href="https://gitea.balki.me/balki/vimtabdiff"
|
||||||
|
class="uri">https://gitea.balki.me/balki/vimtabdiff</a></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<h2 id="grocery_guy">grocery_guy</h2>
|
||||||
|
<p>Telegram bot to manage lists.</p>
|
||||||
|
<div class="table">
|
||||||
|
<table style="width:89%;">
|
||||||
|
<colgroup>
|
||||||
|
<col style="width: 15%" />
|
||||||
|
<col style="width: 73%" />
|
||||||
|
</colgroup>
|
||||||
|
<tbody>
|
||||||
|
<tr class="odd">
|
||||||
|
<td>Project</td>
|
||||||
|
<td>grocery_guy</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="even">
|
||||||
|
<td>Tags</td>
|
||||||
|
<td>#golang, #telegram</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="odd">
|
||||||
|
<td>Gitea</td>
|
||||||
|
<td><a href="https://gitea.balki.me/balki/telegram-chklistbot"
|
||||||
|
class="uri">https://gitea.balki.me/balki/telegram-chklistbot</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="even">
|
||||||
|
<td>Telegram</td>
|
||||||
|
<td><a href="https://t.me/grocery_guy_bot"
|
||||||
|
class="uri">https://t.me/grocery_guy_bot</a></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
96
build/stuff.html
Normal file
96
build/stuff.html
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline' data: ;">
|
||||||
|
<meta http-equiv="refresh" content="5000" >
|
||||||
|
|
||||||
|
<title>Stuff</title>
|
||||||
|
|
||||||
|
<!-- Diable favicon requests: https://stackoverflow.com/a/13416784 -->
|
||||||
|
<link rel="icon" href="data:;base64,iVBORw0KGgo=">
|
||||||
|
<link href="assets/bootstrap.min.css" rel="stylesheet" >
|
||||||
|
|
||||||
|
<script src="assets/bootstrap.min.js" defer></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<ul class="nav">
|
||||||
|
<li class="nav-item"><a class="nav-link" href="/"> Home </a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="https://blog.balki.me"> Blog </a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="/stuff.html"> Stuff </a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="https://gitea.balki.me/balki/blog"> Source </a></li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<div class="container" >
|
||||||
|
<main>
|
||||||
|
<h1 id="some-cool-stuff-i-built">Some cool stuff I built</h1>
|
||||||
|
<h2 id="vimtabdiff">vimtabdiff</h2>
|
||||||
|
<p>Simple python script to see diff off two directories with diff of
|
||||||
|
each file in a vim tab. Typically used to replace
|
||||||
|
<code>git difftool</code></p>
|
||||||
|
<div class="table">
|
||||||
|
<table>
|
||||||
|
<tbody>
|
||||||
|
<tr class="odd">
|
||||||
|
<td style="text-align: left;">Project</td>
|
||||||
|
<td style="text-align: left;">vimtabdiff</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="even">
|
||||||
|
<td style="text-align: left;">Tags</td>
|
||||||
|
<td style="text-align: left;">#python, #vim, #git</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="odd">
|
||||||
|
<td style="text-align: left;">Github</td>
|
||||||
|
<td style="text-align: left;"><a
|
||||||
|
href="https://github.com/balki/vimtabdiff"
|
||||||
|
class="uri">https://github.com/balki/vimtabdiff</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="even">
|
||||||
|
<td style="text-align: left;">Gitea</td>
|
||||||
|
<td style="text-align: left;"><a
|
||||||
|
href="https://gitea.balki.me/balki/vimtabdiff"
|
||||||
|
class="uri">https://gitea.balki.me/balki/vimtabdiff</a></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<h2 id="grocery_guy">grocery_guy</h2>
|
||||||
|
<p>Telegram bot to manage lists.</p>
|
||||||
|
<div class="table">
|
||||||
|
<table style="width:89%;">
|
||||||
|
<colgroup>
|
||||||
|
<col style="width: 15%" />
|
||||||
|
<col style="width: 73%" />
|
||||||
|
</colgroup>
|
||||||
|
<tbody>
|
||||||
|
<tr class="odd">
|
||||||
|
<td>Project</td>
|
||||||
|
<td>grocery_guy</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="even">
|
||||||
|
<td>Tags</td>
|
||||||
|
<td>#golang, #telegram</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="odd">
|
||||||
|
<td>Gitea</td>
|
||||||
|
<td><a href="https://gitea.balki.me/balki/telegram-chklistbot"
|
||||||
|
class="uri">https://gitea.balki.me/balki/telegram-chklistbot</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="even">
|
||||||
|
<td>Telegram</td>
|
||||||
|
<td><a href="https://t.me/grocery_guy_bot"
|
||||||
|
class="uri">https://t.me/grocery_guy_bot</a></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -1,22 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Playground"
|
|
||||||
date: 2023-07-22T19:56:37-04:00
|
|
||||||
draft: true
|
|
||||||
asciinema: true
|
|
||||||
---
|
|
||||||
|
|
||||||
# Playground for hugo
|
|
||||||
|
|
||||||
{{< asciinema key="demo" >}}
|
|
||||||
|
|
||||||
There should be a asciinema cast above!
|
|
||||||
{{< details title="Click to see sample json" >}}
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"external_tracker_url": "https://github.com/caddyserver/caddy/issues",
|
|
||||||
"external_tracker_format": "https://github.com/caddyserver/caddy/issues/{index}",
|
|
||||||
"external_tracker_style": "numeric",
|
|
||||||
"external_tracker_regexp_pattern": ""
|
|
||||||
}
|
|
||||||
```
|
|
||||||
{{< /details >}}
|
|
@ -1,74 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Securing communication between webserver and app"
|
|
||||||
date: 2024-04-19T17:31:06-04:00
|
|
||||||
tags:
|
|
||||||
- unix-sockets
|
|
||||||
- tmpfiles.d
|
|
||||||
- webserver
|
|
||||||
categories:
|
|
||||||
- sysadmin
|
|
||||||
---
|
|
||||||
|
|
||||||
Webapps usually listen on a random tcp port and a web server forwards the
|
|
||||||
requests to it. Webserver handles tls, static asset serving and sometimes
|
|
||||||
authentication, bruteforce check etc., However any local user in the system can
|
|
||||||
directly connect to the app's listen port bypassing the web server and thus
|
|
||||||
loose the protections offered by the webserver.
|
|
||||||
|
|
||||||
### Unix sockets
|
|
||||||
|
|
||||||
Unix sockets are special files in filesystem that processes can use to
|
|
||||||
communicate instead of tcp ports. Since they are files, filesytem ownership and
|
|
||||||
permissions can be used to restrict which system-users can listen or connect to
|
|
||||||
them
|
|
||||||
|
|
||||||
### Caddy ↔ Gitea
|
|
||||||
|
|
||||||
I use [Caddy][1] web server which reverse-proxies to [Gitea][2] server. For
|
|
||||||
caddy to connect to gitea and also disallow anyother user to connect, we want a
|
|
||||||
socket like below
|
|
||||||
|
|
||||||
```bash
|
|
||||||
srw-rw---- 1 gitea caddy 0 Apr 17 21:24 /run/gitea.sock
|
|
||||||
```
|
|
||||||
|
|
||||||
Unfortunately neither `user caddy` nor `user gitea`, can create such socket.
|
|
||||||
Regular users can only create files owned by themselves. Only root can
|
|
||||||
create/change ownership of files and folders.
|
|
||||||
|
|
||||||
### `tmpfiles.d` to rescue
|
|
||||||
|
|
||||||
[tmpfiles.d][3] provides a way to do it. Since it is run as root, it can create
|
|
||||||
files and directories as any user.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
❯ cat /etc/tmpfiles.d/caddy-run-unix.conf
|
|
||||||
d /run/gitea-caddy 0750 gitea caddy -
|
|
||||||
```
|
|
||||||
Above config creates below directory every time on startup.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
❯ sudo ls -ld /run/gitea-caddy/
|
|
||||||
drwxr-x--- 2 gitea caddy 60 Apr 17 21:24 /run/gitea-caddy/
|
|
||||||
```
|
|
||||||
|
|
||||||
With those permissions and ownership, only `user gitea` can create the socket
|
|
||||||
in `/run/gitea-caddy` and only `user caddy` can `cd` into that directory.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
❯ sudo ls -l /run/gitea-caddy/web.sock
|
|
||||||
srw-rw-rw- 1 gitea gitea 0 Apr 17 21:24 /run/gitea-caddy/web.sock
|
|
||||||
```
|
|
||||||
|
|
||||||
The socket file permission can be more liberal as no other user can read into
|
|
||||||
the `/run/gitea-caddy` directory
|
|
||||||
|
|
||||||
### Bonus!
|
|
||||||
|
|
||||||
If your app does not connect to any external services, it can even be run in a
|
|
||||||
[private network][4].
|
|
||||||
|
|
||||||
[1]: https://caddyserver.com
|
|
||||||
[2]: https://gitea.com
|
|
||||||
[3]: https://man.archlinux.org/man/tmpfiles.d.5
|
|
||||||
[4]: https://www.freedesktop.org/software/systemd/man/latest/systemd.exec.html#PrivateNetwork=
|
|
@ -1,116 +0,0 @@
|
|||||||
---
|
|
||||||
title: Vim Send To Terminal
|
|
||||||
date: 2023-07-26T15:23:22-04:00
|
|
||||||
asciinema: true
|
|
||||||
tags:
|
|
||||||
- vim
|
|
||||||
categories:
|
|
||||||
- development
|
|
||||||
---
|
|
||||||
|
|
||||||
### Semi automatic scripts with vim `:terminal`
|
|
||||||
|
|
||||||
<!--more-->
|
|
||||||
|
|
||||||
Sometimes, fully automating a task is not worth the effort. So I end up running
|
|
||||||
a set of commands usually from a cheat sheet text file slightly modifying the
|
|
||||||
arguments each time. I used the below in vim to send line under cursor to vim's
|
|
||||||
`:terminal` open in a split
|
|
||||||
```vim
|
|
||||||
:call term_list()[0]->term_sendkeys(getline('.') .. "\<CR>")
|
|
||||||
```
|
|
||||||
To send another line `@:` and then for every other line `@@`. This works because, last
|
|
||||||
command run is stored in `register :` and the last macro executed using `@` is
|
|
||||||
stored in `register @`.
|
|
||||||
|
|
||||||
To do the same another day, `:call te<UP arrow>` to recall from vim's command
|
|
||||||
history. Or better, add a function and mapping.
|
|
||||||
|
|
||||||
```vim
|
|
||||||
def SendToTerminal()
|
|
||||||
if term_list()->empty()
|
|
||||||
echomsg "No Terminal windows found"
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
terms[0]->term_sendkeys(getline(.) .. "\<CR>")
|
|
||||||
enddef
|
|
||||||
|
|
||||||
nnoremap <silent><leader>s call SendToTerminal()<CR>
|
|
||||||
```
|
|
||||||
|
|
||||||
### More cool features
|
|
||||||
|
|
||||||
For most use-cases that was enough. However added a few more nice features
|
|
||||||
which is very helpful when you need it
|
|
||||||
|
|
||||||
1. Support sending a range of lines (visual selection) at a time. E.g. Send a
|
|
||||||
function block to a python shell
|
|
||||||
2. Add a delay between lines in milliseconds. This is useful when the previous
|
|
||||||
command reads from standard input and takes some time to complete
|
|
||||||
3. Support sending `ctrl` characters like `ctrl d`, `ctrl c` etc,
|
|
||||||
|
|
||||||
```vim
|
|
||||||
def g:SendRangeToTerminal(start_line: number, end_line: number)
|
|
||||||
const terms = term_list()
|
|
||||||
if terms->empty()
|
|
||||||
echomsg "No Terminal windows found"
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
var line_num = start_line
|
|
||||||
for line in getline(start_line, end_line)
|
|
||||||
line_num += 1
|
|
||||||
const spl_cmd = line->matchlist('\vVIMST (sleep|ctrl) ([0-9]+|[a-z])')
|
|
||||||
if !spl_cmd->empty()
|
|
||||||
const [_, cmd, arg1; _] = spl_cmd
|
|
||||||
if cmd == "sleep"
|
|
||||||
timer_start(str2nr(arg1), (_) => g:SendRangeToTerminal(line_num, end_line))
|
|
||||||
return
|
|
||||||
elseif cmd == "ctrl"
|
|
||||||
terms[0]->term_sendkeys(nr2char(char2nr(arg1) - 96))
|
|
||||||
continue
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
terms[0]->term_sendkeys(line .. "\<CR>")
|
|
||||||
endfor
|
|
||||||
enddef
|
|
||||||
|
|
||||||
command -range -bar SendToTerm :call g:SendRangeToTerminal(<line1>, <line2>)
|
|
||||||
vnoremap <silent><leader>s :SendToTerm<CR>
|
|
||||||
nnoremap <silent><leader>s :SendToTerm<CR>
|
|
||||||
```
|
|
||||||
|
|
||||||
### More cool mapping
|
|
||||||
|
|
||||||
Wouldn't it be nice to just double-click commands with mouse? Like a simple GUI! ;)
|
|
||||||
|
|
||||||
```vim
|
|
||||||
nnoremap <silent><2-LeftMouse> :SendToTerm<CR>
|
|
||||||
```
|
|
||||||
|
|
||||||
Or just hit `Enter`?
|
|
||||||
|
|
||||||
```vim
|
|
||||||
nnoremap <buffer> <CR> :SendToTerm \| norm j<CR>
|
|
||||||
```
|
|
||||||
|
|
||||||
Automatically add those mappings for `cheat.sh`
|
|
||||||
```vim
|
|
||||||
autocmd BufNewFile,BufRead cheat.sh nnoremap <buffer> <CR> :SendToTerm \| norm j<CR>
|
|
||||||
autocmd BufNewFile,BufRead cheat.sh nnoremap <buffer> <silent><2-LeftMouse> :SendToTerm<CR>
|
|
||||||
```
|
|
||||||
|
|
||||||
### Demo
|
|
||||||
|
|
||||||
{{< asciinema key="vimstt" >}}
|
|
||||||
|
|
||||||
### Using
|
|
||||||
|
|
||||||
Copying above snippets to your vimrc should work in a recent vim. Checked in
|
|
||||||
ubuntu 22.04 and archlinux. Git: [repo](https://gitea.balki.me/balki/vimfun/src/branch/main/stt/stt8.vim)
|
|
||||||
|
|
||||||
### neovim/tmux/screen
|
|
||||||
|
|
||||||
Since neovim uses a different terminal API, above snippets don't work in
|
|
||||||
neovim. [vim-slime](https://github.com/jpalardy/vim-slime) plugin (available
|
|
||||||
since 2007!) supports different types of terminal. However it does not support
|
|
||||||
adding delay and `ctrl` characters in text.
|
|
7
dist/assets/bootstrap.min.css
vendored
Normal file
7
dist/assets/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
7
dist/assets/bootstrap.min.js
vendored
Normal file
7
dist/assets/bootstrap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
38
dist/index.html
vendored
Normal file
38
dist/index.html
vendored
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline' data: ;">
|
||||||
|
<meta http-equiv="refresh" content="5000" >
|
||||||
|
|
||||||
|
<title>Home</title>
|
||||||
|
|
||||||
|
<!-- Diable favicon requests: https://stackoverflow.com/a/13416784 -->
|
||||||
|
<link rel="icon" href="data:;base64,iVBORw0KGgo=">
|
||||||
|
<link href="assets/bootstrap.min.css" rel="stylesheet" >
|
||||||
|
|
||||||
|
<script src="assets/bootstrap.min.js" defer></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<ul class="nav">
|
||||||
|
<li class="nav-item"><a class="nav-link" href="/"> Home </a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="https://blog.balki.me"> Blog </a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="/stuff.html"> Stuff </a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="https://gitea.balki.me/balki/blog"> Source </a></li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<div class="container" >
|
||||||
|
<main>
|
||||||
|
<p>Welcome to my site!</p>
|
||||||
|
<p>I am Balakrishnan Balasubramanian (a) balki. Nothing much here.
|
||||||
|
Checkout the nav bar above for interesting stuff.</p>
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
96
dist/stuff.html
vendored
Normal file
96
dist/stuff.html
vendored
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline' data: ;">
|
||||||
|
<meta http-equiv="refresh" content="5000" >
|
||||||
|
|
||||||
|
<title>Stuff</title>
|
||||||
|
|
||||||
|
<!-- Diable favicon requests: https://stackoverflow.com/a/13416784 -->
|
||||||
|
<link rel="icon" href="data:;base64,iVBORw0KGgo=">
|
||||||
|
<link href="assets/bootstrap.min.css" rel="stylesheet" >
|
||||||
|
|
||||||
|
<script src="assets/bootstrap.min.js" defer></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<ul class="nav">
|
||||||
|
<li class="nav-item"><a class="nav-link" href="/"> Home </a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="https://blog.balki.me"> Blog </a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="/stuff.html"> Stuff </a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="https://gitea.balki.me/balki/blog"> Source </a></li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<div class="container" >
|
||||||
|
<main>
|
||||||
|
<h1 id="some-cool-stuff-i-built">Some cool stuff I built</h1>
|
||||||
|
<h2 id="vimtabdiff">vimtabdiff</h2>
|
||||||
|
<p>Simple python script to see diff off two directories with diff of
|
||||||
|
each file in a vim tab. Typically used to replace
|
||||||
|
<code>git difftool</code></p>
|
||||||
|
|
||||||
|
<table class="table">
|
||||||
|
<tbody>
|
||||||
|
<tr class="odd">
|
||||||
|
<td style="text-align: left;">Project</td>
|
||||||
|
<td style="text-align: left;">vimtabdiff</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="even">
|
||||||
|
<td style="text-align: left;">Tags</td>
|
||||||
|
<td style="text-align: left;">#python, #vim, #git</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="odd">
|
||||||
|
<td style="text-align: left;">Github</td>
|
||||||
|
<td style="text-align: left;"><a
|
||||||
|
href="https://github.com/balki/vimtabdiff"
|
||||||
|
class="uri">https://github.com/balki/vimtabdiff</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="even">
|
||||||
|
<td style="text-align: left;">Gitea</td>
|
||||||
|
<td style="text-align: left;"><a
|
||||||
|
href="https://gitea.balki.me/balki/vimtabdiff"
|
||||||
|
class="uri">https://gitea.balki.me/balki/vimtabdiff</a></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h2 id="grocery_guy">grocery_guy</h2>
|
||||||
|
<p>Telegram bot to manage lists.</p>
|
||||||
|
<div class="table">
|
||||||
|
<table style="width:89%;">
|
||||||
|
<colgroup>
|
||||||
|
<col style="width: 15%" />
|
||||||
|
<col style="width: 73%" />
|
||||||
|
</colgroup>
|
||||||
|
<tbody>
|
||||||
|
<tr class="odd">
|
||||||
|
<td>Project</td>
|
||||||
|
<td>grocery_guy</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="even">
|
||||||
|
<td>Tags</td>
|
||||||
|
<td>#golang, #telegram</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="odd">
|
||||||
|
<td>Gitea</td>
|
||||||
|
<td><a href="https://gitea.balki.me/balki/telegram-chklistbot"
|
||||||
|
class="uri">https://gitea.balki.me/balki/telegram-chklistbot</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="even">
|
||||||
|
<td>Telegram</td>
|
||||||
|
<td><a href="https://t.me/grocery_guy_bot"
|
||||||
|
class="uri">https://t.me/grocery_guy_bot</a></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
1
.gitignore → hugo/.gitignore
vendored
1
.gitignore → hugo/.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
.hugo_build.lock
|
.hugo_build.lock
|
||||||
|
/public/
|
@ -1,3 +1,3 @@
|
|||||||
baseURL: https://balki.me/
|
baseURL: http://blog.balki.me/
|
||||||
languageCode: en-us
|
languageCode: en-us
|
||||||
title: Balki's Blog
|
title: Balki's Blog
|
103
hugo/content/posts/vim-stt.md
Normal file
103
hugo/content/posts/vim-stt.md
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
---
|
||||||
|
title: Vim Send To Terminal
|
||||||
|
date: 2023-07-15T20:18:03-04:00
|
||||||
|
---
|
||||||
|
|
||||||
|
### Semi automatic scripts with vim `:terminal`
|
||||||
|
|
||||||
|
<!--more-->
|
||||||
|
|
||||||
|
For a long time, I used the below to send current line to vim's `:terminal`
|
||||||
|
```vim
|
||||||
|
:call term_list()[0]->term_sendkeys(getline('.') .. "\<CR>")
|
||||||
|
```
|
||||||
|
|
||||||
|
This is very useful if you have a text file with complex shell commands. To run
|
||||||
|
again, `@:` and then again, `@@`. This works because, last command run is
|
||||||
|
stored in `register :` and the last macro executed using `@` is stored in
|
||||||
|
`register @`. And then to run another day, do `:call te<UP arrow>` to recall
|
||||||
|
from vim's command history.
|
||||||
|
|
||||||
|
Since this was very useful, I then wrapped it in a function and added a mapping
|
||||||
|
|
||||||
|
```vim
|
||||||
|
def SendToTerminal()
|
||||||
|
if term_list()->empty()
|
||||||
|
echomsg "No Terminal windows found"
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
terms[0]->term_sendkeys(getline(.) .. "\<CR>")
|
||||||
|
enddef
|
||||||
|
|
||||||
|
nnoremap <silent><leader>s call SendToTerminal()<CR>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Adding more features
|
||||||
|
|
||||||
|
So far good for shell commands. But when working with python, had to send a
|
||||||
|
block of functions to the `ipython` shell. So added support for range of lines.
|
||||||
|
But then when sending a range of lines to shell, sometimes there had to be a
|
||||||
|
small delay (sleep) between commands so that the previous command can complete
|
||||||
|
and not eat the rest of commands. Then finally added support for sending `ctrl`
|
||||||
|
characters like `ctrl c`, `ctrl l`
|
||||||
|
|
||||||
|
```vim
|
||||||
|
vim9script
|
||||||
|
def SendRangeToTerminal(start_line: number, end_line: number, _ = 0)
|
||||||
|
const terms = term_list()
|
||||||
|
if terms->empty()
|
||||||
|
echomsg "No Terminal windows found"
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
var line_num = start_line
|
||||||
|
for line in getline(start_line, end_line)
|
||||||
|
line_num += 1
|
||||||
|
const spl_cmd = line->matchlist('\vVIMST (sleep|ctrl) ([0-9]+|[a-z])?')
|
||||||
|
if !spl_cmd->empty()
|
||||||
|
const [_, cmd, arg1; _] = spl_cmd
|
||||||
|
if cmd == "sleep"
|
||||||
|
timer_start(arg1->str2nr(), funcref('SendRangeToTerminal', [line_num, end_line]))
|
||||||
|
return
|
||||||
|
elseif cmd == "ctrl"
|
||||||
|
terms[0]->term_sendkeys(nr2char(arg1->char2nr() - 96))
|
||||||
|
continue
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
terms[0]->term_sendkeys(line .. "\<CR>")
|
||||||
|
endfor
|
||||||
|
enddef
|
||||||
|
|
||||||
|
command -range -bar SendToTerm :call <SID>SendRangeToTerminal(<line1>, <line2>)
|
||||||
|
vnoremap <silent><leader>s :SendToTerm<CR>
|
||||||
|
nnoremap <silent><leader>s :SendToTerm<CR>
|
||||||
|
```
|
||||||
|
|
||||||
|
Wouldn't it be nice to just double-click commands with mouse? Like a simple GUI! ;)
|
||||||
|
|
||||||
|
```vim
|
||||||
|
nnoremap <silent><2-LeftMouse> :SendToTerm<CR>
|
||||||
|
```
|
||||||
|
|
||||||
|
Or just `Enter`?
|
||||||
|
|
||||||
|
```vim
|
||||||
|
nnoremap <buffer> <CR> :SendToTerm \| norm j<CR>
|
||||||
|
```
|
||||||
|
|
||||||
|
Of course, mapping `Enter` for any file is a bad idea. So lets just map in our cheat file
|
||||||
|
|
||||||
|
```vim
|
||||||
|
autocmd BufNewFile,BufRead cheat.sh {
|
||||||
|
nnoremap <buffer> <silent><2-LeftMouse> :SendToTerm<CR>
|
||||||
|
nnoremap <buffer> <CR> :SendToTerm \| norm j<CR>
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Demo!
|
||||||
|
|
||||||
|
### What about neovim/tmux/screen?
|
||||||
|
|
||||||
|
I am not the only one who thought about this. See
|
||||||
|
[vim-slime](https://github.com/jpalardy/vim-slime) since 2007. However it does
|
||||||
|
not support adding a sleep or sending arbitrary `ctrl` characters without
|
||||||
|
additional mappings
|
@ -3,8 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline' data: ;{{ if .Params.asciinema }}script-src 'self' 'unsafe-inline' 'unsafe-eval';{{ end }}">
|
<meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline' data: ;">
|
||||||
<link rel="alternate" type="application/rss+xml" href="/posts/index.xml">
|
|
||||||
<title>
|
<title>
|
||||||
{{- block "title" . -}}
|
{{- block "title" . -}}
|
||||||
{{ .Site.Title }}
|
{{ .Site.Title }}
|
||||||
@ -14,16 +13,9 @@
|
|||||||
<!-- Diable favicon requests: https://stackoverflow.com/a/13416784 -->
|
<!-- Diable favicon requests: https://stackoverflow.com/a/13416784 -->
|
||||||
<link rel="icon" href="data:;base64,iVBORw0KGgo=">
|
<link rel="icon" href="data:;base64,iVBORw0KGgo=">
|
||||||
<link href="/assets/bootstrap.min.css" rel="stylesheet" >
|
<link href="/assets/bootstrap.min.css" rel="stylesheet" >
|
||||||
{{ if .Params.asciinema }}
|
|
||||||
<link rel="stylesheet" type="text/css" href="/assets/asciinema-player.css" />
|
|
||||||
{{ end }}
|
|
||||||
<style>
|
<style>
|
||||||
{{ block "styles" . }}
|
{{- block "styles" . -}}
|
||||||
{{ end }}
|
{{- end -}}
|
||||||
div.highlight pre {
|
|
||||||
{{/* code highlighting */}}
|
|
||||||
padding: 1rem;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script src="/assets/bootstrap.min.js" defer></script>
|
<script src="/assets/bootstrap.min.js" defer></script>
|
||||||
@ -50,8 +42,6 @@
|
|||||||
{{ block "main" . }}
|
{{ block "main" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</main>
|
</main>
|
||||||
<hr>
|
|
||||||
<div style="height: 300px;"><!-- This space is intentionally left blank --></div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
11
hugo/layouts/_default/single.html
Normal file
11
hugo/layouts/_default/single.html
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{{ define "title" }}
|
||||||
|
{{ .Title }} – {{ .Site.Title }}
|
||||||
|
{{ end }}
|
||||||
|
{{ define "main" }}
|
||||||
|
<article>
|
||||||
|
<h1 class="display-3 text-center">{{ .Title }}</h1>
|
||||||
|
<p class="text-center"><time datetime="{{ .Date }}">{{ .Date.Format "2006-01-02" }}</time></p>
|
||||||
|
{{ .Content }}
|
||||||
|
</article>
|
||||||
|
{{ end }}
|
||||||
|
|
6
hugo/static/assets/bootstrap.min.css
vendored
Normal file
6
hugo/static/assets/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
7
hugo/static/assets/bootstrap.min.js
vendored
Normal file
7
hugo/static/assets/bootstrap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -1,24 +0,0 @@
|
|||||||
{{ define "title" }}
|
|
||||||
{{ .Title }} – {{ .Site.Title }}
|
|
||||||
{{ end }}
|
|
||||||
{{ define "main" }}
|
|
||||||
<article>
|
|
||||||
<h1 class="display-3 text-center">{{ .Title }}</h1>
|
|
||||||
<p class="text-center"><time datetime="{{ .Date }}">{{ .Date.Format "2006-01-02" }}</time>
|
|
||||||
{{ if .Params.tags }}
|
|
||||||
│
|
|
||||||
{{range .Params.tags}}
|
|
||||||
<a class="btn btn-primary" href="/tags/{{ . | urlize }}" role="button">{{ . }}</a>
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
{{ if .Params.categories }}
|
|
||||||
│
|
|
||||||
{{range .Params.categories}}
|
|
||||||
<a class="btn btn-secondary" href="/categories/{{ . | urlize }}" role="button">{{ . }}</a>
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
</p>
|
|
||||||
{{ .Content }}
|
|
||||||
</article>
|
|
||||||
{{ end }}
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
|||||||
<div id='{{ with .Get "key" }}{{ . }}{{ end }}'></div>
|
|
||||||
<script src="/assets/asciinema-player.min.js"></script>
|
|
||||||
<script>
|
|
||||||
AsciinemaPlayer.create('/casts/{{ with .Get "key" }}{{ . }}{{ end }}.cast', document.getElementById('{{ with .Get "key" }}{{ . }}{{ end }}'), {
|
|
||||||
{{ if .Get "cols" }}cols: "{{ .Get "cols" }}",{{ end }}
|
|
||||||
{{ if .Get "rows" }}rows: "{{ .Get "rows" }}",{{ end }}
|
|
||||||
{{ if .Get "autoPlay" }}autoPlay: "{{ .Get "autoPlay" }}",{{ end }}
|
|
||||||
{{ if .Get "preload" }}preload: "{{ .Get "preload" }}",{{ end }}
|
|
||||||
{{ if .Get "loop" }}loop: "{{ .Get "loop" }}",{{ end }}
|
|
||||||
{{ if .Get "startAt" }}startAt: "{{ .Get "startAt" }}",{{ end }}
|
|
||||||
{{ if .Get "speed" }}speed: "{{ .Get "speed" }}",{{ end }}
|
|
||||||
{{ if .Get "idleTimeLimit" }}idleTimeLimit: "{{ .Get "idleTimeLimit" }}",{{ end }}
|
|
||||||
{{ if .Get "theme" }}theme: "{{ .Get "theme" }}",{{ end }}
|
|
||||||
{{ if .Get "poster" }}poster: "{{ .Get "poster" }}",{{ end }}
|
|
||||||
{{ if .Get "fit" }}fit: "{{ .Get "fit" }}",{{ end }}
|
|
||||||
{{ if .Get "terminalFontSize" }}terminalFontSize: "{{ .Get "terminalFontSize" }}",{{ end }}
|
|
||||||
{{ if .Get "terminalFontFamily" }}terminalFontFamily: "{{ .Get "terminalFontFamily" }}",{{ end }}
|
|
||||||
{{ if .Get "terminalLineHeight" }}terminalLineHeight: "{{ .Get "terminalLineHeight" }}",{{ end }}
|
|
||||||
});
|
|
||||||
</script>
|
|
@ -1,9 +0,0 @@
|
|||||||
{{- /*
|
|
||||||
Template comment syntax: https://hugo.d.balki.me/templates/introduction/#comments
|
|
||||||
collapsable section ref: https://stackoverflow.com/a/78475534
|
|
||||||
*/ -}}
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>{{ .Get "title" | default "Click to expand" | markdownify }}</summary>
|
|
||||||
<div>{{ .Inner | markdownify }}</div>
|
|
||||||
</details>
|
|
3
pages/index.md
Normal file
3
pages/index.md
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
Welcome to my site!
|
||||||
|
|
||||||
|
I am Balakrishnan Balasubramanian (a) balki. Nothing much here. Checkout the nav bar above for interesting stuff.
|
33
pages/stuff.md
Normal file
33
pages/stuff.md
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
# Some cool stuff I built
|
||||||
|
|
||||||
|
## vimtabdiff
|
||||||
|
|
||||||
|
Simple python script to see diff off two directories with diff of each file in a vim tab. Typically used to replace `git difftool`
|
||||||
|
|
||||||
|
<div class="table">
|
||||||
|
+---------+-------------------------------------------+
|
||||||
|
| Project | vimtabdiff |
|
||||||
|
+---------+-------------------------------------------+
|
||||||
|
| Tags | #python, #vim, #git |
|
||||||
|
+---------+-------------------------------------------+
|
||||||
|
| Github | <https://github.com/balki/vimtabdiff> |
|
||||||
|
+---------+-------------------------------------------+
|
||||||
|
| Gitea | <https://gitea.balki.me/balki/vimtabdiff> |
|
||||||
|
+---------+-------------------------------------------+
|
||||||
|
</div>
|
||||||
|
|
||||||
|
## grocery_guy
|
||||||
|
|
||||||
|
Telegram bot to manage lists.
|
||||||
|
|
||||||
|
<div class="table">
|
||||||
|
+----------+----------------------------------------------------+
|
||||||
|
| Project | grocery_guy |
|
||||||
|
+----------+----------------------------------------------------+
|
||||||
|
| Tags | #golang, #telegram |
|
||||||
|
+----------+----------------------------------------------------+
|
||||||
|
| Gitea | <https://gitea.balki.me/balki/telegram-chklistbot> |
|
||||||
|
+----------+----------------------------------------------------+
|
||||||
|
| Telegram | <https://t.me/grocery_guy_bot> |
|
||||||
|
+----------+----------------------------------------------------+
|
||||||
|
</div>
|
1
public
1
public
@ -1 +0,0 @@
|
|||||||
Subproject commit 094b566f7ea054b1b047ecf618d474988cd2c287
|
|
0
scripts/pandocfilters.py
Normal file
0
scripts/pandocfilters.py
Normal file
0
scripts/table.py
Normal file
0
scripts/table.py
Normal file
File diff suppressed because it is too large
Load Diff
1
static/assets/asciinema-player.min.js
vendored
1
static/assets/asciinema-player.min.js
vendored
File diff suppressed because one or more lines are too long
6
static/assets/bootstrap.min.css
vendored
6
static/assets/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
7
static/assets/bootstrap.min.js
vendored
7
static/assets/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,42 +0,0 @@
|
|||||||
{"version": 2, "width": 211, "height": 54, "timestamp": 1690070416, "env": {"SHELL": "/bin/zsh", "TERM": "tmux-256color"}}
|
|
||||||
[0.616662, "o", "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r"]
|
|
||||||
[0.651075, "o", "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\r\n\u001b[1;36mblog\u001b[0m on \u001b[1;35m \u001b[0m\u001b[1;35masciinema\u001b[0m \u001b[1;31m[\u001b[0m\u001b[1;31m$\u001b[0m\u001b[1;31m!\u001b[0m\u001b[1;31m?\u001b[0m\u001b[1;31m]\u001b[0m \r\n\u001b[1;2;31m⬢\u001b[0m\u001b[1;2;31m [\u001b[0m\u001b[1;2;31mOCI\u001b[0m\u001b[1;2;31m]\u001b[0m \u001b[1;32m❯\u001b[0m \u001b[K\u001b[?2004h"]
|
|
||||||
[2.137003, "o", "e"]
|
|
||||||
[2.144549, "o", "\be\u001b[90mcho bye\u001b[39m\b\b\b\b\b\b\b"]
|
|
||||||
[2.192516, "o", "\be\u001b[39mc"]
|
|
||||||
[2.232416, "o", "\u001b[39mh"]
|
|
||||||
[2.372576, "o", "\u001b[39mo"]
|
|
||||||
[2.390732, "o", "\u001b[39m "]
|
|
||||||
[2.774916, "o", "\u001b[39m\"\u001b[39m \u001b[39m \b\b"]
|
|
||||||
[2.781599, "o", "\u001b[90m{{ .Render }}\" > layouts/index.html\u001b[39m\u001b[35D"]
|
|
||||||
[3.091004, "o", "\u001b[39mH\u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[34D"]
|
|
||||||
[3.098663, "o", "\u001b[90meh\" | nc 127.0.0.1 8080\u001b[39m\u001b[23D"]
|
|
||||||
[3.228845, "o", "\u001b[39me"]
|
|
||||||
[3.42287, "o", "\u001b[39me\u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[21D"]
|
|
||||||
[3.830673, "o", "\b \b"]
|
|
||||||
[3.849255, "o", "\u001b[90mh\" | nc 127.0.0.1 8080\u001b[39m\u001b[22D"]
|
|
||||||
[4.059485, "o", "\u001b[39ml\u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[21D"]
|
|
||||||
[4.067668, "o", "\u001b[90ml\" | nc 127.0.0.1 8080\u001b[39m\u001b[22D"]
|
|
||||||
[4.211281, "o", "\u001b[39ml"]
|
|
||||||
[4.469571, "o", "\u001b[39mo\u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[20D"]
|
|
||||||
[4.477592, "o", "\u001b[90m\" | nc 127.0.0.1 8080\u001b[39m\u001b[21D"]
|
|
||||||
[4.943674, "o", "\u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[20D"]
|
|
||||||
[4.951654, "o", "\u001b[90mworld ha ah aha\" | nc 127.0.0.1 8080\u001b[39m\u001b[36D"]
|
|
||||||
[5.144929, "o", "\u001b[39mw"]
|
|
||||||
[5.205373, "o", "\u001b[39mo"]
|
|
||||||
[5.303329, "o", "\u001b[39mr"]
|
|
||||||
[5.422771, "o", "\u001b[39ml"]
|
|
||||||
[5.502979, "o", "\u001b[39md"]
|
|
||||||
[6.684966, "o", "\u001b[39m\"\u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[30D"]
|
|
||||||
[7.170616, "o", "\u001b[?2004l\r\r\n"]
|
|
||||||
[7.174019, "o", "Hello world\r\n\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r"]
|
|
||||||
[7.204173, "o", "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\r\n\u001b[1;36mblog\u001b[0m on \u001b[1;35m \u001b[0m\u001b[1;35masciinema\u001b[0m \u001b[1;31m[\u001b[0m\u001b[1;31m$\u001b[0m\u001b[1;31m!\u001b[0m\u001b[1;31m?\u001b[0m\u001b[1;31m]\u001b[0m \r\n\u001b[1;2;31m⬢\u001b[0m\u001b[1;2;31m [\u001b[0m\u001b[1;2;31mOCI\u001b[0m\u001b[1;2;31m]\u001b[0m \u001b[1;32m❯\u001b[0m \u001b[K\u001b[?2004h"]
|
|
||||||
[10.303159, "o", "e"]
|
|
||||||
[10.310087, "o", "\be\u001b[90mcho \"Hello world\"\u001b[39m\u001b[17D"]
|
|
||||||
[10.49929, "o", "\be\u001b[39mx\u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[16D"]
|
|
||||||
[10.505837, "o", "\u001b[90mport EDITOR=vim\u001b[39m\u001b[15D"]
|
|
||||||
[10.597115, "o", "\u001b[39mi\u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[39m \u001b[14D"]
|
|
||||||
[10.61047, "o", "\u001b[90mt()\u001b[39m\r\r\n\u001b[90mecho hi\u001b[39m\u001b[K\u001bM\u001b[6C"]
|
|
||||||
[10.714876, "o", "\u001b[39mt"]
|
|
||||||
[11.946849, "o", "\u001b[39m \u001b[39m \u001b[1B\r\u001b[K\u001bM\u001b[14C"]
|
|
||||||
[11.947131, "o", "\u001b[?2004l\u001b[1B\r"]
|
|
@ -1,184 +0,0 @@
|
|||||||
{"version": 2, "width": 105, "height": 27, "timestamp": 1690255394, "env": {"SHELL": "/bin/zsh", "TERM": "tmux-256color"}}
|
|
||||||
[0.603476, "o", "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r"]
|
|
||||||
[0.605686, "o", "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[44mbalki@archlinux\u001b[49m \u001b[1m\u001b[32m~/projects/mine/vimfun/stt\r\n\r\u001b[37m % \u001b[0m\u001b[37m\u001b[39m\u001b[49m\u001b[K\u001b[?2004h"]
|
|
||||||
[1.043556, "o", "b"]
|
|
||||||
[1.123276, "o", "\bba"]
|
|
||||||
[1.203174, "o", "t"]
|
|
||||||
[1.301279, "o", " "]
|
|
||||||
[1.613306, "o", "c"]
|
|
||||||
[1.691404, "o", "o"]
|
|
||||||
[1.76925, "o", "m"]
|
|
||||||
[1.917246, "o", "m"]
|
|
||||||
[2.287072, "o", "o"]
|
|
||||||
[2.369433, "o", "n"]
|
|
||||||
[2.529079, "o", "."]
|
|
||||||
[2.807484, "o", "v"]
|
|
||||||
[2.887561, "o", "i"]
|
|
||||||
[2.987485, "o", "m"]
|
|
||||||
[3.570353, "o", "\u001b[?2004l\r\r\n"]
|
|
||||||
[3.58573, "o", "\r\u001b[38;5;238m───────┬─────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\u001b[m\r\n \u001b[38;5;238m│ \u001b[0mFile: \u001b[1mcommon.vim\u001b[0m\u001b[m\r\n\u001b[38;5;238m───────┼─────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\u001b[m\r\n\u001b[38;5;238m 1\u001b[0m \u001b[38;5;238m│\u001b[0m \u001b[m\r\n\u001b[38;5;238m 2\u001b[0m \u001b[38;5;238m│\u001b[0m \u001b[38;5;81mlet\u001b[0m\u001b[38;5;231m \u001b[0m\u001b[38;5;231mg:mapleader\u001b[0m\u001b[38;5;231m = \u001b[0m\u001b[38;5;186m' '\u001b[0m\u001b[m\r\n\u001b[38;5;238m 3\u001b[0m \u001b[38;5;238m│\u001b[0m \u001b[38;5;81mset\u001b[0m\u001b[38;5;231m splitbelow splitright\u001b[0m\u001b[m\r\n\u001b[38;5;238m───────┴─────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\u001b[m\r\n\r\u001b[K"]
|
|
||||||
[3.587155, "o", "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r"]
|
|
||||||
[3.589198, "o", "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[44mbalki@archlinux\u001b[49m \u001b[1m\u001b[32m~/projects/mine/vimfun/stt\r\n\r\u001b[37m % \u001b[0m\u001b[37m\u001b[39m\u001b[49m\u001b[K\u001b[?2004h"]
|
|
||||||
[4.995693, "o", "v"]
|
|
||||||
[5.055642, "o", "\bvi"]
|
|
||||||
[5.174006, "o", "m"]
|
|
||||||
[5.273744, "o", " "]
|
|
||||||
[5.41173, "o", "-"]
|
|
||||||
[5.571713, "o", "-"]
|
|
||||||
[5.753233, "o", "c"]
|
|
||||||
[5.931673, "o", "l"]
|
|
||||||
[6.089803, "o", "e"]
|
|
||||||
[6.16969, "o", "a"]
|
|
||||||
[6.331837, "o", "n"]
|
|
||||||
[6.47983, "o", " "]
|
|
||||||
[6.557859, "o", "-"]
|
|
||||||
[6.813152, "o", "S"]
|
|
||||||
[6.984113, "o", " "]
|
|
||||||
[7.224383, "o", "c"]
|
|
||||||
[7.326254, "o", "o"]
|
|
||||||
[7.446336, "o", "m"]
|
|
||||||
[7.588254, "o", "m"]
|
|
||||||
[7.810388, "o", "o"]
|
|
||||||
[7.930429, "o", "n"]
|
|
||||||
[8.108401, "o", "."]
|
|
||||||
[8.462427, "o", "v"]
|
|
||||||
[8.541417, "o", "i"]
|
|
||||||
[8.608111, "o", "m"]
|
|
||||||
[9.234495, "o", " "]
|
|
||||||
[9.534188, "o", "-"]
|
|
||||||
[9.784079, "o", "S"]
|
|
||||||
[10.408508, "o", " "]
|
|
||||||
[10.528223, "o", "s"]
|
|
||||||
[10.686292, "o", "t"]
|
|
||||||
[10.830104, "o", "t"]
|
|
||||||
[11.008242, "o", "."]
|
|
||||||
[11.245051, "o", "v"]
|
|
||||||
[11.390101, "o", "i"]
|
|
||||||
[11.488703, "o", "m"]
|
|
||||||
[12.704646, "o", "\u001b[?2004l\r\r\n"]
|
|
||||||
[12.71955, "o", "\u001b[?1000h\u001b[?1049h\u001b[?1h\u001b=\u001b[?2004h"]
|
|
||||||
[12.720463, "o", "\u001b[1;27r\u001b[27m\u001b[24m\u001b[23m\u001b[0m\u001b[H\u001b[J\u001b[2;1H▽\u001b[6n\u001b[2;1H \u001b[3;1H\u001bPzz\u001b\\\u001b[0%m\u001b[6n\u001b[3;1H \u001b[1;1H\u001b[>c"]
|
|
||||||
[12.720681, "o", "\u001b[?25l\u001b[2;1H\u001b[94m~ \u001b[3;1H~ \u001b[4;1H~ \u001b[5;1H~ \u001b[6;1H~ \u001b[7;1H~ \u001b[8;1H~ \u001b[9;1H~ \u001b[10;1H~ \u001b[11;1H~ \u001b[12;1H~ \u001b[13;1H~ \u001b[14;1H~ \u001b[15;1H~ \u001b[16;1H~ \u001b[17;1H~ \u001b[18;1H~ \u001b[19;1H~ "]
|
|
||||||
[12.720799, "o", "\u001b[20;1H~ \u001b[21;1H~ \u001b[22;1H~ \u001b[23;1H~ \u001b[24;1H~ \u001b[25;1H~ \u001b[26;1H~ \u001b[0m\u001b[27;88H0,0-1\u001b[9CAll\u001b[8;45HVIM - Vi IMproved\u001b[10;45Hversion 9.0.1676\u001b[11;41Hby Bram Moolenaar et al.\u001b[12;32HVim is open source and freely distributable\u001b[14;39HHelp poor children in Uganda!\u001b[15;30Htype :help iccf\u001b[34m<Enter>\u001b[0m for information \u001b[17;30Htype :q\u001b[34m<Enter>\u001b[0m to exit \u001b[18;30Htype :help\u001b[34m<Enter>\u001b[0m or \u001b[34m<F1>\u001b[0m for on-line help\u001b[19;30Htype :help version9\u001b[34m<Enter>\u001b[0m for version info\u001b[1;1H\u001b[34h\u001b[?25h"]
|
|
||||||
[14.428684, "o", "\u001b[?25l\u001b[27;78H:\u001b[1;1H\u001b[27;78H\u001b[K\u001b[27;1H:\u001b[?1000l\u001b[34h\u001b[?25h"]
|
|
||||||
[14.830782, "o", "e"]
|
|
||||||
[15.026614, "o", "d"]
|
|
||||||
[15.106625, "o", "i"]
|
|
||||||
[15.204778, "o", "t"]
|
|
||||||
[15.268723, "o", " "]
|
|
||||||
[15.848928, "o", "c"]
|
|
||||||
[15.968866, "o", "h"]
|
|
||||||
[16.026805, "o", "e"]
|
|
||||||
[16.106825, "o", "a"]
|
|
||||||
[16.346622, "o", "t"]
|
|
||||||
[16.586891, "o", "."]
|
|
||||||
[16.724942, "o", "s"]
|
|
||||||
[16.824854, "o", "h"]
|
|
||||||
[17.483213, "o", "\r"]
|
|
||||||
[17.484646, "o", "\u001b[?1000h\u001b[?25l\"cheat.sh\" \u001b[27;12H\u001b[K\u001b[27;12H6L, 57B"]
|
|
||||||
[17.493031, "o", "\u001b[1;1H\u001b[38;5;130mecho\u001b[0m\u001b[31m hi\u001b[0m\r\ndate\u001b[2;5H\u001b[K\u001b[3;1HVIMST \u001b[38;5;130msleep\u001b[0m \u001b[31m4000\u001b[0m\u001b[3;17H\u001b[K\u001b[4;1Hdate\u001b[4;5H\u001b[K\u001b[5;1H\u001b[38;5;130mecho\u001b[0m\u001b[31m bye\u001b[0m\u001b[5;9H\u001b[K\u001b[6;1HVIMST ctrl l\u001b[6;13H\u001b[K\u001b[8;45H\u001b[94m \u001b[10;45H \u001b[11;41H \u001b[12;32H \u001b[14;39H \u001b[15;30H \u001b[17;30H \u001b[18;30H \u001b[19;30H \u001b[0m\u001b[27;88H1,1\u001b[11CAll\u001b[1;1H\u001b[34h\u001b[?25h"]
|
|
||||||
[18.57496, "o", "\u001b[?25l\u001b[27;78H:\u001b[1;1H\u001b[27;1H\u001b[K\u001b[27;1H:\u001b[?1000l\u001b[34h\u001b[?25h"]
|
|
||||||
[18.747096, "o", "v"]
|
|
||||||
[18.865071, "o", "e"]
|
|
||||||
[18.965219, "o", "r"]
|
|
||||||
[19.145075, "o", "t"]
|
|
||||||
[19.341239, "o", " "]
|
|
||||||
[19.567871, "o", "t"]
|
|
||||||
[19.627258, "o", "e"]
|
|
||||||
[19.745251, "o", "r"]
|
|
||||||
[19.960829, "o", "m"]
|
|
||||||
[20.101664, "o", "i"]
|
|
||||||
[20.221785, "o", "n"]
|
|
||||||
[20.319265, "o", "a"]
|
|
||||||
[20.459327, "o", "l"]
|
|
||||||
[20.793599, "o", "\r"]
|
|
||||||
[20.793953, "o", "\u001b[?1000h\u001b[?25l"]
|
|
||||||
[20.797471, "o", "\u001b[1;54H\b\u001b[7m|\u001b[2;53H|\u001b[3;53H|\u001b[4;53H|\u001b[5;53H|\u001b[6;53H|\u001b[7;53H|\u001b[8;53H|\u001b[9;53H|\u001b[10;53H|\u001b[11;53H|\u001b[12;53H|\u001b[13;53H|\u001b[14;53H|\u001b[15;53H|\u001b[16;53H|\u001b[17;53H|\u001b[18;53H|\u001b[19;53H|\u001b[20;53H|\u001b[21;53H|\u001b[22;53H|\u001b[23;53H|\u001b[24;53H|\u001b[25;53H|\r\ncheat.sh 1,1 All \u001b[0m\u001b[1;54H \u001b[2;54H \u001b[3;54H \u001b[4;54H \u001b[5;54H \u001b[6;54H \u001b[7;54H \u001b[8;54H \u001b[9;54H \u001b[10;54H \u001b[11;54H \u001b[12;54H \u001b[13;54H \u001b[14;54H \u001b[15;54H \u001b[16;54H \u001b[17;54H \u001b[18;54H \u001b[19;54H \u001b[20;54H \u001b[21;54H \u001b[22;54H \u001b[23;54H \u001b[24;54H \u001b[25;54H \u001b[26;54H\u001b[1m\u001b[97m\u001b[42m!/bin/zsh [running] 0,0-1 All\u001b[1;54H\u001b[34h\u001b[?25h"]
|
|
||||||
[21.340332, "o", "\u001b[?25l\u001b[0m\u001b[27;95H^W\u001b[1;54H\u001b[34h\u001b[?25h"]
|
|
||||||
[21.396446, "o", "\u001b[?25l\u001b[1C\u001b[34h\u001b[?25h\u001b[50C\u001b[1;54H\u001b[1C\b\u001b[?25l\u001b[34h\u001b[?25h"]
|
|
||||||
[21.398352, "o", "\u001b[?25l\u001b[15C\u001b[34h\u001b[?25h\u001b[1C\u001b[26C\u001b[1;54H\u001b[2;54H\u001b[3C"]
|
|
||||||
[21.398702, "o", "\u001b[?25l\u001b[1;54H\u001b[44mbalki@archlinux\u001b[0m\u001b[1C\u001b[1m\u001b[32m~/projects/mine/vimfun/stt\u001b[0m\u001b[2;54H\u001b[1m\u001b[37m % \u001b[34h\u001b[?25h"]
|
|
||||||
[21.739615, "o", "\u001b[?25l\u001b[0m\u001b[27;95H \u001b[2;57H\u001b[27;95H^Wh\u001b[2;57H"]
|
|
||||||
[21.739691, "o", "\u001b[27;95H \u001b[1;1H\u001b[26;1H\u001b[1m\u001b[7mcheat.sh 1,1 All \u001b[0m\u001b[97m\u001b[42m!/bin/zsh [running] 1,1 Top\u001b[1;1H\u001b[34h\u001b[?25h"]
|
|
||||||
[22.89177, "o", "\u001b[?25l\u001b[0m\u001b[27;95H<20>\u001b[1;1H\u001b[34h\u001b[?25h"]
|
|
||||||
[22.931714, "o", "\u001b[?25l\u001b[27;95H \u001b[1;1H\u001b[?1000l\u001b[?1000h\u001b[34h\u001b[?25h"]
|
|
||||||
[22.933412, "o", "\u001b[?25l\u001b[2;57Hecho hi\u001b[1;1H\u001b[34h\u001b[?25h"]
|
|
||||||
[22.936354, "o", "\u001b[?25l\u001b[3;54Hhi\u001b[1;1H\u001b[34h\u001b[?25h"]
|
|
||||||
[22.94211, "o", "\u001b[?25l\u001b[4;54H\u001b[44mbalki@archlinux\u001b[0m\u001b[1C\u001b[1m\u001b[32m~/projects/mine/vimfun/stt\u001b[0m\u001b[5;54H\u001b[1m\u001b[37m % \u001b[1;1H\u001b[34h\u001b[?25h"]
|
|
||||||
[24.507692, "o", "\u001b[?25l\u001b[0m\u001b[27;95HV\u001b[1;1H"]
|
|
||||||
[24.508117, "o", "\u001b[27;95H1\u001b[1;1H\u001b[1C\u001b[38;5;130m\u001b[47mcho\u001b[0m\u001b[31m\u001b[47m hi\u001b[0m\u001b[47m \u001b[0m\u001b[27;1H\u001b[1m-- VISUAL LINE --\u001b[0m\u001b[27;95H\u001b[K\u001b[27;95H1\u001b[1;1H\u001b[34h\u001b[?25h"]
|
|
||||||
[24.789755, "o", "\u001b[?25l\u001b[27;95Hj\u001b[1;1H"]
|
|
||||||
[24.790102, "o", "\u001b[27;95H2\u001b[2;1H\u001b[1;1H\u001b[38;5;130m\u001b[47me\u001b[0m\r\nd\u001b[47mate \u001b[0m\u001b[26;35H\u001b[1m\u001b[7m2\u001b[2;1H\u001b[34h\u001b[?25h"]
|
|
||||||
[25.077917, "o", "\u001b[?25l\u001b[0m\u001b[27;95Hj\u001b[2;1H"]
|
|
||||||
[25.078442, "o", "\u001b[27;95H3\u001b[3;1H\u001b[2;1H\u001b[47md\r\n\u001b[0mV\u001b[47mIMST \u001b[0m\u001b[38;5;130m\u001b[47msleep\u001b[0m\u001b[47m \u001b[0m\u001b[31m\u001b[47m4000\u001b[0m\u001b[47m \u001b[0m\u001b[26;35H\u001b[1m\u001b[7m3\u001b[3;1H\u001b[34h\u001b[?25h"]
|
|
||||||
[25.353911, "o", "\u001b[?25l\u001b[0m\u001b[27;95Hj\u001b[3;1H"]
|
|
||||||
[25.354276, "o", "\u001b[27;95H4\u001b[4;1H\u001b[3;1H\u001b[47mV\r\n\u001b[0md\u001b[47mate \u001b[0m\u001b[26;35H\u001b[1m\u001b[7m4\u001b[4;1H\u001b[34h\u001b[?25h"]
|
|
||||||
[25.781257, "o", "\u001b[?25l\u001b[0m\u001b[27;95Hj\u001b[4;1H"]
|
|
||||||
[25.781502, "o", "\u001b[27;95H5\u001b[5;1H\u001b[4;1H\u001b[47md\u001b[0m\u001b[5;2H\u001b[38;5;130m\u001b[47mcho\u001b[0m\u001b[31m\u001b[47m bye\u001b[0m\u001b[47m \u001b[0m\u001b[26;35H\u001b[1m\u001b[7m5\u001b[5;1H\u001b[34h\u001b[?25h"]
|
|
||||||
[26.178059, "o", "\u001b[?25l\u001b[0m\u001b[27;95H<20>\u001b[5;1H\u001b[34h\u001b[?25h"]
|
|
||||||
[26.238921, "o", "\u001b[?25l\u001b[27;95H5 \u001b[5;1H\u001b[27;95H \u001b[1;1H\u001b[?1000l\u001b[?1000h\u001b[38;5;130mecho\u001b[0m\u001b[31m hi\u001b[0m \r\ndate \r\nVIMST \u001b[38;5;130msleep\u001b[0m \u001b[31m4000\u001b[0m \r\ndate \u001b[5;2H\u001b[38;5;130mcho\u001b[0m\u001b[31m bye\u001b[0m \u001b[27;1H\u001b[K\u001b[26;35H\u001b[1m\u001b[7m1\u001b[1;1H\u001b[34h\u001b[?25h"]
|
|
||||||
[26.239565, "o", "\u001b[?25l\u001b[0m\u001b[5;57Hecho hi\u001b[1;1H\u001b[34h\u001b[?25h"]
|
|
||||||
[26.240481, "o", "\u001b[?25l\u001b[6;54Hhi\u001b[1;1H\u001b[34h\u001b[?25h"]
|
|
||||||
[26.246317, "o", "\u001b[?25l\u001b[7;54H\u001b[44mbalki@archlinux\u001b[0m\u001b[1C\u001b[1m\u001b[32m~/projects/mine/vimfun/stt\u001b[0m\u001b[8;54H\u001b[1m\u001b[37m % \u001b[0mdate\u001b[1;1H\u001b[34h\u001b[?25h\u001b[?25l\u001b[34h\u001b[?25h"]
|
|
||||||
[26.250645, "o", "\u001b[?25l\u001b[9;54HMon 24 Jul 2023 11:23:41 PM EDT\u001b[1;1H\u001b[34h\u001b[?25h"]
|
|
||||||
[26.251354, "o", "\u001b[?25l\u001b[34h\u001b[?25h"]
|
|
||||||
[26.256797, "o", "\u001b[?25l\u001b[10;54H\u001b[44mbalki@archlinux\u001b[0m\u001b[1C\u001b[1m\u001b[32m~/projects/mine/vimfun/stt\u001b[0m\u001b[11;54H\u001b[1m\u001b[37m % \u001b[1;1H\u001b[34h\u001b[?25h"]
|
|
||||||
[30.242604, "o", "\u001b[?25l\u001b[34h\u001b[?25h"]
|
|
||||||
[30.2437, "o", "\u001b[?25l\u001b[0m\u001b[11;57Hdate\u001b[1;1H\u001b[34h\u001b[?25h\u001b[?25l\u001b[34h\u001b[?25h"]
|
|
||||||
[30.24826, "o", "\u001b[?25l\u001b[12;54HMon 24 Jul 2023 11:23:45 PM EDT\u001b[1;1H\u001b[34h\u001b[?25h"]
|
|
||||||
[30.248916, "o", "\u001b[?25l\u001b[34h\u001b[?25h"]
|
|
||||||
[30.254193, "o", "\u001b[?25l\u001b[13;54H\u001b[44mbalki@archlinux\u001b[0m\u001b[1C\u001b[1m\u001b[32m~/projects/mine/vimfun/stt\u001b[0m\u001b[14;54H\u001b[1m\u001b[37m % \u001b[0mecho\u001b[1;1H\u001b[34h\u001b[?25h"]
|
|
||||||
[30.254912, "o", "\u001b[?25l\u001b[14;62Hbye\u001b[1;1H\u001b[34h\u001b[?25h"]
|
|
||||||
[30.255543, "o", "\u001b[?25l\u001b[15;54Hbye\u001b[1;1H\u001b[34h\u001b[?25h"]
|
|
||||||
[30.260783, "o", "\u001b[?25l\u001b[16;54H\u001b[44mbalki@archlinux\u001b[0m\u001b[1C\u001b[1m\u001b[32m~/projects/mine/vimfun/stt\u001b[0m\u001b[17;54H\u001b[1m\u001b[37m % \u001b[1;1H\u001b[34h\u001b[?25h"]
|
|
||||||
[32.366676, "o", "\u001b[?25l\u001b[0m\u001b[27;95HG\u001b[1;1H\u001b[27;95H \u001b[6;1H\u001b[26;35H\u001b[1m\u001b[7m6\u001b[6;1H\u001b[34h\u001b[?25h"]
|
|
||||||
[33.622721, "o", "\u001b[?25l\u001b[0m\u001b[27;95Hk\u001b[6;1H\u001b[27;95H \u001b[5;1H\u001b[26;35H\u001b[1m\u001b[7m5\u001b[5;1H\u001b[34h\u001b[?25h"]
|
|
||||||
[33.804893, "o", "\u001b[?25l\u001b[0m\u001b[27;95Hk\u001b[5;1H\u001b[27;95H \u001b[4;1H\u001b[26;35H\u001b[1m\u001b[7m4\u001b[4;1H\u001b[34h\u001b[?25h"]
|
|
||||||
[38.012689, "o", "\u001b[?25l\u001b[26;35H6,8\u001b[6;8H\u001b[34h\u001b[?25h"]
|
|
||||||
[38.359024, "o", "\u001b[?1000l\u001b[?1000h\u001b[?25l\u001b[34h\u001b[?25h"]
|
|
||||||
[38.360913, "o", "\u001b[?25l\u001b[0m\u001b[2;57H \u001b[3;54H \u001b[4;54H \u001b[5;54H \u001b[6;54H \u001b[7;54H \u001b[8;54H \u001b[9;54H \u001b[10;54H \u001b[11;54H \u001b[12;54H \u001b[13;54H \u001b[14;54H \u001b[15;54H \u001b[16;54H \u001b[17;54H \u001b[6;8H\u001b[34h\u001b[?25h"]
|
|
||||||
[39.454289, "o", "\u001b[?25l\u001b[26;35H\u001b[1m\u001b[7m5\u001b[5;8H\u001b[34h\u001b[?25h"]
|
|
||||||
[39.618716, "o", "\u001b[?1000l\u001b[?1000h\u001b[?25l\u001b[34h\u001b[?25h"]
|
|
||||||
[39.620149, "o", "\u001b[?25l\u001b[0m\u001b[2;57Hecho bye\u001b[5;8H\u001b[34h\u001b[?25h"]
|
|
||||||
[39.621315, "o", "\u001b[?25l\u001b[3;54Hbye\u001b[5;8H\u001b[34h\u001b[?25h"]
|
|
||||||
[39.623263, "o", "\u001b[?25l\u001b[4;54H\u001b[44mbalki@archlinux\u001b[0m\u001b[1C\u001b[1m\u001b[32m~/projects/mine/vimfun/stt\u001b[0m\u001b[5;54H\u001b[1m\u001b[37m % \u001b[5;8H\u001b[34h\u001b[?25h"]
|
|
||||||
[40.77026, "o", "\u001b[?25l\u001b[0m\u001b[26;35H\u001b[1m\u001b[7m1,7\u001b[1;7H\u001b[34h\u001b[?25h"]
|
|
||||||
[40.93504, "o", "\u001b[?1000l\u001b[?1000h\u001b[?25l\u001b[34h\u001b[?25h"]
|
|
||||||
[40.936345, "o", "\u001b[?25l\u001b[0m\u001b[5;57Hecho hi\u001b[1;7H\u001b[34h\u001b[?25h"]
|
|
||||||
[40.937653, "o", "\u001b[?25l\u001b[6;54Hhi\u001b[1;7H\u001b[34h\u001b[?25h"]
|
|
||||||
[40.943521, "o", "\u001b[?25l\u001b[7;54H\u001b[44mbalki@archlinux\u001b[0m\u001b[1C\u001b[1m\u001b[32m~/projects/mine/vimfun/stt\u001b[0m\u001b[8;54H\u001b[1m\u001b[37m % \u001b[1;7H\u001b[34h\u001b[?25h"]
|
|
||||||
[42.629357, "o", "\u001b[?25l\u001b[0m\u001b[26;35H\u001b[1m\u001b[7m6,12\u001b[6;12H\u001b[34h\u001b[?25h"]
|
|
||||||
[44.032006, "o", "\u001b[?25l\u001b[0m\u001b[27;95H:\u001b[6;12H\u001b[27;95H\u001b[K\u001b[27;1H:\u001b[?1000l\u001b[34h\u001b[?25h"]
|
|
||||||
[44.193796, "o", "q"]
|
|
||||||
[44.393755, "o", "a"]
|
|
||||||
[44.71981, "o", "!"]
|
|
||||||
[45.462189, "o", "\r\u001b[?1000h\u001b[?25l\u001b[?1000l\u001b[?2004l"]
|
|
||||||
[45.462284, "o", "\u001b[27;1H\u001b[K\u001b[27;1H\u001b[?2004l\u001b[?1l\u001b>\u001b[?1049l\u001b[34h\u001b[?25h"]
|
|
||||||
[45.464866, "o", "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r"]
|
|
||||||
[45.470145, "o", "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[44mbalki@archlinux\u001b[49m \u001b[1m\u001b[32m~/projects/mine/vimfun/stt\r\n\r\u001b[37m % \u001b[0m\u001b[37m\u001b[39m\u001b[49m\u001b[K\u001b[?2004h"]
|
|
||||||
[47.152206, "o", ":"]
|
|
||||||
[47.614152, "o", "\b: "]
|
|
||||||
[47.812179, "o", "T"]
|
|
||||||
[47.892206, "o", "h"]
|
|
||||||
[48.044315, "o", "a"]
|
|
||||||
[48.102131, "o", "n"]
|
|
||||||
[48.202197, "o", "k"]
|
|
||||||
[48.320023, "o", "s"]
|
|
||||||
[48.460466, "o", " "]
|
|
||||||
[48.540361, "o", "f"]
|
|
||||||
[48.618256, "o", "o"]
|
|
||||||
[48.718252, "o", "r"]
|
|
||||||
[48.778222, "o", " "]
|
|
||||||
[49.134702, "o", "w"]
|
|
||||||
[49.234434, "o", "a"]
|
|
||||||
[49.310933, "o", "t"]
|
|
||||||
[49.596789, "o", "c"]
|
|
||||||
[49.734453, "o", "h"]
|
|
||||||
[49.834509, "o", "i"]
|
|
||||||
[49.952548, "o", "n"]
|
|
||||||
[50.03251, "o", "g"]
|
|
||||||
[50.352787, "o", "!"]
|
|
||||||
[50.909101, "o", "\u001b[?2004l\r\r\n"]
|
|
||||||
[50.914851, "o", "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r"]
|
|
||||||
[50.916752, "o", "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[44mbalki@archlinux\u001b[49m \u001b[1m\u001b[32m~/projects/mine/vimfun/stt\r\n\r\u001b[37m % \u001b[0m\u001b[37m\u001b[39m\u001b[49m\u001b[K\u001b[?2004h"]
|
|
||||||
[51.490522, "o", "\u001b[?2004l\r\r\n"]
|
|
35
templates/index.tmpl.html
Normal file
35
templates/index.tmpl.html
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline' data: ;">
|
||||||
|
<meta http-equiv="refresh" content="5000" >
|
||||||
|
|
||||||
|
<title></title>
|
||||||
|
|
||||||
|
<!-- Diable favicon requests: https://stackoverflow.com/a/13416784 -->
|
||||||
|
<link rel="icon" href="data:;base64,iVBORw0KGgo=">
|
||||||
|
<link href="assets/bootstrap.min.css" rel="stylesheet" >
|
||||||
|
|
||||||
|
<script src="assets/bootstrap.min.js" defer></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<ul class="nav">
|
||||||
|
<li class="nav-item"><a class="nav-link" href="/"> Home </a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="https://blog.balki.me"> Blog </a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="/stuff.html"> Stuff </a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="https://gitea.balki.me/balki/blog"> Source </a></li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<div class="container" >
|
||||||
|
<main>
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
12
wtmp/barf/.build.yml
Normal file
12
wtmp/barf/.build.yml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
image: debian/stable
|
||||||
|
oauth: pages.sr.ht/PAGES:RW
|
||||||
|
environment:
|
||||||
|
site: barf.bt.ht
|
||||||
|
sources:
|
||||||
|
- https://git.sr.ht/~bt/barf
|
||||||
|
tasks:
|
||||||
|
- package: |
|
||||||
|
cd barf/build
|
||||||
|
tar -cvz . > ../../site.tar.gz
|
||||||
|
- upload: |
|
||||||
|
acurl -f https://pages.sr.ht/publish/$site -Fcontent=@site.tar.gz
|
21
wtmp/barf/LICENSE
Normal file
21
wtmp/barf/LICENSE
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2023 Bradley Taunt
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
13
wtmp/barf/Makefile
Normal file
13
wtmp/barf/Makefile
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
build:
|
||||||
|
./barf
|
||||||
|
rsync -r public/ build/public
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf build/*
|
||||||
|
|
||||||
|
watch:
|
||||||
|
while true; do \
|
||||||
|
ls -d .git/* * posts/* pages/* header.html | entr -cd make ;\
|
||||||
|
done
|
||||||
|
|
||||||
|
.PHONY: build clean watch
|
127
wtmp/barf/README.md
Normal file
127
wtmp/barf/README.md
Normal file
@ -0,0 +1,127 @@
|
|||||||
|
# barf
|
||||||
|
|
||||||
|
barf is an extremely minimal blog generator.
|
||||||
|
|
||||||
|
The entire build script is less than 100 lines of shell.
|
||||||
|
|
||||||
|
It could *almost* be called "suckless", but probably isn't.
|
||||||
|
|
||||||
|
(barf is a modified/forked version of Karl Bartel's fantastic [blog.sh](https://github.com/karlb/karl.berlin). Be sure to check it out since my version does things slightly different.)
|
||||||
|
|
||||||
|
You can see a [live demo here](https://barf.bt.ht)
|
||||||
|
|
||||||
|
## Why 'barf'?
|
||||||
|
|
||||||
|
> **barf**
|
||||||
|
>
|
||||||
|
> Blogs Are Really Fun
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Core Features
|
||||||
|
|
||||||
|
- Extremely portable
|
||||||
|
- Automatic, **valid** RSS generation
|
||||||
|
- Handles both blog posts and normal pages
|
||||||
|
- No front matter or templating, just create markdown files
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
- rsync
|
||||||
|
- smu (see below)
|
||||||
|
- entr (optonal)
|
||||||
|
- standard UNIX tools
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Basic Setup
|
||||||
|
|
||||||
|
Clone this repo and navigate inside it. Edit the "header.html" and "footer.html" files with your own information, navigation, etc.
|
||||||
|
|
||||||
|
Be sure to edit the **RSS meta url** or else your feed won't validate!
|
||||||
|
|
||||||
|
Then, clone and build my patched version of smu:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
git clone https://git.sr.ht/~bt/smu
|
||||||
|
cd smu
|
||||||
|
sudo make install
|
||||||
|
```
|
||||||
|
|
||||||
|
Then clone this directory and build:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
make build
|
||||||
|
```
|
||||||
|
|
||||||
|
Your blog content will be in the `build` directory.
|
||||||
|
|
||||||
|
Now you can delete the dummy posts/pages and start making your own!
|
||||||
|
|
||||||
|
Media (such as images, videos) are placed in the "public" folder and carried over to the "build" folder via rsync. You can easily remove this altogether inside the main `barf` script if you plan to store media elsewhere (or not use any at all).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Post Structure
|
||||||
|
|
||||||
|
The first line of any markdown file inside your `posts` directory should start
|
||||||
|
with a h1 heading, then a line break, then the date in `YYYY-MM-DD` format.
|
||||||
|
Like so:
|
||||||
|
|
||||||
|
```
|
||||||
|
# This is the Post Title
|
||||||
|
|
||||||
|
2023-01-05
|
||||||
|
```
|
||||||
|
|
||||||
|
Changing this structure or date format will break things or require you to edit
|
||||||
|
the `barf` script accordingly.
|
||||||
|
|
||||||
|
## Projects Goals
|
||||||
|
|
||||||
|
- The core focus should be to **reduce** the code of this project, not increase it. Overall scope needs to remain small.
|
||||||
|
- Major tweaks/add-ons should be run by individuals via forks/patches - not put into the barf base
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Submitting Patches
|
||||||
|
|
||||||
|
Please use the official [mailing list](https://lists.sr.ht/~bt/barf) to submit
|
||||||
|
your patches or bug fixes. Thanks!
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Running on MacOS
|
||||||
|
|
||||||
|
Please refer to the [main tutorial on setting up barf on MacOS](https://barf.bt.ht/macos)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## FAQs
|
||||||
|
|
||||||
|
### How do I test locally?
|
||||||
|
|
||||||
|
Inside your project directory run:
|
||||||
|
|
||||||
|
```
|
||||||
|
make watch
|
||||||
|
cd build && python3 -m http.server 3003
|
||||||
|
```
|
||||||
|
|
||||||
|
### Do you plan to add "X"? Can *I* add "X"?
|
||||||
|
|
||||||
|
Most likely not. I'm happy with how things are currently. If you want to add something - great! The point of this project is to give others the ability to fork it, tweak it, patch it, and share it as much as they'd like. The core of barf will remain minimal for this reason.
|
||||||
|
|
||||||
|
Of course, any patches that can help *reduce* the project's footprint or even speed things up are more than welcome!
|
||||||
|
|
||||||
|
### Can I use other Markdown parsers?
|
||||||
|
|
||||||
|
Of course! Simply edit the main `barf` script and swap out `smu` with something else. I wouldn't advise doing this if you already have pre-existing content based-off `smu`, since this could break some of your pages.
|
||||||
|
|
||||||
|
But give [smu](https://git.sr.ht/~bt/smu) a try - it is very lightweight and fast!
|
||||||
|
|
||||||
|
```
|
||||||
|
MORE FAQs TO COME...
|
||||||
|
```
|
101
wtmp/barf/barf
Executable file
101
wtmp/barf/barf
Executable file
@ -0,0 +1,101 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -eu
|
||||||
|
MARKDOWN=smu
|
||||||
|
IFS=' '
|
||||||
|
|
||||||
|
# Create tab separated file with filename, title, creation date, last update
|
||||||
|
index_tsv() {
|
||||||
|
for f in "$1"/*.md
|
||||||
|
do
|
||||||
|
title=$(sed -n '/^# /{s/# //p; q}' "$f")
|
||||||
|
printf '%s\t%s\t%s\t%s\n' "$f" "${title:="No Title"}"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
index_html() {
|
||||||
|
# Print header
|
||||||
|
title=$(sed -n '/^# /{s/# //p; q}' index.md)
|
||||||
|
sed "s/{{TITLE}}/$title/" header.html
|
||||||
|
|
||||||
|
# Intro text
|
||||||
|
$MARKDOWN index.md
|
||||||
|
|
||||||
|
# Posts
|
||||||
|
while read -r f title created; do
|
||||||
|
link=$(echo "$f" | sed -E 's|.*/(.*).md|\1/|')
|
||||||
|
created=$(echo $(head -3 "$f" | tail -1))
|
||||||
|
echo "<span class='created'>$created — <a href=\"$link\">$title</a></span>"
|
||||||
|
done < "$1" | sort -r
|
||||||
|
|
||||||
|
# Print footer after post list
|
||||||
|
cat footer.html
|
||||||
|
}
|
||||||
|
|
||||||
|
atom_xml() {
|
||||||
|
uri=$(sed -rn '/atom.xml/ s/.*href="([^"]*)".*/\1/ p' header.html)
|
||||||
|
domain=$(echo "$uri" | sed 's/atom.xml//g' | sed 's|/[^/]*$||')
|
||||||
|
first_commit_date=$(git log --pretty='format:%ai' . | cut -d ' ' -f1 | tail -1)
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||||
|
<title>$(sed -n '/^# /{s/# //p; q}' index.md)</title>
|
||||||
|
<link href="$domain/atom.xml" rel="self" />
|
||||||
|
<updated>$(date +%FT%TZ)</updated>
|
||||||
|
<author>
|
||||||
|
<name>$(git config user.name)</name>
|
||||||
|
</author>
|
||||||
|
<id>$domain,$first_commit_date:default-atom-feed/</id>
|
||||||
|
EOF
|
||||||
|
|
||||||
|
while read -r f title created; do
|
||||||
|
|
||||||
|
content=$($MARKDOWN "$f" | sed 's/&/\&/g; s/</\</g; s/>/\>/g; s/"/\"/g; s/'"'"'/\'/g')
|
||||||
|
post_link=$(echo "$f" | sed -E 's|posts/(.*).md|\1|')
|
||||||
|
basic_date=$(echo $(head -3 "$f" | tail -1))
|
||||||
|
published_date=$(date -d $basic_date +%FT%TZ)
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
<entry>
|
||||||
|
<title>$title</title>
|
||||||
|
<content type="html">$content</content>
|
||||||
|
<link href="$domain/$post_link"/>
|
||||||
|
<id>$domain/$post_link</id>
|
||||||
|
<updated>$published_date</updated>
|
||||||
|
<published>$published_date</published>
|
||||||
|
</entry>
|
||||||
|
EOF
|
||||||
|
done < "$1"
|
||||||
|
|
||||||
|
echo '</feed>'
|
||||||
|
}
|
||||||
|
|
||||||
|
write_page() {
|
||||||
|
filename=$1
|
||||||
|
directory=$(echo $(basename "$filename" .md))
|
||||||
|
$(mkdir -p build/$directory)
|
||||||
|
target=$(echo "$filename" | sed -r 's|\w+/(.*).md|build/\1/index.html|')
|
||||||
|
created=$(echo $(head -3 "$filename" | tail -1))
|
||||||
|
title=$2
|
||||||
|
|
||||||
|
$MARKDOWN "$filename" | \
|
||||||
|
cat header.html - |\
|
||||||
|
sed "s|{{TITLE}}|$title|" \
|
||||||
|
> "$target" && cat footer.html >> "$target"
|
||||||
|
}
|
||||||
|
|
||||||
|
rm -fr build && mkdir build
|
||||||
|
|
||||||
|
# Blog posts
|
||||||
|
index_tsv posts | sort -rt " " -k 3 > build/posts.tsv
|
||||||
|
index_html build/posts.tsv > build/index.html
|
||||||
|
atom_xml build/posts.tsv > build/atom.xml
|
||||||
|
while read -r f title created; do
|
||||||
|
write_page "$f" "$title" "$created"
|
||||||
|
done < build/posts.tsv
|
||||||
|
|
||||||
|
# Pages
|
||||||
|
index_tsv pages > build/pages.tsv
|
||||||
|
while read -r f title created; do
|
||||||
|
write_page "$f" "$title" "$created"
|
||||||
|
done < build/pages.tsv
|
130
wtmp/barf/build/about/index.html
Normal file
130
wtmp/barf/build/about/index.html
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="color-scheme" content="dark light">
|
||||||
|
<link rel="icon" href="data:,">
|
||||||
|
<title>About `barf`</title>
|
||||||
|
<link href="https://barf.bt.ht/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" />
|
||||||
|
<style>
|
||||||
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
font-family: sans-serif;
|
||||||
|
line-height: 1.45;
|
||||||
|
margin: 0 auto;
|
||||||
|
max-width: 45rem;
|
||||||
|
padding: 0 15px;
|
||||||
|
}
|
||||||
|
hr {
|
||||||
|
background-color: grey;
|
||||||
|
border: 0;
|
||||||
|
height: 1px;
|
||||||
|
margin: 2rem 0;
|
||||||
|
}
|
||||||
|
nav {
|
||||||
|
margin: 2rem 0 0;
|
||||||
|
}
|
||||||
|
main {
|
||||||
|
hyphens: auto;
|
||||||
|
}
|
||||||
|
main p {
|
||||||
|
margin: 1rem;
|
||||||
|
}
|
||||||
|
h1,h2,h3,h4 {
|
||||||
|
margin: 2rem 0 0;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
h1 + p {
|
||||||
|
margin: 0 0 1rem;
|
||||||
|
}
|
||||||
|
span.created {
|
||||||
|
display: block;
|
||||||
|
margin: 4px 15px;
|
||||||
|
}
|
||||||
|
img {
|
||||||
|
border: 1px solid lightgrey;
|
||||||
|
height: auto;
|
||||||
|
max-width: 100%;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
blockquote {
|
||||||
|
border: 1px solid;
|
||||||
|
border-left: 6px solid;
|
||||||
|
margin: 2rem 0;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
blockquote p {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
figure {
|
||||||
|
margin: 2rem 0;
|
||||||
|
}
|
||||||
|
figcaption {
|
||||||
|
color: slategrey;
|
||||||
|
}
|
||||||
|
code {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 0.1rem 0.3rem;
|
||||||
|
tab-size: 4;
|
||||||
|
}
|
||||||
|
pre {
|
||||||
|
border: 1px solid;
|
||||||
|
}
|
||||||
|
pre code {
|
||||||
|
border: 0;
|
||||||
|
display: block;
|
||||||
|
overflow-x: auto;
|
||||||
|
padding: 0.3rem 0.6rem;
|
||||||
|
}
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
margin: 2rem 0;
|
||||||
|
text-align: left;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
tr {
|
||||||
|
border-bottom: 1px solid lightgrey;
|
||||||
|
}
|
||||||
|
tr:nth-of-type(odd) td {
|
||||||
|
background-color: #f8f8f8;
|
||||||
|
}
|
||||||
|
th,td {
|
||||||
|
padding: 6px;
|
||||||
|
}
|
||||||
|
footer {
|
||||||
|
border-top: 1px dashed grey;
|
||||||
|
margin: 2rem 0;
|
||||||
|
padding: 1rem 15px;
|
||||||
|
}
|
||||||
|
@supports (color-scheme: dark light) {
|
||||||
|
@media screen and (prefers-color-scheme: dark) {
|
||||||
|
a:link {color: #9e9eff;}
|
||||||
|
a:visited {color: #d0adf0;}
|
||||||
|
a:active {color: red;}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<a href="/">Home</a><span> | </span><a href="/about">About</a><span> | </span><a href="/websites">Websites</a><span> | </span><a href="https://git.sr.ht/~bt/barf">Source Code</a>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<h1>About <code>barf</code></h1>
|
||||||
|
<p>barf is a minimal and suckless-inspired blog generator. It is a tweaked and slightly patched version of Karl Bartel's fantastic <a href="https://github.com/karlb/karl.berlin">blog.sh</a>.</p>
|
||||||
|
<h2>Why?</h2>
|
||||||
|
<p>This project was created by me, <a href="https://bt.ht">Bradley Taunt</a>, out of frustration with overly complex and bloated blogging options. I tried <em>so many</em> "minimal" generators but each one ended up having some glaring issue or heavy reliance on dependencies. </p>
|
||||||
|
<p>I wanted to have a system that I could easily replicate on any Linux machine. Something that didn't require me to download half the internet just to get up and running. I'm a sucker for keeping things simple.</p>
|
||||||
|
<footer role="contentinfo">
|
||||||
|
<span><a href="#">↑ Back to Top</a></span><br><br>
|
||||||
|
<small>
|
||||||
|
Built with <a href="https://git.sr.ht/~bt/barf">barf</a>. <br>
|
||||||
|
The <a href="https://git.sr.ht/~bt/barf">code for this site</a> is <a href="https://git.sr.ht/~bt/barf/tree/master/item/LICENSE">MIT</a>.
|
||||||
|
</small>
|
||||||
|
</footer>
|
294
wtmp/barf/build/atom.xml
Normal file
294
wtmp/barf/build/atom.xml
Normal file
@ -0,0 +1,294 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||||
|
<title>barf</title>
|
||||||
|
<link href="https://barf.bt.ht/atom.xml" rel="self" />
|
||||||
|
<updated>2023-03-09T10:53:26Z</updated>
|
||||||
|
<author>
|
||||||
|
<name>Bradley Taunt</name>
|
||||||
|
</author>
|
||||||
|
<id>https://barf.bt.ht,2023-01-04:default-atom-feed/</id>
|
||||||
|
<entry>
|
||||||
|
<title>Markdown Examples in barf</title>
|
||||||
|
<content type="html"><h1>Markdown Examples in barf</h1>
|
||||||
|
<p>2023-01-05</p>
|
||||||
|
<p>This following was lifted from <a href="https://github.com/karlb/smu">https://github.com/karlb/smu</a></p>
|
||||||
|
<h1><code>smu</code> Syntax</h1>
|
||||||
|
<p>smu was started as a rewrite of
|
||||||
|
<a href="http://daringfireball.net/projects/markdown/">markdown</a> but became something
|
||||||
|
more lightweight and consistent. It differs from <a href="https://commonmark.org/">CommonMark</a> in the following ways:</p>
|
||||||
|
<ul>
|
||||||
|
<li>No support for <em>reference style links</em></li>
|
||||||
|
<li>Stricter indentation rules for lists</li>
|
||||||
|
<li>Lists don't end paragraphs by themselves (blank line needed)</li>
|
||||||
|
<li>Horizontal rules (<code>&lt;hr&gt;</code>) must use <code>- - -</code> as syntax</li>
|
||||||
|
<li>Code fences have stricter syntax</li>
|
||||||
|
</ul>
|
||||||
|
<p>Patches that increase the CommonMark compatibility are welcome as long as they don't increase the code complexity significantly.</p>
|
||||||
|
<p>This project is a fork of the <a href="https://github.com/gottox/smu">original smu</a> by
|
||||||
|
<a href="https://eboland.de">Enno Boland (gottox)</a>. The main differences to the
|
||||||
|
original smu are:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Support for code fences</li>
|
||||||
|
<li>Improved <a href="https://commonmark.org/">CommonMark</a> compatibility. E.g.
|
||||||
|
<ul>
|
||||||
|
<li>Code blocks need four spaces indentation instead of three</li>
|
||||||
|
<li>Skip empty lines at end of code blocks</li>
|
||||||
|
<li>Ignore single spaces around code spans</li>
|
||||||
|
<li>Keep HTML comments in output</li>
|
||||||
|
<li>Improved spec compliance for lists</li>
|
||||||
|
<li>Nesting code block in blockquotes works</li>
|
||||||
|
<li>"Empty" lines in lists behave identically, no matter how much whitespace they contain</li>
|
||||||
|
<li>No backslash escapes in code blocks</li>
|
||||||
|
<li>Use first number as start number for ordered lists</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>Added a simple test suite to check for compliance and avoid regressions</li>
|
||||||
|
</ul>
|
||||||
|
<h2>Inline patterns</h2>
|
||||||
|
<p>There are several patterns you can use to highlight your text:</p>
|
||||||
|
<ul>
|
||||||
|
<li><p>Emphasis</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>Surround your text with <code>*</code> or <code>_</code> to get <em>emphasised</em> text:
|
||||||
|
<pre><code>This *is* cool.
|
||||||
|
This _is_ cool, too.
|
||||||
|
</code></pre>
|
||||||
|
</li>
|
||||||
|
<li>Surround your text with <code>**</code> or <code>__</code> to get <strong>strong</strong> text:
|
||||||
|
<pre><code>This **is** cool.
|
||||||
|
This __is__ cool, too.
|
||||||
|
</code></pre>
|
||||||
|
</li>
|
||||||
|
<li>Surround your text with <code>***</code> or <code>___</code> to get <strong><em>strong and emphasised</em></strong> text:
|
||||||
|
<pre><code>This ***is*** cool.
|
||||||
|
This ___is___ cool, too.
|
||||||
|
</code></pre>
|
||||||
|
</li>
|
||||||
|
<li>But this example won't work as expected:
|
||||||
|
<pre><code>***Hello** you*
|
||||||
|
</code></pre>
|
||||||
|
<p>This is a wontfix bug because it would make the source too complex.
|
||||||
|
Use this instead:
|
||||||
|
</p>
|
||||||
|
<pre><code>***Hello*** *you*
|
||||||
|
</code></pre>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li><p>inline Code</p>
|
||||||
|
<p>You can produce inline code by surrounding it with backticks.</p>
|
||||||
|
<pre><code>Use `rm -rf /` if you're a N00b.
|
||||||
|
Use ``rm -rf /`` if you're a N00b.
|
||||||
|
Use ```rm -rf /``` if you're a N00b.
|
||||||
|
</code></pre>
|
||||||
|
<p>Double and triple backticks can be used if the code itself contains backticks.</p>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<h2>Titles</h2>
|
||||||
|
<p>Creating titles in smu is very easy. There are two different syntax styles. The
|
||||||
|
first is underlining with at least three characters:</p>
|
||||||
|
<pre><code>Heading
|
||||||
|
=======
|
||||||
|
|
||||||
|
Topic
|
||||||
|
-----
|
||||||
|
</code></pre>
|
||||||
|
<p>This is very intuitive and self explaining. The resulting sourcecode looks like
|
||||||
|
this:</p>
|
||||||
|
<pre><code>&lt;h1&gt;Heading&lt;/h1&gt;
|
||||||
|
&lt;h2&gt;Topic&lt;/h2&gt;
|
||||||
|
</code></pre>
|
||||||
|
<p>Use the following prefixes if you don't like underlining:</p>
|
||||||
|
<pre><code># h1
|
||||||
|
## h2
|
||||||
|
### h3
|
||||||
|
#### h4
|
||||||
|
##### h5
|
||||||
|
###### h6
|
||||||
|
</code></pre>
|
||||||
|
<h2>Links</h2>
|
||||||
|
<p>The simplest way to define a link is with simple <code>&lt;&gt;</code>.</p>
|
||||||
|
<pre><code>&lt;http://s01.de&gt;
|
||||||
|
</code></pre>
|
||||||
|
<p>You can do the same for E-Mail addresses:</p>
|
||||||
|
<pre><code>&lt;yourname@s01.de&gt;
|
||||||
|
</code></pre>
|
||||||
|
<p>If you want to define a label for the url, you have to use a different syntax</p>
|
||||||
|
<pre><code>[smu - simple mark up](http://s01.de/~gottox/index.cgi/proj_smu)
|
||||||
|
</code></pre>
|
||||||
|
<p>The resulting HTML-Code</p>
|
||||||
|
<pre><code>&lt;a href=&quot;http://s01.de/~gottox/index.cgi/proj_smu&quot;&gt;smu - simple mark up&lt;/a&gt;&lt;/p&gt;
|
||||||
|
</code></pre>
|
||||||
|
<h2>Lists</h2>
|
||||||
|
<p>Defining lists is very straightforward:</p>
|
||||||
|
<pre><code>* Item 1
|
||||||
|
* Item 2
|
||||||
|
* Item 3
|
||||||
|
</code></pre>
|
||||||
|
<p>Result:</p>
|
||||||
|
<pre><code>&lt;ul&gt;
|
||||||
|
&lt;li&gt;Item 1&lt;/li&gt;
|
||||||
|
&lt;li&gt;Item 2&lt;/li&gt;
|
||||||
|
&lt;li&gt;Item 3&lt;/li&gt;
|
||||||
|
&lt;/ul&gt;
|
||||||
|
</code></pre>
|
||||||
|
<p>Defining ordered lists is also very easy:</p>
|
||||||
|
<pre><code>1. Item 1
|
||||||
|
2. Item 2
|
||||||
|
3. Item 3
|
||||||
|
</code></pre>
|
||||||
|
<p>Only the first number in a list is meaningful. All following list items are
|
||||||
|
continously counted. If you want a list starting at 2, you could write:</p>
|
||||||
|
<pre><code>2. Item 1
|
||||||
|
2. Item 2
|
||||||
|
2. Item 3
|
||||||
|
</code></pre>
|
||||||
|
<p>and get the following HTML which will render with the numbers 2, 3, 4:</p>
|
||||||
|
<pre><code>&lt;ol start=&quot;2&quot;&gt;
|
||||||
|
&lt;li&gt;Item 1&lt;/li&gt;
|
||||||
|
&lt;li&gt;Item 2&lt;/li&gt;
|
||||||
|
&lt;li&gt;Item 3&lt;/li&gt;
|
||||||
|
&lt;/ol&gt;
|
||||||
|
</code></pre>
|
||||||
|
<h2>Code &amp; Blockquote</h2>
|
||||||
|
<p>Use the <code>&gt; </code> as a line prefix for defining blockquotes. Blockquotes are
|
||||||
|
interpreted as well. This makes it possible to embed links, headings and even
|
||||||
|
other quotes into a quote:</p>
|
||||||
|
<pre><code>&gt; Hello
|
||||||
|
&gt; This is a quote with a [link](http://s01.de/~gottox)
|
||||||
|
</code></pre>
|
||||||
|
<p>Result:
|
||||||
|
</p>
|
||||||
|
<pre><code>&lt;blockquote&gt;&lt;p&gt;
|
||||||
|
Hello
|
||||||
|
This is a quote with a &lt;a href=&quot;http://s01.de/~gottox&quot;&gt;link&lt;/a&gt;&lt;/p&gt;
|
||||||
|
&lt;/blockquote&gt;
|
||||||
|
</code></pre>
|
||||||
|
<p>You can define a code block with a leading Tab or with <strong>4</strong> leading spaces</p>
|
||||||
|
<pre><code> this.is(code)
|
||||||
|
|
||||||
|
this.is(code, too)
|
||||||
|
</code></pre>
|
||||||
|
<p>Result:
|
||||||
|
</p>
|
||||||
|
<pre><code>&lt;pre&gt;&lt;code&gt;this.is(code)&lt;/code&gt;&lt;/pre&gt;
|
||||||
|
&lt;pre&gt;&lt;code&gt;this.is(code, too)
|
||||||
|
&lt;/code&gt;&lt;/pre&gt;
|
||||||
|
</code></pre>
|
||||||
|
<p>Please note that you can't use HTML or smu syntax in a code block.</p>
|
||||||
|
<p>Another way to write code blocks is to use code fences:</p>
|
||||||
|
<pre><code>```json
|
||||||
|
{&quot;some&quot;: &quot;code&quot;}
|
||||||
|
```
|
||||||
|
</code></pre>
|
||||||
|
<p>This has two advantages:</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>The optional language identifier will be turned into a <code>language-</code> class name</li>
|
||||||
|
<li>You can keep the original indentation which helps when doing copy &amp; paste</li>
|
||||||
|
</ul>
|
||||||
|
<h2>Tables</h2>
|
||||||
|
<p>Tables can be generated with the following syntax:</p>
|
||||||
|
<pre><code>| Heading1 | Heading2 |
|
||||||
|
| -------- | -------- |
|
||||||
|
| Cell 1 | Cell2 |
|
||||||
|
</code></pre>
|
||||||
|
<p>Aligning the columns make the input nicer to read, but is not necessary to get
|
||||||
|
correct table output. You could just write</p>
|
||||||
|
<pre><code>| Heading1 | Heading2 |
|
||||||
|
| --- | --- |
|
||||||
|
| Cell 1 | Cell2 |
|
||||||
|
</code></pre>
|
||||||
|
<p>To align the content of table cells, use <code>|:--|</code> for left, <code>|--:|</code> for right
|
||||||
|
and <code>|:--:|</code> for centered alignment in the row which separates the header from
|
||||||
|
the table body.</p>
|
||||||
|
<pre><code>| Heading1 | Heading2 | Heading3 |
|
||||||
|
| :------- | :------: | -------: |
|
||||||
|
| Left | Center | Right |
|
||||||
|
</code></pre>
|
||||||
|
<h2>Other interesting stuff</h2>
|
||||||
|
<ul>
|
||||||
|
<li><p>to insert a horizontal rule simple add <code>- - -</code> into an empty line:</p>
|
||||||
|
<pre><code>Hello
|
||||||
|
- - -
|
||||||
|
Hello2
|
||||||
|
</code></pre>
|
||||||
|
<p>Result:
|
||||||
|
</p>
|
||||||
|
<pre><code>&lt;p&gt;
|
||||||
|
Hello
|
||||||
|
&lt;hr /&gt;
|
||||||
|
</code></pre>
|
||||||
|
<pre><code>Hello2&lt;/p&gt;
|
||||||
|
</code></pre>
|
||||||
|
</li>
|
||||||
|
<li><p>Any ASCII punctuation character may escaped by precedeing them with a
|
||||||
|
backslash to avoid them being interpreted:</p>
|
||||||
|
<pre><code>!&quot;#$%&amp;'()*+,-./:;&lt;=&gt;?@[]^_`{|}~\
|
||||||
|
</code></pre>
|
||||||
|
</li>
|
||||||
|
<li><p>To force a linebreak simple add two spaces to the end of the line:</p>
|
||||||
|
<pre><code>No linebreak
|
||||||
|
here.
|
||||||
|
But here is
|
||||||
|
one.
|
||||||
|
</code></pre>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<h2>embed HTML</h2>
|
||||||
|
<p>You can include arbitrary HTML code in your documents. The HTML will be
|
||||||
|
passed through to the resulting document without modification. This is a good
|
||||||
|
way to work around features that are missing in smu. If you don't want this
|
||||||
|
behaviour, use the <code>-n</code> flag when executing smu to stricly escape the HTML
|
||||||
|
tags.</p></content>
|
||||||
|
<link href="https://barf.bt.ht/markdown-examples"/>
|
||||||
|
<id>https://barf.bt.ht/markdown-examples</id>
|
||||||
|
<updated>2023-01-05T00:00:00Z</updated>
|
||||||
|
<published>2023-01-05T00:00:00Z</published>
|
||||||
|
</entry>
|
||||||
|
<entry>
|
||||||
|
<title>Running `barf` on MacOS</title>
|
||||||
|
<content type="html"><h1>Running <code>barf</code> on MacOS</h1>
|
||||||
|
<p>2023-01-18</p>
|
||||||
|
<p>The <code>barf</code> project was built on Linux and was catered towards Linux users. The core of the project will remain focused on Linux/GNU tools, but that doesn't mean MacOS needs to be left out in the cold.</p>
|
||||||
|
<p>There are some very minor changes you'll need to make in the main <code>barf</code> script if you plan to run it on MacOS.</p>
|
||||||
|
<h2>Download Packages</h2>
|
||||||
|
<p>This walkthrough assumes that you already have <a href="https://brew.sh/">homebrew</a> installed on your machine.</p>
|
||||||
|
<p>You will need to install the GNU versions of both <code>date</code> and <code>sed</code> in order to avoid breaking things when <code>barf</code> tries to build.</p>
|
||||||
|
<pre><code>brew install coreutils
|
||||||
|
brew install gnu-sed
|
||||||
|
</code></pre>
|
||||||
|
<h2>The Script Tweaks</h2>
|
||||||
|
<p>Now open the main <code>barf</code> file in your project and replace all instances of <code>sed</code> with <code>gsed</code>.</p>
|
||||||
|
<p>Then change the following variable:</p>
|
||||||
|
<pre><code>published_date=$(date -d $basic_date +%FT%TZ)
|
||||||
|
</code></pre>
|
||||||
|
<p>to this:</p>
|
||||||
|
<pre><code>published_date=$(gdate -d $basic_date +%FT%TZ)
|
||||||
|
</code></pre>
|
||||||
|
<p>After that everything should work perfectly fine. There is probably a cleaner way to do this, but I like to keep things simple.</p></content>
|
||||||
|
<link href="https://barf.bt.ht/macos"/>
|
||||||
|
<id>https://barf.bt.ht/macos</id>
|
||||||
|
<updated>2023-01-18T00:00:00Z</updated>
|
||||||
|
<published>2023-01-18T00:00:00Z</published>
|
||||||
|
</entry>
|
||||||
|
<entry>
|
||||||
|
<title>Supporting Basic Dark Mode</title>
|
||||||
|
<content type="html"><h1>Supporting Basic Dark Mode</h1>
|
||||||
|
<p>2023-03-07</p>
|
||||||
|
<p>The default <code>barf</code> site generator now supports basic dark mode functionality. This has been achieved by including the standard <code>color-scheme</code> meta tag in the core <code>header.html</code> file:</p>
|
||||||
|
<pre><code>&lt;meta name=&quot;color-scheme&quot; content=&quot;dark light&quot;&gt;
|
||||||
|
</code></pre>
|
||||||
|
<p>This change also ships with some minor updates to the default <code>blockquote</code> design. You can see an example below:</p>
|
||||||
|
<blockquote><p>This is a really <em>cool</em> blockquote</p>
|
||||||
|
</blockquote>
|
||||||
|
<h2>Minor Caveat</h2>
|
||||||
|
<p>Unfortunately, Safari still has minor <code>ahref</code> / link color issue when defaulting to browser dark mode. If this is a problem for your own build of <code>barf</code>, take a look at a <a href="https://bt.ht/safari-default-dark-mode/">solution I wrote about here</a>.</p>
|
||||||
|
<p>Personally, I can't be bothered to add that extra code to this project. The Safari team needs to get their shit together and fix such a simple bug. Plus, you shouldn't be using Safari anyway - it's proprietary garbage.</p></content>
|
||||||
|
<link href="https://barf.bt.ht/dark-mode"/>
|
||||||
|
<id>https://barf.bt.ht/dark-mode</id>
|
||||||
|
<updated>2023-03-07T00:00:00Z</updated>
|
||||||
|
<published>2023-03-07T00:00:00Z</published>
|
||||||
|
</entry>
|
||||||
|
</feed>
|
136
wtmp/barf/build/dark-mode/index.html
Normal file
136
wtmp/barf/build/dark-mode/index.html
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="color-scheme" content="dark light">
|
||||||
|
<link rel="icon" href="data:,">
|
||||||
|
<title>Supporting Basic Dark Mode</title>
|
||||||
|
<link href="https://barf.bt.ht/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" />
|
||||||
|
<style>
|
||||||
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
font-family: sans-serif;
|
||||||
|
line-height: 1.45;
|
||||||
|
margin: 0 auto;
|
||||||
|
max-width: 45rem;
|
||||||
|
padding: 0 15px;
|
||||||
|
}
|
||||||
|
hr {
|
||||||
|
background-color: grey;
|
||||||
|
border: 0;
|
||||||
|
height: 1px;
|
||||||
|
margin: 2rem 0;
|
||||||
|
}
|
||||||
|
nav {
|
||||||
|
margin: 2rem 0 0;
|
||||||
|
}
|
||||||
|
main {
|
||||||
|
hyphens: auto;
|
||||||
|
}
|
||||||
|
main p {
|
||||||
|
margin: 1rem;
|
||||||
|
}
|
||||||
|
h1,h2,h3,h4 {
|
||||||
|
margin: 2rem 0 0;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
h1 + p {
|
||||||
|
margin: 0 0 1rem;
|
||||||
|
}
|
||||||
|
span.created {
|
||||||
|
display: block;
|
||||||
|
margin: 4px 15px;
|
||||||
|
}
|
||||||
|
img {
|
||||||
|
border: 1px solid lightgrey;
|
||||||
|
height: auto;
|
||||||
|
max-width: 100%;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
blockquote {
|
||||||
|
border: 1px solid;
|
||||||
|
border-left: 6px solid;
|
||||||
|
margin: 2rem 0;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
blockquote p {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
figure {
|
||||||
|
margin: 2rem 0;
|
||||||
|
}
|
||||||
|
figcaption {
|
||||||
|
color: slategrey;
|
||||||
|
}
|
||||||
|
code {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 0.1rem 0.3rem;
|
||||||
|
tab-size: 4;
|
||||||
|
}
|
||||||
|
pre {
|
||||||
|
border: 1px solid;
|
||||||
|
}
|
||||||
|
pre code {
|
||||||
|
border: 0;
|
||||||
|
display: block;
|
||||||
|
overflow-x: auto;
|
||||||
|
padding: 0.3rem 0.6rem;
|
||||||
|
}
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
margin: 2rem 0;
|
||||||
|
text-align: left;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
tr {
|
||||||
|
border-bottom: 1px solid lightgrey;
|
||||||
|
}
|
||||||
|
tr:nth-of-type(odd) td {
|
||||||
|
background-color: #f8f8f8;
|
||||||
|
}
|
||||||
|
th,td {
|
||||||
|
padding: 6px;
|
||||||
|
}
|
||||||
|
footer {
|
||||||
|
border-top: 1px dashed grey;
|
||||||
|
margin: 2rem 0;
|
||||||
|
padding: 1rem 15px;
|
||||||
|
}
|
||||||
|
@supports (color-scheme: dark light) {
|
||||||
|
@media screen and (prefers-color-scheme: dark) {
|
||||||
|
a:link {color: #9e9eff;}
|
||||||
|
a:visited {color: #d0adf0;}
|
||||||
|
a:active {color: red;}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<a href="/">Home</a><span> | </span><a href="/about">About</a><span> | </span><a href="/websites">Websites</a><span> | </span><a href="https://git.sr.ht/~bt/barf">Source Code</a>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<h1>Supporting Basic Dark Mode</h1>
|
||||||
|
<p>2023-03-07</p>
|
||||||
|
<p>The default <code>barf</code> site generator now supports basic dark mode functionality. This has been achieved by including the standard <code>color-scheme</code> meta tag in the core <code>header.html</code> file:</p>
|
||||||
|
<pre><code><meta name="color-scheme" content="dark light">
|
||||||
|
</code></pre>
|
||||||
|
<p>This change also ships with some minor updates to the default <code>blockquote</code> design. You can see an example below:</p>
|
||||||
|
<blockquote><p>This is a really <em>cool</em> blockquote</p>
|
||||||
|
</blockquote>
|
||||||
|
<h2>Minor Caveat</h2>
|
||||||
|
<p>Unfortunately, Safari still has minor <code>ahref</code> / link color issue when defaulting to browser dark mode. If this is a problem for your own build of <code>barf</code>, take a look at a <a href="https://bt.ht/safari-default-dark-mode/">solution I wrote about here</a>.</p>
|
||||||
|
<p>Personally, I can't be bothered to add that extra code to this project. The Safari team needs to get their shit together and fix such a simple bug. Plus, you shouldn't be using Safari anyway - it's proprietary garbage.</p>
|
||||||
|
<footer role="contentinfo">
|
||||||
|
<span><a href="#">↑ Back to Top</a></span><br><br>
|
||||||
|
<small>
|
||||||
|
Built with <a href="https://git.sr.ht/~bt/barf">barf</a>. <br>
|
||||||
|
The <a href="https://git.sr.ht/~bt/barf">code for this site</a> is <a href="https://git.sr.ht/~bt/barf/tree/master/item/LICENSE">MIT</a>.
|
||||||
|
</small>
|
||||||
|
</footer>
|
138
wtmp/barf/build/index.html
Normal file
138
wtmp/barf/build/index.html
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="color-scheme" content="dark light">
|
||||||
|
<link rel="icon" href="data:,">
|
||||||
|
<title>barf</title>
|
||||||
|
<link href="https://barf.bt.ht/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" />
|
||||||
|
<style>
|
||||||
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
font-family: sans-serif;
|
||||||
|
line-height: 1.45;
|
||||||
|
margin: 0 auto;
|
||||||
|
max-width: 45rem;
|
||||||
|
padding: 0 15px;
|
||||||
|
}
|
||||||
|
hr {
|
||||||
|
background-color: grey;
|
||||||
|
border: 0;
|
||||||
|
height: 1px;
|
||||||
|
margin: 2rem 0;
|
||||||
|
}
|
||||||
|
nav {
|
||||||
|
margin: 2rem 0 0;
|
||||||
|
}
|
||||||
|
main {
|
||||||
|
hyphens: auto;
|
||||||
|
}
|
||||||
|
main p {
|
||||||
|
margin: 1rem;
|
||||||
|
}
|
||||||
|
h1,h2,h3,h4 {
|
||||||
|
margin: 2rem 0 0;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
h1 + p {
|
||||||
|
margin: 0 0 1rem;
|
||||||
|
}
|
||||||
|
span.created {
|
||||||
|
display: block;
|
||||||
|
margin: 4px 15px;
|
||||||
|
}
|
||||||
|
img {
|
||||||
|
border: 1px solid lightgrey;
|
||||||
|
height: auto;
|
||||||
|
max-width: 100%;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
blockquote {
|
||||||
|
border: 1px solid;
|
||||||
|
border-left: 6px solid;
|
||||||
|
margin: 2rem 0;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
blockquote p {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
figure {
|
||||||
|
margin: 2rem 0;
|
||||||
|
}
|
||||||
|
figcaption {
|
||||||
|
color: slategrey;
|
||||||
|
}
|
||||||
|
code {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 0.1rem 0.3rem;
|
||||||
|
tab-size: 4;
|
||||||
|
}
|
||||||
|
pre {
|
||||||
|
border: 1px solid;
|
||||||
|
}
|
||||||
|
pre code {
|
||||||
|
border: 0;
|
||||||
|
display: block;
|
||||||
|
overflow-x: auto;
|
||||||
|
padding: 0.3rem 0.6rem;
|
||||||
|
}
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
margin: 2rem 0;
|
||||||
|
text-align: left;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
tr {
|
||||||
|
border-bottom: 1px solid lightgrey;
|
||||||
|
}
|
||||||
|
tr:nth-of-type(odd) td {
|
||||||
|
background-color: #f8f8f8;
|
||||||
|
}
|
||||||
|
th,td {
|
||||||
|
padding: 6px;
|
||||||
|
}
|
||||||
|
footer {
|
||||||
|
border-top: 1px dashed grey;
|
||||||
|
margin: 2rem 0;
|
||||||
|
padding: 1rem 15px;
|
||||||
|
}
|
||||||
|
@supports (color-scheme: dark light) {
|
||||||
|
@media screen and (prefers-color-scheme: dark) {
|
||||||
|
a:link {color: #9e9eff;}
|
||||||
|
a:visited {color: #d0adf0;}
|
||||||
|
a:active {color: red;}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<a href="/">Home</a><span> | </span><a href="/about">About</a><span> | </span><a href="/websites">Websites</a><span> | </span><a href="https://git.sr.ht/~bt/barf">Source Code</a>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<h1>barf</h1>
|
||||||
|
<p><strong>barf is an extremely minimal blog generator.</strong></p>
|
||||||
|
<p>The entire build script is less than 100 lines of shell.</p>
|
||||||
|
<p>It could almost be called "suckless", but probably isn't. It was created for those focused on writing, not tinkering.</p>
|
||||||
|
<p>You can learn more by reading the <a href="https://git.sr.ht/~bt/barf">official README</a>.</p>
|
||||||
|
<p>You can also view the generated <a href="/atom.xml">Atom feed here</a></p>
|
||||||
|
<blockquote><p><strong>barf</strong></p>
|
||||||
|
<p>Blogs Are Really Fun</p>
|
||||||
|
</blockquote>
|
||||||
|
<hr />
|
||||||
|
<span class='created'>2023-03-07 — <a href="dark-mode/">Supporting Basic Dark Mode</a></span>
|
||||||
|
<span class='created'>2023-01-18 — <a href="macos/">Running `barf` on MacOS</a></span>
|
||||||
|
<span class='created'>2023-01-05 — <a href="markdown-examples/">Markdown Examples in barf</a></span>
|
||||||
|
<footer role="contentinfo">
|
||||||
|
<span><a href="#">↑ Back to Top</a></span><br><br>
|
||||||
|
<small>
|
||||||
|
Built with <a href="https://git.sr.ht/~bt/barf">barf</a>. <br>
|
||||||
|
The <a href="https://git.sr.ht/~bt/barf">code for this site</a> is <a href="https://git.sr.ht/~bt/barf/tree/master/item/LICENSE">MIT</a>.
|
||||||
|
</small>
|
||||||
|
</footer>
|
144
wtmp/barf/build/macos/index.html
Normal file
144
wtmp/barf/build/macos/index.html
Normal file
@ -0,0 +1,144 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="color-scheme" content="dark light">
|
||||||
|
<link rel="icon" href="data:,">
|
||||||
|
<title>Running `barf` on MacOS</title>
|
||||||
|
<link href="https://barf.bt.ht/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" />
|
||||||
|
<style>
|
||||||
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
font-family: sans-serif;
|
||||||
|
line-height: 1.45;
|
||||||
|
margin: 0 auto;
|
||||||
|
max-width: 45rem;
|
||||||
|
padding: 0 15px;
|
||||||
|
}
|
||||||
|
hr {
|
||||||
|
background-color: grey;
|
||||||
|
border: 0;
|
||||||
|
height: 1px;
|
||||||
|
margin: 2rem 0;
|
||||||
|
}
|
||||||
|
nav {
|
||||||
|
margin: 2rem 0 0;
|
||||||
|
}
|
||||||
|
main {
|
||||||
|
hyphens: auto;
|
||||||
|
}
|
||||||
|
main p {
|
||||||
|
margin: 1rem;
|
||||||
|
}
|
||||||
|
h1,h2,h3,h4 {
|
||||||
|
margin: 2rem 0 0;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
h1 + p {
|
||||||
|
margin: 0 0 1rem;
|
||||||
|
}
|
||||||
|
span.created {
|
||||||
|
display: block;
|
||||||
|
margin: 4px 15px;
|
||||||
|
}
|
||||||
|
img {
|
||||||
|
border: 1px solid lightgrey;
|
||||||
|
height: auto;
|
||||||
|
max-width: 100%;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
blockquote {
|
||||||
|
border: 1px solid;
|
||||||
|
border-left: 6px solid;
|
||||||
|
margin: 2rem 0;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
blockquote p {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
figure {
|
||||||
|
margin: 2rem 0;
|
||||||
|
}
|
||||||
|
figcaption {
|
||||||
|
color: slategrey;
|
||||||
|
}
|
||||||
|
code {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 0.1rem 0.3rem;
|
||||||
|
tab-size: 4;
|
||||||
|
}
|
||||||
|
pre {
|
||||||
|
border: 1px solid;
|
||||||
|
}
|
||||||
|
pre code {
|
||||||
|
border: 0;
|
||||||
|
display: block;
|
||||||
|
overflow-x: auto;
|
||||||
|
padding: 0.3rem 0.6rem;
|
||||||
|
}
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
margin: 2rem 0;
|
||||||
|
text-align: left;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
tr {
|
||||||
|
border-bottom: 1px solid lightgrey;
|
||||||
|
}
|
||||||
|
tr:nth-of-type(odd) td {
|
||||||
|
background-color: #f8f8f8;
|
||||||
|
}
|
||||||
|
th,td {
|
||||||
|
padding: 6px;
|
||||||
|
}
|
||||||
|
footer {
|
||||||
|
border-top: 1px dashed grey;
|
||||||
|
margin: 2rem 0;
|
||||||
|
padding: 1rem 15px;
|
||||||
|
}
|
||||||
|
@supports (color-scheme: dark light) {
|
||||||
|
@media screen and (prefers-color-scheme: dark) {
|
||||||
|
a:link {color: #9e9eff;}
|
||||||
|
a:visited {color: #d0adf0;}
|
||||||
|
a:active {color: red;}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<a href="/">Home</a><span> | </span><a href="/about">About</a><span> | </span><a href="/websites">Websites</a><span> | </span><a href="https://git.sr.ht/~bt/barf">Source Code</a>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<h1>Running <code>barf</code> on MacOS</h1>
|
||||||
|
<p>2023-01-18</p>
|
||||||
|
<p>The <code>barf</code> project was built on Linux and was catered towards Linux users. The core of the project will remain focused on Linux/GNU tools, but that doesn't mean MacOS needs to be left out in the cold.</p>
|
||||||
|
<p>There are some very minor changes you'll need to make in the main <code>barf</code> script if you plan to run it on MacOS.</p>
|
||||||
|
<h2>Download Packages</h2>
|
||||||
|
<p>This walkthrough assumes that you already have <a href="https://brew.sh/">homebrew</a> installed on your machine.</p>
|
||||||
|
<p>You will need to install the GNU versions of both <code>date</code> and <code>sed</code> in order to avoid breaking things when <code>barf</code> tries to build.</p>
|
||||||
|
<pre><code>brew install coreutils
|
||||||
|
brew install gnu-sed
|
||||||
|
</code></pre>
|
||||||
|
<h2>The Script Tweaks</h2>
|
||||||
|
<p>Now open the main <code>barf</code> file in your project and replace all instances of <code>sed</code> with <code>gsed</code>.</p>
|
||||||
|
<p>Then change the following variable:</p>
|
||||||
|
<pre><code>published_date=$(date -d $basic_date +%FT%TZ)
|
||||||
|
</code></pre>
|
||||||
|
<p>to this:</p>
|
||||||
|
<pre><code>published_date=$(gdate -d $basic_date +%FT%TZ)
|
||||||
|
</code></pre>
|
||||||
|
<p>After that everything should work perfectly fine. There is probably a cleaner way to do this, but I like to keep things simple.</p>
|
||||||
|
<footer role="contentinfo">
|
||||||
|
<span><a href="#">↑ Back to Top</a></span><br><br>
|
||||||
|
<small>
|
||||||
|
Built with <a href="https://git.sr.ht/~bt/barf">barf</a>. <br>
|
||||||
|
The <a href="https://git.sr.ht/~bt/barf">code for this site</a> is <a href="https://git.sr.ht/~bt/barf/tree/master/item/LICENSE">MIT</a>.
|
||||||
|
</small>
|
||||||
|
</footer>
|
358
wtmp/barf/build/markdown-examples/index.html
Normal file
358
wtmp/barf/build/markdown-examples/index.html
Normal file
@ -0,0 +1,358 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="color-scheme" content="dark light">
|
||||||
|
<link rel="icon" href="data:,">
|
||||||
|
<title>Markdown Examples in barf</title>
|
||||||
|
<link href="https://barf.bt.ht/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" />
|
||||||
|
<style>
|
||||||
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
font-family: sans-serif;
|
||||||
|
line-height: 1.45;
|
||||||
|
margin: 0 auto;
|
||||||
|
max-width: 45rem;
|
||||||
|
padding: 0 15px;
|
||||||
|
}
|
||||||
|
hr {
|
||||||
|
background-color: grey;
|
||||||
|
border: 0;
|
||||||
|
height: 1px;
|
||||||
|
margin: 2rem 0;
|
||||||
|
}
|
||||||
|
nav {
|
||||||
|
margin: 2rem 0 0;
|
||||||
|
}
|
||||||
|
main {
|
||||||
|
hyphens: auto;
|
||||||
|
}
|
||||||
|
main p {
|
||||||
|
margin: 1rem;
|
||||||
|
}
|
||||||
|
h1,h2,h3,h4 {
|
||||||
|
margin: 2rem 0 0;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
h1 + p {
|
||||||
|
margin: 0 0 1rem;
|
||||||
|
}
|
||||||
|
span.created {
|
||||||
|
display: block;
|
||||||
|
margin: 4px 15px;
|
||||||
|
}
|
||||||
|
img {
|
||||||
|
border: 1px solid lightgrey;
|
||||||
|
height: auto;
|
||||||
|
max-width: 100%;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
blockquote {
|
||||||
|
border: 1px solid;
|
||||||
|
border-left: 6px solid;
|
||||||
|
margin: 2rem 0;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
blockquote p {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
figure {
|
||||||
|
margin: 2rem 0;
|
||||||
|
}
|
||||||
|
figcaption {
|
||||||
|
color: slategrey;
|
||||||
|
}
|
||||||
|
code {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 0.1rem 0.3rem;
|
||||||
|
tab-size: 4;
|
||||||
|
}
|
||||||
|
pre {
|
||||||
|
border: 1px solid;
|
||||||
|
}
|
||||||
|
pre code {
|
||||||
|
border: 0;
|
||||||
|
display: block;
|
||||||
|
overflow-x: auto;
|
||||||
|
padding: 0.3rem 0.6rem;
|
||||||
|
}
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
margin: 2rem 0;
|
||||||
|
text-align: left;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
tr {
|
||||||
|
border-bottom: 1px solid lightgrey;
|
||||||
|
}
|
||||||
|
tr:nth-of-type(odd) td {
|
||||||
|
background-color: #f8f8f8;
|
||||||
|
}
|
||||||
|
th,td {
|
||||||
|
padding: 6px;
|
||||||
|
}
|
||||||
|
footer {
|
||||||
|
border-top: 1px dashed grey;
|
||||||
|
margin: 2rem 0;
|
||||||
|
padding: 1rem 15px;
|
||||||
|
}
|
||||||
|
@supports (color-scheme: dark light) {
|
||||||
|
@media screen and (prefers-color-scheme: dark) {
|
||||||
|
a:link {color: #9e9eff;}
|
||||||
|
a:visited {color: #d0adf0;}
|
||||||
|
a:active {color: red;}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<a href="/">Home</a><span> | </span><a href="/about">About</a><span> | </span><a href="/websites">Websites</a><span> | </span><a href="https://git.sr.ht/~bt/barf">Source Code</a>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<h1>Markdown Examples in barf</h1>
|
||||||
|
<p>2023-01-05</p>
|
||||||
|
<p>This following was lifted from <a href="https://github.com/karlb/smu">https://github.com/karlb/smu</a></p>
|
||||||
|
<h1><code>smu</code> Syntax</h1>
|
||||||
|
<p>smu was started as a rewrite of
|
||||||
|
<a href="http://daringfireball.net/projects/markdown/">markdown</a> but became something
|
||||||
|
more lightweight and consistent. It differs from <a href="https://commonmark.org/">CommonMark</a> in the following ways:</p>
|
||||||
|
<ul>
|
||||||
|
<li>No support for <em>reference style links</em></li>
|
||||||
|
<li>Stricter indentation rules for lists</li>
|
||||||
|
<li>Lists don't end paragraphs by themselves (blank line needed)</li>
|
||||||
|
<li>Horizontal rules (<code><hr></code>) must use <code>- - -</code> as syntax</li>
|
||||||
|
<li>Code fences have stricter syntax</li>
|
||||||
|
</ul>
|
||||||
|
<p>Patches that increase the CommonMark compatibility are welcome as long as they don't increase the code complexity significantly.</p>
|
||||||
|
<p>This project is a fork of the <a href="https://github.com/gottox/smu">original smu</a> by
|
||||||
|
<a href="https://eboland.de">Enno Boland (gottox)</a>. The main differences to the
|
||||||
|
original smu are:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Support for code fences</li>
|
||||||
|
<li>Improved <a href="https://commonmark.org/">CommonMark</a> compatibility. E.g.
|
||||||
|
<ul>
|
||||||
|
<li>Code blocks need four spaces indentation instead of three</li>
|
||||||
|
<li>Skip empty lines at end of code blocks</li>
|
||||||
|
<li>Ignore single spaces around code spans</li>
|
||||||
|
<li>Keep HTML comments in output</li>
|
||||||
|
<li>Improved spec compliance for lists</li>
|
||||||
|
<li>Nesting code block in blockquotes works</li>
|
||||||
|
<li>"Empty" lines in lists behave identically, no matter how much whitespace they contain</li>
|
||||||
|
<li>No backslash escapes in code blocks</li>
|
||||||
|
<li>Use first number as start number for ordered lists</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>Added a simple test suite to check for compliance and avoid regressions</li>
|
||||||
|
</ul>
|
||||||
|
<h2>Inline patterns</h2>
|
||||||
|
<p>There are several patterns you can use to highlight your text:</p>
|
||||||
|
<ul>
|
||||||
|
<li><p>Emphasis</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>Surround your text with <code>*</code> or <code>_</code> to get <em>emphasised</em> text:
|
||||||
|
<pre><code>This *is* cool.
|
||||||
|
This _is_ cool, too.
|
||||||
|
</code></pre>
|
||||||
|
</li>
|
||||||
|
<li>Surround your text with <code>**</code> or <code>__</code> to get <strong>strong</strong> text:
|
||||||
|
<pre><code>This **is** cool.
|
||||||
|
This __is__ cool, too.
|
||||||
|
</code></pre>
|
||||||
|
</li>
|
||||||
|
<li>Surround your text with <code>***</code> or <code>___</code> to get <strong><em>strong and emphasised</em></strong> text:
|
||||||
|
<pre><code>This ***is*** cool.
|
||||||
|
This ___is___ cool, too.
|
||||||
|
</code></pre>
|
||||||
|
</li>
|
||||||
|
<li>But this example won't work as expected:
|
||||||
|
<pre><code>***Hello** you*
|
||||||
|
</code></pre>
|
||||||
|
<p>This is a wontfix bug because it would make the source too complex.
|
||||||
|
Use this instead:
|
||||||
|
</p>
|
||||||
|
<pre><code>***Hello*** *you*
|
||||||
|
</code></pre>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li><p>inline Code</p>
|
||||||
|
<p>You can produce inline code by surrounding it with backticks.</p>
|
||||||
|
<pre><code>Use `rm -rf /` if you're a N00b.
|
||||||
|
Use ``rm -rf /`` if you're a N00b.
|
||||||
|
Use ```rm -rf /``` if you're a N00b.
|
||||||
|
</code></pre>
|
||||||
|
<p>Double and triple backticks can be used if the code itself contains backticks.</p>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<h2>Titles</h2>
|
||||||
|
<p>Creating titles in smu is very easy. There are two different syntax styles. The
|
||||||
|
first is underlining with at least three characters:</p>
|
||||||
|
<pre><code>Heading
|
||||||
|
=======
|
||||||
|
|
||||||
|
Topic
|
||||||
|
-----
|
||||||
|
</code></pre>
|
||||||
|
<p>This is very intuitive and self explaining. The resulting sourcecode looks like
|
||||||
|
this:</p>
|
||||||
|
<pre><code><h1>Heading</h1>
|
||||||
|
<h2>Topic</h2>
|
||||||
|
</code></pre>
|
||||||
|
<p>Use the following prefixes if you don't like underlining:</p>
|
||||||
|
<pre><code># h1
|
||||||
|
## h2
|
||||||
|
### h3
|
||||||
|
#### h4
|
||||||
|
##### h5
|
||||||
|
###### h6
|
||||||
|
</code></pre>
|
||||||
|
<h2>Links</h2>
|
||||||
|
<p>The simplest way to define a link is with simple <code><></code>.</p>
|
||||||
|
<pre><code><http://s01.de>
|
||||||
|
</code></pre>
|
||||||
|
<p>You can do the same for E-Mail addresses:</p>
|
||||||
|
<pre><code><yourname@s01.de>
|
||||||
|
</code></pre>
|
||||||
|
<p>If you want to define a label for the url, you have to use a different syntax</p>
|
||||||
|
<pre><code>[smu - simple mark up](http://s01.de/~gottox/index.cgi/proj_smu)
|
||||||
|
</code></pre>
|
||||||
|
<p>The resulting HTML-Code</p>
|
||||||
|
<pre><code><a href="http://s01.de/~gottox/index.cgi/proj_smu">smu - simple mark up</a></p>
|
||||||
|
</code></pre>
|
||||||
|
<h2>Lists</h2>
|
||||||
|
<p>Defining lists is very straightforward:</p>
|
||||||
|
<pre><code>* Item 1
|
||||||
|
* Item 2
|
||||||
|
* Item 3
|
||||||
|
</code></pre>
|
||||||
|
<p>Result:</p>
|
||||||
|
<pre><code><ul>
|
||||||
|
<li>Item 1</li>
|
||||||
|
<li>Item 2</li>
|
||||||
|
<li>Item 3</li>
|
||||||
|
</ul>
|
||||||
|
</code></pre>
|
||||||
|
<p>Defining ordered lists is also very easy:</p>
|
||||||
|
<pre><code>1. Item 1
|
||||||
|
2. Item 2
|
||||||
|
3. Item 3
|
||||||
|
</code></pre>
|
||||||
|
<p>Only the first number in a list is meaningful. All following list items are
|
||||||
|
continously counted. If you want a list starting at 2, you could write:</p>
|
||||||
|
<pre><code>2. Item 1
|
||||||
|
2. Item 2
|
||||||
|
2. Item 3
|
||||||
|
</code></pre>
|
||||||
|
<p>and get the following HTML which will render with the numbers 2, 3, 4:</p>
|
||||||
|
<pre><code><ol start="2">
|
||||||
|
<li>Item 1</li>
|
||||||
|
<li>Item 2</li>
|
||||||
|
<li>Item 3</li>
|
||||||
|
</ol>
|
||||||
|
</code></pre>
|
||||||
|
<h2>Code & Blockquote</h2>
|
||||||
|
<p>Use the <code>> </code> as a line prefix for defining blockquotes. Blockquotes are
|
||||||
|
interpreted as well. This makes it possible to embed links, headings and even
|
||||||
|
other quotes into a quote:</p>
|
||||||
|
<pre><code>> Hello
|
||||||
|
> This is a quote with a [link](http://s01.de/~gottox)
|
||||||
|
</code></pre>
|
||||||
|
<p>Result:
|
||||||
|
</p>
|
||||||
|
<pre><code><blockquote><p>
|
||||||
|
Hello
|
||||||
|
This is a quote with a <a href="http://s01.de/~gottox">link</a></p>
|
||||||
|
</blockquote>
|
||||||
|
</code></pre>
|
||||||
|
<p>You can define a code block with a leading Tab or with <strong>4</strong> leading spaces</p>
|
||||||
|
<pre><code> this.is(code)
|
||||||
|
|
||||||
|
this.is(code, too)
|
||||||
|
</code></pre>
|
||||||
|
<p>Result:
|
||||||
|
</p>
|
||||||
|
<pre><code><pre><code>this.is(code)</code></pre>
|
||||||
|
<pre><code>this.is(code, too)
|
||||||
|
</code></pre>
|
||||||
|
</code></pre>
|
||||||
|
<p>Please note that you can't use HTML or smu syntax in a code block.</p>
|
||||||
|
<p>Another way to write code blocks is to use code fences:</p>
|
||||||
|
<pre><code>```json
|
||||||
|
{"some": "code"}
|
||||||
|
```
|
||||||
|
</code></pre>
|
||||||
|
<p>This has two advantages:</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>The optional language identifier will be turned into a <code>language-</code> class name</li>
|
||||||
|
<li>You can keep the original indentation which helps when doing copy & paste</li>
|
||||||
|
</ul>
|
||||||
|
<h2>Tables</h2>
|
||||||
|
<p>Tables can be generated with the following syntax:</p>
|
||||||
|
<pre><code>| Heading1 | Heading2 |
|
||||||
|
| -------- | -------- |
|
||||||
|
| Cell 1 | Cell2 |
|
||||||
|
</code></pre>
|
||||||
|
<p>Aligning the columns make the input nicer to read, but is not necessary to get
|
||||||
|
correct table output. You could just write</p>
|
||||||
|
<pre><code>| Heading1 | Heading2 |
|
||||||
|
| --- | --- |
|
||||||
|
| Cell 1 | Cell2 |
|
||||||
|
</code></pre>
|
||||||
|
<p>To align the content of table cells, use <code>|:--|</code> for left, <code>|--:|</code> for right
|
||||||
|
and <code>|:--:|</code> for centered alignment in the row which separates the header from
|
||||||
|
the table body.</p>
|
||||||
|
<pre><code>| Heading1 | Heading2 | Heading3 |
|
||||||
|
| :------- | :------: | -------: |
|
||||||
|
| Left | Center | Right |
|
||||||
|
</code></pre>
|
||||||
|
<h2>Other interesting stuff</h2>
|
||||||
|
<ul>
|
||||||
|
<li><p>to insert a horizontal rule simple add <code>- - -</code> into an empty line:</p>
|
||||||
|
<pre><code>Hello
|
||||||
|
- - -
|
||||||
|
Hello2
|
||||||
|
</code></pre>
|
||||||
|
<p>Result:
|
||||||
|
</p>
|
||||||
|
<pre><code><p>
|
||||||
|
Hello
|
||||||
|
<hr />
|
||||||
|
</code></pre>
|
||||||
|
<pre><code>Hello2</p>
|
||||||
|
</code></pre>
|
||||||
|
</li>
|
||||||
|
<li><p>Any ASCII punctuation character may escaped by precedeing them with a
|
||||||
|
backslash to avoid them being interpreted:</p>
|
||||||
|
<pre><code>!"#$%&'()*+,-./:;<=>?@[]^_`{|}~\
|
||||||
|
</code></pre>
|
||||||
|
</li>
|
||||||
|
<li><p>To force a linebreak simple add two spaces to the end of the line:</p>
|
||||||
|
<pre><code>No linebreak
|
||||||
|
here.
|
||||||
|
But here is
|
||||||
|
one.
|
||||||
|
</code></pre>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<h2>embed HTML</h2>
|
||||||
|
<p>You can include arbitrary HTML code in your documents. The HTML will be
|
||||||
|
passed through to the resulting document without modification. This is a good
|
||||||
|
way to work around features that are missing in smu. If you don't want this
|
||||||
|
behaviour, use the <code>-n</code> flag when executing smu to stricly escape the HTML
|
||||||
|
tags.</p>
|
||||||
|
<footer role="contentinfo">
|
||||||
|
<span><a href="#">↑ Back to Top</a></span><br><br>
|
||||||
|
<small>
|
||||||
|
Built with <a href="https://git.sr.ht/~bt/barf">barf</a>. <br>
|
||||||
|
The <a href="https://git.sr.ht/~bt/barf">code for this site</a> is <a href="https://git.sr.ht/~bt/barf/tree/master/item/LICENSE">MIT</a>.
|
||||||
|
</small>
|
||||||
|
</footer>
|
2
wtmp/barf/build/pages.tsv
Normal file
2
wtmp/barf/build/pages.tsv
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
pages/about.md About `barf`
|
||||||
|
pages/websites.md Websites Built with `barf`
|
|
3
wtmp/barf/build/posts.tsv
Normal file
3
wtmp/barf/build/posts.tsv
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
posts/markdown-examples.md Markdown Examples in barf
|
||||||
|
posts/macos.md Running `barf` on MacOS
|
||||||
|
posts/dark-mode.md Supporting Basic Dark Mode
|
|
130
wtmp/barf/build/websites/index.html
Normal file
130
wtmp/barf/build/websites/index.html
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="color-scheme" content="dark light">
|
||||||
|
<link rel="icon" href="data:,">
|
||||||
|
<title>Websites Built with `barf`</title>
|
||||||
|
<link href="https://barf.bt.ht/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" />
|
||||||
|
<style>
|
||||||
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
font-family: sans-serif;
|
||||||
|
line-height: 1.45;
|
||||||
|
margin: 0 auto;
|
||||||
|
max-width: 45rem;
|
||||||
|
padding: 0 15px;
|
||||||
|
}
|
||||||
|
hr {
|
||||||
|
background-color: grey;
|
||||||
|
border: 0;
|
||||||
|
height: 1px;
|
||||||
|
margin: 2rem 0;
|
||||||
|
}
|
||||||
|
nav {
|
||||||
|
margin: 2rem 0 0;
|
||||||
|
}
|
||||||
|
main {
|
||||||
|
hyphens: auto;
|
||||||
|
}
|
||||||
|
main p {
|
||||||
|
margin: 1rem;
|
||||||
|
}
|
||||||
|
h1,h2,h3,h4 {
|
||||||
|
margin: 2rem 0 0;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
h1 + p {
|
||||||
|
margin: 0 0 1rem;
|
||||||
|
}
|
||||||
|
span.created {
|
||||||
|
display: block;
|
||||||
|
margin: 4px 15px;
|
||||||
|
}
|
||||||
|
img {
|
||||||
|
border: 1px solid lightgrey;
|
||||||
|
height: auto;
|
||||||
|
max-width: 100%;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
blockquote {
|
||||||
|
border: 1px solid;
|
||||||
|
border-left: 6px solid;
|
||||||
|
margin: 2rem 0;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
blockquote p {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
figure {
|
||||||
|
margin: 2rem 0;
|
||||||
|
}
|
||||||
|
figcaption {
|
||||||
|
color: slategrey;
|
||||||
|
}
|
||||||
|
code {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 0.1rem 0.3rem;
|
||||||
|
tab-size: 4;
|
||||||
|
}
|
||||||
|
pre {
|
||||||
|
border: 1px solid;
|
||||||
|
}
|
||||||
|
pre code {
|
||||||
|
border: 0;
|
||||||
|
display: block;
|
||||||
|
overflow-x: auto;
|
||||||
|
padding: 0.3rem 0.6rem;
|
||||||
|
}
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
margin: 2rem 0;
|
||||||
|
text-align: left;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
tr {
|
||||||
|
border-bottom: 1px solid lightgrey;
|
||||||
|
}
|
||||||
|
tr:nth-of-type(odd) td {
|
||||||
|
background-color: #f8f8f8;
|
||||||
|
}
|
||||||
|
th,td {
|
||||||
|
padding: 6px;
|
||||||
|
}
|
||||||
|
footer {
|
||||||
|
border-top: 1px dashed grey;
|
||||||
|
margin: 2rem 0;
|
||||||
|
padding: 1rem 15px;
|
||||||
|
}
|
||||||
|
@supports (color-scheme: dark light) {
|
||||||
|
@media screen and (prefers-color-scheme: dark) {
|
||||||
|
a:link {color: #9e9eff;}
|
||||||
|
a:visited {color: #d0adf0;}
|
||||||
|
a:active {color: red;}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<a href="/">Home</a><span> | </span><a href="/about">About</a><span> | </span><a href="/websites">Websites</a><span> | </span><a href="https://git.sr.ht/~bt/barf">Source Code</a>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<h1>Websites Built with <code>barf</code></h1>
|
||||||
|
<p>Send an email to brad [at] bt [dot] ht if you would like me to add your barf-generated website to this list.</p>
|
||||||
|
<ul>
|
||||||
|
<li><a href="https://bt.ht">https://bt.ht</a></li>
|
||||||
|
</ul>
|
||||||
|
<footer role="contentinfo">
|
||||||
|
<span><a href="#">↑ Back to Top</a></span><br><br>
|
||||||
|
<small>
|
||||||
|
Built with <a href="https://git.sr.ht/~bt/barf">barf</a>. <br>
|
||||||
|
The <a href="https://git.sr.ht/~bt/barf">code for this site</a> is <a href="https://git.sr.ht/~bt/barf/tree/master/item/LICENSE">MIT</a>.
|
||||||
|
</small>
|
||||||
|
</footer>
|
7
wtmp/barf/footer.html
Normal file
7
wtmp/barf/footer.html
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<footer role="contentinfo">
|
||||||
|
<span><a href="#">↑ Back to Top</a></span><br><br>
|
||||||
|
<small>
|
||||||
|
Built with <a href="https://git.sr.ht/~bt/barf">barf</a>. <br>
|
||||||
|
The <a href="https://git.sr.ht/~bt/barf">code for this site</a> is <a href="https://git.sr.ht/~bt/barf/tree/master/item/LICENSE">MIT</a>.
|
||||||
|
</small>
|
||||||
|
</footer>
|
118
wtmp/barf/header.html
Normal file
118
wtmp/barf/header.html
Normal file
@ -0,0 +1,118 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="color-scheme" content="dark light">
|
||||||
|
<link rel="icon" href="data:,">
|
||||||
|
<title>{{TITLE}}</title>
|
||||||
|
<link href="https://barf.bt.ht/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" />
|
||||||
|
<style>
|
||||||
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
font-family: sans-serif;
|
||||||
|
line-height: 1.45;
|
||||||
|
margin: 0 auto;
|
||||||
|
max-width: 45rem;
|
||||||
|
padding: 0 15px;
|
||||||
|
}
|
||||||
|
hr {
|
||||||
|
background-color: grey;
|
||||||
|
border: 0;
|
||||||
|
height: 1px;
|
||||||
|
margin: 2rem 0;
|
||||||
|
}
|
||||||
|
nav {
|
||||||
|
margin: 2rem 0 0;
|
||||||
|
}
|
||||||
|
main {
|
||||||
|
hyphens: auto;
|
||||||
|
}
|
||||||
|
main p {
|
||||||
|
margin: 1rem;
|
||||||
|
}
|
||||||
|
h1,h2,h3,h4 {
|
||||||
|
margin: 2rem 0 0;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
h1 + p {
|
||||||
|
margin: 0 0 1rem;
|
||||||
|
}
|
||||||
|
span.created {
|
||||||
|
display: block;
|
||||||
|
margin: 4px 15px;
|
||||||
|
}
|
||||||
|
img {
|
||||||
|
border: 1px solid lightgrey;
|
||||||
|
height: auto;
|
||||||
|
max-width: 100%;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
blockquote {
|
||||||
|
border: 1px solid;
|
||||||
|
border-left: 6px solid;
|
||||||
|
margin: 2rem 0;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
blockquote p {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
figure {
|
||||||
|
margin: 2rem 0;
|
||||||
|
}
|
||||||
|
figcaption {
|
||||||
|
color: slategrey;
|
||||||
|
}
|
||||||
|
code {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 0.1rem 0.3rem;
|
||||||
|
tab-size: 4;
|
||||||
|
}
|
||||||
|
pre {
|
||||||
|
border: 1px solid;
|
||||||
|
}
|
||||||
|
pre code {
|
||||||
|
border: 0;
|
||||||
|
display: block;
|
||||||
|
overflow-x: auto;
|
||||||
|
padding: 0.3rem 0.6rem;
|
||||||
|
}
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
margin: 2rem 0;
|
||||||
|
text-align: left;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
tr {
|
||||||
|
border-bottom: 1px solid lightgrey;
|
||||||
|
}
|
||||||
|
tr:nth-of-type(odd) td {
|
||||||
|
background-color: #f8f8f8;
|
||||||
|
}
|
||||||
|
th,td {
|
||||||
|
padding: 6px;
|
||||||
|
}
|
||||||
|
footer {
|
||||||
|
border-top: 1px dashed grey;
|
||||||
|
margin: 2rem 0;
|
||||||
|
padding: 1rem 15px;
|
||||||
|
}
|
||||||
|
@supports (color-scheme: dark light) {
|
||||||
|
@media screen and (prefers-color-scheme: dark) {
|
||||||
|
a:link {color: #9e9eff;}
|
||||||
|
a:visited {color: #d0adf0;}
|
||||||
|
a:active {color: red;}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<a href="/">Home</a><span> | </span><a href="/about">About</a><span> | </span><a href="/websites">Websites</a><span> | </span><a href="https://git.sr.ht/~bt/barf">Source Code</a>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<main>
|
17
wtmp/barf/index.md
Normal file
17
wtmp/barf/index.md
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# barf
|
||||||
|
|
||||||
|
**barf is an extremely minimal blog generator.**
|
||||||
|
|
||||||
|
The entire build script is less than 100 lines of shell.
|
||||||
|
|
||||||
|
It could almost be called "suckless", but probably isn't. It was created for those focused on writing, not tinkering.
|
||||||
|
|
||||||
|
You can learn more by reading the [official README](https://git.sr.ht/~bt/barf).
|
||||||
|
|
||||||
|
You can also view the generated [Atom feed here](/atom.xml)
|
||||||
|
|
||||||
|
> **barf**
|
||||||
|
>
|
||||||
|
> Blogs Are Really Fun
|
||||||
|
|
||||||
|
---
|
9
wtmp/barf/pages/about.md
Normal file
9
wtmp/barf/pages/about.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# About `barf`
|
||||||
|
|
||||||
|
barf is a minimal and suckless-inspired blog generator. It is a tweaked and slightly patched version of Karl Bartel's fantastic [blog.sh](https://github.com/karlb/karl.berlin).
|
||||||
|
|
||||||
|
## Why?
|
||||||
|
|
||||||
|
This project was created by me, [Bradley Taunt](https://bt.ht), out of frustration with overly complex and bloated blogging options. I tried *so many* "minimal" generators but each one ended up having some glaring issue or heavy reliance on dependencies.
|
||||||
|
|
||||||
|
I wanted to have a system that I could easily replicate on any Linux machine. Something that didn't require me to download half the internet just to get up and running. I'm a sucker for keeping things simple.
|
5
wtmp/barf/pages/websites.md
Normal file
5
wtmp/barf/pages/websites.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Websites Built with `barf`
|
||||||
|
|
||||||
|
Send an email to brad [at] bt [dot] ht if you would like me to add your barf-generated website to this list.
|
||||||
|
|
||||||
|
- [https://bt.ht](https://bt.ht)
|
19
wtmp/barf/posts/dark-mode.md
Normal file
19
wtmp/barf/posts/dark-mode.md
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# Supporting Basic Dark Mode
|
||||||
|
|
||||||
|
2023-03-07
|
||||||
|
|
||||||
|
The default `barf` site generator now supports basic dark mode functionality. This has been achieved by including the standard `color-scheme` meta tag in the core `header.html` file:
|
||||||
|
|
||||||
|
```
|
||||||
|
<meta name="color-scheme" content="dark light">
|
||||||
|
```
|
||||||
|
|
||||||
|
This change also ships with some minor updates to the default `blockquote` design. You can see an example below:
|
||||||
|
|
||||||
|
> This is a really *cool* blockquote
|
||||||
|
|
||||||
|
## Minor Caveat
|
||||||
|
|
||||||
|
Unfortunately, Safari still has minor `ahref` / link color issue when defaulting to browser dark mode. If this is a problem for your own build of `barf`, take a look at a [solution I wrote about here](https://bt.ht/safari-default-dark-mode/).
|
||||||
|
|
||||||
|
Personally, I can't be bothered to add that extra code to this project. The Safari team needs to get their shit together and fix such a simple bug. Plus, you shouldn't be using Safari anyway - it's proprietary garbage.
|
36
wtmp/barf/posts/macos.md
Normal file
36
wtmp/barf/posts/macos.md
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
# Running `barf` on MacOS
|
||||||
|
|
||||||
|
2023-01-18
|
||||||
|
|
||||||
|
The `barf` project was built on Linux and was catered towards Linux users. The core of the project will remain focused on Linux/GNU tools, but that doesn't mean MacOS needs to be left out in the cold.
|
||||||
|
|
||||||
|
There are some very minor changes you'll need to make in the main `barf` script if you plan to run it on MacOS.
|
||||||
|
|
||||||
|
## Download Packages
|
||||||
|
|
||||||
|
This walkthrough assumes that you already have [homebrew](https://brew.sh/) installed on your machine.
|
||||||
|
|
||||||
|
You will need to install the GNU versions of both `date` and `sed` in order to avoid breaking things when `barf` tries to build.
|
||||||
|
|
||||||
|
|
||||||
|
brew install coreutils
|
||||||
|
brew install gnu-sed
|
||||||
|
|
||||||
|
|
||||||
|
## The Script Tweaks
|
||||||
|
|
||||||
|
Now open the main `barf` file in your project and replace all instances of `sed` with `gsed`.
|
||||||
|
|
||||||
|
Then change the following variable:
|
||||||
|
|
||||||
|
|
||||||
|
published_date=$(date -d $basic_date +%FT%TZ)
|
||||||
|
|
||||||
|
|
||||||
|
to this:
|
||||||
|
|
||||||
|
|
||||||
|
published_date=$(gdate -d $basic_date +%FT%TZ)
|
||||||
|
|
||||||
|
|
||||||
|
After that everything should work perfectly fine. There is probably a cleaner way to do this, but I like to keep things simple.
|
254
wtmp/barf/posts/markdown-examples.md
Normal file
254
wtmp/barf/posts/markdown-examples.md
Normal file
@ -0,0 +1,254 @@
|
|||||||
|
# Markdown Examples in barf
|
||||||
|
|
||||||
|
2023-01-05
|
||||||
|
|
||||||
|
This following was lifted from [https://github.com/karlb/smu](https://github.com/karlb/smu)
|
||||||
|
|
||||||
|
`smu` Syntax
|
||||||
|
============
|
||||||
|
|
||||||
|
smu was started as a rewrite of
|
||||||
|
[markdown](http://daringfireball.net/projects/markdown/) but became something
|
||||||
|
more lightweight and consistent. It differs from [CommonMark](https://commonmark.org/) in the following ways:
|
||||||
|
|
||||||
|
* No support for _reference style links_
|
||||||
|
* Stricter indentation rules for lists
|
||||||
|
* Lists don't end paragraphs by themselves (blank line needed)
|
||||||
|
* Horizontal rules (`<hr>`) must use `- - -` as syntax
|
||||||
|
* Code fences have stricter syntax
|
||||||
|
|
||||||
|
Patches that increase the CommonMark compatibility are welcome as long as they don't increase the code complexity significantly.
|
||||||
|
|
||||||
|
This project is a fork of the [original smu](https://github.com/gottox/smu) by
|
||||||
|
[Enno Boland (gottox)](https://eboland.de). The main differences to the
|
||||||
|
original smu are:
|
||||||
|
|
||||||
|
* Support for code fences
|
||||||
|
* Improved [CommonMark](https://commonmark.org/) compatibility. E.g.
|
||||||
|
* Code blocks need four spaces indentation instead of three
|
||||||
|
* Skip empty lines at end of code blocks
|
||||||
|
* Ignore single spaces around code spans
|
||||||
|
* Keep HTML comments in output
|
||||||
|
* Improved spec compliance for lists
|
||||||
|
* Nesting code block in blockquotes works
|
||||||
|
* "Empty" lines in lists behave identically, no matter how much whitespace they contain
|
||||||
|
* No backslash escapes in code blocks
|
||||||
|
* Use first number as start number for ordered lists
|
||||||
|
* Added a simple test suite to check for compliance and avoid regressions
|
||||||
|
|
||||||
|
Inline patterns
|
||||||
|
---------------
|
||||||
|
|
||||||
|
There are several patterns you can use to highlight your text:
|
||||||
|
|
||||||
|
* Emphasis
|
||||||
|
* Surround your text with `*` or `_` to get *emphasised* text:
|
||||||
|
This *is* cool.
|
||||||
|
This _is_ cool, too.
|
||||||
|
* Surround your text with `**` or `__` to get **strong** text:
|
||||||
|
This **is** cool.
|
||||||
|
This __is__ cool, too.
|
||||||
|
* Surround your text with `***` or `___` to get ***strong and emphasised*** text:
|
||||||
|
This ***is*** cool.
|
||||||
|
This ___is___ cool, too.
|
||||||
|
* But this example won't work as expected:
|
||||||
|
***Hello** you*
|
||||||
|
This is a wontfix bug because it would make the source too complex.
|
||||||
|
Use this instead:
|
||||||
|
***Hello*** *you*
|
||||||
|
|
||||||
|
* inline Code
|
||||||
|
|
||||||
|
You can produce inline code by surrounding it with backticks.
|
||||||
|
|
||||||
|
Use `rm -rf /` if you're a N00b.
|
||||||
|
Use ``rm -rf /`` if you're a N00b.
|
||||||
|
Use ```rm -rf /``` if you're a N00b.
|
||||||
|
|
||||||
|
Double and triple backticks can be used if the code itself contains backticks.
|
||||||
|
|
||||||
|
|
||||||
|
Titles
|
||||||
|
------
|
||||||
|
|
||||||
|
Creating titles in smu is very easy. There are two different syntax styles. The
|
||||||
|
first is underlining with at least three characters:
|
||||||
|
|
||||||
|
Heading
|
||||||
|
=======
|
||||||
|
|
||||||
|
Topic
|
||||||
|
-----
|
||||||
|
|
||||||
|
This is very intuitive and self explaining. The resulting sourcecode looks like
|
||||||
|
this:
|
||||||
|
|
||||||
|
<h1>Heading</h1>
|
||||||
|
<h2>Topic</h2>
|
||||||
|
|
||||||
|
Use the following prefixes if you don't like underlining:
|
||||||
|
|
||||||
|
# h1
|
||||||
|
## h2
|
||||||
|
### h3
|
||||||
|
#### h4
|
||||||
|
##### h5
|
||||||
|
###### h6
|
||||||
|
|
||||||
|
Links
|
||||||
|
-----
|
||||||
|
|
||||||
|
The simplest way to define a link is with simple `<>`.
|
||||||
|
|
||||||
|
<http://s01.de>
|
||||||
|
|
||||||
|
You can do the same for E-Mail addresses:
|
||||||
|
|
||||||
|
<yourname@s01.de>
|
||||||
|
|
||||||
|
If you want to define a label for the url, you have to use a different syntax
|
||||||
|
|
||||||
|
[smu - simple mark up](http://s01.de/~gottox/index.cgi/proj_smu)
|
||||||
|
|
||||||
|
The resulting HTML-Code
|
||||||
|
|
||||||
|
<a href="http://s01.de/~gottox/index.cgi/proj_smu">smu - simple mark up</a></p>
|
||||||
|
|
||||||
|
Lists
|
||||||
|
-----
|
||||||
|
|
||||||
|
Defining lists is very straightforward:
|
||||||
|
|
||||||
|
* Item 1
|
||||||
|
* Item 2
|
||||||
|
* Item 3
|
||||||
|
|
||||||
|
Result:
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>Item 1</li>
|
||||||
|
<li>Item 2</li>
|
||||||
|
<li>Item 3</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
Defining ordered lists is also very easy:
|
||||||
|
|
||||||
|
1. Item 1
|
||||||
|
2. Item 2
|
||||||
|
3. Item 3
|
||||||
|
|
||||||
|
Only the first number in a list is meaningful. All following list items are
|
||||||
|
continously counted. If you want a list starting at 2, you could write:
|
||||||
|
|
||||||
|
2. Item 1
|
||||||
|
2. Item 2
|
||||||
|
2. Item 3
|
||||||
|
|
||||||
|
and get the following HTML which will render with the numbers 2, 3, 4:
|
||||||
|
|
||||||
|
<ol start="2">
|
||||||
|
<li>Item 1</li>
|
||||||
|
<li>Item 2</li>
|
||||||
|
<li>Item 3</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
Code & Blockquote
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
Use the `> ` as a line prefix for defining blockquotes. Blockquotes are
|
||||||
|
interpreted as well. This makes it possible to embed links, headings and even
|
||||||
|
other quotes into a quote:
|
||||||
|
|
||||||
|
> Hello
|
||||||
|
> This is a quote with a [link](http://s01.de/~gottox)
|
||||||
|
|
||||||
|
Result:
|
||||||
|
<blockquote><p>
|
||||||
|
Hello
|
||||||
|
This is a quote with a <a href="http://s01.de/~gottox">link</a></p>
|
||||||
|
</blockquote>
|
||||||
|
|
||||||
|
|
||||||
|
You can define a code block with a leading Tab or with __4__ leading spaces
|
||||||
|
|
||||||
|
this.is(code)
|
||||||
|
|
||||||
|
this.is(code, too)
|
||||||
|
|
||||||
|
Result:
|
||||||
|
<pre><code>this.is(code)</code></pre>
|
||||||
|
<pre><code>this.is(code, too)
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
Please note that you can't use HTML or smu syntax in a code block.
|
||||||
|
|
||||||
|
Another way to write code blocks is to use code fences:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{"some": "code"}
|
||||||
|
```
|
||||||
|
|
||||||
|
This has two advantages:
|
||||||
|
* The optional language identifier will be turned into a `language-` class name
|
||||||
|
* You can keep the original indentation which helps when doing copy & paste
|
||||||
|
|
||||||
|
Tables
|
||||||
|
------
|
||||||
|
|
||||||
|
Tables can be generated with the following syntax:
|
||||||
|
|
||||||
|
| Heading1 | Heading2 |
|
||||||
|
| -------- | -------- |
|
||||||
|
| Cell 1 | Cell2 |
|
||||||
|
|
||||||
|
Aligning the columns make the input nicer to read, but is not necessary to get
|
||||||
|
correct table output. You could just write
|
||||||
|
|
||||||
|
| Heading1 | Heading2 |
|
||||||
|
| --- | --- |
|
||||||
|
| Cell 1 | Cell2 |
|
||||||
|
|
||||||
|
To align the content of table cells, use `|:--|` for left, `|--:|` for right
|
||||||
|
and `|:--:|` for centered alignment in the row which separates the header from
|
||||||
|
the table body.
|
||||||
|
|
||||||
|
| Heading1 | Heading2 | Heading3 |
|
||||||
|
| :------- | :------: | -------: |
|
||||||
|
| Left | Center | Right |
|
||||||
|
|
||||||
|
Other interesting stuff
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
* to insert a horizontal rule simple add `- - -` into an empty line:
|
||||||
|
|
||||||
|
Hello
|
||||||
|
- - -
|
||||||
|
Hello2
|
||||||
|
|
||||||
|
Result:
|
||||||
|
<p>
|
||||||
|
Hello
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
Hello2</p>
|
||||||
|
|
||||||
|
* Any ASCII punctuation character may escaped by precedeing them with a
|
||||||
|
backslash to avoid them being interpreted:
|
||||||
|
|
||||||
|
!"#$%&'()*+,-./:;<=>?@[]^_`{|}~\
|
||||||
|
|
||||||
|
* To force a linebreak simple add two spaces to the end of the line:
|
||||||
|
|
||||||
|
No linebreak
|
||||||
|
here.
|
||||||
|
But here is
|
||||||
|
one.
|
||||||
|
|
||||||
|
embed HTML
|
||||||
|
----------
|
||||||
|
|
||||||
|
You can include arbitrary HTML code in your documents. The HTML will be
|
||||||
|
passed through to the resulting document without modification. This is a good
|
||||||
|
way to work around features that are missing in smu. If you don't want this
|
||||||
|
behaviour, use the `-n` flag when executing smu to stricly escape the HTML
|
||||||
|
tags.
|
3
wtmp/content.html
Normal file
3
wtmp/content.html
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<h1> helkjlkfj </h1>
|
||||||
|
<p> This is a para </p>
|
||||||
|
<span> bye!! </span>
|
4
wtmp/filter.sh
Normal file
4
wtmp/filter.sh
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
tee tmp.json
|
0
wtmp/hugo.log
Normal file
0
wtmp/hugo.log
Normal file
1
wtmp/tmp.json
Normal file
1
wtmp/tmp.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"pandoc-api-version":[1,23],"meta":{},"blocks":[{"t":"Header","c":[1,["some-cool-stuff-i-built",[],[]],[{"t":"Str","c":"Some"},{"t":"Space"},{"t":"Str","c":"cool"},{"t":"Space"},{"t":"Str","c":"stuff"},{"t":"Space"},{"t":"Str","c":"I"},{"t":"Space"},{"t":"Str","c":"built"}]]},{"t":"Header","c":[2,["vimtabdiff",[],[]],[{"t":"Str","c":"vimtabdiff"}]]},{"t":"Para","c":[{"t":"Str","c":"Simple"},{"t":"Space"},{"t":"Str","c":"python"},{"t":"Space"},{"t":"Str","c":"script"},{"t":"Space"},{"t":"Str","c":"to"},{"t":"Space"},{"t":"Str","c":"see"},{"t":"Space"},{"t":"Str","c":"diff"},{"t":"Space"},{"t":"Str","c":"off"},{"t":"Space"},{"t":"Str","c":"two"},{"t":"Space"},{"t":"Str","c":"directories"},{"t":"Space"},{"t":"Str","c":"with"},{"t":"Space"},{"t":"Str","c":"diff"},{"t":"Space"},{"t":"Str","c":"of"},{"t":"Space"},{"t":"Str","c":"each"},{"t":"Space"},{"t":"Str","c":"file"},{"t":"Space"},{"t":"Str","c":"in"},{"t":"Space"},{"t":"Str","c":"a"},{"t":"Space"},{"t":"Str","c":"vim"},{"t":"Space"},{"t":"Str","c":"tab."},{"t":"Space"},{"t":"Str","c":"Typically"},{"t":"Space"},{"t":"Str","c":"used"},{"t":"Space"},{"t":"Str","c":"to"},{"t":"Space"},{"t":"Str","c":"replace"},{"t":"Space"},{"t":"Code","c":[["",[],[]],"git difftool"]}]},{"t":"Div","c":[["",["table"],[]],[{"t":"Table","c":[["",[],[]],[null,[]],[[{"t":"AlignDefault"},{"t":"ColWidth","c":0.1388888888888889}],[{"t":"AlignDefault"},{"t":"ColWidth","c":0.6111111111111112}]],[["",[],[]],[]],[[["",[],[]],0,[],[[["",[],[]],[[["",[],[]],{"t":"AlignDefault"},1,1,[{"t":"Plain","c":[{"t":"Str","c":"Project"}]}]],[["",[],[]],{"t":"AlignDefault"},1,1,[{"t":"Plain","c":[{"t":"Str","c":"vimtabdiff"}]}]]]],[["",[],[]],[[["",[],[]],{"t":"AlignDefault"},1,1,[{"t":"Plain","c":[{"t":"Str","c":"Tags"}]}]],[["",[],[]],{"t":"AlignDefault"},1,1,[{"t":"Plain","c":[{"t":"Str","c":"#python,"},{"t":"Space"},{"t":"Str","c":"#vim,"},{"t":"Space"},{"t":"Str","c":"#git"}]}]]]],[["",[],[]],[[["",[],[]],{"t":"AlignDefault"},1,1,[{"t":"Plain","c":[{"t":"Str","c":"Github"}]}]],[["",[],[]],{"t":"AlignDefault"},1,1,[{"t":"Plain","c":[{"t":"Link","c":[["",["uri"],[]],[{"t":"Str","c":"https://github.com/balki/vimtabdiff"}],["https://github.com/balki/vimtabdiff",""]]}]}]]]],[["",[],[]],[[["",[],[]],{"t":"AlignDefault"},1,1,[{"t":"Plain","c":[{"t":"Str","c":"Gitea"}]}]],[["",[],[]],{"t":"AlignDefault"},1,1,[{"t":"Plain","c":[{"t":"Link","c":[["",["uri"],[]],[{"t":"Str","c":"https://gitea.balki.me/balki/vimtabdiff"}],["https://gitea.balki.me/balki/vimtabdiff",""]]}]}]]]]]]],[["",[],[]],[]]]}]]},{"t":"Header","c":[2,["grocery_guy",[],[]],[{"t":"Str","c":"grocery_guy"}]]},{"t":"Para","c":[{"t":"Str","c":"Telegram"},{"t":"Space"},{"t":"Str","c":"bot"},{"t":"Space"},{"t":"Str","c":"to"},{"t":"Space"},{"t":"Str","c":"manage"},{"t":"Space"},{"t":"Str","c":"lists."}]},{"t":"Div","c":[["",["table"],[]],[{"t":"Table","c":[["",[],[]],[null,[]],[[{"t":"AlignDefault"},{"t":"ColWidth","c":0.1527777777777778}],[{"t":"AlignDefault"},{"t":"ColWidth","c":0.7361111111111112}]],[["",[],[]],[]],[[["",[],[]],0,[],[[["",[],[]],[[["",[],[]],{"t":"AlignDefault"},1,1,[{"t":"Plain","c":[{"t":"Str","c":"Project"}]}]],[["",[],[]],{"t":"AlignDefault"},1,1,[{"t":"Plain","c":[{"t":"Str","c":"grocery_guy"}]}]]]],[["",[],[]],[[["",[],[]],{"t":"AlignDefault"},1,1,[{"t":"Plain","c":[{"t":"Str","c":"Tags"}]}]],[["",[],[]],{"t":"AlignDefault"},1,1,[{"t":"Plain","c":[{"t":"Str","c":"#golang,"},{"t":"Space"},{"t":"Str","c":"#telegram"}]}]]]],[["",[],[]],[[["",[],[]],{"t":"AlignDefault"},1,1,[{"t":"Plain","c":[{"t":"Str","c":"Gitea"}]}]],[["",[],[]],{"t":"AlignDefault"},1,1,[{"t":"Plain","c":[{"t":"Link","c":[["",["uri"],[]],[{"t":"Str","c":"https://gitea.balki.me/balki/telegram-chklistbot"}],["https://gitea.balki.me/balki/telegram-chklistbot",""]]}]}]]]],[["",[],[]],[[["",[],[]],{"t":"AlignDefault"},1,1,[{"t":"Plain","c":[{"t":"Str","c":"Telegram"}]}]],[["",[],[]],{"t":"AlignDefault"},1,1,[{"t":"Plain","c":[{"t":"Link","c":[["",["uri"],[]],[{"t":"Str","c":"https://t.me/grocery_guy_bot"}],["https://t.me/grocery_guy_bot",""]]}]}]]]]]]],[["",[],[]],[]]]}]]}]}
|
BIN
wtmp/trace.log
Normal file
BIN
wtmp/trace.log
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user