Compare commits
No commits in common. "c8f0f18f9b68343ad1f5485ef73334c1de691c2b" and "cbbf2340e41541c8a1cb7eee51048840dfb94d3b" have entirely different histories.
c8f0f18f9b
...
cbbf2340e4
3 changed files with 103 additions and 113 deletions
99
config.sh
99
config.sh
|
@ -1,99 +0,0 @@
|
||||||
showgenerator="true"
|
|
||||||
backtotop="true"
|
|
||||||
lastupdated="true"
|
|
||||||
#rssfeed="true"
|
|
||||||
|
|
||||||
site_title="koutsie's telenotes"
|
|
||||||
site_description="thoughts about mainly computers... maybe recipes and cats too?"
|
|
||||||
site_link="https://k0.tel/"
|
|
||||||
|
|
||||||
# Put CSS between <<EOF and EOF
|
|
||||||
site_css=$(cat <<EOF
|
|
||||||
/* font by https://www.1001fonts.com/users/junkohanhero/ */
|
|
||||||
@font-face { font-family: header; src: url(scratch_x_black.ttf); }
|
|
||||||
body {
|
|
||||||
background-color: #0f0f0f;
|
|
||||||
color: #fff;
|
|
||||||
font-family: 'Arial Rounded MT', sans-serif;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
height: 100%;
|
|
||||||
margin: 0;
|
|
||||||
/* font legibility optimizations */
|
|
||||||
-webkit-font-smoothing: antialiased;
|
|
||||||
-moz-osx-font-smoothing: grayscale;
|
|
||||||
text-rendering: optimizeLegibility;
|
|
||||||
}
|
|
||||||
.container {
|
|
||||||
max-width: 800px;
|
|
||||||
padding: 20px;
|
|
||||||
border-radius: 15px;
|
|
||||||
}
|
|
||||||
.note {
|
|
||||||
background-color: #181717;
|
|
||||||
padding: 10px;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
border-radius: 10px;
|
|
||||||
}
|
|
||||||
h1 {
|
|
||||||
text-align: center;
|
|
||||||
font-family: "header", sans-serif;
|
|
||||||
}
|
|
||||||
h3 {
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
img {
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
note {
|
|
||||||
color: #fff;
|
|
||||||
white-space: pre-wrap;
|
|
||||||
}
|
|
||||||
code {
|
|
||||||
color: #00ff62b5;
|
|
||||||
font-family: "Lucida Console", "Courier New", monospace;
|
|
||||||
white-space: pre-wrap;
|
|
||||||
}
|
|
||||||
.back-to-top {
|
|
||||||
text-align: right;
|
|
||||||
margin-top: 20px;
|
|
||||||
}
|
|
||||||
.last-updated {
|
|
||||||
text-align: right;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
color: #888;
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
a:link, a:visited, a:hover, a:active {
|
|
||||||
color: #ff7b00;
|
|
||||||
font-style: normal;
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
/* le tableee */
|
|
||||||
table {
|
|
||||||
width: 100%;
|
|
||||||
border-collapse: collapse;
|
|
||||||
border: 1px solid #fff;
|
|
||||||
border-radius: 8px;
|
|
||||||
overflow: hidden;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
th, td {
|
|
||||||
padding: 10px 15px;
|
|
||||||
border: 1px solid #fff;
|
|
||||||
border-radius: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
th {
|
|
||||||
background: #1f1f1f;
|
|
||||||
text-align: left;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
td {
|
|
||||||
background: #0b0b0b;
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
)
|
|
110
noter.sh
110
noter.sh
|
@ -1,7 +1,11 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# noter 1.3.0 - "nice configs" - @k@layer8.space - mit
|
# noter 1.2.4 - "nice font" - @k@layer8.space - mit
|
||||||
|
|
||||||
|
showgenerator="true"
|
||||||
|
backtotop="true"
|
||||||
|
lastupdated="true"
|
||||||
|
#rssfeed="true"
|
||||||
|
|
||||||
source ./config.sh
|
|
||||||
|
|
||||||
# a pretty nifty little logging utility!
|
# a pretty nifty little logging utility!
|
||||||
nlog() {
|
nlog() {
|
||||||
|
@ -82,6 +86,9 @@ generate_top_year_bar() {
|
||||||
generate_rss_feed() {
|
generate_rss_feed() {
|
||||||
nlog "generating rss feed"
|
nlog "generating rss feed"
|
||||||
local rss_file="feed.xml"
|
local rss_file="feed.xml"
|
||||||
|
local rss_title="koutsies telenotes"
|
||||||
|
local rss_description="thoughts about mainly computers... maybe recipes and cats too?"
|
||||||
|
local rss_link="https://k0.tel/"
|
||||||
local rss_pubdate=$(date -u +"%a, %d %b %Y %H:%M:%S GMT")
|
local rss_pubdate=$(date -u +"%a, %d %b %Y %H:%M:%S GMT")
|
||||||
|
|
||||||
xml_escape() {
|
xml_escape() {
|
||||||
|
@ -93,9 +100,9 @@ generate_rss_feed() {
|
||||||
echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>
|
echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>
|
||||||
<rss version=\"2.0\">
|
<rss version=\"2.0\">
|
||||||
<channel>
|
<channel>
|
||||||
<title>$(xml_escape "$site_title")</title>
|
<title>$(xml_escape "$rss_title")</title>
|
||||||
<link>$site_link</link>
|
<link>$rss_link</link>
|
||||||
<description>$(xml_escape "$site_description")</description>
|
<description>$(xml_escape "$rss_description")</description>
|
||||||
<pubDate>$rss_pubdate</pubDate>
|
<pubDate>$rss_pubdate</pubDate>
|
||||||
<lastBuildDate>$rss_pubdate</lastBuildDate>
|
<lastBuildDate>$rss_pubdate</lastBuildDate>
|
||||||
<docs>https://cyber.harvard.edu/rss/rss.html</docs>
|
<docs>https://cyber.harvard.edu/rss/rss.html</docs>
|
||||||
|
@ -140,8 +147,8 @@ echo "<!DOCTYPE html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset='utf-8'>
|
<meta charset='utf-8'>
|
||||||
<title>$notecount notes | noter</title>
|
<title>$notecount notes | noter</title>
|
||||||
<meta property='og:title' content='$site_title' />
|
<meta property='og:title' content='koutsies telenotes' />
|
||||||
<meta property='og:description' content='$site_description' />
|
<meta property='og:description' content='thoughts about mainly computers... maybe recipes and cats too?' />
|
||||||
<meta property='og:type' content='blog' />
|
<meta property='og:type' content='blog' />
|
||||||
<meta property='og:generator' content='noter' />
|
<meta property='og:generator' content='noter' />
|
||||||
<!-- those who seek, shall see - but thy shall be prepared... -->
|
<!-- those who seek, shall see - but thy shall be prepared... -->
|
||||||
|
@ -149,12 +156,97 @@ echo "<!DOCTYPE html>
|
||||||
<link rel='alternate' type='application/atom+xml' title="rss" href='/feed.xml' />
|
<link rel='alternate' type='application/atom+xml' title="rss" href='/feed.xml' />
|
||||||
<meta name='last-generated' content='$(date +"%Y-%m-%d %H:%M:%S")' />
|
<meta name='last-generated' content='$(date +"%Y-%m-%d %H:%M:%S")' />
|
||||||
<style>
|
<style>
|
||||||
$site_css
|
/* font by https://www.1001fonts.com/users/junkohanhero/ */
|
||||||
|
@font-face { font-family: header; src: url(scratch_x_black.ttf); }
|
||||||
|
body {
|
||||||
|
background-color: #0f0f0f;
|
||||||
|
color: #fff;
|
||||||
|
font-family: 'Arial Rounded MT', sans-serif;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
height: 100%;
|
||||||
|
margin: 0;
|
||||||
|
/* font legibility optimizations */
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
text-rendering: optimizeLegibility;
|
||||||
|
}
|
||||||
|
.container {
|
||||||
|
max-width: 800px;
|
||||||
|
padding: 20px;
|
||||||
|
border-radius: 15px;
|
||||||
|
}
|
||||||
|
.note {
|
||||||
|
background-color: #181717;
|
||||||
|
padding: 10px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
text-align: center;
|
||||||
|
font-family: "header", sans-serif;
|
||||||
|
}
|
||||||
|
h3 {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
img {
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
note {
|
||||||
|
color: #fff;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
}
|
||||||
|
code {
|
||||||
|
color: #00ff62b5;
|
||||||
|
font-family: "Lucida Console", "Courier New", monospace;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
}
|
||||||
|
.back-to-top {
|
||||||
|
text-align: right;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
.last-updated {
|
||||||
|
text-align: right;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
color: #888;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
a:link, a:visited, a:hover, a:active {
|
||||||
|
color: #ff7b00;
|
||||||
|
font-style: normal;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
/* le tableee */
|
||||||
|
table {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
border: 1px solid #fff;
|
||||||
|
border-radius: 8px;
|
||||||
|
overflow: hidden;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
th, td {
|
||||||
|
padding: 10px 15px;
|
||||||
|
border: 1px solid #fff;
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
background: #1f1f1f;
|
||||||
|
text-align: left;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
background: #0b0b0b;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class='container'>
|
<div class='container'>
|
||||||
<h1>$site_title</h1><br>
|
<h1>koutsie's telenotes</h1><br>
|
||||||
<center> <a rel='me' href='https://layer8.space/@k'>fedi</a> | <a href="feed.xml">rss</a> | <a href="https://the-sauna.icu/">sauna</a> </center>" >"$output_file"
|
<center> <a rel='me' href='https://layer8.space/@k'>fedi</a> | <a href="feed.xml">rss</a> | <a href="https://the-sauna.icu/">sauna</a> </center>" >"$output_file"
|
||||||
generate_top_year_bar >>"$output_file"
|
generate_top_year_bar >>"$output_file"
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# writer 1.2 - @k@layer8.space - mit
|
# writer 1.0 - @k@layer8.space - mit
|
||||||
|
|
||||||
# Use the assigned editor, if any, else use nano
|
|
||||||
[[ ${EDITOR:-"unset"} == "unset" ]] && EDITOR=nano
|
|
||||||
|
|
||||||
nlog() {
|
nlog() {
|
||||||
local ORANGE='\033[0;33m'
|
local ORANGE='\033[0;33m'
|
||||||
|
@ -14,5 +11,5 @@ mkdir -p notes
|
||||||
current_date=$(date +%Y-%m-%d)
|
current_date=$(date +%Y-%m-%d)
|
||||||
nlog "opening note notes/$current_time.txt"
|
nlog "opening note notes/$current_time.txt"
|
||||||
filename="notes/${current_date}.txt"
|
filename="notes/${current_date}.txt"
|
||||||
$EDITOR "$filename"
|
nano "$filename"
|
||||||
./noter.sh
|
./noter.sh
|
||||||
|
|
Reference in a new issue