ADDED desk/cortav-view.desktop Index: desk/cortav-view.desktop ================================================================== --- desk/cortav-view.desktop +++ desk/cortav-view.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Encoding=UTF-8 +Type=Application +Icon=accessories-text-editor + +Name=CortavView +Name[x-ranuir]=CortavLocmos DELETED desk/cortav-view.desktop.tpl Index: desk/cortav-view.desktop.tpl ================================================================== --- desk/cortav-view.desktop.tpl +++ desk/cortav-view.desktop.tpl @@ -1,7 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Type=Application -Icon=accessories-text-editor - -Name=CortavView -Name[x-ranuir]=CortavLocmos Index: desk/cortav-view.sh ================================================================== --- desk/cortav-view.sh +++ desk/cortav-view.sh @@ -4,11 +4,11 @@ # we also do something similar with the path to cortav, in case the # executable isn't in $PATH out=$(mktemp --suffix=.html) -"$cortav_exec" "$1" -o "$out" -m html:width 35em +"$cortav_exec" "$1" -o "$out" $cortav_flags if test "$BROWSER" != ""; then "$BROWSER" "file://$out" else xdg-open "$out" Index: makefile ================================================================== --- makefile +++ makefile @@ -4,10 +4,11 @@ extens = $(wildcard ext/*.lua) extens_names ?= $(basename $(notdir $(extens))) build = build executable = cortav +default-format-flags = -m html:width 40em prefix = $(HOME)/.local bin_prefix = $(prefix)/bin share_prefix = $(prefix)/share/$(executable) @@ -16,11 +17,11 @@ echo '#!$(lua)' > $@ luac -o - $^ >> $@ chmod +x $@ $(build)/cortav.html: cortav.ct $(build)/$(executable) | $(build)/ - ./cortav $< -o $@ -m render:format html -y html:fossil-uv + $(build)/$(executable) $< -o $@ -m render:format html -y html:fossil-uv .PHONY: syncdoc syncdoc: $(build)/cortav.html fossil uv add $< fossil uv sync @@ -30,14 +31,15 @@ rm -f $(build)/cortav $(build)/cortav.html $(build)/velartrill-cortav-view.desktop $(build)/cortav-view.sh $(build)/%.sh: desk/%.sh echo >$@ "#!$(sh)" echo >>$@ 'cortav_exec="$(bin_prefix)/$(executable)"' + echo >>$@ 'cortav_flags="$${ct_format_flags-$(default-format-flags)}"' cat $< >> $@ chmod +x $@ -$(build)/velartrill-cortav-view.desktop: desk/cortav-view.desktop.tpl +$(build)/velartrill-cortav-view.desktop: desk/cortav-view.desktop cp $< $@ echo "Exec=$(bin_prefix)/cortav-view.sh" >>$@ %/: mkdir -p $@