Compare commits
3 Commits
4be38a46b0
...
f749bcb05d
Author | SHA1 | Date |
---|---|---|
Greg Gauthier | f749bcb05d | |
Greg Gauthier | 32db0924c8 | |
Greg Gauthier | 22efdb11b3 |
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
title: "Atari Assembler for the Absolute Beginner"
|
||||
date: 2023-08-30T14:33:00+01:00
|
||||
tags: ["Programming", "Languages", "Assembler"]
|
||||
description: "Atari assembler starting from scratch"
|
||||
draft: true
|
||||
---
|
||||
I am starting a new series on my Rumble channel.
|
|
@ -0,0 +1,45 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
export ED='vi'
|
||||
# export ED='vi'
|
||||
|
||||
Help()
|
||||
{
|
||||
# Display Help
|
||||
echo "Add a new post to a hugo blog"
|
||||
echo
|
||||
echo "Syntax: new -c contentType -t 'some title'"
|
||||
echo "options:"
|
||||
echo "-c [required] Content Type: 'blog'"
|
||||
echo "-t [required] Content Title: \"Any Plain Text At All\""
|
||||
echo "-h This display."
|
||||
exit 0
|
||||
}
|
||||
|
||||
while getopts c:t:h flag
|
||||
do
|
||||
case "${flag}" in
|
||||
c) contentType=${OPTARG};;
|
||||
t) title=${OPTARG};;
|
||||
h) Help;;
|
||||
*) echo "-h for help" >&2
|
||||
exit 1 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -z "$contentType" ]; then
|
||||
echo "Specify a content type. Eg. '-c post'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$title" ]; then
|
||||
echo "Specify an entry title. Eg. '-t \"The Hamburg Happening\"'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
tmp=${title// /-}
|
||||
filename=${tmp,,}
|
||||
echo "$filename"
|
||||
|
||||
hugo new "${contentType}"/"${filename}".md
|
||||
$ED content/"${contentType}"/"${filename}".md
|
Loading…
Reference in New Issue