forked from tildeverse/tilde.chat
update some links and wiki
This commit is contained in:
parent
c5b03666bf
commit
ceb3ccbd9f
45
gen_stats
45
gen_stats
@ -7,26 +7,43 @@ r.raise_for_status()
|
|||||||
out = {}
|
out = {}
|
||||||
d = xml.fromstring(r.text)
|
d = xml.fromstring(r.text)
|
||||||
assert d.tag == "inspircdstats"
|
assert d.tag == "inspircdstats"
|
||||||
def define(name,xps,vfilter=lambda x: x):
|
|
||||||
|
|
||||||
|
def define(name, xps, vfilter=lambda x: x):
|
||||||
global out
|
global out
|
||||||
out[name] = vfilter(d.findall(xps)[0].text)
|
out[name] = vfilter(d.findall(xps)[0].text)
|
||||||
define("usercount","./general/usercount",int)
|
|
||||||
define("channelcount","./general/channelcount",int)
|
|
||||||
|
define("usercount", "./general/usercount", int)
|
||||||
|
define("channelcount", "./general/channelcount", int)
|
||||||
schannels = d.findall("./channellist/channel")
|
schannels = d.findall("./channellist/channel")
|
||||||
#print(len(schannels))
|
# print(len(schannels))
|
||||||
channels = []
|
channels = []
|
||||||
for schannel in schannels:
|
for schannel in schannels:
|
||||||
channel = dict(name=schannel.findall("channelname")[0].text,usercount=int(schannel.findall("usercount")[0].text))
|
channel = dict(
|
||||||
channel["topic"] = schannel.findall("./channeltopic/topictext")[0].text if schannel.findall("./channeltopic/topictext")[0].text is not None else "No topic set"
|
name=schannel.findall("channelname")[0].text,
|
||||||
|
usercount=int(schannel.findall("usercount")[0].text),
|
||||||
|
)
|
||||||
|
channel["topic"] = (
|
||||||
|
schannel.findall("./channeltopic/topictext")[0].text
|
||||||
|
if schannel.findall("./channeltopic/topictext")[0].text is not None
|
||||||
|
else "No topic set"
|
||||||
|
)
|
||||||
# bugfix: if mode s is set and there's a topic, hide the topic
|
# bugfix: if mode s is set and there's a topic, hide the topic
|
||||||
if "s" in schannel.findall("./channelmodes")[0].text.split()[0] and channel["topic"]!="No topic set":
|
if (
|
||||||
channel["topic"]="Topic hidden"
|
"s" in schannel.findall("./channelmodes")[0].text.split()[0]
|
||||||
if channel["name"]=="#secret-sudoers": # no stat output for #secret-sudoers! it's a sekrit club of the ~team sysadmins!
|
and channel["topic"] != "No topic set"
|
||||||
|
):
|
||||||
|
channel["topic"] = "Topic hidden"
|
||||||
|
if channel["name"] == "#secret-sudoers":
|
||||||
|
# no stat output for #secret-sudoers! it's a sekrit club of the ~team sysadmins!
|
||||||
continue
|
continue
|
||||||
channel["webchatlink"] = "https://web.tilde.chat/?join="+channel["name"].lstrip("#")
|
channel["webchatlink"] = "https://web.tilde.chat/?join=" + channel["name"].lstrip(
|
||||||
|
"#"
|
||||||
|
)
|
||||||
channels.append(channel)
|
channels.append(channel)
|
||||||
channels.sort(key=lambda x: x["name"].lower())
|
channels.sort(key=lambda x: x["name"].lower())
|
||||||
out["channels"]=channels
|
out["channels"] = channels
|
||||||
#print([x.text for x in d.findall("./channellist/channel/channeltopic/topictext")])
|
# print([x.text for x in d.findall("./channellist/channel/channeltopic/topictext")])
|
||||||
with open("/var/www/tilde.chat/stats.json","w") as f:
|
with open("/var/www/tilde.chat/stats.json", "w") as f:
|
||||||
json.dump(out,f)
|
json.dump(out, f)
|
||||||
|
24
members.json
24
members.json
@ -1,17 +1,5 @@
|
|||||||
{
|
{
|
||||||
"members": [
|
"members": [
|
||||||
{
|
|
||||||
"private_channel": "#fun",
|
|
||||||
"name": "tilde.fun",
|
|
||||||
"sysadmins": [
|
|
||||||
[
|
|
||||||
"shiki",
|
|
||||||
"https://tilde.fun/~shiki/"
|
|
||||||
]
|
|
||||||
],
|
|
||||||
"link": "https://tilde.fun",
|
|
||||||
"description": "Linux machine on the internet where you can get a shell account"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"private_channel": "#town",
|
"private_channel": "#town",
|
||||||
"name": "tilde.town",
|
"name": "tilde.town",
|
||||||
@ -55,6 +43,18 @@
|
|||||||
],
|
],
|
||||||
"link": "https://yourtilde.com",
|
"link": "https://yourtilde.com",
|
||||||
"description": "basically a social network inside SSH: there is chat, email, forums, games, and lots more."
|
"description": "basically a social network inside SSH: there is chat, email, forums, games, and lots more."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"private_channel": "#fun",
|
||||||
|
"name": "tilde.fun",
|
||||||
|
"sysadmins": [
|
||||||
|
[
|
||||||
|
"shiki",
|
||||||
|
"https://tilde.fun/~shiki/"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"link": "https://tilde.fun",
|
||||||
|
"description": "Linux machine on the internet where you can get a shell account"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
<ul class="dropdown-menu" role="menu">
|
<ul class="dropdown-menu" role="menu">
|
||||||
<li><a href="https://quotes.tilde.chat/"><i class="fa fa-comment"></i> ~chat qdb</a></li>
|
<li><a href="https://quotes.tilde.chat/"><i class="fa fa-comment"></i> ~chat qdb</a></li>
|
||||||
<li><a href="https://web.tilde.chat/"><i class="fa fa-comments-o"></i> ~webchat</a></li>
|
<li><a href="https://web.tilde.chat/"><i class="fa fa-comments-o"></i> ~webchat</a></li>
|
||||||
<li><a href="https://tilde.chat/stats.php"><i class="fa fa-bar-chart"></i> network stats</a></li>
|
<li><a href="https://tilde.chat/stats/"><i class="fa fa-bar-chart"></i> network stats</a></li>
|
||||||
<li><a href="https://tilde.chat/badges/"><i class="fa fa-shield"></i> status badges</a></li>
|
<li><a href="https://tilde.chat/badges/"><i class="fa fa-shield"></i> status badges</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<?php $title="stats page";
|
<?php $title="stats page";
|
||||||
$desc="stats about tilde.chat and its channels";
|
$desc="stats about tilde.chat and its channels";
|
||||||
include "header.php"; ?>
|
include __DIR__."/../header.php"; ?>
|
||||||
<h1>stats</h1>
|
<h1>stats</h1>
|
||||||
<?php
|
<?php
|
||||||
$stats = json_decode(file_get_contents("stats.json"));
|
$stats = json_decode(file_get_contents("../stats.json"));
|
||||||
?>
|
?>
|
||||||
<p>There are <?=$stats->usercount?> users across <?=$stats->channelcount?> channels.</p>
|
<p>There are <?=$stats->usercount?> users across <?=$stats->channelcount?> channels.</p>
|
||||||
<table class='table table-striped table-bordered table-hover'>
|
<table class='table table-striped table-bordered table-hover'>
|
||||||
@ -15,5 +15,5 @@ include "header.php"; ?>
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<hr>
|
<hr>
|
||||||
<p>Available in <a href="stats.json">JSON format</a>.</p>
|
<p>Available in <a href="/stats.json">JSON format</a>.</p>
|
||||||
<?php include "footer.php"; ?>
|
<?php include __DIR__."/../footer.php"; ?>
|
@ -4,7 +4,7 @@ hi there, welcome to our wiki!
|
|||||||
|
|
||||||
to contribute to the wiki:
|
to contribute to the wiki:
|
||||||
|
|
||||||
* [fork the repo](https://git.tildeverse.org/repo/fork/53)
|
* [fork the repo](https://tildegit.org/repo/fork/53)
|
||||||
|
|
||||||
* clone the repo to your local machine (or your public_html folder on the tilde.team box for live testing)
|
* clone the repo to your local machine (or your public_html folder on the tilde.team box for live testing)
|
||||||
```sh
|
```sh
|
||||||
@ -23,14 +23,14 @@ cp template.md my-new-page.md
|
|||||||
|
|
||||||
* edit as needed!
|
* edit as needed!
|
||||||
|
|
||||||
* commit your changes and [create a pull request](https://git.tildeverse.org/tildeverse/tilde.chat/pulls) :)
|
* commit your changes and [create a pull request](https://tildegit.org/tildeverse/tilde.chat/pulls) :)
|
||||||
```sh
|
```sh
|
||||||
git add --all
|
git add --all
|
||||||
git commit -m "added my-new-page"
|
git commit -m "added my-new-page"
|
||||||
git push origin my-new-page # this should match the branch name you created earlier
|
git push origin my-new-page # this should match the branch name you created earlier
|
||||||
```
|
```
|
||||||
|
|
||||||
* create a pull request on the [site](https://git.tildeverse.org/tildeverse/tilde.chat) repo
|
* create a pull request on the [site](https://tildegit.org/tildeverse/tilde.chat) repo
|
||||||
|
|
||||||
thanks!~
|
thanks!~
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ if (!isset($_GET["page"]) || !file_exists("pages/{$_GET['page']}.md")) {
|
|||||||
<p>welcome to the tilde.chat wiki!</p>
|
<p>welcome to the tilde.chat wiki!</p>
|
||||||
|
|
||||||
<p>if you want to contribute, check out the
|
<p>if you want to contribute, check out the
|
||||||
<a href="https://git.tildeverse.org/tildeverse/tilde.chat/src/branch/master/wiki">source</a> and open a PR!
|
<a href="https://tildegit.org/tildeverse/tilde.chat/src/branch/master/wiki">source</a> and open a PR!
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
@ -78,7 +78,7 @@ if (!isset($_GET["page"]) || !file_exists("pages/{$_GET['page']}.md")) {
|
|||||||
<hr>
|
<hr>
|
||||||
<?=str_replace("<table", '<table class="table table-striped"', $pg->getContent())?>
|
<?=str_replace("<table", '<table class="table table-striped"', $pg->getContent())?>
|
||||||
<hr>
|
<hr>
|
||||||
<a href="https://git.tildeverse.org/tildeverse/tilde.chat/src/branch/master/wiki/pages/<?=$_GET["page"]?>.md">
|
<a href="https://tildegit.org/tildeverse/tilde.chat/src/branch/master/wiki/pages/<?=$_GET["page"]?>.md">
|
||||||
<i class="fa fa-edit"></i> source
|
<i class="fa fa-edit"></i> source
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ don't join #chaos or #shitposting unless you want your bot to be spammed to hell
|
|||||||
|
|
||||||
## tilde.team bot starter kit
|
## tilde.team bot starter kit
|
||||||
|
|
||||||
[khuxkm](https://khuxkm.tilde.team) is hard at work developing a starter kit framework in python that you can use to build your own irc bot. find the [source here](https://git.tildeverse.org/team/teambot). it's installed globally on ~team, so get coding!
|
[khuxkm](https://khuxkm.tilde.team) is hard at work developing a starter kit framework in python that you can use to build your own irc bot. find the [source here](https://tildegit.org/team/teambot). it's installed globally on ~team, so get coding!
|
||||||
|
|
||||||
## add your bot to the list below
|
## add your bot to the list below
|
||||||
|
|
||||||
@ -41,4 +41,4 @@ follow the example of sedbot when you add your bot in a PR to the wiki
|
|||||||
+ s/needle/replace/flags
|
+ s/needle/replace/flags
|
||||||
+ most regex character classes match here
|
+ most regex character classes match here
|
||||||
+ flags include `g` and `i`
|
+ flags include `g` and `i`
|
||||||
- [source](https://git.tildeverse.org/ben/sedbot)
|
- [source](https://tildegit.org/ben/sedbot)
|
||||||
|
@ -15,6 +15,8 @@ some rules adapted from: https://github.com/fizerkhan/irc-etiquette
|
|||||||
multiline messages belong in a pastebin. feel free to use https://ttm.sh (`echo text here | curl -F'file=@-;filename=stdin.txt'`) or https://paste.tildeverse.org for a graphical pastebin.
|
multiline messages belong in a pastebin. feel free to use https://ttm.sh (`echo text here | curl -F'file=@-;filename=stdin.txt'`) or https://paste.tildeverse.org for a graphical pastebin.
|
||||||
if you have a need to spam many lines or abuse the figlet feature of tildebot, please do so in the appropriate channel (#chaos or #shitposting).
|
if you have a need to spam many lines or abuse the figlet feature of tildebot, please do so in the appropriate channel (#chaos or #shitposting).
|
||||||
|
|
||||||
|
this includes ascii art and/or figlet output. please be considerate.
|
||||||
|
|
||||||
bot commands belong in #bots. please limit yourself to 2 or 3 commands at a time. spamming commands is unacceptable and subject to the consequences below.
|
bot commands belong in #bots. please limit yourself to 2 or 3 commands at a time. spamming commands is unacceptable and subject to the consequences below.
|
||||||
|
|
||||||
## don't be lazy - read the documentation
|
## don't be lazy - read the documentation
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
---
|
|
||||||
author: ~ben
|
|
||||||
published: true
|
|
||||||
title: irc
|
|
||||||
description: irc information
|
|
||||||
category:
|
|
||||||
- main
|
|
||||||
---
|
|
||||||
|
|
||||||
# [tildeverse irc](https://tilde.chat)
|
|
||||||
|
|
||||||
hi tildizens!
|
|
||||||
|
|
||||||
the tilde.chat irc network is available at tilde.chat:+6697 (with ssl)
|
|
||||||
|
|
||||||
this is the beginning of the [tilde.chat](https://tilde.chat) irc federation! more info on that site.
|
|
||||||
|
|
||||||
there is an instance of [thelounge](https://thelounge.chat) webchat at [irc.tilde.team](https://web.tilde.chat) if you don't already have your own client.
|
|
Loading…
Reference in New Issue
Block a user