Commit 15ee553

xxwhirlpool  ·  2025-10-23 17:29:32 -0400 EDT
parent 52e9eeb
cleanup
7 files changed,  +7, -299
+1, -1
......@@ -66,7 +66,7 @@ ${goto 24}${color1}Uptime: ${color1}$uptime
6666
6767 ${goto 24}${color1}${font1}Memory ${voffset 8}${font}
6868 ${goto 24}${color1}RAM: ${color1}$mem/$memmax ${alignr}$memperc% ${color1}${membar 4, 124}
69-${goto 24}${color1}Swap: ${color1}$swap/$swapmax ${alignr}$swapperc% ${color1}${swapbar 4, 124}
69+${goto 24}${color1}Swap: ${color1}$swap/$swapmax ${alignr}$swapperc% ${color1}${swapbar 4, 124}${voffset 8}
7070
7171 ${goto 24}${color1}${font1}Now Playing ${font}${voffset 8}
7272 ${color1}${font1}${execi 5 (/home/kat/Documents/lastfm.sh | sed 's/^/ /')}
+3, -3
......@@ -9,13 +9,13 @@
99 # edit to suit your system
1010
1111 # functions
12-read() {
12+fromstdin() {
1313 # declare some vars
1414 MDFILE="/tmp/$(openssl rand -hex 5).md"
1515 HTMLFILE="${MDFILE%.*}.html"
1616 HTMLFILE_FINAL="${HTMLFILE%.*}_final.html"
1717 # prompt user to paste markdown formatted text, then write it to a temp file
18- gum write > "$MDFILE"
18+ gum write --header="paste MD-formatted text below" > "$MDFILE"
1919 # the conversion!
2020 pandoc --no-highlight --wrap=none "$MDFILE" -o "$HTMLFILE"
2121 # swap unicode/HTML entities to their actual characters
......@@ -49,7 +49,7 @@ fromfile() {
4949 choice() {
5050 choose=$(gum choose "paste" "file")
5151 case "$choose" in
52- *paste) read ;;
52+ *paste) fromstdin ;;
5353 *file) fromfile ;;
5454 *) exit ;;
5555 esac
+0, -204
......@@ -1,204 +0,0 @@
1-@import url('https://unpkg.com/@catppuccin/palette/css/catppuccin.css');
2- html {
3- color: var(--ctp-frappe-base);
4- background-color: var(--ctp-latte-base);
5- }
6- body {
7- margin: 0;
8- min-height: 100vh;
9- line-height: 1.7;
10- font-family: Arial, sans-serif;
11- hyphens: auto;
12- overflow-wrap: break-word;
13- text-rendering: optimizeLegibility;
14- font-kerning: normal;
15- }
16- @media (max-width: 600px) {
17- body {
18- font-size: 0.9em;
19- padding: 12px;
20- max-width: 100%;
21- }
22- h1 {
23- font-size: 1.8em;
24- }
25- }
26- @media print {
27- html {
28- background-color: white;
29- }
30- body {
31- background-color: transparent;
32- color: black;
33- font-size: 12pt;
34- }
35- p, h2, h3 {
36- orphans: 3;
37- widows: 3;
38- }
39- h2, h3, h4 {
40- page-break-after: avoid;
41- }
42- }
43- p {
44- margin: 1em 0;
45- }
46- a, a:link, a:visited, a:link:visited {
47- color: var(--ctp-latte-lavender);
48- }
49- a:hover {
50- text-decoration: none;
51- color: var(--ctp-latte-text);
52- }
53- img {
54- max-width: 100%;
55- display: block;
56- }
57- svg {
58- height: auto;
59- max-width: 100%;
60- }
61- h1, h2, h3, h4, h5, h6 {
62- margin-top: 1.4em;
63- color: var(--ctp-frappe-surface0);
64- line-height: 1.1;
65- }
66- h5, h6 {
67- font-size: 1em;
68- font-style: italic;
69- }
70- h6 {
71- font-weight: normal;
72- }
73- ol, ul {
74- padding-left: 1.7em;
75- margin-top: 1em;
76- }
77- li > ol, li > ul {
78- margin-top: 0;
79- }
80- blockquote {
81- margin: 1em 0 1em 1.7em;
82- padding-left: 1em;
83- border-left: 2px solid #e6e6e6;
84- color: #606060;
85- }
86- code {
87- font-family: Menlo, Monaco, Consolas, 'Lucida Console', monospace;
88- font-size: 85%;
89- margin: 0;
90- hyphens: manual;
91- }
92- pre {
93- margin: 1em 0;
94- overflow: auto;
95- padding: 1em;
96- background: #303446;
97- }
98- pre code {
99- padding: 0;
100- overflow: visible;
101- overflow-wrap: normal;
102- }
103- .sourceCode {
104- background-color: transparent;
105- overflow: visible;
106- }
107- hr {
108- background-color: #1a1a1a;
109- border: none;
110- height: 1px;
111- margin: 1em 0;
112- }
113- table {
114- margin: 1em 0;
115- border-collapse: collapse;
116- width: 100%;
117- overflow-x: auto;
118- display: block;
119- font-variant-numeric: lining-nums tabular-nums;
120- }
121- table caption {
122- margin-bottom: 0.75em;
123- }
124- tbody {
125- margin-top: 0.5em;
126- border-top: 1px solid #1a1a1a;
127- border-bottom: 1px solid #1a1a1a;
128- }
129- th {
130- border-top: 1px solid #1a1a1a;
131- padding: 0.25em 0.5em 0.25em 0.5em;
132- }
133- td {
134- padding: 0.125em 0.5em 0.25em 0.5em;
135- }
136- header {
137- margin-bottom: 4em;
138- text-align: center;
139- }
140- #TOC li {
141- list-style: none;
142- }
143- #TOC ul {
144- padding-left: 1.3em;
145- }
146- #TOC > ul {
147- padding-left: 0;
148- }
149- #TOC a:not(:hover) {
150- text-decoration: none;
151- }
152- code{white-space: pre-wrap;}
153- span.smallcaps{font-variant: small-caps;}
154- div.columns{display: flex; gap: min(4vw, 1.5em);}
155- div.column{flex: auto; overflow-x: auto;}
156- div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
157- /* The extra [class] is a hack that increases specificity enough to
158- override a similar rule in reveal.js */
159- ul.task-list[class]{list-style: none;}
160- ul.task-list li input[type="checkbox"] {
161- font-size: inherit;
162- width: 0.8em;
163- margin: 0 0.8em 0.2em -1.6em;
164- vertical-align: middle;
165- }
166- .display.math{display: block; text-align: center; margin: 0.5rem auto;}
167-
168- ::selection {
169- color: var(--ctp-latte-surface1);
170- background: var(--ctp-frappe-crust);
171- }
172-
173- .flow > * + * {
174- margin-block-start: var(--flow-space, 1em);
175- }
176-
177- :is(h1, h2, h3, blockquote) {
178- --flow-space: 1.5em;
179- }
180-
181- :is(h1, h2, h3) + * {
182- --flow-space: 0.5em;
183- }
184-
185- article > * {
186- max-width: 65ch;
187- }
188-
189- article {
190- max-width: 65ch;
191- margin-inline: auto;
192- }
193-
194- blockquote {
195- max-width: 50ch;
196- }
197-
198- h1 {
199- max-width: 20ch;
200- }
201-
202- h2,h3 {
203- max-width: 28ch;
204- }
+0, -88
......@@ -1,88 +0,0 @@
1-<!DOCTYPE html>
2-<html lang="en">
3-<head>
4- <meta charset="utf-8" />
5- <meta name="generator" content="pandoc" />
6- <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
7-$for(author-meta)$
8- <meta name="author" content="$author-meta$" />
9-$endfor$
10-$if(date-meta)$
11- <meta name="dcterms.date" content="$date-meta$" />
12-$endif$
13-$if(keywords)$
14- <meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$" />
15-$endif$
16-$if(description-meta)$
17- <meta name="description" content="$description-meta$" />
18-$endif$
19- <title>$if(title-prefix)$$title-prefix$ – $endif$$pagetitle$</title>
20-
21- <link rel="stylesheet" href="https://unpkg.com/@catppuccin/highlightjs@1.0.1/css/catppuccin-frappe.css">
22-
23- <link rel="stylesheet" href="../md2html.css">
24-
25- <script src="https://unpkg.com/@highlightjs/cdn-assets@11.9.0/highlight.min.js"></script>
26-
27- <script>
28- document.getElementById("sourceCode").classList.add("language ");
29- </script>
30-
31-$for(header-includes)$
32- $header-includes$
33-$endfor$
34-$if(math)$
35- $math$
36-$endif$
37-</head>
38-<body>
39-<script>hljs.highlightAll();</script>
40-<article class="flow">
41-$for(include-before)$
42-$include-before$
43-$endfor$
44-$if(title)$
45-<header id="title-block-header">
46-<h1 class="title">$title$</h1>
47-$if(subtitle)$
48-<p class="subtitle">$subtitle$</p>
49-$endif$
50-<p>
51-$if(date)$
52-published <span class="date">$date$</span>
53-$endif$
54-</p>
55-<p>
56-$if(lastmodified)$
57-last edited <span class="date">$lastmodified$</span>
58-$endif$
59-</p>
60-<p>
61-$for(author)$
62-by <a href="https://girlonthemoon.xyz/"><span class="author">$author$</span></a>
63-$endfor$
64-</p>
65-$if(abstract)$
66-<div class="abstract">
67-<div class="abstract-title">$abstract-title$</div>
68-$abstract$
69-</div>
70-$endif$
71-</header>
72-$endif$
73-$if(toc)$
74-<nav id="$idprefix$TOC" role="doc-toc">
75-$if(toc-title)$
76-<h2 id="$idprefix$toc-title">$toc-title$</h2>
77-$endif$
78-$table-of-contents$
79-</nav>
80-$endif$
81-
82-$body$
83-$for(include-after)$
84-$include-after$
85-$endfor$
86-</article>
87-</body>
88-</html>
R scripts/Scripts/md2html_test/md2html.css => scripts/Scripts/pandoc/md2html.css
+0, -0
R scripts/Scripts/md2html_test/md2html.html => scripts/Scripts/pandoc/md2html.html
+0, -0
R scripts/Scripts/md2html => scripts/Scripts/pandoc/md2page
+3, -3
......@@ -1,9 +1,9 @@
1-#!/bin/bash
1+#!/usr/bin/env bash
22
33 FILE=$(gum input --placeholder "without an extension")
44
5-HTML="/home/kat/Documents/Code/Templates/pandoc/md2html.html"
5+HTML="./md2html.html"
66
7-CSS="/home/kat/Documents/Code/Templates/pandoc/md2html.css"
7+CSS="./md2html.css"
88
99 pandoc --standalone "$FILE.md" --template=$HTML --no-highlight -o "$FILE.html"