On 23 April 2018 at 15:11, Jan Iversen <j...@apache.org> wrote:
> Please when you add fields, add them to all objects. That way it is possible 
> to simply copy an object.

The problem is that if a field is ever omitted, then one might copy
the 'wrong' object.
Errors are likely to be propagated.
It would require a syntax checker to ensure that every object has every field.

> Alternatively the json should have a template object with all possible fields.

I think that would have to be in a separate file.

> Problem is we forget what fields are available if there are no easy 
> reminder.....copy from another object or a template object and then delete 
> (or set to none), what you do not need is easy.

Which is one reason why documentation is useful in data files...

I have not finished updating projects.json yet.
I'll see about adding a sample file later.

> rgds
> jan i
>
> Sent from my iPad
>
>> On 23 Apr 2018, at 15:51, s...@apache.org wrote:
>>
>> Author: sebb
>> Date: Mon Apr 23 13:51:31 2018
>> New Revision: 1829888
>>
>> URL: http://svn.apache.org/viewvc?rev=1829888&view=rev
>> Log:
>> Split the website field into project[/subproject] if possible
>>
>> Modified:
>>    attic/site-jekyll/src/_data/projects.json
>>    attic/site-jekyll/src/_layouts/project.html
>>    attic/site-jekyll/src/_plugins/generate_projects.rb
>>
>> Modified: attic/site-jekyll/src/_data/projects.json
>> URL: 
>> http://svn.apache.org/viewvc/attic/site-jekyll/src/_data/projects.json?rev=1829888&r1=1829887&r2=1829888&view=diff
>> ==============================================================================
>> --- attic/site-jekyll/src/_data/projects.json (original)
>> +++ attic/site-jekyll/src/_data/projects.json Mon Apr 23 13:51:31 2018
>> @@ -1,7 +1,7 @@
>> [
>> {
>>    "name":        "Abdera",
>> -   "website":     "http://abdera.apache.org/";,
>> +   "project":     "abdera",
>>    "retired":     "March 2017",
>>    "source code": "http://svn.apache.org/repos/asf/abdera/";,
>>    "issues":      "https://issues.apache.org/jira/projects/ABDERA";,
>> @@ -14,7 +14,7 @@
>> },
>> {
>>    "name":        "ACE",
>> -   "website":     "http://ace.apache.org/";,
>> +   "project":     "ace",
>>    "retired":     "December 2017",
>>    "source code": "http://svn.apache.org/repos/asf/ace";,
>>    "issues":      "https://issues.apache.org/jira/projects/ACE";,
>> @@ -27,7 +27,7 @@
>> },
>> {
>>    "name":        "Avalon",
>> -   "website":     "http://avalon.apache.org/";,
>> +   "project":     "avalon",
>>    "retired":     "June 2004",
>>    "source code": "http://svn.apache.org/repos/asf/avalon";,
>>    "issues":      "https://issues.apache.org/jira/browse/avalon/";,
>> @@ -49,7 +49,8 @@
>> {
>>    "id":          "axis-sandesha-c",
>>    "name":        "Axis Sandesha2/C",
>> -   "website":     "http://axis.apache.org/axis2/c/sandesha";,
>> +   "project":     "axis",
>> +   "subproject":  "axis2/c/sandesha",
>>    "retired":     "September 2014",
>>    "source code": "http://svn.apache.org/repos/asf/axis/axis2/c/sandesha";,
>>    "issues":      "https://issues.apache.org/jira/projects/SANDESHA2C";,
>> @@ -60,7 +61,8 @@
>> },
>> {
>>    "name":        "Axis Savan/C",
>> -   "website":     "http://axis.apache.org/axis2/c/savan";,
>> +   "project":     "axis",
>> +   "subproject":  "axis2/c/savan",
>>    "retired":     "September 2014",
>>    "source code": "http://svn.apache.org/repos/asf/axis/axis2/c/savan";,
>>    "issues":      "https://issues.apache.org/jira/browse/AXIS2C";,
>> @@ -71,7 +73,8 @@
>> },
>> {
>>    "name":        "Axis Savan/Java",
>> -   "website":     "http://axis.apache.org/axis2/java/savan";,
>> +   "project":     "axis",
>> +   "subproject":  "axis2/java/savan",
>>    "retired":     "September 2014",
>>    "source code": "",
>>    "issues":      "https://issues.apache.org/jira/projects/SAVAN";,
>> @@ -82,7 +85,7 @@
>> },
>> {
>>    "name":        "Beehive",
>> -   "website":     "http://beehive.apache.org/";,
>> +   "project":     "beehive",
>>    "retired":     "January 2010",
>>    "source code": "http://svn.apache.org/repos/asf/beehive";,
>>    "issues":      "https://issues.apache.org/jira/projects/BEEHIVE";,
>> @@ -95,7 +98,7 @@
>> },
>> {
>>    "name":        "Click",
>> -   "website":     "http://click.apache.org/";,
>> +   "project":     "click",
>>    "retired":     "May 2014",
>>    "source code": "http://svn.apache.org/repos/asf/click";,
>>    "issues":      "https://issues.apache.org/jira/projects/CLK";,
>> @@ -108,7 +111,8 @@
>> },
>> {
>>    "name":        "Crimson",
>> -   "website":     "http://xml.apache.org/crimson";,
>> +   "project":     "xml",
>> +   "subproject":  "crimson",
>>    "retired":     "August 2010",
>>    "source code": "",
>>    "issues":      "",
>> @@ -119,7 +123,7 @@
>> },
>> {
>>    "name":        "Continuum",
>> -   "website":     "http://continuum.apache.org/";,
>> +   "project":     "continuum",
>>    "retired":     "May 2016",
>>    "source code": "http://svn.apache.org/repos/asf/continuum";,
>>    "issues":      "https://issues.apache.org/jira/projects/CONTINUUM";,
>> @@ -134,7 +138,7 @@
>> },
>> {
>>    "name":        "Deltacloud",
>> -   "website":     "http://deltacloud.apache.org/";,
>> +   "project":     "deltacloud",
>>    "retired":     "July 2015",
>>    "source code": "http://svn.apache.org/repos/asf/deltacloud";,
>>    "issues":      "https://issues.apache.org/jira/projects/DTACLOUD";,
>> @@ -147,7 +151,7 @@
>> },
>> {
>>    "name":        "DeviceMap",
>> -   "website":     "http://devicemap.apache.org/";,
>> +   "project":     "devicemap",
>>    "retired":     "December 2016",
>>    "source code": "http://svn.apache.org/repos/asf/devicemap";,
>>    "issues":      "https://issues.apache.org/jira/projects/DMAP";,
>> @@ -159,7 +163,7 @@
>> },
>> {
>>    "name":        "DirectMemory",
>> -   "website":     "http://directmemory.apache.org/";,
>> +   "project":     "directmemory",
>>    "retired":     "July 2015",
>>    "source code": "http://svn.apache.org/repos/asf/directmemory";,
>>    "issues":      "https://issues.apache.org/jira/projects/DIRECTMEMORY";,
>> @@ -172,7 +176,7 @@
>> },
>> {
>>    "name":        "ESME",
>> -   "website":     "http://esme.apache.org/";,
>> +   "project":     "esme",
>>    "retired":     "July 2013",
>>    "source code": "http://svn.apache.org/repos/asf/esme";,
>>    "issues":      "https://issues.apache.org/jira/projects/ESME";,
>> @@ -184,7 +188,7 @@
>> },
>> {
>>    "name":        "Etch",
>> -   "website":     "http://etch.apache.org/";,
>> +   "project":     "etch",
>>    "retired":     "June 2016",
>>    "source code": "http://svn.apache.org/repos/asf/etch";,
>>    "issues":      "https://issues.apache.org/jira/projects/ETCH";,
>> @@ -197,7 +201,7 @@
>> },
>> {
>>    "name":        "Excalibur",
>> -   "website":     "http://excalibur.apache.org/";,
>> +   "project":     "excalibur",
>>    "retired":     "December 2010",
>>    "source code": "http://svn.apache.org/repos/asf/excalibur";,
>>    "issues":      "https://issues.apache.org/jira/projects/EXLBR";,
>> @@ -210,7 +214,7 @@
>> },
>> {
>>    "name":        "Harmony",
>> -   "website":     "http://harmony.apache.org/";,
>> +   "project":     "harmony",
>>    "retired":     "November 2011",
>>    "source code": "http://svn.apache.org/repos/asf/harmony";,
>>    "issues":      "https://issues.apache.org/jira/projects/HARMONY";,
>> @@ -223,7 +227,7 @@
>> },
>> {
>>    "name":        "HiveMind",
>> -   "website":     "http://hivemind.apache.org/";,
>> +   "project":     "hivemind",
>>    "retired":     "April 2009",
>>    "source code": "http://svn.apache.org/repos/asf/hivemind";,
>>    "issues":      "https://issues.apache.org/jira/projects/HIVEMIND";,
>> @@ -236,7 +240,7 @@
>> },
>> {
>>    "name":        "iBATIS",
>> -   "website":     "http://ibatis.apache.org/";,
>> +   "project":     "ibatis",
>>    "retired":     "June 2010",
>>    "source code": "http://svn.apache.org/repos/asf/ibatis";,
>>    "issues":      "",
>> @@ -250,7 +254,7 @@
>> },
>> {
>>    "name":        "Jakarta",
>> -   "website":     "http://jakarta.apache.org/";,
>> +   "project":     "jakarta",
>>    "retired":     "December 2011",
>>    "source code": "http://svn.apache.org/repos/asf/jakarta";,
>>    "issues":      "",
>> @@ -262,7 +266,8 @@
>> },
>> {
>>    "name":        "Jakarta Cactus",
>> -   "website":     "http://jakarta.apache.org/cactus";,
>> +   "project":     "jakarta",
>> +   "subproject":  "cactus",
>>    "retired":     "August 2011",
>>    "source code": "http://svn.apache.org/repos/asf/jakarta/cactus";,
>>    "issues":      "https://issues.apache.org/jira/projects/CACTUS";,
>> @@ -275,7 +280,8 @@
>> },
>> {
>>    "name":        "Jakarta ECS",
>> -   "website":     "http://jakarta.apache.org/ecs";,
>> +   "project":     "jakarta",
>> +   "subproject":  "ecs",
>>    "retired":     "September 2010",
>>    "source code": "http://svn.apache.org/repos/asf/jakarta/ecs";,
>>    "issues":      "",
>> @@ -288,7 +294,8 @@
>> },
>> {
>>    "name":        "Jakarta ORO",
>> -   "website":     "http://jakarta.apache.org/oro";,
>> +   "project":     "jakarta",
>> +   "subproject":  "oro",
>>    "retired":     "September 2010",
>>    "source code": "http://svn.apache.org/repos/asf/jakarta/oro";,
>>    "issues":      "https://bz.apache.org/bugzilla/buglist.cgi?product=oro";,
>> @@ -301,7 +308,8 @@
>> },
>> {
>>    "name":        "Jakarta Regexp",
>> -   "website":     "http://jakarta.apache.org/regexp";,
>> +   "project":     "jakarta",
>> +   "subproject":  "regexp",
>>    "retired":     "April 2011",
>>    "source code": "http://svn.apache.org/repos/asf/jakarta/regexp";,
>>    "issues":      "",
>> @@ -314,7 +322,8 @@
>> },
>> {
>>    "name":        "Jakarta Slide",
>> -   "website":     "http://jakarta.apache.org/slide";,
>> +   "project":     "jakarta",
>> +"   subproject":  "slide",
>>    "retired":     "November 2007",
>>    "source code": "http://svn.apache.org/repos/asf/jakarta/slide";,
>>    "issues":      
>> "https://bz.apache.org/bugzilla/describecomponents.cgi?product=Slide";,
>> @@ -326,7 +335,8 @@
>> },
>> {
>>    "name":        "Jakarta Taglibs",
>> -   "website":     "",
>> +   "project":     "jakarta",
>> +   "subproject":  "taglibs",
>>    "retired":     "June 2008",
>>    "source code": "http://svn.apache.org/repos/asf/jakarta/taglibs";,
>>    "issues":      "",
>> @@ -338,7 +348,7 @@
>> },
>> {
>>    "name":        "Lenya",
>> -   "website":     "http://lenya.apache.org/";,
>> +   "project":     "lenya",
>>    "retired":     "April 2015",
>>    "source code": "http://svn.apache.org/repos/asf/lenya";,
>>    "issues":      "",
>> @@ -351,7 +361,7 @@
>> },
>> {
>>    "name":        "MRUnit",
>> -   "website":     "http://mrunit.apache.org/";,
>> +   "project":     "mrunit",
>>    "retired":     "April 2016",
>>    "source code": "http://svn.apache.org/repos/asf/mrunit";,
>>    "issues":      "https://issues.apache.org/jira/projects/MRUNIT";,
>> @@ -365,7 +375,8 @@
>> {
>>    "id":          "ojb",
>>    "name":        "ObJectRelationalBridge (OJB)",
>> -   "website":     "http://db.apache.org/ojb";,
>> +   "project":     "db",
>> +   "subproject":  "ojb",
>>    "retired":     "January 2011",
>>    "source code": "http://svn.apache.org/repos/asf/db/ojb";,
>>    "issues":      "https://issues.apache.org/jira/projects/OJB";,
>> @@ -378,7 +389,7 @@
>> },
>> {
>>    "name":        "Oltu",
>> -   "website":     "http://oltu.apache.org/";,
>> +   "project":     "oltu",
>>    "retired":     "April 2018",
>>    "source code": "http://svn.apache.org/repos/asf/oltu";,
>>    "issues":      "https://issues.apache.org/jira/projects/OLTU";,
>> @@ -391,7 +402,7 @@
>> },
>> {
>>    "name":        "Onami",
>> -   "website":     "http://onami.apache.org/";,
>> +   "project":     "onami",
>>    "retired":     "January 2016",
>>    "source code": "http://svn.apache.org/repos/asf/onami";,
>>    "issues":      "https://issues.apache.org/jira/projects/ONAMI";,
>> @@ -404,7 +415,7 @@
>> },
>> {
>>    "name":        "Quetzalcoatl",
>> -   "website":     "http://quetz.apache.org/";,
>> +   "project":     "quetz",
>>    "retired":     "June 2010",
>>    "source code": "http://svn.apache.org/repos/asf/quetzalcoatl/";,
>>    "issues":      "",
>> @@ -416,7 +427,7 @@
>> },
>> {
>>    "name":        "Rave",
>> -   "website":     "http://rave.apache.org/";,
>> +   "project":     "rave",
>>    "retired":     "January 2016",
>>    "source code": "http://svn.apache.org/repos/asf/rave";,
>>    "issues":      "https://issues.apache.org/jira/projects/RAVE";,
>> @@ -429,7 +440,7 @@
>> },
>> {
>>    "name":        "Shale",
>> -   "website":     "http://shale.apache.org/";,
>> +   "project":     "shale",
>>    "retired":     "May 2009",
>>    "source code": "http://svn.apache.org/repos/asf/shale";,
>>    "issues":      "",
>> @@ -443,7 +454,7 @@
>> },
>> {
>>    "name":        "Shindig",
>> -   "website":     "http://shindig.apache.org/";,
>> +   "project":     "shindig",
>>    "retired":     "November 2015",
>>    "source code": "http://svn.apache.org/repos/asf/shindig";,
>>    "issues":      "https://issues.apache.org/jira/projects/SHINDIG";,
>> @@ -458,7 +469,7 @@
>> {
>>    "id":          "stdcxx",
>>    "name":        "Standard C++ Library (STDCXX)",
>> -   "website":     "http://stdcxx.apache.org/";,
>> +   "project":     "stdcxx",
>>    "retired":     "July 2013",
>>    "source code": "http://svn.apache.org/repos/asf/stdcxx";,
>>    "issues":      "https://issues.apache.org/jira/projects/STDCXX";,
>> @@ -473,7 +484,7 @@
>> },
>> {
>>    "name":        "Stratos",
>> -   "website":     "http://stratos.apache.org/";,
>> +   "project":     "stratos",
>>    "retired":     "January 2017",
>>    "source code": "http://svn.apache.org/repos/asf/stratos/";,
>>    "issues":      "https://issues.apache.org/jira/projects/STRATOS";,
>> @@ -485,7 +496,7 @@
>> },
>> {
>>    "name":        "Tuscany",
>> -   "website":     "http://tuscany.apache.org/";,
>> +   "project":     "tuscany",
>>    "retired":     "May 2016",
>>    "source code": "http://svn.apache.org/repos/asf/tuscany";,
>>    "issues":      "https://issues.apache.org/jira/projects/TUSCANY";,
>> @@ -499,7 +510,7 @@
>> },
>> {
>>    "name":        "Whirr",
>> -   "website":     "http://whirr.apache.org/";,
>> +   "project":     "whirr",
>>    "retired":     "March 2015",
>>    "source code": "http://svn.apache.org/repos/asf/whirr";,
>>    "issues":      "https://issues.apache.org/jira/projects/WHIRR";,
>> @@ -512,7 +523,7 @@
>> },
>> {
>>    "name":        "Wink",
>> -   "website":     "http://wink.apache.org/";,
>> +   "project":     "wink",
>>    "retired":     "April 2017",
>>    "source code": "http://svn.apache.org/repos/asf/wink";,
>>    "issues":      "https://issues.apache.org/jira/projects/WINK";,
>> @@ -525,7 +536,7 @@
>> },
>> {
>>    "name":        "Wookie",
>> -   "website":     "http://wookie.apache.org/";,
>> +   "project":     "wookie",
>>    "retired":     "April 2016",
>>    "source code": "http://svn.apache.org/repos/asf/wookie";,
>>    "issues":      "https://issues.apache.org/jira/projects/WOOKIE";,
>> @@ -539,7 +550,7 @@
>> {
>>    "id":          "muse",
>>    "name":        "WS Muse",
>> -   "website":     "",
>> +   "website":     "NONE",
>>    "retired":     "January 2013",
>>    "source code": "",
>>    "issues":      "",
>> @@ -553,7 +564,8 @@
>> },
>> {
>>    "name":        "Xang",
>> -   "website":     "http://xml.apache.org/xang";,
>> +   "project":     "xml",
>> +   "subproject":  "xang",
>>    "retired":     "December 2009",
>>    "source code": "http://svn.apache.org/repos/asf/xml/xang";,
>>    "issues":      "",
>> @@ -565,7 +577,8 @@
>> },
>> {
>>    "name":        "Xindice",
>> -   "website":     "http://xml.apache.org/xindice";,
>> +   "project":     "xml",
>> +   "subproject":  "xindice",
>>    "retired":     "August 2011",
>>    "source code": "http://svn.apache.org/repos/asf/xml/xindice";,
>>    "issues":      
>> "https://bz.apache.org/bugzilla/buglist.cgi?product=Xindice";,
>> @@ -577,7 +590,8 @@
>> },
>> {
>>    "name":        "XMLBeans",
>> -   "website":     "http://xml.apache.org/xmlbeans";,
>> +   "project":     "xml",
>> +   "subproject":  "xmlbeans",
>>    "retired":     "July 2013",
>>    "source code": "http://svn.apache.org/repos/asf/xmlbeans";,
>>    "issues":      "",
>> @@ -591,7 +605,7 @@
>> },
>> {
>>    "name":        "XML",
>> -   "website":     "http://xml.apache.org/";,
>> +   "project":     "xml",
>>    "retired":     "April 2012",
>>    "source code": "http://svn.apache.org/repos/asf/xml";,
>>    "issues":      "",
>>
>> Modified: attic/site-jekyll/src/_layouts/project.html
>> URL: 
>> http://svn.apache.org/viewvc/attic/site-jekyll/src/_layouts/project.html?rev=1829888&r1=1829887&r2=1829888&view=diff
>> ==============================================================================
>> --- attic/site-jekyll/src/_layouts/project.html (original)
>> +++ attic/site-jekyll/src/_layouts/project.html Mon Apr 23 13:51:31 2018
>> @@ -60,7 +60,7 @@
>>     </tr>
>>     <tr>
>>       <td>Website</td>
>> -      <td><a href="{{ page.json.website }}">{{ page.json.website | replace: 
>> "http://",""; }}</a></td>
>> +      <td><a href="{{ page.json.website }}/">{{ page.json.website | 
>> replace: "http://",""; }}/</a></td>
>>     </tr>
>>     <tr>
>>       <td>Mailing List Archives</td>
>>
>> Modified: attic/site-jekyll/src/_plugins/generate_projects.rb
>> URL: 
>> http://svn.apache.org/viewvc/attic/site-jekyll/src/_plugins/generate_projects.rb?rev=1829888&r1=1829887&r2=1829888&view=diff
>> ==============================================================================
>> --- attic/site-jekyll/src/_plugins/generate_projects.rb (original)
>> +++ attic/site-jekyll/src/_plugins/generate_projects.rb Mon Apr 23 13:51:31 
>> 2018
>> @@ -20,6 +20,14 @@ module Jekyll
>>       end
>>       p['dist'] = id.sub 'jakarta-','jakarta/'
>>
>> +      unless p['website'] # generate the website unless it is overridden
>> +        # Omit the trailing slash as that is added in the template if needed
>> +        if p['subproject']
>> +          p['website'] = 
>> "http://#{p['project']}.apache.org/#{p['subproject']}"
>> +        else
>> +          p['website'] = "http://#{p['project']}.apache.org"
>> +        end
>> +      end
>>       self.data['json'] = p # pass the data to the page processor
>>     end
>>   end
>>
>>

Reply via email to