1
0

not a single test since last commit

This commit is contained in:
dtb 2023-07-19 23:27:46 -04:00
parent bfea5f032e
commit 5cd709a449

View File

@ -1,34 +1,82 @@
#!/bin/sh #!/bin/sh
#llllmmmm11234567892123456789312345678941234567895123456789612345678971234567890 #llllmmmm11234567892123456789312345678941234567895123456789612345678971234567890
set -ex set -ex
<"$0" python3 -c " <"$0" python3 -c '
import os, sys import os, sys
cleanupsh = '#!/bin/sh\n' class File:
for day in sys.stdin.read().split('\n\n\n'): attributes = [ # last in order wins in conflict, list must have both
f = day.split('\n')[0] "literally", "figuratively",
if '\t' in f: "append", "replace",
fa = f.split('\t')[1].split(',') "verbatim", "stub"
f = f.split('\t')[0] ]
content = ""
def __init__(self, **kwargs):
if "attributes" in kwargs:
self.attributes += kwargs["attributes"]
del(kwargs["attributes"])
for key in kwargs:
if key == "attributes": self.attributes+=kwargs["key"]
else: setattr(self, key, kwargs[key])
files = {"./cleanup.sh": File(attributes=["verbatim"], content="#!/bin/sh\n")}
for part in sys.stdin.read().split("\n\n\n").reverse():
name = part.split("\n")[0]
substitutions = dict()
if "\t" in "." + name:
attributes = name.split("\t")[1].split(",")
name = name.split("\t")[0]
else: attributes = default_attributes
if len(name) > 1 and name[1] != "/": continue
for s in part[len(name)+1:].split("\n\n")[0].split("\n"):
s = s.split("\t")
if len(s) == 2: substitutions[s[0]] = s[1]
content = part[len(substitutions)+2:]
if attributes.index("append") > attributes.index("replace"):
if not(name in files):
sys.stderr.write(sys.argv[0] + ": " + name + ": "
+ "appending to nothing\n")
else: else:
fa = [''] content = files[name].content + content
if f[0] != '/': files += {name: File(attributes = attributes, content = content,
continue substitutions = substitutions)}
f = '.' + f for name in files:
if os.path.isfile(f): if name == "./cleanup.sh": continue
continue attributes = files[name].attributes
d = '/'.join(f.split('/')[:-1]) directory = "/".join(name.split("/")[:-1])
if '/' in f and not(os.path.isdir(d)) and not(d == ''): if attributes.index("stub") > attributes.index("verbatim"):
os.makedirs(d) prefix = ""
cleanupsh += 'rm -r -- ' + d + '\n' suffix = ""
with open(f,'w') as fd: for d in directory.split("/"):
fd.write(day) if d + "/Prefix" in files.keys():
if cleanupsh == '': prefix = files[d + "/Prefix"].content
cleanupsh = '#!/bin/sh\n' if d + "/Suffix" in files.keys():
cleanupsh += 'rm -- ' + f + '\n' suffix = files[d + "/Suffix"].content
if len(cleanupsh.split('\n')) > 2: files[name].content = prefix + files[name].content + suffix
with open('cleanup.sh', 'w') as fd: if attributes.index("figuratively") > attributes.index("literally"):
fd.write(cleanupsh) content = files[name].content
" for s in files[name].substitutions:
instances = []
i = 0
while True:
instance = content.find(s, i)
if instance == -1: break
intances += [instance]
i = instance + len(s)
if len(instances) == 0: continue
for i in intances.reverse():
content = (content[:i] + substitutions[s]
+ content[i+len(s):])
files[name].content = content
if not(os.path.isdir(directory)):
os.makedirs(directory)
files["./cleanup.sh"].content += "rm -r -- " + directory + "\n"
else if directory == ".":
files["./cleanup.sh"].content += "rm -- " + name + "\n"
with open(name, "w") as fd:
fd.write(f)
if len(files["./cleanup.sh"].content.split("\n")) > 2:
with open("./cleanup.sh", "w") as fd:
fd.write(files["./cleanup.sh"].content)
'
test -f homepage.local \ test -f homepage.local \
&& exec ./homepage.local \ && exec ./homepage.local \
|| exit 0 || exit 0
@ -63,8 +111,8 @@ For more information, please refer to <http://unlicense.org/>
/homepage.html /homepage.html
$! __TITLE__ &quot;homepage&quot; documentation $!TITLE &quot;homepage&quot; documentation
$! __DESCRIPTION one file, one website $!DESCRIPTION one file, one website
<H1>&quot;homepage&quot; documentation</H1> <H1>&quot;homepage&quot; documentation</H1>
<H2>the forest</H2> <H2>the forest</H2>
@ -109,14 +157,62 @@ appended. The "stub" attribute indicates the opposite, though its behavior is
default. default.
</P> </P>
<P> <P>
The "literal" attribute indicates that the file should not be subject to The "literally" attribute indicates that the file should not be subject to
macro expansion despite any other directives. The "figurative" attribute macro expansion despite any other directives. The "figuratively" attribute
indicates the opposite, though its behavior is default. indicates the opposite, though its behavior is default.
</P> </P>
/praise/index.html append,literally
<LI>[<TIME datetime="2023-07-18 12:27">2023</TIME>] Doctor Eli Selig !!JQHA6kqyl91: >Maid Phone user / >mfw / ["Heart hands.jpg"]</LI>
/praise/Prefix
<!DOCTYPE html>
<HTML lang="en-US">
<HEAD>
<LINK HREF="https://trinity.moe/_PAGE" REL="canonical" />
<LINK HREF="/img/icons/favicon.ico" REL="shortcut icon" TYPE="image/x-icon" />
<LINK HREF="/css/2023.css" ID="styling" REL="stylesheet" />
<META CHARSET="UTF-8" />
<META CONTENT="dtb" NAME="author" />
<META CONTENT="praise for trinity / dot moe" NAME="description" />
<META CONTENT="width=device-width, initial-scale=1" NAME="viewport" />
<META CONTENT="img/trinnow.bmp" NAME="og:image" />
<META CONTENT="noindex" NAME="googlebot" /> <!-- FUCK GOOGLE -->
<META CONTENT="interest-cohort=()" HTTP-EQUIV="Permissions-Policy" /> <!-- FUCK GOOGLE -->
<STYLE>
li { font-family: monospace }
</STLYE>
<TITLE>praise</TITLE>
</HEAD>
<BODY>
<P><A HREF="..">~ www.trinity.moe</A></P>
<UL>
/praise/index.html literally
<LI>[<TIME datetime="2004-12-09">2004</TIME>] Dr. Gene Ray: <A HREF="https://web.archive.org/web/20041209065507/http://timecube.com:80/index.html">Life rotation debunks Trinity.</A></LI>
<LI>[<TIME datetime="2021-03-27 04:44">2021<TIME>] 🛸UFO🛸: I wanna hug trinity</LI>
<LI>[<TIME datetime="2021-05-03">2021</TIME>] Вероника Заглотова: <A HREF="https://invidious.tube/watch?v=fUpZO9LnNo0">my computer is making mustard gases</A></LI>
<LI>[<TIME datetime="2021-05-10 10:47">2021</TIME>] Аноним: [<I>screenshot of this website next to a screenshot of a wojak</I>]</LI> <!-- https://web.archive.org/web/20210510123535mp_/https://2ch.hk/s/res/2981671.html -->
<LI>[<TIME datetime="2021-05-15 08:49">2021</TIME>] Anonymous: deven's website is the best~!</LI>
<LI>[<TIME datetime="2021-05-15 09:17">2021</TIME>] Anonymous: this is what developing mental illness in teen years looks like</LI>
<LI>[<TIME>2021</TIME>] MetaMask/eth-phishing-detect: <A HREF="https://github.com/MetaMask/eth-phishing-detect/issues/5119">This domain was blocked for its similarity to dfinity.org, a historical phishing target.</A></LI>
<LI>[<TIME datetime="2022-05-11 21:43">2022</TIME>] Eminav_B: Never watching a movie with trinity</LI>
<LI>[<TIME datetime="2022-09-15 21:11">2022</TIME>] Milady Sonora Sprite: hi</LI>
/praise/Suffix
</UL>
</BODY>
</HTML>
/x200t/index.html /x200t/index.html
$! Thinkpad X200 Tablet $!TITLE Thinkpad X200 Tablet
<SCRIPT SRC="/js/cookies.js" TYPE="application/javascript"></SCRIPT> <SCRIPT SRC="/js/cookies.js" TYPE="application/javascript"></SCRIPT>
<SCRIPT SRC="/js/sheets.js" TYPE="application/javascript"></SCRIPT> <SCRIPT SRC="/js/sheets.js" TYPE="application/javascript"></SCRIPT>
@ -299,7 +395,7 @@ No other FRUs need to be removed, nor do any other steps of the removal process
/hacker-howto/index.html /hacker-howto/index.html
$! __TITLE__ How to Become A Hacker $!TITLE How to Become A Hacker
<H2>How to Become A Hacker</H2> <H2>How to Become A Hacker</H2>
<H3>Deven Trinity Blake</H3> <H3>Deven Trinity Blake</H3>
@ -384,7 +480,7 @@ How to accomplish this is an exercise left to the reader.
/home/index.html /home/index.html
$! __TITLE__ home $!TITLE home
<P><A HREF="/">~ www.trinity.moe</A></P> <P><A HREF="/">~ www.trinity.moe</A></P>
<UL> <UL>
@ -2064,7 +2160,7 @@ https://be.murderu.us/unix#posix#true(1)</A>.
/k/gacc.html /k/gacc.html
$! __TITLE__ on the gender acceleration blackpaper $!TITLE on the gender acceleration blackpaper
<H1>on the gender acceleration blackpaper</H1> <H1>on the gender acceleration blackpaper</H1>
<H3>updated ⏬?⏬?⏬</H3> <H3>updated ⏬?⏬?⏬</H3>
@ -2363,8 +2459,8 @@ You have disconnected.
/index.html /index.html
$! __TITLE__ trinity dot moe $!TITLE trinity dot moe
$! __DESCRIPTION__ trinity's personal website $!DESCRIPTION trinity's personal website
<SCRIPT TYPE="application/javascript" SRC="js/cookies.js" ></SCRIPT> <SCRIPT TYPE="application/javascript" SRC="js/cookies.js" ></SCRIPT>
<SCRIPT TYPE="application/javascript" SRC="js/quotes.js" ></SCRIPT> <SCRIPT TYPE="application/javascript" SRC="js/quotes.js" ></SCRIPT>
@ -2429,23 +2525,6 @@ curl https://www.trinity.moe/zeldb.sh | sudo sh
<HR ALIGN="left" SIZE="1" WIDTH="25%" /> <HR ALIGN="left" SIZE="1" WIDTH="25%" />
<ARTICLE>
<H2>praise</H2>
<UL>
<LI STYLE="font-family: monospace">[<TIME datetime="2004-12-09">2004</TIME>] Dr. Gene Ray: <A HREF="https://web.archive.org/web/20041209065507/http://timecube.com:80/index.html">Life rotation debunks Trinity.</A></LI>
<LI STYLE="font-family: monospace">[<TIME datetime="2021-03-27 04:44">2021<TIME>] 🛸UFO🛸: I wanna hug trinity</LI>
<LI STYLE="font-family: monospace">[<TIME datetime="2021-05-03">2021</TIME>] Вероника Заглотова: <A HREF="https://invidious.tube/watch?v=fUpZO9LnNo0">my computer is making mustard gases</A></LI>
<LI STYLE="font-family: monospace">[<TIME datetime="2021-05-10 10:47">2021</TIME>] Аноним: [<I>screenshot of this website next to a screenshot of a wojak</I>]</LI> <!-- https://web.archive.org/web/20210510123535mp_/https://2ch.hk/s/res/2981671.html -->
<LI STYLE="font-family: monospace">[<TIME datetime="2021-05-15 08:49">2021</TIME>] Anonymous: deven's website is the best~!')
<LI STYLE="font-family: monospace">[<TIME datetime="2021-05-15 09:17">2021</TIME>] Anonymous: this is what developing mental illness in teen years looks like</LI>
<LI STYLE="font-family: monospace">[<TIME>2021</TIME>] MetaMask/eth-phishing-detect: <A HREF="https://github.com/MetaMask/eth-phishing-detect/issues/5119">This domain was blocked for its similarity to dfinity.org, a historical phishing target.</A></LI>
<LI STYLE="font-family: monospace">[<TIME datetime="2022-05-11 21:43">2022</TIME>] Eminav_B: Never watching a movie with trinity</LI>
<LI STYLE="font-family: monospace">[<TIME datetime="2022-09-15 21:11">2022</TIME>] Milady Sonora Sprite: hi</LI>
</UL>
</ARTICLE>
<HR ALIGN="left" SIZE="1" WIDTH="25%" />
<P> <P>
This site is written in vim and tested in the latest Firefox. This site is written in vim and tested in the latest Firefox.
No rights reserved, all rights exercised, rights turned to lefts, left in this corner of the web. No rights reserved, all rights exercised, rights turned to lefts, left in this corner of the web.