From 575b8c27563c0c5f7a37f5a20c31d2dbcfabc0a0 Mon Sep 17 00:00:00 2001 From: Nic0Nic0Nii Date: Fri, 3 Jun 2022 19:35:03 +0000 Subject: [PATCH] Some semblance of \ command parsing Co-authored-by: sigonasr2 --- out/DIRECTORY_LISTING | 30 +++------ out/articles/DIRECTORY_LISTING | 25 ++------ .../curabitur vel tempus ex.article.html | 15 +---- out/articles/sigplace1.article.html | 15 +---- out/articles/test articles/DIRECTORY_LISTING | 27 +++----- out/articles/test articles/test1.article.html | 15 +---- out/articles/test articles/test2.article.html | 15 +---- out/articles/test articles/test3.article.html | 15 +---- out/codeBackground | 2 +- out/otherpage.html | 25 ++------ out/testfile.html | 25 +++----- out/uploadform.html | 15 +---- out/uploads/Love_Live!_Logo.png | Bin 12213 -> 0 bytes ref/DEFAULT.html | 15 +---- sampleCode | 9 +++ sigPlace.java | 58 ++++++++++++++++++ sitefiles/testfile.html | 10 ++- 17 files changed, 121 insertions(+), 195 deletions(-) delete mode 100644 out/uploads/Love_Live!_Logo.png create mode 100644 sampleCode diff --git a/out/DIRECTORY_LISTING b/out/DIRECTORY_LISTING index 24a95e1..504cca0 100644 --- a/out/DIRECTORY_LISTING +++ b/out/DIRECTORY_LISTING @@ -16,28 +16,14 @@ -
- -
TestTesting
-Test a whole
-bunch of random Java code.
-
-System.out.println("Building directory listings...");
-try {
-    buildDirectoryListings();
-} catch (IOException e) {
-    e.printStackTrace();
-        System.err.println(Failed to build directory listings!");
-        return;
-}
-

Directory Listing for /

📁articles 2022-05-19T19:07:02.131093Z gitpod 190
-
🗎codeBackground 2022-05-19T19:07:02.067093Z gitpod 2635
-
🗎otherpage.html 2022-05-19T19:07:02.103093Z gitpod 9684
-
🗎reset.css 2022-05-19T19:07:02.075093Z gitpod 1093
-
🗎sig.css 2022-05-19T19:07:02.083093Z gitpod 5175
-
🗎testfile.html 2022-05-19T19:07:02.107093Z gitpod 1621
-
🗎uploadform.html 2022-05-19T19:07:02.107093Z gitpod 1676
-
📁uploads 2022-05-19T14:49:27Z gitpod 6
+
+

Directory Listing for /

📁articles 2022-06-03T19:15:23.539299Z gitpod 190
+
🗎codeBackground 2022-06-03T19:15:23.439299Z gitpod 2635
+
🗎otherpage.html 2022-06-03T19:15:23.523299Z gitpod 8892
+
🗎reset.css 2022-06-03T19:15:23.447299Z gitpod 1093
+
🗎sig.css 2022-06-03T19:15:23.455299Z gitpod 5175
+
🗎testfile.html 2022-06-03T19:15:23.527299Z gitpod 2004
+
🗎uploadform.html 2022-06-03T19:15:23.527299Z gitpod 884
diff --git a/out/articles/DIRECTORY_LISTING b/out/articles/DIRECTORY_LISTING index 0c67efc..99032c9 100644 --- a/out/articles/DIRECTORY_LISTING +++ b/out/articles/DIRECTORY_LISTING @@ -16,25 +16,12 @@ -
- -
TestTesting
-Test a whole
-bunch of random Java code.
-
-System.out.println("Building directory listings...");
-try {
-    buildDirectoryListings();
-} catch (IOException e) {
-    e.printStackTrace();
-        System.err.println(Failed to build directory listings!");
-        return;
-}
-

Directory Listing for /articles/

🗎curabitur vel tempus ex.article 2022-05-19T19:07:02.055093Z gitpod 579
-
🗎sigplace1.article 2022-05-19T19:07:02.059093Z gitpod 3807
-
📁test articles 2022-05-19T19:07:02.123093Z gitpod 147
-
🗎curabitur vel tempus ex.article.html 2022-05-19T19:07:02.111093Z gitpod 2088
-
🗎sigplace1.article.html 2022-05-19T19:07:02.115093Z gitpod 5316
+
+

Directory Listing for /articles/

🗎curabitur vel tempus ex.article 2022-06-03T19:15:23.419299Z gitpod 579
+
🗎sigplace1.article 2022-06-03T19:15:23.427299Z gitpod 3807
+
📁test articles 2022-06-03T19:15:23.531299Z gitpod 147
+
🗎curabitur vel tempus ex.article.html 2022-06-03T19:15:23.527299Z gitpod 1296
+
🗎sigplace1.article.html 2022-06-03T19:15:23.531299Z gitpod 4524
diff --git a/out/articles/curabitur vel tempus ex.article.html b/out/articles/curabitur vel tempus ex.article.html index 1c43685..9259532 100644 --- a/out/articles/curabitur vel tempus ex.article.html +++ b/out/articles/curabitur vel tempus ex.article.html @@ -16,20 +16,7 @@ -
- -
TestTesting
-Test a whole
-bunch of random Java code.
-
-System.out.println("Building directory listings...");
-try {
-    buildDirectoryListings();
-} catch (IOException e) {
-    e.printStackTrace();
-        System.err.println(Failed to build directory listings!");
-        return;
-}
+

Curabitur vel tempus ex

Curabitur vel tempus ex. Duis cursus sapien nisl, ut pulvinar dui porttitor ut. Nullam odio purus, tristique non turpis sit amet, malesuada ultricies purus. Mauris ut nulla nisl. Aenean sit amet est egestas justo volutpat consequat. Suspendisse in sagittis augue, et mattis tortor. Nullam viverra metus et nibh fringilla iaculis.

29 Apr 2022 7:37PM
diff --git a/out/articles/sigplace1.article.html b/out/articles/sigplace1.article.html index 7cfea45..2f3a4ab 100644 --- a/out/articles/sigplace1.article.html +++ b/out/articles/sigplace1.article.html @@ -16,20 +16,7 @@ -
- -
TestTesting
-Test a whole
-bunch of random Java code.
-
-System.out.println("Building directory listings...");
-try {
-    buildDirectoryListings();
-} catch (IOException e) {
-    e.printStackTrace();
-        System.err.println(Failed to build directory listings!");
-        return;
-}
+

Welcome to SigPlace!

This is a SigPlace article! It will contain information that is important (probably) and will be layed out as such.

Paragraphs are automatically split up for readability and generated correctly via the parser. There's quite a bit of flexibility with the system and makes it easy to post updates should they be required.

diff --git a/out/articles/test articles/DIRECTORY_LISTING b/out/articles/test articles/DIRECTORY_LISTING index 95ee328..85cf22e 100644 --- a/out/articles/test articles/DIRECTORY_LISTING +++ b/out/articles/test articles/DIRECTORY_LISTING @@ -16,26 +16,13 @@ -
- -
TestTesting
-Test a whole
-bunch of random Java code.
-
-System.out.println("Building directory listings...");
-try {
-    buildDirectoryListings();
-} catch (IOException e) {
-    e.printStackTrace();
-        System.err.println(Failed to build directory listings!");
-        return;
-}
-

Directory Listing for /articles/test articles/

🗎test1.article 2022-05-19T19:07:02.059093Z gitpod 1068
-
🗎test2.article 2022-05-19T19:07:02.059093Z gitpod 764
-
🗎test3.article 2022-05-19T19:07:02.063093Z gitpod 977
-
🗎test1.article.html 2022-05-19T19:07:02.115093Z gitpod 2577
-
🗎test2.article.html 2022-05-19T19:07:02.119093Z gitpod 2273
-
🗎test3.article.html 2022-05-19T19:07:02.123093Z gitpod 2486
+
+

Directory Listing for /articles/test articles/

🗎test1.article 2022-06-03T19:15:23.427299Z gitpod 1068
+
🗎test2.article 2022-06-03T19:15:23.431299Z gitpod 764
+
🗎test3.article 2022-06-03T19:15:23.431299Z gitpod 977
+
🗎test1.article.html 2022-06-03T19:15:23.531299Z gitpod 1785
+
🗎test2.article.html 2022-06-03T19:15:23.531299Z gitpod 1481
+
🗎test3.article.html 2022-06-03T19:15:23.531299Z gitpod 1694
diff --git a/out/articles/test articles/test1.article.html b/out/articles/test articles/test1.article.html index 534d2ee..50cab29 100644 --- a/out/articles/test articles/test1.article.html +++ b/out/articles/test articles/test1.article.html @@ -16,20 +16,7 @@ -
- -
TestTesting
-Test a whole
-bunch of random Java code.
-
-System.out.println("Building directory listings...");
-try {
-    buildDirectoryListings();
-} catch (IOException e) {
-    e.printStackTrace();
-        System.err.println(Failed to build directory listings!");
-        return;
-}
+

A Test Title

In dolor erat, malesuada at elit cursus, convallis imperdiet turpis. Ut aliquet magna tellus, at viverra mauris ullamcorper vehicula. Nam quis urna semper magna ornare elementum sed id mauris. Suspendisse faucibus nunc ante, ac rhoncus nisl tristique sed. Vestibulum pretium odio eget scelerisque vestibulum. Aliquam viverra ex ac vestibulum interdum. Donec ligula nunc, dignissim a purus vitae, fermentum laoreet diam. Quisque nec auctor urna. Vestibulum sit amet ligula ullamcorper, congue ipsum et, accumsan ante. Phasellus fermentum, sapien nec pulvinar blandit, elit purus pretium urna, et dapibus orci urna eu metus. Nunc molestie dictum pharetra. Suspendisse luctus felis et ante tristique, vitae commodo diam porttitor. Aliquam orci eros, placerat ac justo vitae, bibendum efficitur metus. Phasellus eget bibendum mauris.

2 May 2022 10:16AM
diff --git a/out/articles/test articles/test2.article.html b/out/articles/test articles/test2.article.html index fffcf5f..5822213 100644 --- a/out/articles/test articles/test2.article.html +++ b/out/articles/test articles/test2.article.html @@ -16,20 +16,7 @@ -
- -
TestTesting
-Test a whole
-bunch of random Java code.
-
-System.out.println("Building directory listings...");
-try {
-    buildDirectoryListings();
-} catch (IOException e) {
-    e.printStackTrace();
-        System.err.println(Failed to build directory listings!");
-        return;
-}
+

Another test title

Sed lobortis nisi id nunc tincidunt volutpat. Mauris cursus felis quis condimentum posuere. Pellentesque vitae dolor et justo suscipit ultrices. Integer dapibus leo id felis varius, ut volutpat massa bibendum. Quisque sed nunc arcu. In sit amet faucibus magna, non venenatis massa. Cras sed placerat risus, id consectetur est. Pellentesque in nunc dolor. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Quisque eget lorem ac urna posuere accumsan. Quisque sed imperdiet nisi.

1 May 2022 05:13AM
diff --git a/out/articles/test articles/test3.article.html b/out/articles/test articles/test3.article.html index 438ad8c..39474c8 100644 --- a/out/articles/test articles/test3.article.html +++ b/out/articles/test articles/test3.article.html @@ -16,20 +16,7 @@ -
- -
TestTesting
-Test a whole
-bunch of random Java code.
-
-System.out.println("Building directory listings...");
-try {
-    buildDirectoryListings();
-} catch (IOException e) {
-    e.printStackTrace();
-        System.err.println(Failed to build directory listings!");
-        return;
-}
+

And More

Curabitur suscipit quam tellus, non rhoncus diam vehicula in. Aliquam ut dapibus tortor. Cras accumsan arcu vel ante maximus ornare. Nam tempus fermentum leo maximus euismod. Donec vehicula pretium est a ultrices. Nunc blandit nibh lorem, nec blandit leo posuere quis. Sed mauris ligula, euismod eu aliquam vel, rhoncus eget magna. Proin eget tortor ut ligula suscipit mattis. Integer rutrum aliquet eleifend. Suspendisse leo libero, placerat nec mi id, sagittis malesuada felis. Quisque euismod ante cursus elit lobortis, eu tempus ligula condimentum. Mauris viverra metus et dignissim efficitur. Ut placerat nunc nunc, eu tempus neque ultrices nec. Suspendisse et magna risus. Phasellus in ullamcorper tortor. Sed lobortis ut mi in blandit.

30 Apr 2022 6:14PM
diff --git a/out/codeBackground b/out/codeBackground index 8b8a175..9e16ede 100644 --- a/out/codeBackground +++ b/out/codeBackground @@ -11,7 +11,6 @@ boolean truncateUntilBoundary=false; String filename=null; OutputStream stream = null; - boolean firstLine=true; requestLine=in.readLine(); //Read the first line, this should be our request. if (requestLine!=null) { String[] splitter = requestLine.split(Pattern.quote(" ")); @@ -38,3 +37,4 @@ System.out.println(line); } } else { + File myFile = new File(new File(sigPlace.OUTDIR,sigPlace.UPLOADSDIR),filename); diff --git a/out/otherpage.html b/out/otherpage.html index 1aaf8e2..d625b7e 100644 --- a/out/otherpage.html +++ b/out/otherpage.html @@ -16,20 +16,7 @@ -
- -
TestTesting
-Test a whole
-bunch of random Java code.
-
-System.out.println("Building directory listings...");
-try {
-    buildDirectoryListings();
-} catch (IOException e) {
-    e.printStackTrace();
-        System.err.println(Failed to build directory listings!");
-        return;
-}
+
This is a different webpage.
-
- -
TestTesting
-Test a whole
-bunch of random Java code.
-
-System.out.println("Building directory listings...");
-try {
-    buildDirectoryListings();
-} catch (IOException e) {
-    e.printStackTrace();
-        System.err.println(Failed to build directory listings!");
-        return;
-}
+
SigPlace -SigPlace -Basic Content goes here. + + + + + + + + +
    System.out.println("Building directory listings...");    try {        buildDirectoryListings();    } catch (IOException e) {        e.printStackTrace();            System.err.println(Failed to build directory listings!");            return; 
 ===
 

Other Page! diff --git a/out/uploadform.html b/out/uploadform.html index ce8cf69..7518d47 100644 --- a/out/uploadform.html +++ b/out/uploadform.html @@ -16,20 +16,7 @@ -
- -
TestTesting
-Test a whole
-bunch of random Java code.
-
-System.out.println("Building directory listings...");
-try {
-    buildDirectoryListings();
-} catch (IOException e) {
-    e.printStackTrace();
-        System.err.println(Failed to build directory listings!");
-        return;
-}
+
SigPlace
diff --git a/out/uploads/Love_Live!_Logo.png b/out/uploads/Love_Live!_Logo.png deleted file mode 100644 index 2f52540b1a8f6dcabe3c43256cdd618714a8e2b7..0000000000000000000000000000000000000000 GIT binary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qXcTUzVmle5Ss6&X6T2S6qz!416Z^7Zh=__{3_c3J^z)krR(pjLQxb$*yGZ;rD?kPnzh%U zTk>7K{M>4`MP9RGOyY7{I{6D_E!}KBRosJc;uzye!d2|Mga~r!ej9q|goaNu`HS+K zUyDC}Q0gTC*p0@1{}=Azhta(Gv4TGaPN_xCZ8bt?`78n>|rt#WN!b z0jZH?ugC;wEEQA6N2+B|YYp*fPV>_U(U`|hHtb^OtWN|lL(kgl02#SUO(b|U^iH4K zqciXB5QJEys?=)K8%X?trv?-lTLT=SPhx44wXB;YGdC+IFI%gKEOcL zkp}mM5hdpftdN64%AH%DpKEqFuDw2NX*1{Pp>DM#eJmGgz#GS+euNwSs2RoI%`V=z}`P7o&=SK7HF%k{Lf}jR8;^UL9 zo#`UZpA&DgcaYA@ee=A9Xf&P->SlP3H!YF#y49B|SAluR74Z85T=gS^g_aFS5^wNH$AB5&T%5~>e>bO;D}ziD4?A8jH2y-_@3*Qv*s$;$0kDu8hRLwqcv&JRVa4 zUE41OlE-u$Zd{Q=b#zb z6Y&1S?RG^&(fn2mH|@oZ$e`hKLW1JENtzdI!{dK`=zZ)Yt+rwI@|J1qK`)Bm`=M19 zr}1)khJ{+v{$_#PmduHPqt1N?dYn*!^JGi>?H_w?=o9f+BS>tq9Gq#8scvp;MdkoM> z{-XtL#4wE~KE^**{@=0U{}X60E8I)u|0DkISyU7K$r&)0LNA=#tK0u_*9o93|6Z;} z#w-jQgY!R+zLmv0I}ZhCH%A#~Pp6OOZoVFG<-k1dI<8 -
- -
TestTesting
-Test a whole
-bunch of random Java code.
-
-System.out.println("Building directory listings...");
-try {
-    buildDirectoryListings();
-} catch (IOException e) {
-    e.printStackTrace();
-        System.err.println(Failed to build directory listings!");
-        return;
-}
\ No newline at end of file +
\ No newline at end of file diff --git a/sampleCode b/sampleCode new file mode 100644 index 0000000..577776f --- /dev/null +++ b/sampleCode @@ -0,0 +1,9 @@ +
+System.out.println("Building directory listings...");
+try {
+    buildDirectoryListings();
+} catch (IOException e) {
+    e.printStackTrace();
+        System.err.println(Failed to build directory listings!");
+        return;
+}
\ No newline at end of file diff --git a/sigPlace.java b/sigPlace.java index 7b2efc2..36941bd 100644 --- a/sigPlace.java +++ b/sigPlace.java @@ -24,6 +24,9 @@ public class sigPlace { final static String DIRECTORYLISTING_FILENAME = "DIRECTORY_LISTING"; static int PORT = 8080; + static boolean inCodeBlock = false; + static String storedCodeBlock = ""; + final static HashMap map = new HashMap<>(Map.ofEntries( new AbstractMap.SimpleEntry<>("$SITENAME", "SigPlace"), new AbstractMap.SimpleEntry<>("$SITE_BACKCOL", "#111"), @@ -127,6 +130,55 @@ public class sigPlace { for (String key : map.keySet()) { s=s.replaceAll(Pattern.quote(key),map.get(key)); } + if (s.length()>0&&isHTMLFile(f)) { + if (!inCodeBlock) { + if (s.contains("
")) {
+                                    inCodeBlock=true;
+                                    storedCodeBlock+=s.substring(s.indexOf("
"));
+                                    s=s.substring(0,s.indexOf("
"));
+                                }
+                            } else {
+                                if (s.contains("
")) { + inCodeBlock=false; + storedCodeBlock+=s.substring(0,s.indexOf("
")+"
".length()); + int startPos=0; + String endText=s.substring(s.indexOf("
")+"".length(),s.length()); + s=""; + for (int j=0;j"+storedCodeBlock.charAt(j); + startPos=j+1; + continue; + } else + if (storedCodeBlock.charAt(j)=='\n') { + System.out.println("newline"); + //Previous section is done. + s+="\r\n"; + startPos=j+1; + continue; + } else + if (storedCodeBlock.charAt(j)=='(') { + //Previous section was a keyword. + s+=SPAN("function")+storedCodeBlock.substring(startPos,j)+"
"+storedCodeBlock.charAt(j); + startPos=j+1; + continue; + } else + if (storedCodeBlock.charAt(j)==' '&&j>0&&storedCodeBlock.charAt(j-1)!=' ') { + //Previous section was a keyword. + s+=SPAN("keyword")+storedCodeBlock.substring(startPos,j)+""+storedCodeBlock.charAt(j); + startPos=j+1; + continue; + } + } + s+=endText; + //System.out.println("Stored code block: "+storedCodeBlock); + } else { + storedCodeBlock+=s; + s=""; + } + } + } content.set(i,s); } @@ -142,6 +194,12 @@ public class sigPlace { } } } + /** + * Writes a span tag with the included class. + * **/ + private static String SPAN(String className) { + return ""; + } private static void GenerateArticleFiles(Iterator items){ System.out.println(" Generating article files..."); while (items.hasNext()) { diff --git a/sitefiles/testfile.html b/sitefiles/testfile.html index 2a244c3..64dea0d 100644 --- a/sitefiles/testfile.html +++ b/sitefiles/testfile.html @@ -1,6 +1,14 @@ $SITENAME -SigPlace -Basic Content goes here. +
+    System.out.println("Building directory listings...");
+    try {
+        buildDirectoryListings();
+    } catch (IOException e) {
+        e.printStackTrace();
+            System.err.println(Failed to build directory listings!");
+            return;
+    }
===

Other Page! \ No newline at end of file