From 8eaa88d4cef5e732e37fd760eea1157de244cb4b Mon Sep 17 00:00:00 2001 From: jesusalva Date: Mon, 5 Mar 2018 23:08:30 -0300 Subject: Unify updates. Include a fancy RSS Atom Feed for... reasons. --- update/commit.txt | 2 +- web/feed.xml | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ web/newsfeed.py | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++ web/nf_main.xml | 91 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 294 insertions(+), 1 deletion(-) create mode 100644 web/feed.xml create mode 100755 web/newsfeed.py create mode 100644 web/nf_main.xml diff --git a/update/commit.txt b/update/commit.txt index 5f1dc9e..835e57f 100644 --- a/update/commit.txt +++ b/update/commit.txt @@ -1 +1 @@ -2af8755671b65519ba8fe98372f5bdee99d83591 +020dcd7010cfa783b8a4cfb3b6b361629153509f diff --git a/web/feed.xml b/web/feed.xml new file mode 100644 index 0000000..e9ce721 --- /dev/null +++ b/web/feed.xml @@ -0,0 +1,104 @@ + + + TMW2 + + + 2018-03-06T01:56:59.145089 + https://tmw2.org + + TMW2 Project + admin@tmw2.org + + + 01.5 - Can I Break This Pipeline? + + 2018-03-06T01:56:59.145089 + tag:tmw2.org,2018-03-02 + Welcome to TMW-2: Monster Wars! +

+

By playing you agree and abide to the Terms of Service, available at: +

+

https://tmw2.org/legal.php +

+

Last ToS update: 2018-02-24 +

+

+

+

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! +

+

+

+

Latest release: 2018-03-04 (Easter stuff, bug fixes) +

+

Never miss a release! Follow our Discord Channel! +

+

+

+

Your head aches. Your vision is dizzy. A ship appears in your front. Oh no, +

+

please don't tell me this is Evol! +

+

+

+

You may meet familiar faces and/or names, and even places you think that you +

+

know, but don't be fooled - things are different here, and work different here. +

+

Awake in Nard ship, visit Candor, journey to Tulimshar - the game offers the +

+

basic stuff a MMORPG needs. Use Tulimshar's mines to grind - this is not an +

+

easy game, but it is definitively fun, specially with friends. +

+

+

+

Our Game Masters often arrange events which are announced by Discord/IRC! +

+

There is also a Daily Login Bonus, to encourage you to keep playing! +

+

Please bear the development stages with us. There are balance problems, and +

+

various items are NPC-Only, and even bugs could be lurking here and there - +

+

give us feedback at #world channel and, who knows, you may be rewarded if you +

+

find a bug! +

+

+

+

We want to express our gratitude here to Saulc, for sponsoring this server. +

+

We also want to thanks to all testers: Thanks, you've did a great job! +

+

And by last, our gratitude to every developer and contributor who made this possible! +

+

+

+

Enjoy gaming, and leave feedback at Discord! +

+

The second release is already being baked! +

+

+

+

-- Your TMW2 Team +

+

March 2018 +

+

+

+

You can check out this page for older entries: +

+

http://tmw2.org/news +

+]]>
+
+ + + +
diff --git a/web/newsfeed.py b/web/newsfeed.py new file mode 100755 index 0000000..91c6898 --- /dev/null +++ b/web/newsfeed.py @@ -0,0 +1,98 @@ +#! /usr/bin/env python +# -*- coding: utf8 -*- +# +# Copyright (C) 2018 The Mana World 2 +# Author: Jonatas N. (Jesusalva) + +import datetime +date=str(datetime.date.today()) +fulldate=str(datetime.datetime.utcnow().isoformat()) + +# Open file (Dt) and export to "old". (Src) is current news +dt=open("nf_main.xml", "r") +old=[] +for line in dt: + old.append(line) +dt.close() +dt=open("nf_main.xml", "w") +src=open("../update/news.txt", "r") + + +# Read news and prepare header +ns=open("../update/news.txt", "r") + + +# Function to markup it, and strip new lines +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 +def nn(r): + return r.replace('\n', '') + +# Write the news, and close that file +dt.write(' \n') +for i in src: + if ('##0 Actual Release: ##1' in i): + dt.write('\ + '+nn(i.replace('##0 Actual Release: ##1',''))+'\n\ + \n\ + '+fulldate+'\n\ + tag:tmw2.org,'+date+'\n\ + '+markup(i)+'

\n') +dt.write("]]>
\n
") + +dt.write('\n\n') + +for i in old: + dt.write(i) + +src.close() +dt.close() + +# Open main file as (Dt) and read from (Ns) +dt=open("feed.xml", "w") +ns=open("nf_main.xml", "r") + +# headers +dt.write('\ +\n\ +\n\ + TMW2\n\ + \n\ + \n\ +') +dt.write(' '+fulldate+'\n') +dt.write('\ + https://tmw2.org\n\ + \n\ + TMW2 Project\n\ + admin@tmw2.org\n\ + \n\ +') + +# Write data +for i in ns: + dt.write(i) + +# close +dt.write('\n') + +dt.close() +ns.close() + diff --git a/web/nf_main.xml b/web/nf_main.xml new file mode 100644 index 0000000..2270b91 --- /dev/null +++ b/web/nf_main.xml @@ -0,0 +1,91 @@ + + 01.5 - Can I Break This Pipeline? + + 2018-03-06T01:56:59.145089 + tag:tmw2.org,2018-03-02 + Welcome to TMW-2: Monster Wars! +

+

By playing you agree and abide to the Terms of Service, available at: +

+

https://tmw2.org/legal.php +

+

Last ToS update: 2018-02-24 +

+

+

+

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! +

+

+

+

Latest release: 2018-03-04 (Easter stuff, bug fixes) +

+

Never miss a release! Follow our Discord Channel! +

+

+

+

Your head aches. Your vision is dizzy. A ship appears in your front. Oh no, +

+

please don't tell me this is Evol! +

+

+

+

You may meet familiar faces and/or names, and even places you think that you +

+

know, but don't be fooled - things are different here, and work different here. +

+

Awake in Nard ship, visit Candor, journey to Tulimshar - the game offers the +

+

basic stuff a MMORPG needs. Use Tulimshar's mines to grind - this is not an +

+

easy game, but it is definitively fun, specially with friends. +

+

+

+

Our Game Masters often arrange events which are announced by Discord/IRC! +

+

There is also a Daily Login Bonus, to encourage you to keep playing! +

+

Please bear the development stages with us. There are balance problems, and +

+

various items are NPC-Only, and even bugs could be lurking here and there - +

+

give us feedback at #world channel and, who knows, you may be rewarded if you +

+

find a bug! +

+

+

+

We want to express our gratitude here to Saulc, for sponsoring this server. +

+

We also want to thanks to all testers: Thanks, you've did a great job! +

+

And by last, our gratitude to every developer and contributor who made this possible! +

+

+

+

Enjoy gaming, and leave feedback at Discord! +

+

The second release is already being baked! +

+

+

+

-- Your TMW2 Team +

+

March 2018 +

+

+

+

You can check out this page for older entries: +

+

http://tmw2.org/news +

+]]>
+
+ + -- cgit v1.2.3-70-g09d2