Author: sebb
Date: Mon Jan 20 22:53:58 2025
New Revision: 1923292
URL: http://svn.apache.org/viewvc?rev=1923292&view=rev
Log:
Set up cwiki, svn and git entries
Modified:
attic/site/retire.py
attic/site/xdocs/projects/_template.xml
Modified: attic/site/retire.py
URL:
http://svn.apache.org/viewvc/attic/site/retire.py?rev=1923292&r1=1923291&r2=1923292&view=diff
==============================================================================
--- attic/site/retire.py (original)
+++ attic/site/retire.py Mon Jan 20 22:53:58 2025
@@ -28,6 +28,7 @@ from inspect import getsourcefile
from string import Template
import os
import re
+import subprocess
from collections import defaultdict
from urlutils import loadyaml, loadjson
@@ -44,6 +45,19 @@ for entry in loadjson(CWIKI_INFO)['resul
JIRA='https://issues.apache.org/jira/rest/api/2/project'
+SVNURL='https://svn.apache.org/repos/asf/'
+SVNKEYS = {}
+svnargs = ['svn', 'ls', SVNURL]
+output = subprocess.run(svnargs, stdout=subprocess.PIPE,
check=True).stdout.decode("us-ascii")
+for name in output.split('\n'):
+ if len(name) > 0:
+ SVNKEYS[name.rstrip('/')] = ''
+
+GITREPOS='https://gitbox.apache.org/repositories.json'
+GITKEYS = {}
+for entry in loadjson(GITREPOS)['projects']:
+ GITKEYS[entry] = ''
+
MYHOME = dirname(abspath(getsourcefile(lambda:0)))
PROJECTS = join((MYHOME), 'xdocs', 'projects')
SYLESHEETS = join((MYHOME), 'xdocs', 'stylesheets')
@@ -123,11 +137,30 @@ def create_project(pid):
mnames = lists[pid]
mnames.remove('dev')
jiras = list_jira(pid)
+ # Is there a Wiki?
+ cwikis = find_wiki(pid)
+ if len(cwikis) > 0:
+ if len(cwikis) == 1 and cwikis[0].lower() == pid:
+ cwiki ='<cwiki/>'
+ else:
+ keys = ','.join(sorted(cwikis))
+ cwiki =f'<cwiki keys="{keys}"/>'
+ else:
+ cwiki = ''
+ svn = git = ''
+ # May have both SVN and Git
+ if pid in SVNKEYS:
+ svn = '<svn/>'
+ if pid in GITKEYS:
+ git = '<git/>'
out = template.substitute(tlpid = pid,
FullName = meta['display_name'],
Month_Year = meta['retired'],
mail_names = ",".join(sorted(mnames)),
jira_names = ",".join(sorted(jiras)),
+ cwiki = cwiki,
+ svn = svn,
+ git = git,
description = meta.get('description', 'TBA'))
with open(outfile, 'w', encoding='utf-8') as o:
o.write(out)
Modified: attic/site/xdocs/projects/_template.xml
URL:
http://svn.apache.org/viewvc/attic/site/xdocs/projects/_template.xml?rev=1923292&r1=1923291&r2=1923292&view=diff
==============================================================================
--- attic/site/xdocs/projects/_template.xml (original)
+++ attic/site/xdocs/projects/_template.xml Mon Jan 20 22:53:58 2025
@@ -48,10 +48,11 @@
<!-- use attribute key="" to override default JIRA -->
<!-- N.B. some projects may use GitHub issues instead of JIRA -->
<jira key="${jira_names}"/>
- <!--
- <cwiki/>
- -->
- <!--svn/> OR <git/-->
+ <!-- <cwiki [key="a,b"]/> if present -->
+ ${cwiki}
+ <!--svn/> AND/OR <git/> -->
+ ${svn}
+ ${git}
<!-- use the tag
<no_downloads/>
to suppress the Downloads links -->