diff --git a/dysprosalt/index.html b/dysprosalt/index.html new file mode 100644 index 0000000..5e58440 --- /dev/null +++ b/dysprosalt/index.html @@ -0,0 +1,31 @@ + + + + + + CSV Reader Tool + + + + + + +
+

CSV Reader Tool

+
+
+ +
+
+
+ + + + + + + + + diff --git a/dysprosalt/scripts.js b/dysprosalt/scripts.js new file mode 100644 index 0000000..480217e --- /dev/null +++ b/dysprosalt/scripts.js @@ -0,0 +1,117 @@ +let jsonData = []; // Global variable to hold the JSON data +let testout; + +var numTiers = 0; + + +document.getElementById('csvFileInput').addEventListener('change', (event) => { + const file = event.target.files[0]; + Papa.parse(file, { + header: true, // Treat the first row as headers + complete: function(results) { + jsonData = results.data; // Convert CSV data to JSON + console.log(jsonData); + displayTable(jsonData); + validateData(jsonData); + generateDynamicDropdown(jsonData); + + } + }); +}); + + + +function displayTable(data) { + const table = document.createElement('table'); + const thead = document.createElement('thead'); + const tbody = document.createElement('tbody'); + + // Create table header + const headerRow = document.createElement('tr'); + if (data.length > 0) { + Object.keys(data[0]).forEach(header => { + const th = document.createElement('th'); + th.textContent = header; + headerRow.appendChild(th); + }); + } + thead.appendChild(headerRow); + + // Create table body + data.forEach((row, rowIndex) => { + const tr = document.createElement('tr'); + Object.values(row).forEach(cell => { + const td = document.createElement('td'); + td.textContent = cell; + tr.appendChild(td); + }); + tbody.appendChild(tr); + + // Highlight the row if it is invalid + if (!isRowValid(row)) { + tr.style.backgroundColor = 'red'; // Highlight the entire row + } + }); + + table.appendChild(thead); + table.appendChild(tbody); + document.getElementById('dataTable').innerHTML = ''; // Clear any previous data + document.getElementById('dataTable').appendChild(table); +} + +function isRowValid(row) { + // Count populated cells in a row object + let populatedCells = 0; + Object.values(row).forEach(cell => { + if (cell.trim() !== '') { + populatedCells++; + } + }); + + // Check if more than two cells are populated in the row + return populatedCells <= 2; +} + +function validateData(data) { + let isValidFile = true; + data.slice(1).forEach(row => { + if (!isRowValid(row)) { + isValidFile = false; + } + }); + + const statusElement = document.getElementById('validationStatus'); + numTiers = Object.keys(jsonData[0]).length; + statusElement.textContent = isValidFile ? 'File is a valid '+parseInt(numTiers/2)+' tiered dynamic dropdown.' : 'File is invalid. Please check highlighted rows.'; + statusElement.style.color = isValidFile ? 'green' : 'red'; +} + + + +function generateDynamicDropdown(data) { + // Example: Assume each row in the data has a 'category' and 'subcategory' field + let categories = {}; + testout = data; + console.log("data: "+data) + data.forEach(row => { + if (row.category && row.subcategory) { + if (!categories[row.category]) { + categories[row.category] = []; + } + categories[row.category].push(row.subcategory); + } + }); + + // Now create a dropdown menu based on categories + let dropdown = ''; + + document.getElementById('dataTable').insertAdjacentHTML('afterend', dropdown); +} diff --git a/dysprosalt/styles.css b/dysprosalt/styles.css new file mode 100644 index 0000000..147cc6c --- /dev/null +++ b/dysprosalt/styles.css @@ -0,0 +1,14 @@ +/* Add your CSS styles here */ +body { + font-family: Arial, sans-serif; +} + +header, footer { + text-align: center; + padding: 1em; + background-color: #f4f4f4; +} + +main { + margin: 2em; +} diff --git a/godot/GodotMiniProjects/.gitattributes b/godot/GodotMiniProjects/.gitattributes new file mode 100644 index 0000000..8ad74f7 --- /dev/null +++ b/godot/GodotMiniProjects/.gitattributes @@ -0,0 +1,2 @@ +# Normalize EOL for all files that Git considers text files. +* text=auto eol=lf diff --git a/godot/GodotMiniProjects/.gitignore b/godot/GodotMiniProjects/.gitignore new file mode 100644 index 0000000..4709183 --- /dev/null +++ b/godot/GodotMiniProjects/.gitignore @@ -0,0 +1,2 @@ +# Godot 4+ specific ignores +.godot/ diff --git a/godot/GodotMiniProjects/BalloonPopper/Balloon.gd b/godot/GodotMiniProjects/BalloonPopper/Balloon.gd new file mode 100644 index 0000000..f950f74 --- /dev/null +++ b/godot/GodotMiniProjects/BalloonPopper/Balloon.gd @@ -0,0 +1,6 @@ +extends Area3D + +var clicksToPop : int = 3 +var sizeIncrease : float = 0.2 +var scoreValue : int = 1 + diff --git a/godot/GodotMiniProjects/BalloonPopper/BalloonPopper.tscn b/godot/GodotMiniProjects/BalloonPopper/BalloonPopper.tscn new file mode 100644 index 0000000..a5e2256 --- /dev/null +++ b/godot/GodotMiniProjects/BalloonPopper/BalloonPopper.tscn @@ -0,0 +1,59 @@ +[gd_scene load_steps=8 format=3 uid="uid://dk17utktif2gs"] + +[ext_resource type="Script" path="res://BalloonPopper/Balloon.gd" id="1_iyw13"] + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_7ghci"] +albedo_color = Color(1, 0, 0, 1) +metallic = 0.85 +metallic_specular = 0.24 +metallic_texture_channel = 3 +roughness = 0.2 +rim_enabled = true +rim = 0.78 +rim_tint = 0.8 +clearcoat_enabled = true + +[sub_resource type="SphereMesh" id="SphereMesh_k4erw"] + +[sub_resource type="SphereShape3D" id="SphereShape3D_tfo1q"] + +[sub_resource type="PrismMesh" id="PrismMesh_ne1ja"] + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_v2q1e"] +albedo_color = Color(0.431373, 0.215686, 0, 1) + +[sub_resource type="RibbonTrailMesh" id="RibbonTrailMesh_lkiha"] +material = SubResource("StandardMaterial3D_v2q1e") +shape = 0 +size = 0.05 + +[node name="Main" type="Node3D"] +transform = Transform3D(0.988477, 0, 0, 0, 0.988477, 0, 0, 0, 0.988477, 0, 0, 0) + +[node name="Balloon" type="Area3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.0447183, 0) +script = ExtResource("1_iyw13") + +[node name="sphereMesh" type="MeshInstance3D" parent="Balloon"] +transform = Transform3D(-0.997577, -0.0119507, -0.0685306, -0.0133845, 0.9997, 0.0205016, 0.0682651, 0.0213691, -0.997438, 0.00279832, 5.96046e-08, -0.00688982) +material_override = SubResource("StandardMaterial3D_7ghci") +mesh = SubResource("SphereMesh_k4erw") + +[node name="sphereCollision" type="CollisionShape3D" parent="Balloon"] +shape = SubResource("SphereShape3D_tfo1q") + +[node name="bottomMesh" type="MeshInstance3D" parent="Balloon"] +transform = Transform3D(0.213792, 0, 0, 0, 0.221636, 0, 0, 0, 0.116729, 0, -0.541416, 0) +material_override = SubResource("StandardMaterial3D_7ghci") +mesh = SubResource("PrismMesh_ne1ja") + +[node name="MeshInstance3D" type="MeshInstance3D" parent="Balloon"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.935999, 0) +mesh = SubResource("RibbonTrailMesh_lkiha") + +[node name="Camera3D" type="Camera3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 0.9683, 0.249789, 0, -0.249789, 0.9683, 0, 1.15235, 3.89011) +fov = 86.7705 + +[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."] +transform = Transform3D(0.832902, 0.172366, -0.525894, 0, 0.950261, 0.311456, 0.553421, -0.259412, 0.791474, -4.72276, 3.28655, 9.76698) diff --git a/godot/GodotMiniProjects/BalloonPopper/new_standard_material_3d.tres b/godot/GodotMiniProjects/BalloonPopper/new_standard_material_3d.tres new file mode 100644 index 0000000..8ffa745 --- /dev/null +++ b/godot/GodotMiniProjects/BalloonPopper/new_standard_material_3d.tres @@ -0,0 +1,12 @@ +[gd_resource type="StandardMaterial3D" format=3 uid="uid://dmjcg37mrlljl"] + +[resource] +albedo_color = Color(1, 0, 0, 1) +metallic = 0.85 +metallic_specular = 0.24 +metallic_texture_channel = 3 +roughness = 0.2 +rim_enabled = true +rim = 0.78 +rim_tint = 0.8 +clearcoat_enabled = true diff --git a/godot/GodotMiniProjects/icon.svg b/godot/GodotMiniProjects/icon.svg new file mode 100644 index 0000000..b370ceb --- /dev/null +++ b/godot/GodotMiniProjects/icon.svg @@ -0,0 +1 @@ + diff --git a/godot/GodotMiniProjects/icon.svg.import b/godot/GodotMiniProjects/icon.svg.import new file mode 100644 index 0000000..8f33346 --- /dev/null +++ b/godot/GodotMiniProjects/icon.svg.import @@ -0,0 +1,38 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cb2ofvijox614" +path.s3tc="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} + +[deps] + +source_file="res://icon.svg" +dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.s3tc.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=true +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/godot/GodotMiniProjects/new_standard_material_3d.tres b/godot/GodotMiniProjects/new_standard_material_3d.tres new file mode 100644 index 0000000..8ffa745 --- /dev/null +++ b/godot/GodotMiniProjects/new_standard_material_3d.tres @@ -0,0 +1,12 @@ +[gd_resource type="StandardMaterial3D" format=3 uid="uid://dmjcg37mrlljl"] + +[resource] +albedo_color = Color(1, 0, 0, 1) +metallic = 0.85 +metallic_specular = 0.24 +metallic_texture_channel = 3 +roughness = 0.2 +rim_enabled = true +rim = 0.78 +rim_tint = 0.8 +clearcoat_enabled = true diff --git a/godot/GodotMiniProjects/project.godot b/godot/GodotMiniProjects/project.godot new file mode 100644 index 0000000..16aea5a --- /dev/null +++ b/godot/GodotMiniProjects/project.godot @@ -0,0 +1,15 @@ +; Engine configuration file. +; It's best edited using the editor UI and not directly, +; since the parameters that go here are not all obvious. +; +; Format: +; [section] ; section goes between [] +; param=value ; assign values to parameters + +config_version=5 + +[application] + +config/name="GodotMiniProjects" +config/features=PackedStringArray("4.1", "Forward Plus") +config/icon="res://icon.svg" diff --git a/nspsearch/index.html b/nspsearch/index.html index 0d2ac77..d0d5e36 100644 --- a/nspsearch/index.html +++ b/nspsearch/index.html @@ -4,8 +4,39 @@ nsp search + +

Sanctuary Search:

+ + + + + + +
@@ -13,4 +44,4 @@ -l \ No newline at end of file + \ No newline at end of file diff --git a/nspsearch/js.js b/nspsearch/js.js index 550ac3e..eda9872 100644 --- a/nspsearch/js.js +++ b/nspsearch/js.js @@ -1,6 +1,9 @@ // var RSS_URL = 'https://nosleep.supercast.com/feeds/rne91aoPhrNb7kr7i8k3m6GJ'; +document.getElementById('seasonSelect').addEventListener('change', function() { + var seasonNumber = this.value; // This will be S01, S02, ..., S20 + // Fetch the RSS feed and parse it fetch(RSS_URL) .then(response => response.text()) @@ -13,9 +16,9 @@ fetch(RSS_URL) const items = data.querySelectorAll("item"); let html = ``; items.forEach(el=> - {1 + { let storyTitle = el.querySelector('title').innerHTML; - if(storyTitle.indexOf('S19') != -1) + if(storyTitle.indexOf(seasonNumber) != -1) { html += ` @@ -28,10 +31,17 @@ fetch(RSS_URL) ` } }) - - document.body.insertAdjacentHTML("beforeBegin", html); + document.getElementById('results').innerHTML = html; + //document.body.insertAdjacentHTML("beforeend", html); }) .catch(error => { console.error('Error fetching the RSS feed:', error); document.getElementById('results').textContent = 'Error fetching the RSS feed. Please check the console for details.'; }); + + + +}); + + + diff --git a/nspsearch/style.css b/nspsearch/style.css new file mode 100644 index 0000000..6253a7e --- /dev/null +++ b/nspsearch/style.css @@ -0,0 +1,44 @@ +/* General Styles */ +body { + background-color: #1b1b1b; /* Dark background */ + color: #f0f0f0; /* Light text */ + font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; /* Modern font */ + line-height: 1.6; /* Spacing for readability */ + margin: 0; + padding: 20px; +} + +/* Article Styles */ +article { + background-color: #292929; /* Slightly lighter than the body for contrast */ + padding: 20px; + margin-bottom: 20px; + border-radius: 5px; /* Rounded corners for a modern look */ + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); /* Subtle shadow for depth */ +} + +/* Header Styles */ +h2 { + color: #e6e6e6; /* Slightly lighter text for headers */ + margin-top: 0; +} + +/* Link Styles */ +a { + color: #1e90ff; /* Bright color for links */ + text-decoration: none; /* No underlines for a cleaner look */ +} + +a:hover { + text-decoration: underline; /* Underline on hover for interactivity */ +} + +/* Paragraph Styles */ +p { + margin-bottom: 15px; +} + +/* Strong tag style for emphasis */ +strong { + color: #ff8c00; /* Orange color for strong emphasis */ +}