Skip to content

Commit

Permalink
Filter out empty discord and website links
Browse files Browse the repository at this point in the history
  • Loading branch information
amoeba committed Nov 22, 2023
1 parent d5d27a1 commit 8dfa439
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 33 deletions.
26 changes: 16 additions & 10 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,22 @@ namespace :servers do
servers = []

doc.xpath('//serveritem').each do |server|
servers.push({
name: server.xpath('./name').first.content,
description: server.xpath('./description').first.content,
type: server.xpath('./type').first.content,
software: server.xpath('./emu').first.content,
host: server.xpath('./server_host').first.content,
port: server.xpath('./server_port').first.content,
website_url: server.xpath('./website_url').first.content,
discord_url: server.xpath('./discord_url').first.content
})
s = {
name: server.xpath('./name').first.content,
description: server.xpath('./description').first.content,
type: server.xpath('./type').first.content,
software: server.xpath('./emu').first.content,
host: server.xpath('./server_host').first.content,
port: server.xpath('./server_port').first.content,
website_url: server.xpath('./website_url').first.content,
discord_url: server.xpath('./discord_url').first.content
}

# clean up
s.delete(:website_url) if s[:website_url].length <= 0
s.delete(:discord_url) if s[:discord_url].length <= 0

servers.push(s)
end

servers = servers.sort_by { |server| server[:name] }
Expand Down
25 changes: 2 additions & 23 deletions helpers/server_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ module ServerHelper
:software=>"ACE",
:host=>"asheronscall.hopto.org",
:port=>"9000",
:website_url=>"",
:discord_url=>"https://discord.gg/VSFtYXN3v7"},
{:name=>"AChard",
:description=>"ACE EOR PVP Server/Custom PK Content/PK Kill Rankings",
Expand All @@ -38,7 +37,6 @@ module ServerHelper
:software=>"ACE",
:host=>"play.coldeve.online",
:port=>"9000",
:website_url=>"",
:discord_url=>"https://discord.gg/nUR4PHe"},
{:name=>"DarkSide-PK",
:description=>
Expand Down Expand Up @@ -91,7 +89,6 @@ module ServerHelper
:software=>"ACE",
:host=>"ac.duskfall.net",
:port=>"9000",
:website_url=>"",
:discord_url=>"https://discord.gg/jH7uYyF8gp"},
{:name=>"Fathomless Refuge",
:description=>
Expand All @@ -100,7 +97,6 @@ module ServerHelper
:software=>"ACE",
:host=>"23.254.209.233",
:port=>"9000",
:website_url=>"",
:discord_url=>"https://discord.gg/C9Tu5yUYn2"},
{:name=>"Frostcull",
:description=>
Expand All @@ -109,17 +105,14 @@ module ServerHelper
:software=>"ACE",
:host=>"frostcull.ddns.net",
:port=>"9000",
:website_url=>"",
:discord_url=>"https://discord.gg/RQF7HgEZn4"},
{:name=>"FrostfACE",
:description=>
"New accounts include lvl 275 starter characters. Retail character restoration also supported.",
:type=>"PvE",
:software=>"ACE",
:host=>"172.111.230.127",
:port=>"9000",
:website_url=>"",
:discord_url=>""},
:port=>"9000"},
{:name=>"FunkyTEST",
:description=>"FunkyTown 2.0 Test Server",
:type=>"PvE",
Expand Down Expand Up @@ -152,7 +145,6 @@ module ServerHelper
:software=>"GDL",
:host=>"test.gdleac.com",
:port=>"9050",
:website_url=>"",
:discord_url=>"https://discord.gg/jd3dEJf"},
{:name=>"Harvestbud",
:description=>"Retail experience. 3 account max",
Expand All @@ -177,7 +169,6 @@ module ServerHelper
:software=>"ACE",
:host=>"ifh.ddns.net",
:port=>"9000",
:website_url=>"",
:discord_url=>"https://discord.gg/zdQVP7bmjC"},
{:name=>"InfiniteLeaftide",
:description=>
Expand All @@ -186,33 +177,28 @@ module ServerHelper
:software=>"ACE",
:host=>"infiniteleaftide.online",
:port=>"9000",
:website_url=>"",
:discord_url=>"https://discord.gg/KtNxP8CaZt"},
{:name=>"Jellocull",
:description=>"A PVE Server to mimic retail and later add custom content. ",
:type=>"PvE",
:software=>"ACE",
:host=>"ac.jellocull.com",
:port=>"9000",
:website_url=>"",
:discord_url=>"https://discord.gg/snv52pX"},
{:name=>"Levistras",
:description=>"A 100% Botting-Free PvE Server! Open access! 2 account limit",
:type=>"PvE",
:software=>"ACE",
:host=>"levistras.acportalstorm.com",
:port=>"9000",
:website_url=>"",
:discord_url=>"https://discord.gg/TtkcWbv"},
{:name=>"Modclaim",
:description=>
"A PVE AC Server evolving to provide a end of retail experience running ACEmulator with addition of \"persistent arrows\".",
:type=>"PvE",
:software=>"ACE",
:host=>"ngc1069.dynamic-dns.net",
:port=>"9000",
:website_url=>"",
:discord_url=>""},
:port=>"9000"},
{:name=>"Morgentau",
:description=>
"A PVE server with some server side portal bots. Max. 7 accounts per IP.",
Expand All @@ -237,15 +223,13 @@ module ServerHelper
:software=>"GDL",
:host=>"reefcull.gdleac.com",
:port=>"9000",
:website_url=>"",
:discord_url=>"https://discord.com/jd3dEJf"},
{:name=>"Seedsow",
:description=>"A PVE Dark Majesty server must use classic AC .dats",
:type=>"PvE",
:software=>"GDL",
:host=>"serafino.ddns.net",
:port=>"9060",
:website_url=>"",
:discord_url=>"https://goo.gl/mUEu6g"},
{:name=>"Shadowland",
:description=>
Expand All @@ -262,7 +246,6 @@ module ServerHelper
:software=>"GDL",
:host=>"serafino.ddns.net",
:port=>"9070",
:website_url=>"",
:discord_url=>"https://goo.gl/mUEu6g"},
{:name=>"Soulclaim",
:description=>
Expand All @@ -271,15 +254,13 @@ module ServerHelper
:software=>"ACE",
:host=>"soulclaim.ddns.net",
:port=>"9000",
:website_url=>"",
:discord_url=>"https://discord.gg/939ARjY"},
{:name=>"Thistlecrown",
:description=>"Everyone welcome! 3 account limit. Recreation of TD.",
:type=>"PVE",
:software=>"ACE",
:host=>"thistlecrown.ddns.net",
:port=>"9000",
:website_url=>"",
:discord_url=>"https://discord.gg/uhZ3hn7"},
{:name=>"ValHeel",
:description=>
Expand All @@ -288,7 +269,6 @@ module ServerHelper
:software=>"ACE",
:host=>"162.250.127.186",
:port=>"9000",
:website_url=>"",
:discord_url=>"https://discord.gg/U5wxByySCt"},
{:name=>"Wynterhaven",
:description=>
Expand All @@ -297,7 +277,6 @@ module ServerHelper
:software=>"ACE",
:host=>"71.87.108.159",
:port=>"9000",
:website_url=>"",
:discord_url=>"https://discord.gg/uWUgNv2yDP"}]

def self.softwares
Expand Down

0 comments on commit 8dfa439

Please sign in to comment.