OcttKB Cross-Repo Sync (HTML to Raw)

This commit is contained in:
octospacc 2023-03-07 22:19:44 +00:00
parent fc3ac3e4ae
commit 10878bb7b3
15 changed files with 77 additions and 42 deletions

View File

@ -1,7 +1,7 @@
created: 20230209150101862
creator: Octt
icon: 💅
modified: 20230221210603599
modified: 20230307220803864
modifier: Octt
page-cover: https://images.unsplash.com/photo-1523437113738-bbd3cc89fb19
tags: Web
@ -12,3 +12,7 @@ title: CSS
!!! ''References''
* [[CSS Attribute Selectors|https://www.w3schools.com/css/css_attribute_selectors.asp]]
!!! ''Amazing''
* [[After Dark Screensavers in CSS|https://www.bryanbraun.com/after-dark-css/]] - <<[ "[[Git|https://github.com/bryanbraun/after-dark-css]]">>

View File

@ -1,9 +1,10 @@
created: 20230111223018169
creator: Octt
icon: 💣
modified: 20230225113355715
modified: 20230307221408438
modifier: Octt
tags: TODO Puzzle $:/i18n:en Game Generic $:/Games
page-cover: https://plus.unsplash.com/premium_photo-1668046490523-6f4e603d446c
tags: Puzzle $:/i18n:en Game Generic $:/Games
title: Minesweeper
<<^wikipediaframe "Minesweeper (video game)" en>>

View File

@ -1,5 +1,7 @@
created: 20221110120605389
modified: 20230206111552344
creator: Octt
icon: 🐍
modified: 20230307220831705
modifier: Octt
page-cover: https://source.unsplash.com/random/?Python
tags: Development $:/i18n:en

View File

@ -0,0 +1,10 @@
created: 20230307215116937
creator: Octt
modified: 20230307215737976
modifier: Octt
title: Saved/Games
List of some small games I liked, I must save them but don't know where.
* [[Rogule|https://rogule.com/]] - //A dungeon a day keeps the Balrog away// - <<[ "[[Git|https://github.com/chr15m/rogule.com]]">>
* [[ZType|https://zty.pe/]] - //Typing Game//

View File

@ -1,5 +1,5 @@
created: 20230307194210756
created: 20230307221943341
current-tiddler: GettingStarted
modified: 20230307194210756
modified: 20230307221943341
title: $:/HistoryList
type: application/json

View File

@ -8,12 +8,5 @@ tiddlywiki \
--rendertiddler $:/core/templates/static.template.css Style.css text/plain \
--rendertiddler $:/core/templates/alltiddlers.template.html Static.html text/plain
# Fix errors in the resulting HTML
cat << EOF | python3
from bs4 import BeautifulSoup;
from re import sub;
File = 'Static.html'
def Fix1(m): return f'<details><a name="{m.group(1)}"></a><summary>{m.group(2)}</summary>';
Source = str(BeautifulSoup(open(File, 'r'), 'html5lib'));
open(File, 'w').write(sub('<details><a name="(.+)"><summary>(.+)<\/summary>\s*<\/a>', Fix1, Source));
EOF
# Apply patches to the static HTML
python3 ../PatchStatic.py

View File

@ -1,6 +1,6 @@
created: 20230126082147025
creator: Octt
modified: 20230225230248038
modified: 20230307221654772
modifier: Octt
title: $:/OcttKB/Repo/Build.sh
type: text/plain

View File

@ -0,0 +1,12 @@
#!/usr/bin/env python3
from bs4 import BeautifulSoup
from re import sub
File = 'Static.html'
def Fix1(m):
return f'<details><a name="{m.group(1)}"></a><summary>{m.group(2)}</summary>'
Source = str(BeautifulSoup(open(File, 'r'), 'html5lib'));
open(File, 'w').write(sub('<details><a name="(.+)"><summary>(.+)<\/summary>\s*<\/a>', Fix1, Source));

View File

@ -0,0 +1,6 @@
created: 20230307221237990
creator: Octt
modified: 20230307221722752
modifier: Octt
title: $:/OcttKB/Repo/PatchStatic.py
type: text/plain

View File

@ -1,6 +1,6 @@
created: 20230307193342778
created: 20230307212347887
creator: Octt
list:
modified: 20230307194102788
modified: 20230307221614637
modifier: Octt
title: $:/StoryList

View File

@ -1,6 +1,6 @@
created: 20230108190740128
creator: Octt
modified: 20230307191744793
modified: 20230307215827258
modifier: Octt
tags: $:/tags/Stylesheet
title: $:/Styles/Main
@ -99,6 +99,8 @@ Div.View-Breadcrumbs
border-radius: 1em;
}
.AiLink { opacity: 0.40; }
.DirList-Title, .DirList-Title * { Font-Style: Normal !Important; }
.Separator-Right:last-of-type { Display: None; }

View File

@ -1,31 +1,29 @@
created: 20230124112022156
creator: Octt
modified: 20230307194005027
modified: 20230307214438744
modifier: Octt
tags:
tags: $:/tags/ViewTemplate
title: $:/Styles/View/9-99-Hacks
\define MainScript()
\whitespace trim
<<script script="
var Title = `$(currentTiddler)$`.replaceAll();
var Select = `.tc-tiddler-frame[data-tiddler-title='$(currentTiddler)$']`;
Tiddlers = document.querySelectorAll(Select);
alert(Tiddlers);
if (true) {
var Query = decodeURIComponent('Please summarize the following article into concise key bullet points: ${URL}. Write the points as objective, generalized declarations that stand by themselves. Do not write them as to explain what the author thinks subjectively. Do not leave any point as unclear: each point must not lead the reader to asking any %22why%22; questions. Avoid boilerplate and repetitions.');
var Title = `$(currentTiddler)$`.replaceAll(`'`, '&apos;');
var Select = `.tc-tiddler-frame[data-tiddler-title='${Title}']`;
var Tiddlers = document.querySelectorAll(Select);
Tiddlers.forEach(function(El){
El.querySelectorAll('a.tc-tiddlylink-external').forEach(function(Link){
var AiLink = document.createElement('span');
AiLink.className = 'AiLink';
AiLink.innerHTML = `<sup>[<a rel='noopener noreferrer' target='_blank' href='https://www.bing.com/search?q=${encodeURIComponent(Query.replace('${URL}', Link.href))}'>AI</a>]</sup>`;
Link.after(AiLink);
});
});
};
">>
\end
<!--
<<script off>>
<script>
/*
<$text text=<<currentTiddler>>/>
*/
/*
document.querySelector('.tc-story-river > div[data-tiddler-title=""]')
console.log();
*/
</script>
<<script off>>
-->
<!--<<TiddlerViewShowBreadcrumbs>>-->
<!-- <<MainScript>> -->
<<MainScript>>

View File

@ -1,6 +1,6 @@
created: 20220920174307633
creator: Octt
modified: 20230305220241073
modified: 20230307214152122
modifier: Octt
title: $:/state/sidebar

View File

@ -1,6 +1,6 @@
created: 20220920092307479
creator: Octt
modified: 20230307194109370
modified: 20230307221829948
modifier: Octt
title: $:/state/tab/sidebar--595412856

View File

@ -0,0 +1,7 @@
created: 20230307215026101
creator: Octt
modified: 20230307215026780
modifier: Octt
title: $:/state/tree/Saved/Posts/
hide