Skip to content

Commit

Permalink
Initial revision
Browse files Browse the repository at this point in the history
git-svn-id: file:https:///home/ksmith/gitmigration/svn/xmpp/trunk@2 4b5297f7-1745-476d-ba37-a9c6900126ab
  • Loading branch information
Peter Saint-Andre committed Oct 2, 2006
0 parents commit 2ac91f5
Show file tree
Hide file tree
Showing 219 changed files with 93,420 additions and 0 deletions.
31 changes: 31 additions & 0 deletions all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/sh
# for each XEP, generates HTML file and IETF reference, then copies XML file
# also generates HTML for the README and template
# finally, copies the stylesheet, DTD, and schema
# usage: ./all.sh

xeppath=/var/www/stage.xmpp.org/extensions

ls xep-0*.xml > tmp.txt
sed s/xep-\(.*\).xml/\1/ tmp.txt > nums.txt
rm tmp.txt

while read f
do
xsltproc xep.xsl xep-$f.xml > $xeppath/xep-$f.html
xsltproc ref.xsl xep-$f.xml > $xeppath/refs/reference.JSF.XEP-$f.xml
cp xep-$f.xml $xeppath/
done < nums.txt

rm nums.txt

xsltproc xep.xsl xep-README.xml > $xeppath/README.html
xsltproc xep.xsl xep-template.xml > $xeppath/template.html

cp xep.dtd $xeppath/
cp xep.ent $xeppath/
cp xep.xsd $xeppath/
cp xep.xsl $xeppath/

# END

187 changes: 187 additions & 0 deletions announce.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
#!/usr/bin/env python

# File: announce.py
# Version: 0.8
# Description: a script for announcing XEPs
# Last Modified: 2006-10-03
# Author: Peter Saint-Andre ([email protected])
# License: public domain
# HowTo: ./announce.py xepnum dbuser dbpw 'cvsmodsurl'
# NOTE: the cvsmodsurl MUST be in quotes!

# IMPORTS:
#
import glob
import MySQLdb
import os
from select import select
import smtplib
import socket
from string import split,strip,join,find
import sys
import time
from xml.dom.minidom import parse,parseString,Document

def getText(nodelist):
thisText = ""
for node in nodelist:
if node.nodeType == node.TEXT_NODE:
thisText = thisText + node.data
return thisText

# get the seconds in the Unix era
now = int(time.time())

# READ IN ARGS:
#
# 1. XEP number
# 2. database user
# 3. database password

xepnum = sys.argv[1];
dbuser = sys.argv[2];
dbpw = sys.argv[3];
mods = sys.argv[4];

xepfile = 'xep-' + xepnum + '.xml'

# PARSE XEP HEADERS:
#
# - title
# - abstract
# - version
# - date
# - initials
# - remark

thexep = parse(xepfile)
xepNode = (thexep.getElementsByTagName("xep")[0])
headerNode = (xepNode.getElementsByTagName("header")[0])
titleNode = (headerNode.getElementsByTagName("title")[0])
title = getText(titleNode.childNodes)
abstractNode = (headerNode.getElementsByTagName("abstract")[0])
abstract = getText(abstractNode.childNodes)
statusNode = (headerNode.getElementsByTagName("status")[0])
xepstatus = getText(statusNode.childNodes)
typeNode = (headerNode.getElementsByTagName("type")[0])
xeptype = getText(typeNode.childNodes)
revNode = (headerNode.getElementsByTagName("revision")[0])
versionNode = (revNode.getElementsByTagName("version")[0])
version = getText(versionNode.childNodes)
dateNode = (revNode.getElementsByTagName("date")[0])
date = getText(dateNode.childNodes)
initialsNode = (revNode.getElementsByTagName("initials")[0])
initials = getText(initialsNode.childNodes)
remNode = (revNode.getElementsByTagName("remark")[0])
# could be <p> or <ul>
testRemarkNode = remNode.firstChild.nodeName
# print testRemarkNode
if (testRemarkNode == "p"):
remarkNode = (remNode.getElementsByTagName("p")[0])
remark = getText(remarkNode.childNodes)
else:
remark = "[See revision history]"

# what kind of action are we taking?
xepflag = ""
if (version == "0.1"):
xepflag = "new"
elif ((version == "1.0") & (xeptype == "Standards Track")):
xepflag = "draft"
elif ((version == "1.0") & (xeptype != "Standards Track")):
xepflag = "active"
elif (version == "2.0"):
xepflag = "final"
elif (xepstatus == "Retracted"):
xepflag = "retract"
elif (xepstatus == "Deferred"):
xepflag = "defer"

# UPDATE DATABASE:
#
# number is $xepnum
# name is $title
# type is $xeptype
# status is $xepstatus
# notes is "Version $version of XEP-$xepnum released $date."
# version is $version
# last_modified is $now
# abstract is $abstract
# changelog is "$remark ($initials)"

db = MySQLdb.connect("localhost", dbuser, dbpw, "foundation")
cursor = db.cursor()
theNotes = "Version " + version + " of XEP-" + xepnum + " released " + date + "."
theLog = remark + " (" + initials + ")"
if xepflag == "new":
theStatement = "INSERT INTO jeps VALUES ('" + str(xepnum) + "', '" + title + "', '" + xeptype + "', '" + xepstatus + "', '" + theNotes + "', '" + str(version) + "', '" + str(now) + "', '" + abstract + "', '" + theLog + "', '0', '5', 'Proposed', 'none');"
cursor.execute(theStatement)
else:
theStatement = "UPDATE jeps SET name='" + title + "', type='" + xeptype + "', status='" + xepstatus + "', notes='" + theNotes + "', version='" + str(version) + "', last_modified='" + str(now) + "', abstract='" + abstract + "', changelog='" + theLog + "' WHERE number='" + str(xepnum) + "';"
cursor.execute(theStatement)
result = cursor.fetchall()

## SEND MAIL:
#
# From: [email protected]
# To: [email protected]
# Subject: UPDATED: XEP-$xepnum ($title)
# [or "NEW..." if version 0.1]
# Body:
# Version $version of XEP-$xepnum ($title) is now available.
# Abstract: $abstract
# Changelog: $remark ($initials)
# CVS Diff: $mods
# URL: http:https://www.xmpp.org/extensions/xep-$xepnum.html

fromaddr = "[email protected]"
# for testing...
# toaddrs = "[email protected]"
# for real...
toaddrs = "[email protected]"

if xepflag == "new":
thesubject = 'NEW: XEP-'
elif xepflag == "draft":
thesubject = 'DRAFT: XEP-'
toaddrs = toaddrs + ", [email protected]"
elif xepflag == "final":
thesubject = 'FINAL: XEP-'
toaddrs = toaddrs + ", [email protected]"
elif xepflag == "active":
thesubject = 'ACTIVE: XEP-'
elif xepflag == "retract":
thesubject = 'RETRACTED: XEP-'
elif xepflag == "defer":
thesubject = 'DEFERRED: XEP-'
else:
thesubject = 'UPDATED: XEP-'
thesubject = thesubject + xepnum + ' (' + title + ')'

versionline = 'Version ' + version + ' of XEP-' + xepnum + ' (' + title + ') has been released.'
abstractline = 'Abstract: ' + abstract
changelogline = 'Changelog: ' + remark + ' (' + initials + ')'
modsline = 'CVS Diff: ' + mods
urlline = 'URL: http:https://www.xmpp.org/extensions/xep-' + xepnum + '.html'

msg = "From: XMPP Extensions Editor <%s>\r\n" % fromaddr
msg = msg + "To: %s\r\n" % toaddrs
msg = msg + "Subject: %s\r\n" % thesubject
msg = msg + versionline
msg = msg + "\r\n\n"
msg = msg + abstractline
msg = msg + "\r\n\n"
msg = msg + changelogline
msg = msg + "\r\n\n"
msg = msg + modsline
msg = msg + "\r\n\n"
msg = msg + urlline
msg = msg + "\r\n\n"

server = smtplib.SMTP('localhost')
server.set_debuglevel(1)
server.sendmail(fromaddr, toaddrs, msg)
server.quit()

# END

9 changes: 9 additions & 0 deletions archive.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
# archive an old version of a XEP (before publishing new version)
# usage: ./archive.sh xepnum version

xeppath=/var/www/xmpp.org/extensions

cp $xeppath/xep-$1.html $jeppath/attic/xep-$1-$2.html

# end
143 changes: 143 additions & 0 deletions deferred.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
#!/usr/bin/env python

# File: deferred.py
# Version: 0.2
# Description: a script for setting a JEP to Deferred
# Last Modified: 2006-04-24
# Author: Peter Saint-Andre ([email protected])
# License: public domain
# HowTo: ./deferred.py jepnum dbuser dbpw

# IMPORTS:
#
import glob
import MySQLdb
import os
from select import select
import smtplib
import socket
from string import split,strip,join,find
import sys
import time
from xml.dom.minidom import parse,parseString,Document

def getText(nodelist):
thisText = ""
for node in nodelist:
if node.nodeType == node.TEXT_NODE:
thisText = thisText + node.data
return thisText

# get the seconds in the Unix era
now = int(time.time())

# READ IN ARGS:
#
# 1. JEP number
# 2. database user
# 3. database password

jepnum = sys.argv[1];
dbuser = sys.argv[2];
dbpw = sys.argv[3];

jepfile = jepnum + '/jep-' + jepnum + '.xml'

# PARSE JEP HEADERS:
#
# - title
# - abstract
# - version
# - date
# - initials
# - remark

thejep = parse(jepfile)
jepNode = (thejep.getElementsByTagName("jep")[0])
headerNode = (jepNode.getElementsByTagName("header")[0])
titleNode = (headerNode.getElementsByTagName("title")[0])
title = getText(titleNode.childNodes)
abstractNode = (headerNode.getElementsByTagName("abstract")[0])
abstract = getText(abstractNode.childNodes)
statusNode = (headerNode.getElementsByTagName("status")[0])
jepstatus = getText(statusNode.childNodes)
typeNode = (headerNode.getElementsByTagName("type")[0])
jeptype = getText(typeNode.childNodes)
revNode = (headerNode.getElementsByTagName("revision")[0])
versionNode = (revNode.getElementsByTagName("version")[0])
version = getText(versionNode.childNodes)
dateNode = (revNode.getElementsByTagName("date")[0])
date = getText(dateNode.childNodes)
initialsNode = (revNode.getElementsByTagName("initials")[0])
initials = getText(initialsNode.childNodes)
remarkNode = (revNode.getElementsByTagName("remark")[0])
remark = getText(remarkNode.childNodes)

# UPDATE DATABASE:
#
# number is $jepnum
# name is $title
# type is $jeptype
# status is $jepstatus
# notes is "Version $version of JEP-$jepnum released $date."
# version is $version
# last_modified is $now
# abstract is $abstract
# changelog is "$remark ($initials)"

db = MySQLdb.connect("localhost", dbuser, dbpw, "foundation")
cursor = db.cursor()
theNotes = "Version " + version + " of JEP-" + jepnum + " released " + date + "; consideration deferred because of inactivity."
theLog = remark + " (" + initials + ")"
theStatement = "UPDATE jeps SET name='" + title + "', type='" + jeptype + "', status='Deferred', notes='" + theNotes + "', version='" + str(version) + "', last_modified='" + str(now) + "', abstract='" + abstract + "', changelog='" + theLog + "' WHERE number='" + str(jepnum) + "';"
cursor.execute(theStatement)
result = cursor.fetchall()

# SEND MAIL:
#
# From: [email protected]
# To: [email protected]
# Subject: DEFERRED: JEP-$jepnum ($title)
# Body:
# JEP-$jepnum ($title) has been Deferred because of inactivity.
#
# Abstract: $abstract
#
# URL: http:https://www.jabber.org/jeps/jep-$jepnum.html
#
# If and when a new revision of this JEP is published,
# its status will be changed back to Experimental.
#

fromaddr = "[email protected]"
# for testing...
# toaddrs = "[email protected]"
# for real...
toaddrs = "[email protected]"

thesubject = 'DEFERRED: JEP-' + jepnum + " (" + title + ")"
introline = 'JEP-' + jepnum + ' (' + title + ') has been Deferred because of inactivity.'
abstractline = 'Abstract: ' + abstract
urlline = 'URL: http:https://www.jabber.org/jeps/jep-' + jepnum + '.html'
endline = 'If and when a new revision of this JEP is published, its status will be changed back to Experimental.'

#msg = "From: %s\r\n" % fromaddr
msg = "From: JEP Editor <%s>\r\n" % fromaddr
msg = msg + "To: %s\r\n" % toaddrs
msg = msg + "Subject: %s\r\n" % thesubject
msg = msg + introline
msg = msg + "\r\n\n"
msg = msg + abstractline
msg = msg + "\r\n\n"
msg = msg + urlline
msg = msg + "\r\n\n"
msg = msg + endline
msg = msg + "\r\n"

server = smtplib.SMTP('localhost')
server.set_debuglevel(1)
server.sendmail(fromaddr, toaddrs, msg)
server.quit()

# END

21 changes: 21 additions & 0 deletions editor.shtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<html>
<head>
<title>XEP Editor</title>
<!--#include virtual="/includes/head.txt" -->
<h2>XEP Editor</h2>
<p>In accordance with <a href="jep-0001.html">XEP-0001</a>, the XEP Editor is responsible for overall management of the Jabber Software Foundation's standards process and publication of <a href="/extensions/">XMPP Extension Protocols</a>; in particular, the XEP Editor:</p>
<ul>
<li>works with XEP authors</li>
<li>ensures that each XEP is properly formatted</li>
<li>assigns a unique number to each XEP</li>
<li>assigns or modifies the status of each XEP</li>
<li>maintains each XEP under <a href="http:https://www.jabberstudio.org/cgi-bin/viewcvs.cgi/jeps/">source control</a></li>
<li>maintains the canonical <a href="/extensions/">list of XEPs</a></li>
<li>publishes each XEP to the xmpp.org website</li>
<li>publicly announces the existence and status of each XEP</li>
<li>gathers and tallies the votes of the <a href="/council/">XMPP Council</a></li>
<li>fulfills the responsibilities of the <a href="/registrar/">XMPP Registrar</a></li>
</ul>
<p>Since the founding of the Jabber Software Foundation in 2001, the XEP Editor has been <a href="http:https://www.jabber.org/people/stpeter.shtml">Peter Saint-Andre</a>, who may be contacted via &lt;&#101;&#100;&#105;&#116;&#111;&#114;&#64;&#106;&#97;&#98;&#98;&#101;&#114;&#46;&#111;&#114;&#103&gt;.</p>
</div>
<!--#include virtual="/includes/foot.txt" -->
Loading

0 comments on commit 2ac91f5

Please sign in to comment.