diff --git a/out/DIRECTORY_LISTING b/out/DIRECTORY_LISTING index dc79c70..39cdff9 100644 --- a/out/DIRECTORY_LISTING +++ b/out/DIRECTORY_LISTING @@ -18,12 +18,12 @@
-

Directory Listing for /

📁.. (Previous Directory)
📁articles 2022-05-05T19:52:33.539616Z gitpod 116
-
🗎codeBackground 2022-05-05T19:52:33.499616Z gitpod 2635
-
🗎otherpage.html 2022-05-05T19:52:33.531616Z gitpod 8892
-
🗎reset.css 2022-05-05T19:52:33.507616Z gitpod 1093
-
🗎sig.css 2022-05-05T19:52:33.515616Z gitpod 4702
-
🗎testfile.html 2022-05-05T19:52:33.531616Z gitpod 829
+

Directory Listing for /

📁.. (Previous Directory)
📁articles 2022-05-05T20:16:24.546334Z gitpod 190
+
🗎codeBackground 2022-05-05T20:16:24.478334Z gitpod 2635
+
🗎otherpage.html 2022-05-05T20:16:24.522334Z gitpod 8892
+
🗎reset.css 2022-05-05T20:16:24.486334Z gitpod 1093
+
🗎sig.css 2022-05-05T20:16:24.498334Z gitpod 4702
+
🗎testfile.html 2022-05-05T20:16:24.522334Z gitpod 829
diff --git a/out/articles/DIRECTORY_LISTING b/out/articles/DIRECTORY_LISTING index f6d9ef8..eb3a98b 100644 --- a/out/articles/DIRECTORY_LISTING +++ b/out/articles/DIRECTORY_LISTING @@ -18,9 +18,11 @@
-

Directory Listing for /articles/

📁.. (Previous Directory)
🗎curabitur vel tempus ex.article 2022-05-05T19:52:33.483616Z gitpod 579
-
🗎sigplace1.article 2022-05-05T19:52:33.487616Z gitpod 3807
-
📁test articles 2022-05-05T19:52:33.419616Z gitpod 69
+

Directory Listing for /articles/

📁.. (Previous Directory)
🗎curabitur vel tempus ex.article 2022-05-05T20:16:24.462334Z gitpod 579
+
🗎sigplace1.article 2022-05-05T20:16:24.470334Z gitpod 3807
+
📁test articles 2022-05-05T20:16:24.538334Z gitpod 147
+
🗎curabitur vel tempus ex.article.html 2022-05-05T20:16:24.530334Z gitpod 1296
+
🗎sigplace1.article.html 2022-05-05T20:16:24.530334Z gitpod 4524
diff --git a/out/articles/curabitur vel tempus ex.article.html b/out/articles/curabitur vel tempus ex.article.html new file mode 100644 index 0000000..b2ea657 --- /dev/null +++ b/out/articles/curabitur vel tempus ex.article.html @@ -0,0 +1,32 @@ + + + + + + + + + +
+ +

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 new file mode 100644 index 0000000..d082341 --- /dev/null +++ b/out/articles/sigplace1.article.html @@ -0,0 +1,43 @@ + + + + + + + + + +
+ +

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.

+

A lot of content management systems would do this by having a web interface and submitting content and managing it that way, but by coding my own management system and using the built-in OS' filesystem to handle the work, I save myself a lot of pains and headaches.

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. In feugiat, urna ut sollicitudin luctus, nulla magna faucibus mauris, at semper nisl nisi ut mauris. Vestibulum cursus tortor velit, ut congue ex porta in. Nullam hendrerit risus sit amet neque euismod faucibus. Sed ac diam non lectus euismod pulvinar eu non mauris. Donec accumsan nisl efficitur, sodales lectus et, finibus quam. Sed vel consectetur leo. Cras ut condimentum quam. Aliquam molestie viverra congue. Donec scelerisque nibh ac nulla dictum semper. Aliquam id massa a massa bibendum finibus id ac sapien. Integer vitae ullamcorper enim, non semper massa.

+
+

Proin cursus sodales elit, vitae volutpat mi fermentum a. In vitae magna quis leo cursus accumsan id facilisis purus. Vestibulum accumsan iaculis turpis eu sollicitudin. Sed ultricies felis non elit suscipit interdum. Maecenas sollicitudin turpis justo, vel pretium sapien scelerisque eget. Nullam sagittis finibus risus ut aliquam. Praesent quam orci, dapibus ut ex ac, sodales dapibus nunc.

+
+

Fusce magna risus, iaculis non justo sit amet, semper sodales urna. Morbi eu eros lectus. Integer euismod venenatis eros a hendrerit. Nulla ultricies lectus nec quam condimentum fermentum. Quisque a turpis vitae orci pharetra ullamcorper. Nunc fringilla vitae nunc a aliquam. In aliquam gravida massa. Sed imperdiet dignissim sapien, ullamcorper rutrum lacus convallis ut.

+
+

Nunc tortor sem, dapibus mattis varius id, varius eu leo. Phasellus efficitur nulla a diam faucibus, id facilisis lacus malesuada. Nulla condimentum egestas erat a fermentum. Ut interdum dui id est condimentum, vel fermentum nisi ornare. Sed eu rhoncus magna, sit amet finibus eros. In a nibh tincidunt, suscipit tellus eleifend, faucibus mauris. Vestibulum sagittis nisi et efficitur ullamcorper. Donec sodales efficitur ligula id congue. Etiam egestas tristique interdum. Mauris at massa eget metus pellentesque fermentum nec non lacus. Nulla turpis nunc, feugiat vel euismod ac, maximus id est. Praesent cursus elit ac dolor hendrerit lacinia.

+
+

Vestibulum laoreet lorem consequat, mollis augue finibus, luctus libero. Praesent convallis sed velit vitae molestie. Vestibulum nec fringilla tellus, non dictum nulla. Donec tempor ac diam sit amet porta. Quisque mi ex, vulputate ac tincidunt vel, vestibulum vitae orci. Duis gravida mauris eget mauris pulvinar, lobortis tincidunt neque efficitur. Nunc blandit metus vitae faucibus vulputate. Curabitur rhoncus volutpat lorem, sit amet pulvinar ipsum. Fusce ultricies enim odio, a viverra quam tincidunt quis. Aliquam sollicitudin a sapien id efficitur. Proin at finibus elit, id gravida elit. Nulla facilisi. Ut tincidunt, ligula eu pulvinar dapibus, lorem nisl facilisis tellus, in ornare quam dolor quis libero. Pellentesque ut convallis orci. Donec volutpat nunc velit, tristique convallis purus lacinia sit amet. Maecenas porttitor cursus nisl sed porta.

+
3 May 2022 10:25AM
+ +
+
+
+ + + diff --git a/out/articles/test articles/DIRECTORY_LISTING b/out/articles/test articles/DIRECTORY_LISTING index 6e19caa..f93c4be 100644 --- a/out/articles/test articles/DIRECTORY_LISTING +++ b/out/articles/test articles/DIRECTORY_LISTING @@ -18,9 +18,12 @@
-

Directory Listing for /articles/test articles/

📁.. (Previous Directory)
🗎test1.article 2022-05-05T19:52:33.491616Z gitpod 1068
-
🗎test2.article 2022-05-05T19:52:33.491616Z gitpod 764
-
🗎test3.article 2022-05-05T19:52:33.491616Z gitpod 977
+

Directory Listing for /articles/test articles/

📁.. (Previous Directory)
🗎test1.article 2022-05-05T20:16:24.470334Z gitpod 1068
+
🗎test2.article 2022-05-05T20:16:24.474334Z gitpod 764
+
🗎test3.article 2022-05-05T20:16:24.474334Z gitpod 977
+
🗎test1.article.html 2022-05-05T20:16:24.534334Z gitpod 1785
+
🗎test2.article.html 2022-05-05T20:16:24.538334Z gitpod 1481
+
🗎test3.article.html 2022-05-05T20:16:24.538334Z gitpod 1694
diff --git a/out/articles/test articles/test1.article.html b/out/articles/test articles/test1.article.html new file mode 100644 index 0000000..24763a0 --- /dev/null +++ b/out/articles/test articles/test1.article.html @@ -0,0 +1,32 @@ + + + + + + + + + +
+ +

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 new file mode 100644 index 0000000..f2dac62 --- /dev/null +++ b/out/articles/test articles/test2.article.html @@ -0,0 +1,32 @@ + + + + + + + + + +
+ +

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 new file mode 100644 index 0000000..3478b21 --- /dev/null +++ b/out/articles/test articles/test3.article.html @@ -0,0 +1,32 @@ + + + + + + + + + +
+ +

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/sigPlace.java b/sigPlace.java index 7e354ae..6fd9927 100644 --- a/sigPlace.java +++ b/sigPlace.java @@ -63,6 +63,8 @@ public class sigPlace { items = Files.walk(Paths.get("out")).iterator(); ConvertArticleReferences(items); + items = Files.walk(Paths.get("out","articles")).iterator(); + GenerateArticleFiles(items); }catch (IOException e) { e.printStackTrace(); System.err.println("Copying files over failed!"); @@ -139,6 +141,44 @@ public class sigPlace { } } } + private static void GenerateArticleFiles(Iterator items){ + System.out.println(" Generating article files..."); + while (items.hasNext()) { + Path f = items.next(); + try { + if (Files.isRegularFile(f)&&isArticleFile(f)) { + System.out.println(" Creating article for "+f.getFileName()); + List content = Files.readAllLines(f); + List preContent = Files.readAllLines(ops.get("%DEFAULT")); + List postContent = Files.readAllLines(ops.get("%FOOTER")); + StringBuilder sb = new StringBuilder(); + for (String d : preContent) { + for (String k : sigPlace.map.keySet()) { + d=d.replaceAll(Pattern.quote(k),sigPlace.map.get(k)); + } + sb.append(d).append("\n"); + } + for (String d : content) { + for (String k : sigPlace.map.keySet()) { + d=d.replaceAll(Pattern.quote(k),sigPlace.map.get(k)); + } + d=d.replaceFirst("div class=\"content\"","div class=\"expandedContent\""); + d=d.replaceFirst("%CONDITIONAL_EXPAND%",""); + sb.append(d).append("\n"); + } + for (String d : postContent) { + for (String k : sigPlace.map.keySet()) { + d=d.replaceAll(Pattern.quote(k),sigPlace.map.get(k)); + } + sb.append(d).append("\n"); + } + Files.write(Paths.get(f.getParent().toString(),f.getFileName()+".html"),sb.toString().getBytes()); + } + } catch (IOException e) { + e.printStackTrace(); + } + } + } private static void ConvertArticleReferences(Iterator items) { while (items.hasNext()) { Path f = items.next();