A more complex test post
I need a more complex post to test how this blog format will work out. We'll include samples of various Spartan content types.
Quotation
This is the quote of the day. I should have looked up some pithy quote by somebody more interesting than me, but I didn't. -- me
Code sample
Here is the current version of the "bp" blog post helper script.
#!/usr/bin/bash
# bp - a Spartan blog helper to create a new blog post
# Where is the blog directory?
blogdir=~/public_spartan/blog
fname=$(date -Iminutes) # get current date and time
cdate="${fname/T/ }" # capture file creation date for potential use in the post text
fname="${fname%-*}.gmi" # create a name for the file.
# Create the new file.
printf "# new\n\ntext\n\n📅_c: %s ✏️ e: \ntags: #new\n" "${cdate%-*}" >> "$blogdir/$fname"
# Verify that the file was created? No, if the editor opens an empty file it will be obvious something is wrong.
echo "New post is at: $blogdir/$fname" # This makes it easy to re-edit the file if you need to.
# Edit the new post
"$EDITOR" "$blogdir/$fname" # ToDo: check whether $EDITOR is set?
# Display the result so you can review it for errors.
cat "$blogdir/$fname"
Table
There is not a table type included in gemtext, but preformatted text can be used to display tabular data. I don't have a good sample data table already built so here is a scrap from another document that I can quickly paste in.
┌─────────────┬──────────────────────────┬─────────────────────────┬─────────────────────────┐ │ Note │ 1952 │ 1966 │ 2015 │ ╞═════════════╪══════════════════════════╪═════════════════════════╪═════════════════════════╡ │ │ This is the text as I │ │ │ │ │ copied it from my │ │ │ │ │ mother's signed and │ │ The current text as │ │ │ framed document from │ │ available as │ │ │ 1952. It may have been │ I copied this text from │ │ │ │ in use in this form ever │ my own document that I │ [SOLDIER'S COVENANT] │ │ Source │ since the 1880s; it │ signed in December │ │ │ │ appears to have been │ 1966. │ at The Salvation Army │ │ │ quoted in Thomas H. │ │ International │ │ │ Huxley's │ │ │ │ │ [Legal Opinions] │ │ │ ├─────────────┼──────────────────────────┼─────────────────────────┼─────────────────────────┤ │ Title │ Articles of War │ Articles of War │ SOLDIER'S COVENANT │ ├─────────────┼──────────────────────────┼─────────────────────────┼─────────────────────────┤ │ │ │ │ (Promises made when │ │ │ Signed by all Salvation │ Signed by all Salvation │ becoming a soldier in │ │ Explanation │ Army Soldiers │ Army Soldiers │ The Salvation Army. │ │ │ │ │ Formerly called │ │ │ │ │ 'Articles of War'.) │ ├─────────────┼──────────────────────────┼─────────────────────────┼─────────────────────────┤ │ │ Having received with all │ Having received with │ │ │ │ my heart the salvation │ all my heart the │ │ │ │ offered to me by the │ Salvation offered to me │ │ │ │ tender mercy of Jehovah, │ by the tender mercy of │ │ │ │ I do here and now │ God, I do here and now │ HAVING accepted Jesus │ │ │ publicly acknowledge God │ acknowledge God the │ Christ as my Saviour │ │ │ the Father to be my │ Father to be my King; │ and Lord, and desiring │ │ │ king, God the Son, Jesus │ God the Son, Jesus │ to fulfil my membership │ │ Motivation │ Christ our Lord, to be │ Christ our Lord, to be │ of His Church on earth │ │ │ my Saviour, God the Holy │ my Saviour; and God the │ as a soldier of The │ │ │ Spirit to be my Guide, │ Holy Spirit to be my │ Salvation Army, I now │ │ │ Comforter, and Strength; │ Guide, Comforter and │ by God's grace enter │ │ │ and I will, by His help, │ Strength; and I will, │ into a sacred covenant. │ │ │ love, serve, worship and │ by His help, love, │ │ │ │ obey this glorious God │ serve, worship, and │ │ │ │ through time and through │ obey this glorious God │ │ │ │ eternity. │ through time and │ │ │ │ │ through eternity. │ │ └─────────────┴──────────────────────────┴─────────────────────────┴─────────────────────────┘
List
Of course we should include a list.
- Item one
- Item 2
- 3. Why should list items be consistent?
- Fourth, they are easier to read.
My, what a pitiful list that was.
Finally
There must a level3 heading:
Level 3
And here it is.
I think we're done here, for now.
Now it is time to test, test, test using the varios Spartan clients I have installed. So far, I am satisfied with what I'm seeing in both GUI and text-mode clients. Once I resolve the file-name, date-sorted index list issue (discussed in my Spartan [blog] working document) I think it's ready for regular use.
[blog] (/blog-for-spartan.gmi)
📅 c: 2022-07-14 08:10 ✏️e: 2022-07-14 15:11
tags: #test #gemtext