From 5f364c98a084ef3915c0fceba237274f1a1aa3bd Mon Sep 17 00:00:00 2001 From: jesusalva Date: Fri, 16 Feb 2018 00:37:11 -0200 Subject: Include a tool to autogen our news historic page --- web/all_news.bin | 169 +++++++++++++++++++++++++++++++++++++++++++++++++++ web/backup.bin | 68 +++++++++++++++++++++ web/news.html | 170 ++++++++++++++++++++++++++++++++++++++++++++++++++++ web/news_to_html.py | 66 ++++++++++++++++++++ 4 files changed, 473 insertions(+) create mode 100644 web/all_news.bin create mode 100644 web/backup.bin create mode 100644 web/news.html create mode 100755 web/news_to_html.py (limited to 'web') diff --git a/web/all_news.bin b/web/all_news.bin new file mode 100644 index 0000000..4de6713 --- /dev/null +++ b/web/all_news.bin @@ -0,0 +1,169 @@ + +

2018-02-16

+ + Actual Release: Pilot-II Testing +
+
Welcome to The Mana World 2: Monster War! +
+
By playing you agree and abide to the Terms of Service of The Mana World 2, available at: +
+ https://gitlab.com/TMW2/TheManaWorld_Wiki/wikis/Rules +
+ Last ToS update: 2018-02-15 +
+ +
+ Our Staff will never ask for your password. You are the sole responsible for +
+ its safety! +
+ If you ever run in trouble, try contacting a GM with @request Help me! +
+ Please enjoy our server, and have fun! +
+ +
+ The adventure begins! +
+ +
+ Release 1.1: Candy Candy! +
+ +
+
Nard is ready to bring you to and fro Candor and Tulimshar. His ship still have +
+
some issues, like global space and no wait times, but hey! He brings you to where +
+
you want! +
+ +
+
We needed to rewrite the client updates due the domain name move. Do not worry, +
+
this download should be the last massive one, with humble 60 Megabytes! +
+ +
+
Various map issues were fixed, including warps. NPCs are improved, and paying +
+
the ticket to Tulimshar is not impossible anymore. Many NPCs are mere placeholders, +
+
and female sprites are still broken, but hey! We'll fix as we move on! +
+ +
+
We want to express our gratitute here to Saulc, for sponsoring this server. +
+
We also want to thanks everyone who contributed to this game, it would never +
+
have left drawing board without all of you! +
+ +
+
You can see at our gitlab page the issues remaining for next release. Broken +
+
maps, missing NPCs, broken XML and sprites - you're welcome to pick any task +
+
to help us. We plan in releasing at 2018-03-02 and with your help we can! +
+
Yes! Let's make a great TMW2:MW! +
+ +
+
Due the very early stages of development, we may need to do a full account reset +
+
before next release, so do not get too attached to it :> +
+
The early stage also means constant server resets and updates. Sorry. +
+ +
+
This is a Pilot Release, and therefore, not much content is present. +
+
We welcome all contributors who are willing to join. +
+ +
+
Have fun, because the monsters won't wait for you! +
+ +
+ -- Your TMW2 Team +
+ February 2018 +
+ +
+
You can check out this page for older entries: +
+ http://tmw2.org/news +
+

+

2018-02-14

+ + Actual Release: Pilot-I Testing +
+
Welcome to The Mana World 2! +
+
By playing you agree and abide to the Terms of Service of The Mana World 2, available at: +
+ https://gitlab.com/TMW2/TheManaWorld_Wiki/wikis/Rules +
+ +
+ Our Staff will never ask for your password. You are the sole responsible for +
+ its safety! +
+ If you ever run in trouble, try contacting a GM with @request Help me! +
+ Please enjoy our server, and have fun! +
+ +
+ The adventure begins! +
+ +
+ Release 1: Candy! +
+ +
+
The work which started at mid-january is currently advancing. +
+
You can travel with Nard to Candor and later, you'll be able to visit Tulishmar. +
+
Remember that this is not TMW:rEvolt, even if many aspects are similar. +
+ +
+
Due the very early stages of development, we may need to do a full account reset +
+
before next release, so do not get too attached to it :> +
+
The early stage also means constant server resets and updates. Sorry. +
+ +
+
This is a Pilot Release, and therefore, not much content is present. +
+
We welcome all contributors who are willing to join. +
+ +
+
Have fun, the adventure starts now! +
+ +
+ -- Your TMW2 Team +
+ February 2018 +
+ +
+
You can check out this page for older entries: +
+ http://tmw2.org/news +
+

diff --git a/web/backup.bin b/web/backup.bin new file mode 100644 index 0000000..5a4da16 --- /dev/null +++ b/web/backup.bin @@ -0,0 +1,68 @@ + +

2018-02-14

+ + Actual Release: Pilot-I Testing +
+
Welcome to The Mana World 2! +
+
By playing you agree and abide to the Terms of Service of The Mana World 2, available at: +
+ https://gitlab.com/TMW2/TheManaWorld_Wiki/wikis/Rules +
+ +
+ Our Staff will never ask for your password. You are the sole responsible for +
+ its safety! +
+ If you ever run in trouble, try contacting a GM with @request Help me! +
+ Please enjoy our server, and have fun! +
+ +
+ The adventure begins! +
+ +
+ Release 1: Candy! +
+ +
+
The work which started at mid-january is currently advancing. +
+
You can travel with Nard to Candor and later, you'll be able to visit Tulishmar. +
+
Remember that this is not TMW:rEvolt, even if many aspects are similar. +
+ +
+
Due the very early stages of development, we may need to do a full account reset +
+
before next release, so do not get too attached to it :> +
+
The early stage also means constant server resets and updates. Sorry. +
+ +
+
This is a Pilot Release, and therefore, not much content is present. +
+
We welcome all contributors who are willing to join. +
+ +
+
Have fun, the adventure starts now! +
+ +
+ -- Your TMW2 Team +
+ February 2018 +
+ +
+
You can check out this page for older entries: +
+ http://tmw2.org/news +
+

diff --git a/web/news.html b/web/news.html new file mode 100644 index 0000000..6ecfe08 --- /dev/null +++ b/web/news.html @@ -0,0 +1,170 @@ +Server News +

2018-02-16

+ + Actual Release: Pilot-II Testing +
+
Welcome to The Mana World 2: Monster War! +
+
By playing you agree and abide to the Terms of Service of The Mana World 2, available at: +
+ https://gitlab.com/TMW2/TheManaWorld_Wiki/wikis/Rules +
+ Last ToS update: 2018-02-15 +
+ +
+ Our Staff will never ask for your password. You are the sole responsible for +
+ its safety! +
+ If you ever run in trouble, try contacting a GM with @request Help me! +
+ Please enjoy our server, and have fun! +
+ +
+ The adventure begins! +
+ +
+ Release 1.1: Candy Candy! +
+ +
+
Nard is ready to bring you to and fro Candor and Tulimshar. His ship still have +
+
some issues, like global space and no wait times, but hey! He brings you to where +
+
you want! +
+ +
+
We needed to rewrite the client updates due the domain name move. Do not worry, +
+
this download should be the last massive one, with humble 60 Megabytes! +
+ +
+
Various map issues were fixed, including warps. NPCs are improved, and paying +
+
the ticket to Tulimshar is not impossible anymore. Many NPCs are mere placeholders, +
+
and female sprites are still broken, but hey! We'll fix as we move on! +
+ +
+
We want to express our gratitute here to Saulc, for sponsoring this server. +
+
We also want to thanks everyone who contributed to this game, it would never +
+
have left drawing board without all of you! +
+ +
+
You can see at our gitlab page the issues remaining for next release. Broken +
+
maps, missing NPCs, broken XML and sprites - you're welcome to pick any task +
+
to help us. We plan in releasing at 2018-03-02 and with your help we can! +
+
Yes! Let's make a great TMW2:MW! +
+ +
+
Due the very early stages of development, we may need to do a full account reset +
+
before next release, so do not get too attached to it :> +
+
The early stage also means constant server resets and updates. Sorry. +
+ +
+
This is a Pilot Release, and therefore, not much content is present. +
+
We welcome all contributors who are willing to join. +
+ +
+
Have fun, because the monsters won't wait for you! +
+ +
+ -- Your TMW2 Team +
+ February 2018 +
+ +
+
You can check out this page for older entries: +
+ http://tmw2.org/news +
+

+

2018-02-14

+ + Actual Release: Pilot-I Testing +
+
Welcome to The Mana World 2! +
+
By playing you agree and abide to the Terms of Service of The Mana World 2, available at: +
+ https://gitlab.com/TMW2/TheManaWorld_Wiki/wikis/Rules +
+ +
+ Our Staff will never ask for your password. You are the sole responsible for +
+ its safety! +
+ If you ever run in trouble, try contacting a GM with @request Help me! +
+ Please enjoy our server, and have fun! +
+ +
+ The adventure begins! +
+ +
+ Release 1: Candy! +
+ +
+
The work which started at mid-january is currently advancing. +
+
You can travel with Nard to Candor and later, you'll be able to visit Tulishmar. +
+
Remember that this is not TMW:rEvolt, even if many aspects are similar. +
+ +
+
Due the very early stages of development, we may need to do a full account reset +
+
before next release, so do not get too attached to it :> +
+
The early stage also means constant server resets and updates. Sorry. +
+ +
+
This is a Pilot Release, and therefore, not much content is present. +
+
We welcome all contributors who are willing to join. +
+ +
+
Have fun, the adventure starts now! +
+ +
+ -- Your TMW2 Team +
+ February 2018 +
+ +
+
You can check out this page for older entries: +
+ http://tmw2.org/news +
+

+ \ No newline at end of file diff --git a/web/news_to_html.py b/web/news_to_html.py new file mode 100755 index 0000000..0f0b7c1 --- /dev/null +++ b/web/news_to_html.py @@ -0,0 +1,66 @@ +#! /usr/bin/env python +# -*- coding: utf8 -*- +# +# Copyright (C) 2018 The Mana World 2 +# Author: Jonatas N. (Jesusalva) + +import datetime +date=str(datetime.date.today()) + + +# Prepare to sort from newest to oldest +dt=open("all_news.bin", "r") +dc=open("backup.bin", "w") +for i in dt: + dc.write(i) +dc.close() +dt.close() +dt=open("all_news.bin", "w") +dc=open("backup.bin", "r") + +# Read news and prepare header +ns=open("../update/news.txt", "r") +dt.write("\n

"+date+"

\n\n") + +# Function to markup it +def markup(r): + r=r.replace('##0', '') + r=r.replace('##1', '') + r=r.replace('##2', '') + r=r.replace('##3', '') + r=r.replace('##4', '') + r=r.replace('##5', '') + r=r.replace('##6', '') + r=r.replace('##7', '') + r=r.replace('##8', '') + r=r.replace('##9', '') + r=r.replace('##B', '') + r=r.replace('##b', '') + r=r.replace('[@@', '') + r=r.replace('@@]', '') + return r + +# Write the news at all_news.bin, and then reload the backup. Finally, close the file +for i in ns: + dt.write(markup(i)+'
\n') +dt.write("

") +for i in dc: + dt.write(i) + +ns.close() +dt.close() +dc.close() + +# Write the final HTML page +wp=open("news.html", "w") +dt=open("all_news.bin", "r") + +wp.write("Server News") +for line in dt: + wp.write(line) +wp.write("") + +wp.close() +dt.close() + -- cgit v1.2.3-70-g09d2