mirror of
https://github.com/inexorabletash/jsbasic.git
synced 2025-01-23 00:32:47 +00:00
Build sample index from data file
This commit is contained in:
parent
abe614a52d
commit
aee6b4665f
132
index.html
132
index.html
@ -54,111 +54,35 @@ By <a target=_blank href="mailto:inexorabletash@gmail.com">Joshua Bell</a>
|
||||
|
||||
<select id="lb_files">
|
||||
<option disabled selected="selected">Select a sample...</option>
|
||||
<option value="sample.basic">DEMOS</option>
|
||||
|
||||
<option disabled>____________________________________________</option>
|
||||
<option disabled>Tests</option>
|
||||
<option value="sample.unittests"> Unit Tests</option>
|
||||
<option value="sample.keyboard"> Keyboard Test</option>
|
||||
<option value="sample.charset"> Charset Test</option>
|
||||
|
||||
|
||||
<option disabled>____________________________________________</option>
|
||||
<option disabled>Games</option>
|
||||
|
||||
<option value="simple.pong"> SIMPLE.PONG</option>
|
||||
<option value="sample.adventure"> Text Adventure (Floyd McWilliams)</option>
|
||||
<option value="sample.pacman"> (Not Really) ASCII Pac-Man (Michael Kemp)</option>
|
||||
<option value="sample.puzzler"> Puzzler (Gregg Buntin)</option>
|
||||
<option value="sample.hangman"> Hangman (Mike Gleason)</option>
|
||||
<option value="sample.raindrops"> Catch the Raindrop (Nicholas Merchant)</option>
|
||||
<option value="sample.jot"> JOT (Mike Gleason)</option>
|
||||
<option value="sample.miniindy"> Mini Indy (Gregg Buntin)</option>
|
||||
<option value="sample.doordetector"> Door Detector (Jeff)</option>
|
||||
<option value="sample.columns"> Columns (Arthur Allen)</option>
|
||||
<option value="sample.tetris"> Tetris (Arthur Allen)</option>
|
||||
<option value="sample.dicegame"> Colorful Dice (Gregory Lewis)</option>
|
||||
<option value="sample.aritm"> Aritm - Mental calculation (Mikael O. Bonnier)</option>
|
||||
<option value="sample.unfinishedmaze"> Unfinished Maze (Alexander G. Tozzi)</option>
|
||||
<option value="sample.dragonsmaze"> Dragon's Maze (Russell Hokanson)</option>
|
||||
<option value="sample.blackhole"> Black Hole Maze (S.M.Compton c/o Melody Ayres-Griffiths)</option>
|
||||
<option value="sample.chase"> Chase (Dominik Heidler)</option>
|
||||
<option value="sample.spaceattack"> Space Attack! (Alan Ratliff)</option>
|
||||
<option value="sample.building"> Building (Melvin Rosario)</option>
|
||||
<option value="sample.artillery"> Artillery (Michael "Moose" O'Malley)</option>
|
||||
<option value="sample.platformer"> Platformer (Beckett Bylsma & Brendan Ghareeb)</option>
|
||||
|
||||
<option disabled>____________________________________________</option>
|
||||
<option disabled>Graphics</option>
|
||||
|
||||
<option value="sample.rodscolorpattern"> Rod's Color Pattern</option>
|
||||
<option value="sample.hacker"> Hacker Logo (markwstock)</option>
|
||||
<option value="sample.loreswalk"> Random LoRes (John Melesky)</option>
|
||||
<option value="sample.hireswalk"> Random HiRes (John Melesky)</option>
|
||||
<option value="sample.sierpinski"> Sierpinski Triangles (Kevin Miller)</option>
|
||||
<option value="sample.stringart"> String Art (Chris Heric)</option>
|
||||
<option value="sample.paint"> Drawing Program (Brian Broker)</option>
|
||||
<option value="sample.scribble"> Scribble (William Simms)</option>
|
||||
<option value="sample.connections"> Connections (Gregg Buntin)</option>
|
||||
<option value="sample.squiggle"> Squiggle (Gregg Buntin)</option>
|
||||
<option value="sample.boys_surface"> Boy's Surface (Lukas Innig)</option>
|
||||
<option value="sample.gaussian"> Gaussian Distribution 2D (John Russ)</option>
|
||||
<option value="sample.bitmaps"> Bitmap Images (Brian Broker)</option>
|
||||
<option value="sample.mandelbrot"> Mandelbrot Set (c/o Gregory Lewis)</option>
|
||||
<option value="sample.mandelbrot2"> Mandelbrot Set in Color</option>
|
||||
<option value="sample.steve"> Steve (Nicola Foggi)</option>
|
||||
<option value="sample.logo"> Apple Logo (Brendan Robert)</option>
|
||||
<option value="sample.loresdrawing"> Graphics Drawing (Gregg Buntin)</option>
|
||||
<option value="sample.calculatedimage"> Calculated Image (Gregg Buntin)</option>
|
||||
<option value="sample.xmastree"> Christmas Tree (Gregg Buntin and Rich Orde)</option>
|
||||
<option value="sample.snowflakes"> Snowflakes (Kevin Riordan)</option>
|
||||
<option value="sample.ninjaturtle"> Ninja Turtle (Chris Whong)</option>
|
||||
|
||||
<option value="sample.3dhat"> 3D Hat (Micro, the 6502 magazine, may 1981 c/o Golden Child)</option>
|
||||
<option value="sample.dbconverge"> Double-Buffered Value Convergence (Golden Child)</option>
|
||||
<option value="sample.dbpendulum"> Double-Buffered Physics Pendulum Simulation (Golden Child)</option>
|
||||
<option value="sample.dbvectorship"> Double-Buffered Asteroids Ship Demo (Golden Child)</option>
|
||||
<option value="sample.dbvectortext"> Double-Buffered Vector Font (Golden Child)</option>
|
||||
<option value="sample.stellar7"> STELLAR 7 Rotate 3d Objects (Golden Child)</option>
|
||||
<option value="sample.functiongraphing"> Function Graphing (Golden Child)</option>
|
||||
<option value="sample.codabar"> Codabar Generator (Golden Child)</option>
|
||||
|
||||
<option value="sample.coloredserpinski"> Colored Serpinski Triangles (Gregory Lewis)</option>
|
||||
<option value="sample.radar"> Radar (Josiah Keller)</option>
|
||||
<option value="sample.moire"> Moiré (Sylvie Breaud)</option>
|
||||
<option value="sample.jobs"> Steve Jobs (Nick McMillen / CJBaird)</option>
|
||||
<option value="sample.dye"> Will You Dye (Brett Edwards)</option>
|
||||
<option value="sample.pretzel"> Pretzel (Zee)</option>
|
||||
<option value="sample.3drectangle"> 3D Rectangle (Tomo Wa)</option>
|
||||
<option value="sample.enterprise"> Original Series Enterprise (Gil Keidar)</option>
|
||||
<option value="sample.colorrings"> Colored Rings (Miika Oja)</option>
|
||||
<option value="sample.bite"> Apple Bite (Michael "Moose" O'Malley)</option>
|
||||
|
||||
<option disabled>____________________________________________</option>
|
||||
<option disabled>Other</option>
|
||||
|
||||
<option value="sample.primes"> Prime Sieve (Kevin Miller)</option>
|
||||
<option value="sample.february"> February Surprise (Antti Pirskanen)</option>
|
||||
<option value="sample.hellosine"> Hello World Sine Wave (Jamie Beu)</option>
|
||||
<option value="sample.bodymass"> Body Mass Index Calculator (Tim Dwyer)</option>
|
||||
<option value="sample.quine"> Quine (Nikolay Mirin)</option>
|
||||
<option value="sample.10print"> 10 PRINT MAZE (translated by Rich Hanes)</option>
|
||||
<option value="sample.primecheck"> Prime Check (Tony Hill)</option>
|
||||
<option value="sample.vdt"> Velocity/Distance/Time (feman1977)</option>
|
||||
<option value="sample.protonelectron"> Proton/Electron Mass Ratio (Mark Rohrbaugh)</option>
|
||||
<option value="sample.onelinetrain"> One Liner Train (Chris ten Den)</option>
|
||||
<option value="sample.piglatin"> Pig Latin Translator (Gregg Buntin)</option>
|
||||
<option value="sample.nuclear"> Nuclear Power Plant (Stephen R. Berggren c/o Kevin Riggle)</option>
|
||||
<option value="sample.factors"> Prime Factors (Cristiano Trabuio)</option>
|
||||
|
||||
<option disabled>____________________________________________</option>
|
||||
<option disabled>Traveller RPG Utilities</option>
|
||||
|
||||
<option value="TRADER C"> TRADER</option>
|
||||
<option value="sample.sectorgen"> Traveller Sector Generator</option>
|
||||
<option value="sample.zhorelay"> Zhodani Relay Station Placement</option>
|
||||
<option value="sample.readsector"> Read Sector File</option>
|
||||
</select>
|
||||
<script>
|
||||
fetch('samples/index.txt')
|
||||
.then(response => {
|
||||
if (!response.ok)
|
||||
throw new Error(response.statusText);
|
||||
return response.text();
|
||||
})
|
||||
.then(text => {
|
||||
const select = document.querySelector('#lb_files');
|
||||
text.split(/\r?\n/g).forEach(line => {
|
||||
line = line.replace(/^\s+|\s+$/, '');
|
||||
if (!line.length) return;
|
||||
if (line.startsWith('#')) {
|
||||
line = line.replace(/^#\s+/, '');
|
||||
select.appendChild(Object.assign(
|
||||
document.createElement('option'),
|
||||
{disabled: true, innerText: line }));
|
||||
} else {
|
||||
const match = line.match(/^(\S+)\s+(.*)$/);
|
||||
select.appendChild(Object.assign(
|
||||
document.createElement('option'),
|
||||
{value: match[1], innerText: '\xA0\xA0' + match[2]}));
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<!-- Source code editor inserted here -->
|
||||
<div id="editorframe"></div>
|
||||
|
103
samples/index.txt
Normal file
103
samples/index.txt
Normal file
@ -0,0 +1,103 @@
|
||||
# ____________________________________________
|
||||
# Tests & Demos
|
||||
|
||||
sample.basic Feature Demos
|
||||
sample.unittests Unit Tests
|
||||
sample.keyboard Keyboard Test
|
||||
sample.charset Charset Test
|
||||
|
||||
# ____________________________________________
|
||||
# Games
|
||||
|
||||
simple.pong SIMPLE.PONG
|
||||
sample.adventure Text Adventure (Floyd McWilliams)
|
||||
sample.pacman (Not Really) ASCII Pac-Man (Michael Kemp)
|
||||
sample.puzzler Puzzler (Gregg Buntin)
|
||||
sample.hangman Hangman (Mike Gleason)
|
||||
sample.raindrops Catch the Raindrop (Nicholas Merchant)
|
||||
sample.jot JOT (Mike Gleason)
|
||||
sample.miniindy Mini Indy (Gregg Buntin)
|
||||
sample.doordetector Door Detector (Jeff)
|
||||
sample.columns Columns (Arthur Allen)
|
||||
sample.tetris Tetris (Arthur Allen)
|
||||
sample.dicegame Colorful Dice (Gregory Lewis)
|
||||
sample.aritm Aritm - Mental calculation (Mikael O. Bonnier)
|
||||
sample.unfinishedmaze Unfinished Maze (Alexander G. Tozzi)
|
||||
sample.dragonsmaze Dragon's Maze (Russell Hokanson)
|
||||
sample.blackhole Black Hole Maze (S.M.Compton c/o Melody Ayres-Griffiths)
|
||||
sample.chase Chase (Dominik Heidler)
|
||||
sample.spaceattack Space Attack! (Alan Ratliff)
|
||||
sample.building Building (Melvin Rosario)
|
||||
sample.artillery Artillery (Michael "Moose" O'Malley)
|
||||
sample.platformer Platformer (Beckett Bylsma & Brendan Ghareeb)
|
||||
|
||||
# ____________________________________________
|
||||
# Graphics
|
||||
|
||||
sample.rodscolorpattern Rod's Color Pattern
|
||||
sample.hacker Hacker Logo (markwstock)
|
||||
sample.loreswalk Random LoRes (John Melesky)
|
||||
sample.hireswalk Random HiRes (John Melesky)
|
||||
sample.sierpinski Sierpinski Triangles (Kevin Miller)
|
||||
sample.stringart String Art (Chris Heric)
|
||||
sample.paint Drawing Program (Brian Broker)
|
||||
sample.scribble Scribble (William Simms)
|
||||
sample.connections Connections (Gregg Buntin)
|
||||
sample.squiggle Squiggle (Gregg Buntin)
|
||||
sample.boys_surface Boy's Surface (Lukas Innig)
|
||||
sample.gaussian Gaussian Distribution 2D (John Russ)
|
||||
sample.bitmaps Bitmap Images (Brian Broker)
|
||||
sample.mandelbrot Mandelbrot Set (c/o Gregory Lewis)
|
||||
sample.mandelbrot2 Mandelbrot Set in Color
|
||||
sample.steve Steve (Nicola Foggi)
|
||||
sample.logo Apple Logo (Brendan Robert)
|
||||
sample.loresdrawing Graphics Drawing (Gregg Buntin)
|
||||
sample.calculatedimage Calculated Image (Gregg Buntin)
|
||||
sample.xmastree Christmas Tree (Gregg Buntin and Rich Orde)
|
||||
sample.snowflakes Snowflakes (Kevin Riordan)
|
||||
sample.ninjaturtle Ninja Turtle (Chris Whong)
|
||||
|
||||
sample.3dhat 3D Hat (Micro, the 6502 magazine, may 1981 c/o Golden Child)
|
||||
sample.dbconverge Double-Buffered Value Convergence (Golden Child)
|
||||
sample.dbpendulum Double-Buffered Physics Pendulum Simulation (Golden Child)
|
||||
sample.dbvectorship Double-Buffered Asteroids Ship Demo (Golden Child)
|
||||
sample.dbvectortext Double-Buffered Vector Font (Golden Child)
|
||||
sample.stellar7 STELLAR 7 Rotate 3d Objects (Golden Child)
|
||||
sample.functiongraphing Function Graphing (Golden Child)
|
||||
sample.codabar Codabar Generator (Golden Child)
|
||||
|
||||
sample.coloredserpinski Colored Serpinski Triangles (Gregory Lewis)
|
||||
sample.radar Radar (Josiah Keller)
|
||||
sample.moire Moiré (Sylvie Breaud)
|
||||
sample.jobs Steve Jobs (Nick McMillen / CJBaird)
|
||||
sample.dye Will You Dye (Brett Edwards)
|
||||
sample.pretzel Pretzel (Zee)
|
||||
sample.3drectangle 3D Rectangle (Tomo Wa)
|
||||
sample.enterprise Original Series Enterprise (Gil Keidar)
|
||||
sample.colorrings Colored Rings (Miika Oja)
|
||||
sample.bite Apple Bite (Michael "Moose" O'Malley)
|
||||
|
||||
# ____________________________________________
|
||||
# Other
|
||||
|
||||
sample.primes Prime Sieve (Kevin Miller)
|
||||
sample.february February Surprise (Antti Pirskanen)
|
||||
sample.hellosine Hello World Sine Wave (Jamie Beu)
|
||||
sample.bodymass Body Mass Index Calculator (Tim Dwyer)
|
||||
sample.quine Quine (Nikolay Mirin)
|
||||
sample.10print 10 PRINT MAZE (translated by Rich Hanes)
|
||||
sample.primecheck Prime Check (Tony Hill)
|
||||
sample.vdt Velocity/Distance/Time (feman1977)
|
||||
sample.protonelectron Proton/Electron Mass Ratio (Mark Rohrbaugh)
|
||||
sample.onelinetrain One Liner Train (Chris ten Den)
|
||||
sample.piglatin Pig Latin Translator (Gregg Buntin)
|
||||
sample.nuclear Nuclear Power Plant (Stephen R. Berggren c/o Kevin Riggle)
|
||||
sample.factors Prime Factors (Cristiano Trabuio)
|
||||
|
||||
# ____________________________________________
|
||||
# Traveller RPG Utilities
|
||||
|
||||
TRADER C TRADER
|
||||
sample.sectorgen Traveller Sector Generator
|
||||
sample.zhorelay Zhodani Relay Station Placement
|
||||
sample.readsector Read Sector File
|
Loading…
x
Reference in New Issue
Block a user