~xdavidwu/xdavidwu.link

372a6dfd8f960ad44c7d4c11b50a9ed29241388f — Pinghao Wu 1 year, 2 months ago e871a1b
builds: gemini: extract title with yq
1 files changed, 2 insertions(+), 1 deletions(-)

M .builds/gemini.yml
M .builds/gemini.yml => .builds/gemini.yml +2 -1
@@ 4,6 4,7 @@ packages:
  - py3-pip
  - hut
  - md2gemini
  - yq
tasks:
  - tools: |
      find /usr/lib -name 'renderers.py' -exec sed -i -E 's/text\.rstrip\(\)\.endswith\("\[" \+ str\(self\.footnote_num\) \+ "\]"\)/False/' {} \;


@@ 24,7 25,7 @@ tasks:
        done < "${i}.orig"
        set -x
        IFS=$OIFS
        echo "=> $(echo $i | sed s/\.md$/.gmi/) $(echo $i | cut -f 1-3 -d '-'): $(grep '^title:' $i | cut -f 2 -d \")" >> ../gemini/index.gmi
        echo "=> $(echo $i | sed s/\.md$/.gmi/) $(echo $i | cut -f 1-3 -d '-'): $(grep '^title:' $i | yq .title)" >> ../gemini/index.gmi
      done
      md2gemini -w -d ../gemini -a -f -i tab -l paragraph *.md
  - pack: |