Wiki source code of New Documentation Progress
Last modified by Eleni Cojocariu on 2026/11/05 11:53
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | {{warning}} | ||
| 2 | WIP: this is being revamped at [[XWikiOrg.documentation-scripts-queries.migration-progress.new-pages.WebHome]] and [[XWikiOrg.documentation-scripts-queries.migration-progress.contributors.WebHome]]. | ||
| 3 | {{/warning}} | ||
| 4 | |||
| 5 | {{velocity}} | ||
| 6 | |||
| 7 | #if ("$!request.start" != '' && "$!request.end" != '') | ||
| 8 | #set ($startDate = $datetool.toDate('yyyy-MM-dd', $request.start)) | ||
| 9 | #set ($monthName = $datetool.format('MMMM', $startDate)) | ||
| 10 | #set ($year = $datetool.format('yyyy', $startDate)) | ||
| 11 | |||
| 12 | #set ($query = $services.query.xwql("from doc.object(DocApp.Code.DocumentationClass) as docpage where doc.creationDate > :date1 AND doc.creationDate < :date2")) | ||
| 13 | #set ($query = $query.bindValue('date1', $datetool.toDate('yyyy-MM-dd', $request.start))) | ||
| 14 | #set ($endDate = $datetool.toDate('yyyy-MM-dd HH:mm:ss.SSS', "$request.end 23:59:59.999")) | ||
| 15 | #set ($query = $query.bindValue('date2', $endDate)) | ||
| 16 | Number of pages created between $request.start and $request.end: $query.count() | ||
| 17 | |||
| 18 | #set ($docpages = $query.execute()) | ||
| 19 | #set ($authorsCount = {}) | ||
| 20 | #foreach ($docpage in $docpages) | ||
| 21 | #set ($currentDoc = $xwiki.getDocument($docpage)) | ||
| 22 | #set ($author = $currentDoc.creator) | ||
| 23 | #if ($authorsCount.containsKey($author)) | ||
| 24 | #set ($authorsCount[$author] = $authorsCount[$author] + 1) | ||
| 25 | #else | ||
| 26 | #set ($authorsCount[$author] = 1) | ||
| 27 | #end | ||
| 28 | #end | ||
| 29 | |||
| 30 | == $monthName $year top contributors == | ||
| 31 | |||
| 32 | |=Contributor|=Pages created in $monthName | ||
| 33 | #foreach ($author in $authorsCount.keySet()) | ||
| 34 | |[[$author]]|$authorsCount.get($author) | ||
| 35 | #end | ||
| 36 | |||
| 37 | New Pages and their author: | ||
| 38 | #foreach ($docpage in $docpages) | ||
| 39 | #set ($currentDoc = $xwiki.getDocument($docpage)) | ||
| 40 | #set ($author = $currentDoc.creator) | ||
| 41 | * [[$docpage]] - [[$currentDoc.creator]] | ||
| 42 | #end | ||
| 43 | |||
| 44 | #else | ||
| 45 | ## Pass the "start" and "end" request parameters to view pages created between these dates. The format for the dates are: "yyy-MM-dd". | ||
| 46 | |||
| 47 | ## Examples: | ||
| 48 | |||
| 49 | The tables and bar charts below show the evolution of the documentation efforts each month, where "Pages Created" are new documentation pages and correspond either to documentation content moved (and usually rewritten), or new documentation that didn't exist in the old documentation: | ||
| 50 | |||
| 51 | = New Pages per Month = | ||
| 52 | |||
| 53 | == 2026 == | ||
| 54 | |||
| 55 | * [[Pages created in January 2026>>||queryString='start=2026-01-01&end=2026-01-31']] | ||
| 56 | * [[Pages created in February 2026>>||queryString='start=2026-02-01&end=2026-02-28']] | ||
| 57 | * [[Pages created in March 2026>>||queryString='start=2026-03-01&end=2026-03-31']] | ||
| 58 | * [[Pages created in April 2026>>||queryString='start=2026-04-01&end=2026-04-30']] | ||
| 59 | * [[Pages created in May 2026>>||queryString='start=2026-05-01&end=2026-05-31']] | ||
| 60 | * [[Pages created in June 2026>>||queryString='start=2026-06-01&end=2026-06-30']] | ||
| 61 | * [[Pages created in July 2026>>||queryString='start=2026-07-01&end=2026-07-31']] | ||
| 62 | * [[Pages created in August 2026>>||queryString='start=2026-08-01&end=2026-08-31']] | ||
| 63 | * [[Pages created in September 2026>>||queryString='start=2026-09-01&end=2026-09-30']] | ||
| 64 | * [[Pages created in October 2026>>||queryString='start=2026-10-01&end=2026-10-31']] | ||
| 65 | * [[Pages created in November 2026>>||queryString='start=2026-11-01&end=2026-11-30']] | ||
| 66 | |||
| 67 | |||
| 68 | (% id="newdocpages2026" %) | ||
| 69 | |=Month|=Pages Created | ||
| 70 | |Jan|32 | ||
| 71 | |Feb|23 | ||
| 72 | |Mar|169 | ||
| 73 | |Apr|31 | ||
| 74 | |May|45 | ||
| 75 | |Jun|26 | ||
| 76 | |Jul|70 | ||
| 77 | |Aug|162 | ||
| 78 | |Sep|126 | ||
| 79 | |Oct|205 | ||
| 80 | {{chart type='bar3D' | ||
| 81 | source='inline' | ||
| 82 | params='range:B2-B11;series:columns' | ||
| 83 | title="Pages Created per Month (2026)" | ||
| 84 | width="600" | ||
| 85 | height="350" | ||
| 86 | }} | ||
| 87 | |=Month|=Pages Created | ||
| 88 | |Jan|32 | ||
| 89 | |Feb|23 | ||
| 90 | |Mar|169 | ||
| 91 | |Apr|31 | ||
| 92 | |May|45 | ||
| 93 | |Jun|26 | ||
| 94 | |Jul|70 | ||
| 95 | |Aug|162 | ||
| 96 | |Sep|126 | ||
| 97 | |Oct|205 | ||
| 98 | {{/chart}} | ||
| 99 | |||
| 100 | == 2025 == | ||
| 101 | |||
| 102 | * [[Pages created in October 2025>>||queryString='start=2025-10-01&end=2025-10-31']] | ||
| 103 | * [[Pages created in November 2025>>||queryString='start=2025-11-01&end=2025-11-30']] | ||
| 104 | * [[Pages created in December 2025>>||queryString='start=2025-12-01&end=2025-12-31']] | ||
| 105 | |||
| 106 | (% id="newdocpages2025" %) | ||
| 107 | |=Month|=Pages Created | ||
| 108 | |Oct|64 | ||
| 109 | |Nov|55 | ||
| 110 | |Dec|48 | ||
| 111 | {{chart type='bar3D' | ||
| 112 | source='inline' | ||
| 113 | params='range:B2-B4;series:columns' | ||
| 114 | title="Pages Created per Month (2025)" | ||
| 115 | width="600" | ||
| 116 | height="350" | ||
| 117 | }} | ||
| 118 | |=Month|=Pages Created | ||
| 119 | |Oct|64 | ||
| 120 | |Nov|55 | ||
| 121 | |Dec|48 | ||
| 122 | {{/chart}} | ||
| 123 | |||
| 124 | #end | ||
| 125 | |||
| 126 | {{/velocity}} | ||
| 127 | |||
| 128 | |||
| 129 | |||
| 130 | {{comment}} | ||
| 131 | TODO: | ||
| 132 | * sort contributors by nb of pages created | ||
| 133 | {{/comment}} |