💾 Archived View for tilde.team › ~tomasino › journal › 20230416-re-my-create-article-script.gmi captured on 2024-08-19 at 00:24:51. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-04-19)

-=-=-=-=-=-=-

RE: my create article script

In reply to:

Yretek - My create article script

My capsule has a Makefile in the root. One of the targets of that file is "journal".

journal: ## create new journal post
	@test -n "$(title)" || read -p "Enter a title for your journal: " title; \
	export post_date=$(shell date +"%Y-%m-%d"); \
	export post_date_slug=$(shell date +"%Y%m%d"); \
	export title_slug=$post_date_slug-`echo ${title:-Untitled} | sed -E -e 's/[^[:alnum:]]/-/g' -e 's/^-+|-+$//g' | tr -s '-' | tr A-Z a-z`; \
	export post_path=journal/$title_slug.gmi; \
	printf "# %s\n" "$title"                                    > $post_path; \
	printf "\n\n"                                                >> $post_path; \
	printf "Originally Published %s at:\n" "$post_date"         >> $post_path; \
	printf "gemini://tilde.team/~tomasino/%s\n" "$post_path"    >> $post_path; \
	printf "\n"                                                  >> $post_path; \
	printf "If you have questions or thoughts to add"            >> $post_path; \
	printf " please send me a link to your response.\n"          >> $post_path; \
	printf "=> /~tomasino/about.txt Contact Information"         >> $post_path; \
	vim $post_path

I made a similar one for my new film reviews section as well. After writing I manually update my index pages and my Atom feed.

Originally Published 2023-04-16 at:

gemini://tilde.team/~tomasino/journal/20230416-re-my-create-article-script.gmi

If you have questions or thoughts to add please send me a link to your response.

Contact Information