💾 Archived View for gemi.dev › gemini-mailing-list › 001004.gmi captured on 2024-06-16 at 15:21:33. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-12-28)

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

[Tool Discussion][Not a Programmer] Idea i'm not sure if has been done for gemtext editing

1. Andrew Singleton (singletona082 (a) gmail.com)

Idea I have for a tool that might be useful might not:

Concept is you feed it your top level directory.

It lists all your subdirectories in that and lets you hit a button and
it goes through EVERY file and if it's an index.gmi it puts at the
foot of the file links to any directory's index.gmi above it with the
directory name (listing top level domain as Home.)

Any non index.gmi file gets a footer that links back to that
directory's index.gmi file.

Note: Those footer behaviors SHOULD be editable, but i'm talking about
what the thing would do by default.

I would also want this program to make GMI files where you can type
out the thing, then at the end hit button to automatically add your
footer text as appropriate.

Also would like to have a feature that allows you to select text and
hit a button for it to turn it into ascii art (since i know a tool for
that exists) for the sake of making top of page interesting text
(would by default put the source text as the mouseover text for screen
readers or anyone who has unformatted text collapsed by default.)

Is... this too complex a beginner project for someone learning code?
It fills a convenience I would like, but at the same time I don't know
if anyone else would find it useful.

Link to individual message.

2. Matthew Graybosch (contact (a) starbreaker.org)

On Tue, Aug 31, 2021, at 2:47 PM, Andrew Singleton wrote:
> Idea I have for a tool that might be useful might not:
> 
> Concept is you feed it your top level directory.
> 
> It lists all your subdirectories in that and lets you hit a button and
> it goes through EVERY file and if it's an index.gmi it puts at the
> foot of the file links to any directory's index.gmi above it with the
> directory name (listing top level domain as Home.)

I bet somebody could implement this as a shell script. Traversing the 
directory tree could be handled with the following commands, where 
$CAPSULE is the top-level directory.

to get index.gmi files: find ${CAPSULE} -type f -name 'index.gmi'
to get other gemtext files while excluding index.gmi: find ${CAPSULE} 
-type f -name '*.gmi' ! -name 'index.gmi'

If you want to make this a GUI app, that would be more complicated. Dunno 
if a beginner could manage it; but I haven't been one in over 20 years so maybe?

-- 
Matthew Graybosch
gemini://starbreaker.org
"The lies you tell yourself are the lies that define you."
#include <disclaimer.h>

Link to individual message.

3. Andrew Thorp (andrew.thorp.dev (a) gmail.com)

Hi Andrew,

I've set up something similar while in the process of making my capsule[1].
I have a front page, /index.gmi, a header and footer, /header.gmi and
/footer.gemi respectively, and a number of posts in /posts/.
Running `make build` will add the header and footer to all gemini
documents (index and posts) as well as add links to all the posts in
the index.
It does some swizzling as well to convert snake_case and kebab-case
file names into Title Case for the "pretty link name".
Lastly, if you create the post with `make post
title=my-new-post-title` it will prepend the date to both the post
title and link.
This is recommended to keep posts ordered as well.

Hope this helps,

Andrew Thorp

[1] (https://git.sr.ht/~athorp96/gemini-thorp.dev)

Link to individual message.

---

Previous Thread: More Awesome Gemini

Next Thread: Subject: Re: Hi, I am new and I have created Gemini library