@@ -56,10 +56,12 @@ func main() {
5656 codeExampleRemovedRegex := regexp .MustCompile (`Code example removed: Page ID: (.+), (\d+) code examples removed` )
5757 codeExampleCreatedRegex := regexp .MustCompile (`Code example created: Page ID: (.+), (\d+) new code examples added` )
5858 appliedUsageRegex := regexp .MustCompile (`Applied usage example added: Page ID: (.+), (\d+) new applied usage examples added` )
59+ claimedAppliedUsageRegex := regexp .MustCompile (`New applied usage examples for (.+): (\d+)` )
5960
6061 removedPages := make (map [string ]PageEvent )
6162 createdPages := make (map [string ]PageEvent )
6263 appliedUsageMap := make (map [string ]AppliedUsageExample )
64+ claimedAppliedUsageByProject := make (map [string ]int )
6365
6466 currentProject := ""
6567
@@ -133,6 +135,13 @@ func main() {
133135 Count : count ,
134136 }
135137 }
138+
139+ // Parse claimed applied usage examples per project
140+ if matches := claimedAppliedUsageRegex .FindStringSubmatch (line ); matches != nil {
141+ project := matches [1 ]
142+ count , _ := strconv .Atoi (matches [2 ])
143+ claimedAppliedUsageByProject [project ] = count
144+ }
136145 }
137146
138147 if err := scanner .Err (); err != nil {
@@ -185,7 +194,7 @@ func main() {
185194 }
186195
187196 // Print results
188- printResults (movedPages , trulyCreatedPages , trulyRemovedPages , appliedUsageMap )
197+ printResults (movedPages , trulyCreatedPages , trulyRemovedPages , appliedUsageMap , claimedAppliedUsageByProject )
189198}
190199
191200// isPageMoved checks if a removed page and created page represent the same page that was moved
@@ -213,7 +222,7 @@ func isPageMoved(removedID, createdID string, removedCodeExamples, createdCodeEx
213222 return false
214223}
215224
216- func printResults (movedPages []MovedPage , trulyCreatedPages []PageEvent , trulyRemovedPages []PageEvent , appliedUsageMap map [string ]AppliedUsageExample ) {
225+ func printResults (movedPages []MovedPage , trulyCreatedPages []PageEvent , trulyRemovedPages []PageEvent , appliedUsageMap map [string ]AppliedUsageExample , claimedAppliedUsageByProject map [ string ] int ) {
217226 fmt .Println ("=== MOVED PAGES ===" )
218227 if len (movedPages ) == 0 {
219228 fmt .Println ("No moved pages found." )
@@ -277,4 +286,17 @@ func printResults(movedPages []MovedPage, trulyCreatedPages []PageEvent, trulyRe
277286 }
278287 fmt .Printf ("\n Total new applied usage examples: %d\n " , totalNewAppliedUsage )
279288 }
289+
290+ // Print claimed applied usage examples per project from the logs
291+ fmt .Println ("\n === CLAIMED APPLIED USAGE EXAMPLES PER PROJECT ===" )
292+ if len (claimedAppliedUsageByProject ) == 0 {
293+ fmt .Println ("No claimed applied usage examples found in logs." )
294+ } else {
295+ totalClaimed := 0
296+ for project , count := range claimedAppliedUsageByProject {
297+ fmt .Printf ("CLAIMED [%s]: %d applied usage examples\n " , project , count )
298+ totalClaimed += count
299+ }
300+ fmt .Printf ("\n Total claimed applied usage examples: %d\n " , totalClaimed )
301+ }
280302}
0 commit comments