moved list of strings to json file + added test html file

This commit is contained in:
array-in-a-matrix 2022-06-10 00:34:44 -04:00
parent 1e6aa6ed47
commit 7571a86647
4 changed files with 26 additions and 2 deletions

3
.gitignore vendored
View file

@ -102,3 +102,6 @@ dist
# TernJS port file
.tern-port
# Example strings
strings.json

View file

@ -1,11 +1,13 @@
const file = require('fs');
const path = require('path');
const cheerio = require('cheerio');
const config = require('./strings.json');
const filePath = path.join(__dirname, '../../index.html');
// const filePath = path.join(__dirname, '../../index.html');
const filePath = path.join(__dirname, './test.html');
const $ = cheerio.load(file.readFileSync(filePath));
let string_list = ['Welcome to the abyss.', 'Among Us', 'Shinjū', 'Tenebrous', '[this splash text is now available]', 'As seen on TV!', 'Open source!', 'Déjà vu!', 'doot doot', '/give @a hugs 64', 'Home-made!', 'Made by a "real" person!', 'Made in Canada!', '& Knuckles!', 'Check out my blog!', 'Removed Herobrine', '3.14159265358979323846264338327950...','Know your addictions not a crime', 'undefined', 'Theres no escape.', 'Sleep all day, wide awake when the night falls', 'I know Im complacent <br> Youll find a replacement', 'All You Are', 'Foreign skies <br> Come and find me where the daylight ends', 'Too late to start again so lets live to see the end.', 'But only after dark', 'So lay waste to all we\'ve made <br> For your corporate palisade', 'Edgy', 'A killer in a slick dress, shed your skin and regress', 'Would you fight, would you die <br> To project the change you\'ve buried deep inside?', 'Nugget, biscuit, nugget in a biscuit <br> Dip it all in mashed potatoes!', 'Gotta let it go', 'Node.Js &lt;3', 'h', 'ت', 'The CIA glow in the dark, you can see them if you\'re driving. You just run them over, that\'s what you do.', 'lord, forgive me for what I\'m about to do.', '9 + 10 = 21', 'Running on GNU/Linux!', 'I use Arch btw', 'real', 'sad', '"Please stop hitting my rib cage with a metal bar!" 🤓', 'An array (or vector) inside a matrix (2D array) is just a tensor (3D array).', 'Send me a frog video pls.', 'π = 3 = √g', 'A man once drove a car',':(){ :|:& };:', '#include &lt;stdio.h&gt;', '#include &lt;math.h&gt;', '127.0.0.1', 'Welcome!', 'Welcome back! (assuming you came before)', 'Assume a Spherical Cow', '꧁༺༻꧂', 'Made with HTML and CSS!', 'I have your IP address', 'Touch grass', 'Full of soup.', 'el gato', 'low intelligence specimen', 'Rule #1: always boss up', 'Rule #2: never forget ya homies <br> they always there 4u', 'Rule #3: get outdoors', 'suffering builds character', 'Greetings federal agents!', 'Jinx the cat &lt;3', 'Bingus &lt;3', 'Big Floppa &lt;3', 'Juice the cat &lt;3', 'Phrogghe', '&lt;!DOCTYPE html&gt;', 'AAAAAAAAAAAAAAAAAAAAAA', 'stop thinking', 'The voices are getting louder.', 'Disgusted by the fact that the passage of time affects me.', 'Normalize being a sleepyhead!', 'What if we exchagned our public gpg keys? aha jk.. Unless...?', 'jhawifiw awfjjjwfiv', "the moment when the", 'Look for The Gummy Bear Album in Stores on November 13th!', 'Friendship ended with NPM now PNPM is my new best friend', 'Free free Palestine 🇵🇸!'];
let string_list = config.strings;
let string = string_list[Math.floor(Math.random() * string_list.length)];
// let string = string_list[string_list.length - 1];

7
strings.example.json Normal file
View file

@ -0,0 +1,7 @@
{
"strings": [
"tagline 1",
"tagline 2",
"tagline 3"
]
}

12
test.html Normal file
View file

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<h2 class="project-tagline">static string</h2>
</body>
</html>