-- Leo's gemini proxy

-- Connecting to tilde.team:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini; lang=en

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

-- Response ended

-- Page fetched on Thu May 2 22:37:14 2024