From a27fa0c2e26eb2e30e220fd68cd5ee910474b602 Mon Sep 17 00:00:00 2001 From: Bradley Taunt Date: Fri, 2 Feb 2024 12:39:46 -0500 Subject: Initial commit to new cgit platform --- LICENSE | 21 ++ README | 90 +++++ feed.xml | 544 ++++++++++++++++++++++++++++++ index.html | 161 +++++++++ makefile | 9 + posts/create-your-own-shinobi-website.txt | 121 +++++++ posts/full-posts-rss-readers.txt | 111 ++++++ posts/introducing-shinobi-website.txt | 61 ++++ posts/patch-1.txt | 85 +++++ posts/patch-2.txt | 39 +++ posts/patch-3.txt | 24 ++ posts/shinobi-sourcehut.txt | 46 +++ rss.xsl | 42 +++ script.sh | 47 +++ 14 files changed, 1401 insertions(+) create mode 100644 LICENSE create mode 100644 README create mode 100644 feed.xml create mode 100644 index.html create mode 100644 makefile create mode 100644 posts/create-your-own-shinobi-website.txt create mode 100644 posts/full-posts-rss-readers.txt create mode 100644 posts/introducing-shinobi-website.txt create mode 100644 posts/patch-1.txt create mode 100644 posts/patch-2.txt create mode 100644 posts/patch-3.txt create mode 100644 posts/shinobi-sourcehut.txt create mode 100644 rss.xsl create mode 100755 script.sh diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f97607b --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Bradley Taunt + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README b/README new file mode 100644 index 0000000..4530125 --- /dev/null +++ b/README @@ -0,0 +1,90 @@ +SHINOBI SCRIPT +============== + +The basic shell script used to create a RSS-focused blog from plain text +files. + +More info and live demo: +https://shinobi.btxx.org + +RUNNING LOCALLY +--------------- + +In your terminal simply run `make serve` then navigate to `localhost:8000`. +You will also be able to inspect and test the generated `feed.xml` file. + + +ADVANCED SETTING: WRAPPING PLAIN TEXT +------------------------------------- + +If you would prefer to have your posts set to wrap at a certain character +length (72 is set by default) then follow the process below: + +1. Create a new folder in your root directory named "_posts" +2. Move any existing posts to this directory (and create all new articles +here as well moving forward) +3. Open your `script.sh` for editing +4. Uncomment the `RW_DIR` variable in the "Configuration" section +5. Uncomment the following two lines in the `script.sh` file: + +```shell +for i in $(find $RW_DIR -type f); do cp $i $POST_DIR ; done +for i in $(find $POST_DIR -type f); do fold -s -w 72 $i > $i.temp; mv $i.temp $i ; done +``` + +6. Replace the loop directory setting: + + Change: + for file in $POST_DIR*; do + To: + for file in $RW_DIR*; do + +7. Replace the following sections of code (lines 36 and 42): + + Change: + $DOMAIN/$file + To: + $DOMAIN/$POST_DIR$(basename ${file}) + + Change: + $DOMAIN/$file + To: + $DOMAIN/$POST_DIR$(basename ${file}) + +That's it! The reason for making this process somewhat more _complex_ than +simply formatting the posts themselves has to do with RSS Feed Readers. +We want to avoid ugly and misplaced line breaks in Reader apps. We also +want to keep the user in full control of how they can consume their feeds. + +If this looks a little too confusing for you, don't worry! This is completely +optional and is disabled by default. + + +TESTED RSS READERS (WIP) +------------------------ + +FULL SUPPORT: + [+] NetNewsWire (macOS + iOS) + [+] Reeder 5 (iOS) + [+] Inoreader (Web + iOS) + [+] tt-rss.org + +PARTIAL SUPPORT: + [-] Miniflux* + +*: The Miniflux reader overrides default `pre` styling and ignores +wrapping the content. This can be fixed by using your own custom styling +in the Miniflux > Settings menu: + +```css +.entry-content > pre { + white-space: pre-wrap; +} +``` + + +SUBMITTING A PATCH +------------------ + +Please submit any patches to: +shinobi@patches.btxx.org diff --git a/feed.xml b/feed.xml new file mode 100644 index 0000000..19455da --- /dev/null +++ b/feed.xml @@ -0,0 +1,544 @@ + + + + + Shinobi + https://shinobi.btxx.org + A text-based, RSS focused blogging system + 2022 Bradley Taunt + 60 + + Thu, 21 Apr 2022 12:37:54 EST + 2022/04/21/4 + SIMPLE GUIDE FOR CREATING YOUR OWN SHINOBI.WEBSITE + https://shinobi.btxx.org/posts/create-your-own-shinobi-website.txt + + Learn how to setup your own Shinobi site without the need for any +technical background. + +I'm going to keep this article as streamlined as possible. This post +assumes you understand _what_ a shinobi website is and will therefore +skip reiterating that. Instead we will break things down into basic +step-by-step instructions. + + +STEP 1 +------ + +Create a new folder (where you think it is best on your system). This +will contain all the files for our shinobi website. Name it what ever +you like. + + +STEP 2 +------ + +Download the following project: + +https://git.sr.ht/~tdarb/shinobi-script + + +STEP 3 +------ + +Edit the following content in the newly created "script.sh" to align +with your own settings. (ie: YOUR-DOMAIN would be +"yourcustomdomain.com") Feel free to use any text editor that works +best for you. + +1. YOUR-DOMAIN +2. YOUR-EMAIL (YOUR-NAME) +3. YOUR-BLOG-TITLE +4. YOUR-BLOG-DESCRIPTION +5. YOUR-COPYRIGHT-INFO + +*Important*: You might not have a domain setup currently or plan to use +the one generated by Netlify Drop below. That's okay! You can always +come back to this step after the domain is live, change it and re-run +everything again to update! + + +STEP 4 +------ + +Next, look for the folder named "posts". This will contain all your +blog posts going forward. (It also contains a couple dummy posts for +reference) + + +STEP 5 +------ + +Write your first blog post! Create a new text file inside the "posts" +sub-folder (ie: my-awesome-post.txt). Be sure to structure the first 4 +lines the same as below: (Pay attention to the blank space between the +title and post description!) + +> Thu, 21 Apr 2022 +> YOUR BLOG POST TITLE +> +> This is my short and sweet blog post description + + +STEP 6 +------ + +If you are happy with your article then that means it's time to +generate your site! Open a terminal app in your system (Windows, Mac, +Linux - doesn't matter) and navigate to your new website folder by +typing the following: + +cd path/to/your/blog/folder + + +STEP 7 +------ + +Now run the bash script to generate the "feed.xml" file automatically: + +bash script.sh > feed.xml + + +STEP 8 +------ + +Now to host your new website! For this tutorial we are going to use +Netlify Drop for simplicity and ease-of-use. Go to +https://app.netlify.com/drop and then drag-and-drop your website folder +directly into the website. + +You'll get a ".netlify.app" based URL, unless you decide to implement a +custom domain (which is easy to do following Netlify's instructions). + +Now you can share your "subdomain.netlify.app/feed.xml" with the world +and your readers can subscribe via RSS! + + +WHAT ABOUT NEW POSTS OR UPDATES? +-------------------------------- + +By getting a free Netlify account you can continue to re-upload the +website folder when you make changes or add new articles. Easy, right? + +Good luck on your own shinobi websites! + + +P.S. Feel free to reach out to me if you have any questions via +shinobi.web@protonmail.com. I'll try to respond as quick as I can. +Please be patient!]]> + + bt@btxx.org(Bradley Taunt) + https://shinobi.btxx.org/posts/create-your-own-shinobi-website.txt + + + Fri, 06 May 2022 12:37:54 EST + 2022/05/06/5 + FULL POSTS ARE NOW RENDERED INSIDE RSS READERS + https://shinobi.btxx.org/posts/full-posts-rss-readers.txt + + Your subscribers can now read your full articles without leaving the +comfort of their RSS readers. + +I have finally succeeded after fighting with properly rendering full +post content directly _inside_ RSS readers. I struggled with this +implementation far longer than I'd like to admit. Although, that's to +be expected with my caveman knowledge of RSS feeds and my simple monkey +brain. + +But here we are! We made it. + + +INSPIRATION +----------- + +The thought of rendering all the content within users' RSS readers was +always something I wanted for the initial launch of Shinobi Website. It +was taking me a while to understand the layout issues caused by +articles being pure plain text, so I ended up giving up for version +"1.0". + +Then fellow web-minimalist Matthew Graybosch kindly reached out and +showed off his own beautifully crafted shinobi website[0]. Browsing +through his site and articles I quickly realized a few rendering woes +of my own: + +1. Having set the reading length to 72, I was hurting the reading +experience for mobile users +2. Matthew was doing a lot more cool things on his site (D&D style +tables, separating specific feeds into their own directories) + +Shortly after this exchange I was contacted by another plain-text web +enthusiast, Koray Er[1]. They were inspired to start building out +their own Shinobi Website. This is where the question was brought up +regarding full post rendering: + +> i want the entire content in my rss reader - not just one line. the +best i could do was put $(tail -n +4 $file) in the description. that +works, but without line breaks. is it possible to fix that in rss.sh? i +don't want to change the txt - it's so pure. + +This was the final straw. I _needed_ to get this working in _some_ +capacity. + + +CDATA TO THE RESCUE +------------------- + +I played around with converting plain text to HTML and pasting it +inside the XML at build time. This created more problems than it fixed. +But finally, after roughly 2 hours of going down multiple rabbit holes +of failure, I mashed together a few concepts from everyone's trusty +copy/paste site: stackoverflow. + +Take a look at the newly updated shell script here: + +> https://shinobi.website/script.sh + +The only change I have made is inside the `description` tag within the +individual `item` elements. Take a look if you're interested. + +Wait, what the heck that CDATA junk, you might be asking? + +> CDATA is defined as blocks of text that are not parsed by the parser, +but are otherwise recognized as markup. + +After that we use `sed` to swap out any newlines with HTML line break +elements. Nothing crazy there. + +NOTE: +As you may have noticed on the main page of this project, the `rss.sh` +code snippet has been replaced with a direct link to a new `script.sh`. +Those wishing to implement this new style of formatting will need to +make the shell changes manually. + + +CAVEATS +------- + +Please note that if you are planning to render your content this way +there are minor things to look out for. + +1. Pasting code examples is a big no-no. The content will be mangled +and the reader will try to render example snippets as HTML elements. +Your best bet is to link directly to example files elsewhere in your +directory. + +^ THIS IS NO LONGER TRUE. See details below.[2] + +2. This may not work for every single RSS Reader. I can't test every +application out there in the wild nor can I double check different +operating systems. All I know is this renders fine for me on macOS +using NetNewsWire. + + +FOOTNOTES +--------- +[0]: https://matthewgraybosch.com/ +[1]: https://korayer.de/ +[2]: This issue has been fixed thanks to Matthew Graybosch's excellent +patch. See patch notes here: +https://git.sr.ht/~tdarb/shinobi-script/log?from=7e2f8bd312d648ff1c8d3cf +dc747d2e5634100d7#log-7e2f8bd312d648ff1c8d3cfdc747d2e5634100d7 + + +Thanks for reading my humble blog (maybe directly in your RSS reader +this time too!), +-- Brad]]> + + bt@btxx.org(Bradley Taunt) + https://shinobi.btxx.org/posts/full-posts-rss-readers.txt + + + Thu, 14 Apr 2022 12:37:54 EST + 2022/04/14/4 + INTRODUCING SHINOBI.WEBSITE + https://shinobi.btxx.org/posts/introducing-shinobi-website.txt + + What is a shinobi website? + +I have finally been blessed with enough extra free-time to launch my +small shinobi.website "system" into the wild! My hope is that others +take inspiration from it and even start shinobi blogs/sites of their +own. + + +SHINOBI.WEBSITE EXPLAINED +------------------------- + +Quoting the homepage of https://shinobi.website: + +> A shinobi website is a text-based, RSS focused blogging "system" + +More details about the naming decision, running the simple bash script +and properly writing plain text blog posts can be found on the +homepage. For this specific post I more of less want to focus on the +initial "launch" of the product and what the future holds for this URL +as a whole. + + +WHAT TO EXPECT +-------------- + +If you're reading this post, you have shown interest in this project. +First off, I would like to thank you for taking the time subscribing to +this feed or sneakily finding the direct link URL to this post. You are +a true web shinobi. + +As for articles posted here; they will cover topics about minimalism, +open source software, writing prompts, HTML/CSS hacks and video game +reviews. This place is an ever-evolving project, I'm not going to +restrict myself too much by hard constraints or limited topics. + +For my next set of posts, I plan to cover a more step-by-step tutorial +on setting up your own shinobi website through Netlify (for free!). +After that I have a couple other concepts to follow-up with: + +1. A clean Sublime Text setup for writing plain text posts +2. Easy steps to de-clutter and minimize your digital life +3. Switching over from a static site generator to a shinobi website + + +EXCITED TO INSPIRE +------------------ + +I'm excited to see if this project inspires even *one* person to do the +same. If it gets enough traction, I'll need to post a list or "club" +somewhere for the shinobi community to show-off their work. It will be +an interesting endeavour to watch grow and I'm looking forward to +sharing the experience with you, dear reader! + + +Thanks for reading my humble blog, +-- Brad]]> + + bt@btxx.org(Bradley Taunt) + https://shinobi.btxx.org/posts/introducing-shinobi-website.txt + + + Sun, 15 May 2022 12:37:54 EST + 2022/05/15/7 + FIRST MAJOR PATCH AND QOL IMPROVEMENTS + https://shinobi.btxx.org/posts/patch-1.txt + + The main shinobi script has received its first external patch! + +It's getting just past 10PM on this stormy Sunday night, but I have an +urge to share this post now instead of waiting for next week. +Afterwards I'll be going to bed before the start of a new week. + +If you've been following along, you might have noticed a pretty solid +patch has been added to the core shinobi script project: + +https://git.sr.ht/~tdarb/shinobi-script + +Special shout out to Matthew Graybosch[0] for putting together these +improvements and working towards a more consistent experience across +all RSS readers. + + +THE CHANGES AT A GLANCE +----------------------- + +In a nutshell: + +- text inside the CDATA tag is now wrapped with <pre> tags +- <pre> tag has inline CSS to specify reasonable wrapping +- tail command to retrieve post text now pipes into sed to escape HTML +tags. +- added test posts +- added makefile for local testing + +Please take a look at the changes directly in the official patch +notes[1]. Take notice of some of the new folders/files included with +the default project. You'll also see updated instructions in the README +to help with testing and local development. + + +QUALITY OF LIFE +--------------- + +In addition to the first major patch, I've included basic styling to +properly render the RSS feed directory in supported browsers. To see it +in action, simply check out: + +https://shinobi.website/feed.xml + +The styles are included in the new `rss.css` file of the shinobi +project. The current layout is taken from Len Falken's main +directory[2]. Feel free to change this to however you see fit! I've +kept them consistent with the remainder of the project, but there is +nothing stopping you from including things like XSLT. + +To reflect these changes, I've updated some of the details found in the +original "SIMPLE GUIDE FOR CREATING YOUR OWN SHINOBI.WEBSITE"[3] + + +TESTING, TESTING, TESTING +------------------------- + +I'm trying my best to test every RSS reader available to me. My main +machine is running macOS and my phone iOS, thus making me somewhat +limited in my access to other OS-specific RSS applications. Even still, +I've added a growing list to the project README documenting readers +that have been tested, along with their support "grade". Feel free to +include your own testing in tickets or patches on your own! + +That is really all there is to say. Enjoy your week! + + +LINKS +----- + +[0]: https://matthewgraybosch.com +[1]: +https://git.sr.ht/~tdarb/shinobi-script/log?from=7e2f8bd312d648ff1c8d3cf +dc747d2e5634100d7#log-7e2f8bd312d648ff1c8d3cfdc747d2e5634100d7 +[2]: http://len.falken.directory +[3]: https://shinobi.website/posts/create-your-own-shinobi-website.txt + + +*** + +Thanks for reading, +-- Brad]]> + + bt@btxx.org(Bradley Taunt) + https://shinobi.btxx.org/posts/patch-1.txt + + + Tue, 31 May 2022 12:37:54 EST + 2022/05/31/2 + CUSTOMIZED RSS FEED WITH XSLT + https://shinobi.btxx.org/posts/patch-2.txt + + I've finally merged in the latest changes from the `patch-2` branch +into `master`. This patch includes a fairly decent update to the +shinobi structure as a whole: + +- Set all configuration options as variables for easier editing and +updating +- Customized XML feed to match "plain text" style (in supported +browsers) +- Option to wrap all posts at a 72 character limit for improved +readability in the browser (commented out by default) + + +THE NEW RSS FEED "LOOK" +----------------------- + +For demo purposes, simply visit the following link in any supported +browser to see the XSLT in action: + +https://shinobi.website/feed.xml + + +WRAPPING PLAIN TEXT +------------------- + +You now have the ability to have shinobi automatically wrap your plain +text files at a 72 character limit. Since this is _slightly_ more +advanced, you will need to perform some minor edits to the `script.sh` +file itself. Don't worry - I've updated the main README file with +detailed instructions on how to set this up under the section "ADVANCED +SETTING: WRAPPING PLAIN TEXT": + +https://git.sr.ht/~tdarb/shinobi-script + + +That's all for now. Enjoy the rest of your week! +- Brad]]> + + bt@btxx.org(Bradley Taunt) + https://shinobi.btxx.org/posts/patch-2.txt + + + Tue, 14 Jun 2022 12:37:54 EST + 2022/06/14/2 + INTERACTIVE LINKS INSIDE XML FEEDS + https://shinobi.btxx.org/posts/patch-3.txt + + Today I pushed out a minor change to include clickable, interactive +links inside the generated XML feed. This isn't anything groundbreaking +but greatly improves the user experience for those visiting the RSS +file directly in their browser. The full changes can be found in the +official repo for this project. + +You can see a live example on this very website: + +https://shinobi.website/feed.xml + +and also on my own personal website: + +https://tdarb.org/feeds/posts.xml + +I plan to do a larger, more detailed write-up on how this is +accomplished on my personal blog within the coming days. Subscribed to +that feed if that is something you might be interested in. + +Thanks for reading, +- Brad]]> + + bt@btxx.org(Bradley Taunt) + https://shinobi.btxx.org/posts/patch-3.txt + + + Mon, 09 May 2022 12:37:54 EST + 2022/05/09/1 + THE SHINOBI SCRIPT IS NOW AVAILABLE ON SOURCEHUT + https://shinobi.btxx.org/posts/shinobi-sourcehut.txt + + The basic shell script that builds shinobi websites is now on sourcehut +and licensed under MIT. + +Like the title of this post says: the shinobi build script is now +available on sourcehut: + +> https://git.sr.ht/~tdarb/shinobi-script + +The original downloadable `script.sh` file will now redirect to this +repo to ensure users are provided the most up-to-date version. The last +thing I want is conflicting scripts being used out in the wild! + + +IMPROVEMENTS WELCOME +-------------------- + +I wanted to have this available to the public from day one but life has +been busy! Special shout-out to `prx` for suggesting QoL improvements +to the script[0]. I haven't tried implementing these suggested changes +yet, if anyone wants to beat me to it...go for it! This is why the +shinobi script needs to be more in the open. It can improve over time +with the help of people _much_ smarter than myself! + + +WHY SOURCEHUT AND NOT GITHUB? +----------------------------- + +I like to support competition and help reduce growing monopolies. +Github is great for what it is but I have enough projects "stuck" on +that platform. It's nice to diversify your git hosting! + + +LINKS +----- + +[0]: https://si3t.ch/Logiciel-libre/atom-awk.xhtml + + +*** + +That's all folks, thanks for reading! +-- Brad]]> + + bt@btxx.org(Bradley Taunt) + https://shinobi.btxx.org/posts/shinobi-sourcehut.txt + + + diff --git a/index.html b/index.html new file mode 100644 index 0000000..bded92d --- /dev/null +++ b/index.html @@ -0,0 +1,161 @@ + + +Shinobi Website | A text-based, RSS focused blogging "system"
   ______ _______  ______  ___  ____
+  / __/ // /  _/ |/ / __ \/ _ )/  _/
+ _\ \/ _  // //    / /_/ / _  |/ /
+/___/_//_/___/_/|_/\____/____/___/
+
+       /\
+,vvvvvvv\\-------------------------,
+`^^^^^^^//========================"
+       \/
+
+
+WHAT IS A SHINOBI WEBSITE?
+==========================
+
+A shinobi website is a text-based, RSS focused blogging "system". I put
+the word system in quotes since it's really just a simple bash script
+that converts plain text files into an RSS feed. So, it isn't an actual
+blogging platform or website in the traditional sense.
+
+Why the name "shinobi"? Well, a shinobi was a covert agent or mercenary
+during the time of feudal Japan. Due to their focus on infiltration and
+assassination, they required a strong focus on stealth and being unseen.
+
+A shinobi website follows the same principles of being secretive and
+unseen (minus the assassinations and espionage). Only those who
+*choose* to include your feed in their respective RSS readers can view
+your content via the included URL.
+
+It's like an exclusive club[0] for your true, real audience.
+
+
+A SHINOBI WEBSITE IS PURE MINIMALISM
+------------------------------------
+
+Imagine writing *just* content. No dependencies. No heavy-duty build
+process. Nothing but simple plain text files. One bare-bones bash
+script is all you need to generate a valid RSS file from your existing
+text files.
+
+This concept isn't anything new. In fact, this entire project was
+greatly influenced by WRITING FOR THE INTERNET ACROSS A HUMAN
+LIFETIME[1]
+
+
+CREATE YOUR OWN
+---------------
+
+1. Simply clone/download the project below
+2. Make sure you edit the parameters at the top of the script.sh (in
+your favorite text editor)
+
+```shell
+#!/bin/sh
+DOMAIN="YOUR-DOMAIN"
+POST_DIR="posts/"
+AUTHOR="YOUR-EMAIL (YOUR-NAME)"
+TIME="00:00:00 EST"
+```
+
+3. Write your posts/pages as plain text files (.txt) inside a
+sub-folder (/posts)
+4. Run the `make` in you terminal when a new post/page is added
+5. (Optional) Run `make serve` to test your changes locally
+6. Update your site files and RSS feed to your web server
+7. Profit!
+
+
+THE CODE
+--------
+
+I hardly consider myself a hardcore "developer" (I'm actually a UI
+designer - if you can believe it!) so please go easy on judging my ugly
+coding skills. It gets the job done quickly and renders valid RSS
+syntax. That's all that matters.
+
+You can find the very basic project code on sourcehut (licensed under
+MIT):
+
+https://git.btxx.org/shinobi
+
+
+WRITING A POST OR PAGE
+----------------------
+
+There are only a few minor caveats you need to be aware of when writing
+your plain text files. If you have the technical skills, you have the
+freedom to change these settings within the script.sh file itself.
+
+1. The first line of each text file needs to be the post's date
+2. The second line of each text file needs to be the post's title
+3. The third line of each text file needs to be blank
+4. The fourth line of each text file needs to be the post's description
+
+Example:
+
+01| Wed, 13 Dec 2045
+02| MY AMAZING BLOG POST FROM THE FUTURE
+03|
+04| This blog post is ahead of its time
+
+That's it. The script will take care of everything and render things
+perfectly for most RSS readers.
+
+
+READ THE OFFICIAL SHINOBI.WEBSITE
+---------------------------------
+
+Simply add:
+
+
https://shinobi.btxx.org/feed.xml
+
+to your RSS reader of choice. For Apple devices, I strongly recommend
+using the NetNewsWire[2] family of applications. For those on other
+platforms I would recommend the web-based application Feedly.
+
+
+ARTICLES
+--------
+
Tue, 14 Jun 2022 08:40:17 EDT
INTERACTIVE LINKS INSIDE XML FEEDS
https://shinobi.btxx.org/posts/patch-3.txt
Tue, 31 May 2022 08:40:17 EDT
CUSTOMIZED RSS FEED WITH XSLT
https://shinobi.btxx.org/posts/patch-2.txt
Sun, 15 May 2022 08:40:17 EDT
FIRST MAJOR PATCH AND QOL IMPROVEMENTS
https://shinobi.btxx.org/posts/patch-1.txt
Mon, 09 May 2022 08:40:17 EDT
THE SHINOBI SCRIPT IS NOW AVAILABLE ON SOURCEHUT
https://shinobi.btxx.org/posts/shinobi-sourcehut.txt
Fri, 06 May 2022 08:40:17 EDT
FULL POSTS ARE NOW RENDERED INSIDE RSS READERS
https://shinobi.btxx.org/posts/full-posts-rss-readers.txt
Thu, 21 Apr 2022 08:40:17 EDT
SIMPLE GUIDE FOR CREATING YOUR OWN SHINOBI.WEBSITE
https://shinobi.btxx.org/posts/create-your-own-shinobi-website.txt
Thu, 14 Apr 2022 08:40:17 EDT
INTRODUCING SHINOBI.WEBSITE
https://shinobi.btxx.org/posts/introducing-shinobi-website.txt
+
+Articles posted here will mostly cover updates and patch notes for
+all things Shinobi. Following this feed is a good way to stay up-to-date.
+
+
+HELP BY CONTRIBUTING!
+---------------------
+
+I am far from a good developer, so my code is most likely lacking.
+Please don't hesitate to submit patches or suggest changes below:
+
+
https://git.btxx.org/shinobi
+
+
+FOOTNOTES
+---------
+[0]: https://daverupert.com/rss-club/
+[1]:http://len.falken.directory/misc/writing-for-the-internet-across-a-human-lifetime.txt
+[2]: https://netnewswire.com
+
+
+Thanks for reading,
+-- Brad
+
+
+
diff --git a/makefile b/makefile new file mode 100644 index 0000000..f8fc793 --- /dev/null +++ b/makefile @@ -0,0 +1,9 @@ +.DEFAULT: build + +.PHONY: build +build: + ./script.sh > feed.xml + +serve: build + python3 -m http.server --directory . + diff --git a/posts/create-your-own-shinobi-website.txt b/posts/create-your-own-shinobi-website.txt new file mode 100644 index 0000000..14f940f --- /dev/null +++ b/posts/create-your-own-shinobi-website.txt @@ -0,0 +1,121 @@ +Thu, 21 Apr 2022 +SIMPLE GUIDE FOR CREATING YOUR OWN SHINOBI.WEBSITE + +Learn how to setup your own Shinobi site without the need for any +technical background. + +I'm going to keep this article as streamlined as possible. This post +assumes you understand _what_ a shinobi website is and will therefore +skip reiterating that. Instead we will break things down into basic +step-by-step instructions. + + +STEP 1 +------ + +Create a new folder (where you think it is best on your system). This +will contain all the files for our shinobi website. Name it what ever +you like. + + +STEP 2 +------ + +Download the following project: + +https://git.sr.ht/~tdarb/shinobi-script + + +STEP 3 +------ + +Edit the following content in the newly created "script.sh" to align +with your own settings. (ie: YOUR-DOMAIN would be +"yourcustomdomain.com") Feel free to use any text editor that works +best for you. + +1. YOUR-DOMAIN +2. YOUR-EMAIL (YOUR-NAME) +3. YOUR-BLOG-TITLE +4. YOUR-BLOG-DESCRIPTION +5. YOUR-COPYRIGHT-INFO + +*Important*: You might not have a domain setup currently or plan to use +the one generated by Netlify Drop below. That's okay! You can always +come back to this step after the domain is live, change it and re-run +everything again to update! + + +STEP 4 +------ + +Next, look for the folder named "posts". This will contain all your +blog posts going forward. (It also contains a couple dummy posts for +reference) + + +STEP 5 +------ + +Write your first blog post! Create a new text file inside the "posts" +sub-folder (ie: my-awesome-post.txt). Be sure to structure the first 4 +lines the same as below: (Pay attention to the blank space between the +title and post description!) + +> Thu, 21 Apr 2022 +> YOUR BLOG POST TITLE +> +> This is my short and sweet blog post description + + +STEP 6 +------ + +If you are happy with your article then that means it's time to +generate your site! Open a terminal app in your system (Windows, Mac, +Linux - doesn't matter) and navigate to your new website folder by +typing the following: + +cd path/to/your/blog/folder + + +STEP 7 +------ + +Now run the bash script to generate the "feed.xml" file automatically: + +bash script.sh > feed.xml + + +STEP 8 +------ + +Now to host your new website! For this tutorial we are going to use +Netlify Drop for simplicity and ease-of-use. Go to +https://app.netlify.com/drop and then drag-and-drop your website folder +directly into the website. + +You'll get a ".netlify.app" based URL, unless you decide to implement a +custom domain (which is easy to do following Netlify's instructions). + +Now you can share your "subdomain.netlify.app/feed.xml" with the world +and your readers can subscribe via RSS! + + +WHAT ABOUT NEW POSTS OR UPDATES? +-------------------------------- + +By getting a free Netlify account you can continue to re-upload the +website folder when you make changes or add new articles. Easy, right? + +Good luck on your own shinobi websites! + + +P.S. Feel free to reach out to me if you have any questions via +shinobi.web@protonmail.com. I'll try to respond as quick as I can. +Please be patient! + + + + + diff --git a/posts/full-posts-rss-readers.txt b/posts/full-posts-rss-readers.txt new file mode 100644 index 0000000..cc42bf3 --- /dev/null +++ b/posts/full-posts-rss-readers.txt @@ -0,0 +1,111 @@ +Fri, 06 May 2022 +FULL POSTS ARE NOW RENDERED INSIDE RSS READERS + +Your subscribers can now read your full articles without leaving the +comfort of their RSS readers. + +I have finally succeeded after fighting with properly rendering full +post content directly _inside_ RSS readers. I struggled with this +implementation far longer than I'd like to admit. Although, that's to +be expected with my caveman knowledge of RSS feeds and my simple monkey +brain. + +But here we are! We made it. + + +INSPIRATION +----------- + +The thought of rendering all the content within users' RSS readers was +always something I wanted for the initial launch of Shinobi Website. It +was taking me a while to understand the layout issues caused by +articles being pure plain text, so I ended up giving up for version +"1.0". + +Then fellow web-minimalist Matthew Graybosch kindly reached out and +showed off his own beautifully crafted shinobi website[0]. Browsing +through his site and articles I quickly realized a few rendering woes +of my own: + +1. Having set the reading length to 72, I was hurting the reading +experience for mobile users +2. Matthew was doing a lot more cool things on his site (D&D style +tables, separating specific feeds into their own directories) + +Shortly after this exchange I was contacted by another plain-text web +enthusiast, Koray Er[1]. They were inspired to start building out +their own Shinobi Website. This is where the question was brought up +regarding full post rendering: + +> i want the entire content in my rss reader - not just one line. the +best i could do was put $(tail -n +4 $file) in the description. that +works, but without line breaks. is it possible to fix that in rss.sh? i +don't want to change the txt - it's so pure. + +This was the final straw. I _needed_ to get this working in _some_ +capacity. + + +CDATA TO THE RESCUE +------------------- + +I played around with converting plain text to HTML and pasting it +inside the XML at build time. This created more problems than it fixed. +But finally, after roughly 2 hours of going down multiple rabbit holes +of failure, I mashed together a few concepts from everyone's trusty +copy/paste site: stackoverflow. + +Take a look at the newly updated shell script here: + +> https://shinobi.website/script.sh + +The only change I have made is inside the `description` tag within the +individual `item` elements. Take a look if you're interested. + +Wait, what the heck that CDATA junk, you might be asking? + +> CDATA is defined as blocks of text that are not parsed by the parser, +but are otherwise recognized as markup. + +After that we use `sed` to swap out any newlines with HTML line break +elements. Nothing crazy there. + +NOTE: +As you may have noticed on the main page of this project, the `rss.sh` +code snippet has been replaced with a direct link to a new `script.sh`. +Those wishing to implement this new style of formatting will need to +make the shell changes manually. + + +CAVEATS +------- + +Please note that if you are planning to render your content this way +there are minor things to look out for. + +1. Pasting code examples is a big no-no. The content will be mangled +and the reader will try to render example snippets as HTML elements. +Your best bet is to link directly to example files elsewhere in your +directory. + +^ THIS IS NO LONGER TRUE. See details below.[2] + +2. This may not work for every single RSS Reader. I can't test every +application out there in the wild nor can I double check different +operating systems. All I know is this renders fine for me on macOS +using NetNewsWire. + + +FOOTNOTES +--------- +[0]: https://matthewgraybosch.com/ +[1]: https://korayer.de/ +[2]: This issue has been fixed thanks to Matthew Graybosch's excellent +patch. See patch notes here: +https://git.sr.ht/~tdarb/shinobi-script/log?from=7e2f8bd312d648ff1c8d3cf +dc747d2e5634100d7#log-7e2f8bd312d648ff1c8d3cfdc747d2e5634100d7 + + +Thanks for reading my humble blog (maybe directly in your RSS reader +this time too!), +-- Brad \ No newline at end of file diff --git a/posts/introducing-shinobi-website.txt b/posts/introducing-shinobi-website.txt new file mode 100644 index 0000000..c128cd1 --- /dev/null +++ b/posts/introducing-shinobi-website.txt @@ -0,0 +1,61 @@ +Thu, 14 Apr 2022 +INTRODUCING SHINOBI.WEBSITE + +What is a shinobi website? + +I have finally been blessed with enough extra free-time to launch my +small shinobi.website "system" into the wild! My hope is that others +take inspiration from it and even start shinobi blogs/sites of their +own. + + +SHINOBI.WEBSITE EXPLAINED +------------------------- + +Quoting the homepage of https://shinobi.website: + +> A shinobi website is a text-based, RSS focused blogging "system" + +More details about the naming decision, running the simple bash script +and properly writing plain text blog posts can be found on the +homepage. For this specific post I more of less want to focus on the +initial "launch" of the product and what the future holds for this URL +as a whole. + + +WHAT TO EXPECT +-------------- + +If you're reading this post, you have shown interest in this project. +First off, I would like to thank you for taking the time subscribing to +this feed or sneakily finding the direct link URL to this post. You are +a true web shinobi. + +As for articles posted here; they will cover topics about minimalism, +open source software, writing prompts, HTML/CSS hacks and video game +reviews. This place is an ever-evolving project, I'm not going to +restrict myself too much by hard constraints or limited topics. + +For my next set of posts, I plan to cover a more step-by-step tutorial +on setting up your own shinobi website through Netlify (for free!). +After that I have a couple other concepts to follow-up with: + +1. A clean Sublime Text setup for writing plain text posts +2. Easy steps to de-clutter and minimize your digital life +3. Switching over from a static site generator to a shinobi website + + +EXCITED TO INSPIRE +------------------ + +I'm excited to see if this project inspires even *one* person to do the +same. If it gets enough traction, I'll need to post a list or "club" +somewhere for the shinobi community to show-off their work. It will be +an interesting endeavour to watch grow and I'm looking forward to +sharing the experience with you, dear reader! + + +Thanks for reading my humble blog, +-- Brad + + diff --git a/posts/patch-1.txt b/posts/patch-1.txt new file mode 100644 index 0000000..f6e582a --- /dev/null +++ b/posts/patch-1.txt @@ -0,0 +1,85 @@ +Sun, 15 May 2022 +FIRST MAJOR PATCH AND QOL IMPROVEMENTS + +The main shinobi script has received its first external patch! + +It's getting just past 10PM on this stormy Sunday night, but I have an +urge to share this post now instead of waiting for next week. +Afterwards I'll be going to bed before the start of a new week. + +If you've been following along, you might have noticed a pretty solid +patch has been added to the core shinobi script project: + +https://git.sr.ht/~tdarb/shinobi-script + +Special shout out to Matthew Graybosch[0] for putting together these +improvements and working towards a more consistent experience across +all RSS readers. + + +THE CHANGES AT A GLANCE +----------------------- + +In a nutshell: + +- text inside the CDATA tag is now wrapped with
 tags
+- 
 tag has inline CSS to specify reasonable wrapping
+- tail command to retrieve post text now pipes into sed to escape HTML 
+tags.
+- added test posts
+- added makefile for local testing
+
+Please take a look at the changes directly in the official patch 
+notes[1]. Take notice of some of the new folders/files included with 
+the default project. You'll also see updated instructions in the README 
+to help with testing and local development.
+
+
+QUALITY OF LIFE
+---------------
+
+In addition to the first major patch, I've included basic styling to 
+properly render the RSS feed directory in supported browsers. To see it 
+in action, simply check out:
+
+https://shinobi.website/feed.xml
+
+The styles are included in the new `rss.css` file of the shinobi 
+project. The current layout is taken from Len Falken's main 
+directory[2]. Feel free to change this to however you see fit! I've 
+kept them consistent with the remainder of the project, but there is 
+nothing stopping you from including things like XSLT.
+
+To reflect these changes, I've updated some of the details found in the 
+original "SIMPLE GUIDE FOR CREATING YOUR OWN SHINOBI.WEBSITE"[3]
+
+
+TESTING, TESTING, TESTING
+-------------------------
+
+I'm trying my best to test every RSS reader available to me. My main 
+machine is running macOS and my phone iOS, thus making me somewhat 
+limited in my access to other OS-specific RSS applications. Even still, 
+I've added a growing list to the project README documenting readers 
+that have been tested, along with their support "grade". Feel free to 
+include your own testing in tickets or patches on your own!
+
+That is really all there is to say. Enjoy your week!
+
+
+LINKS
+-----
+
+[0]: https://matthewgraybosch.com
+[1]: 
+https://git.sr.ht/~tdarb/shinobi-script/log?from=7e2f8bd312d648ff1c8d3cf
+dc747d2e5634100d7#log-7e2f8bd312d648ff1c8d3cfdc747d2e5634100d7
+[2]: http://len.falken.directory
+[3]: https://shinobi.website/posts/create-your-own-shinobi-website.txt
+
+
+***
+
+Thanks for reading,
+-- Brad
+
diff --git a/posts/patch-2.txt b/posts/patch-2.txt
new file mode 100644
index 0000000..f0c8165
--- /dev/null
+++ b/posts/patch-2.txt
@@ -0,0 +1,39 @@
+Tue, 31 May 2022
+CUSTOMIZED RSS FEED WITH XSLT
+
+I've finally merged in the latest changes from the `patch-2` branch 
+into `master`. This patch includes a fairly decent update to the 
+shinobi structure as a whole:
+
+- Set all configuration options as variables for easier editing and 
+updating
+- Customized XML feed to match "plain text" style (in supported 
+browsers)
+- Option to wrap all posts at a 72 character limit for improved 
+readability in the browser (commented out by default)
+
+
+THE NEW RSS FEED "LOOK"
+-----------------------
+
+For demo purposes, simply visit the following link in any supported 
+browser to see the XSLT in action:
+
+https://shinobi.website/feed.xml
+
+
+WRAPPING PLAIN TEXT
+-------------------
+
+You now have the ability to have shinobi automatically wrap your plain 
+text files at a 72 character limit. Since this is _slightly_ more 
+advanced, you will need to perform some minor edits to the `script.sh` 
+file itself. Don't worry - I've updated the main README file with 
+detailed instructions on how to set this up under the section "ADVANCED 
+SETTING: WRAPPING PLAIN TEXT":
+
+https://git.sr.ht/~tdarb/shinobi-script
+
+
+That's all for now. Enjoy the rest of your week!
+- Brad
diff --git a/posts/patch-3.txt b/posts/patch-3.txt
new file mode 100644
index 0000000..4102ab6
--- /dev/null
+++ b/posts/patch-3.txt
@@ -0,0 +1,24 @@
+Tue, 14 Jun 2022
+INTERACTIVE LINKS INSIDE XML FEEDS
+
+Today I pushed out a minor change to include clickable, interactive 
+links inside the generated XML feed. This isn't anything groundbreaking 
+but greatly improves the user experience for those visiting the RSS 
+file directly in their browser. The full changes can be found in the 
+official repo for this project.
+
+You can see a live example on this very website:
+
+https://shinobi.website/feed.xml
+
+and also on my own personal website:
+
+https://tdarb.org/feeds/posts.xml
+
+I plan to do a larger, more detailed write-up on how this is 
+accomplished on my personal blog within the coming days. Subscribed to 
+that feed if that is something you might be interested in.
+
+Thanks for reading,
+- Brad
+
diff --git a/posts/shinobi-sourcehut.txt b/posts/shinobi-sourcehut.txt
new file mode 100644
index 0000000..d0b4016
--- /dev/null
+++ b/posts/shinobi-sourcehut.txt
@@ -0,0 +1,46 @@
+Mon, 09 May 2022
+THE SHINOBI SCRIPT IS NOW AVAILABLE ON SOURCEHUT
+
+The basic shell script that builds shinobi websites is now on sourcehut 
+and licensed under MIT.
+
+Like the title of this post says: the shinobi build script is now 
+available on sourcehut:
+
+> https://git.sr.ht/~tdarb/shinobi-script
+
+The original downloadable `script.sh` file will now redirect to this 
+repo to ensure users are provided the most up-to-date version. The last 
+thing I want is conflicting scripts being used out in the wild!
+
+
+IMPROVEMENTS WELCOME
+--------------------
+
+I wanted to have this available to the public from day one but life has 
+been busy! Special shout-out to `prx` for suggesting QoL improvements 
+to the script[0]. I haven't tried implementing these suggested changes 
+yet, if anyone wants to beat me to it...go for it! This is why the 
+shinobi script needs to be more in the open. It can improve over time 
+with the help of people _much_ smarter than myself!
+
+
+WHY SOURCEHUT AND NOT GITHUB?
+-----------------------------
+
+I like to support competition and help reduce growing monopolies. 
+Github is great for what it is but I have enough projects "stuck" on 
+that platform. It's nice to diversify your git hosting!
+
+
+LINKS
+-----
+
+[0]: https://si3t.ch/Logiciel-libre/atom-awk.xhtml
+
+
+***
+
+That's all folks, thanks for reading!
+-- Brad
+
diff --git a/rss.xsl b/rss.xsl
new file mode 100644
index 0000000..008c5d2
--- /dev/null
+++ b/rss.xsl
@@ -0,0 +1,42 @@
+
+
+    
+    
+        
+            
+                <xsl:value-of select="/rss/channel/title"/>
+                
+                
+                
+                
+            
+            
+                
+
+ + +
+
+ + + + +
+
+
+ + +
+
diff --git a/script.sh b/script.sh new file mode 100755 index 0000000..f129bfe --- /dev/null +++ b/script.sh @@ -0,0 +1,47 @@ +#!/bin/sh + +# Configuration +DOMAIN="https://shinobi.btxx.org" +TITLE="Shinobi" +DESCRIPTION="A text-based, RSS focused blogging system" +COPYRIGHT="2022 Bradley Taunt" +# RW_DIR="_posts/" +POST_DIR="posts/" +TTL="60" +AUTHOR="bt@btxx.org(Bradley Taunt)" +TIME=$(date +"%T %Z") + +# Advanced Setting: Automatically wrap plain text files at 72 character limit +# Detailed documentation: https://git.btxx.org/shinobi +# +# for i in $(find $RW_DIR -type f); do cp $i $POST_DIR ; done +# for i in $(find $POST_DIR -type f); do fold -s -w 72 $i > $i.temp; mv $i.temp $i ; done + +echo " + + + + $TITLE + $DOMAIN + $DESCRIPTION + $COPYRIGHT + $TTL"; + +for file in $POST_DIR*; do + +echo " + $(head -n 1 $file) $TIME + $(date -d "$(head -n 1 $file)" +"%Y/%m/%d/%u") + $(head -n 2 $file | tail -n 1) + $DOMAIN/$file + + $(tail -n +4 $file | sed 's/&/\&/g; s//\>/g; s/"/\"/g; s/'"'"'/\'/g')
]]> + + $AUTHOR + $DOMAIN/$file + "; +done + +echo " +"; -- cgit v1.2.3-54-g00ecf