From 92b2d35b3b809b60ac2af8d6972d083e5df650dd Mon Sep 17 00:00:00 2001 From: "sigonasr2, Sig, Sigo" Date: Mon, 2 May 2022 15:45:53 +0000 Subject: [PATCH] Create basic web interpreter project --- build | 5 +++++ clean | 2 ++ readme.md | 15 +++++++++++++++ sigPlace.java | 31 +++++++++++++++++++++++++++++++ sitefiles/testfile | 0 5 files changed, 53 insertions(+) create mode 100755 build create mode 100755 clean create mode 100644 readme.md create mode 100644 sigPlace.java create mode 100644 sitefiles/testfile diff --git a/build b/build new file mode 100755 index 0000000..81102c1 --- /dev/null +++ b/build @@ -0,0 +1,5 @@ +cd /workspace/SigPlace +javac -Xlint:unchecked -cp . sigPlace.java +printf "\n\n\nRunning Program...\n\n" +java sigPlace +./clean \ No newline at end of file diff --git a/clean b/clean new file mode 100755 index 0000000..601c5ae --- /dev/null +++ b/clean @@ -0,0 +1,2 @@ +cd /workspace/SigPlace +find . -type f -name *.class -delete \ No newline at end of file diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..e245a18 --- /dev/null +++ b/readme.md @@ -0,0 +1,15 @@ +This repository will host the files necessary to build and run a website created by Sig. + +There are a couple of reasons I want to make this website: + - A place to exist. (As of late, I have had no place to just directly insert my content.) + - Develop the simplest possible product to get the job done. (I considered using fancy technologies like React and Bootstrap CSS and it's all just bloat and unncessary. I want people to load my site in the few kb they need to see to work with it. Not hundreds and hundreds of extraneous unnecessary bits.) + - Share Code. I need the ability to share what I do coding-wise and to allow others to type up code to run as well for practicing. + - Project Management. Able to internally hold all my project data and show off what I work on. I'm not content with just "oh, here's yet another project on github." I want more metadata tied to it and a clean, concise way for others to go looking at it. + - Interactivity. I want people to be able to talk to me and reach out to me if they have a sudden urge or need, or just a random question that I could answer. It needs to be simple, fast, and available (Mobile notifications? https://developers.google.com/web/fundamentals/codelabs/push-notifications/). + - Sells myself. There should be ways for people to hire me for coding projects. + +Potential domain names: +sig.codes +sig.academy +sig.fan +sig.place \ No newline at end of file diff --git a/sigPlace.java b/sigPlace.java new file mode 100644 index 0000000..5423360 --- /dev/null +++ b/sigPlace.java @@ -0,0 +1,31 @@ +import java.io.IOException; +import java.nio.file.FileStore; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.AbstractMap; +import java.util.HashMap; +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; + +public class sigPlace { + final static HashMap map = new HashMap<>(Map.ofEntries( + new AbstractMap.SimpleEntry<>("$SITENAME", "SigPlace") + )); + public static void main(String[] args) { + Set files = GetFilesInDir("sitefiles"); + for (Path f : files) { + System.out.println(f.getFileName()); + } + } + private static Set GetFilesInDir(String directory) { + Path dir = Paths.get(directory); + try { + return Files.list(dir).collect(Collectors.toSet()); + } catch (IOException e) { + e.printStackTrace(); + } + return null; + } +} \ No newline at end of file diff --git a/sitefiles/testfile b/sitefiles/testfile new file mode 100644 index 0000000..e69de29