💾 Archived View for thatit.be › 2022-11-06-10-43-55.gmi captured on 2024-02-05 at 09:54:18. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-11-14)

➡️ Next capture (2024-03-21)

🚧 View Differences

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

thinking about a calendar page

I’m considering creating a calendar page with links to the different notes, but I don’t know if that’s useful. Or perhaps a calendar page with links to days that are built up from the content of a specific day?

I’m not sure how I would do that yet.

cut_list(){
    local -n LIST=${1}
    local CUTTING=${2}

    for ITEM in "${LIST[@]}" ; do
        echo "${ITEM}"
    done | cut $CUTTING | sort -u
}

grep_list(){
    local -n LIST=${1}
    local EXPR=${2}
    for ITEM in "${LIST[@]}" ; do
        echo "${ITEM}"
    done | grep $EXPR
}

PAGES=( [0-9][0-9][0-9][0-9]-*.md )
YEARS=( $(cut_list PAGES "-f1 -d-") )

for YEAR in "${YEARS[@]}" ; do
    echo "# ${YEAR}"
    echo
    MONTHS=( $(cut_list PAGES "-f1-2 -d-") )
    for MONTH in "${MONTHS[@]}" ; do
        echo "## ${MONTH}"
        echo
        POSTS=( $(grep_list PAGES "^${MONTH}") )
        for POST in "${POSTS[@]}" ; do
            echo "${POST}"
            # or cat "${POST}" ...
        done
        echo
    done
    echo
done

And the result would be something like the following:

# 2022

## 2022-03

2022-03-22-21-27-26.md
2022-03-22-21-35-02.md
# .... snip snip .....

## 2022-04

2022-04-02-23-09-09.md

## 2022-05

2022-05-02-23-54-34.md
2022-05-31-15-11-15.md

## 2022-06

2022-06-04-18-42-08.md

## 2022-07

2022-07-01-16-24-24.md
2022-07-11-16-26-49.md

## 2022-08

2022-08-17-23-11-42.md
2022-08-17-23-23-30.md
# .... snip snip .....

## 2022-10

2022-10-07-00-43-09.md
2022-10-08-00-44-16.md
# .... snip snip .....

## 2022-11

2022-11-04-17-12-57.md
2022-11-06-01-34-07.md
# .... snip snip .....

## 2022-12

2022-12-01-00-37-43.md
2022-12-01-01-07-48.md
# .... snip snip .....

I don’t know, something that mimic’s cal output might be cooler in my local HTML version.

Tags

#meta

Navigation

index

tags

updated: 2022-11-06 11:07:52

generated: 2024-02-03