Script data retrieval from Matomo for "in review" posts
To simplify the gleaning of data for #1276 (closed), #1277 (closed), #1278 (closed), #1279 (closed), as well as maybe some retrospective views too,
Plus:
require 'yaml'
total = 0
blogumentation = 0
counts = {}
Dir.glob("content/posts/#{ARGV[0]}*").each do |f|
total += 1
h = YAML.load_file f, permitted_classes: [Time]
blogumentation += 1 if h['tags'].include? 'blogumentation'
h['tags'].each do |t|
next if t == 'blogumentation'
counts[t] ||= 0
counts[t] += 1
end
end
puts "total: #{total}"
puts "blogumentation: #{blogumentation}"
puts 'tags:'
# counts.take(5).each do |k, v|
#
# end
counts.sort_by { |_k, v| v }.reverse.take(5).each do |k, v|
puts "- #{k} #{v}"
end
total: 1
blogumentation: 0
tags:
<table>
<tr>
<th>
Tag
</th>
<th>
Number of posts
</th>
</tr>
<tr>
<td>community</td>
<td>1</td>
</tr>
<tr>
<td>free-software</td>
<td>1</td>
</tr>
<tr>
<td>open-source</td>
<td>1</td>
</tr>
<tr>
<td>hacktoberfest</td>
<td>1</td>
</tr>
<tr>
<td>guide</td>
<td>1</td>
</tr>
</table>
2017
total: 22
blogumentation: 16
tags:
<table>
<tr>
<th>
Tag
</th>
<th>
Number of posts
</th>
</tr>
<tr>
<td>chef</td>
<td>5</td>
</tr>
<tr>
<td>open-source</td>
<td>5</td>
</tr>
<tr>
<td>workflow</td>
<td>4</td>
</tr>
<tr>
<td>docker</td>
<td>4</td>
</tr>
<tr>
<td>gitlab</td>
<td>4</td>
</tr>
</table>
2018
total: 60
blogumentation: 41
tags:
<table>
<tr>
<th>
Tag
</th>
<th>
Number of posts
</th>
</tr>
<tr>
<td>chef</td>
<td>23</td>
</tr>
<tr>
<td>command-line</td>
<td>12</td>
</tr>
<tr>
<td>testing</td>
<td>11</td>
</tr>
<tr>
<td>chefspec</td>
<td>9</td>
</tr>
<tr>
<td>chef-13-upgrade</td>
<td>8</td>
</tr>
</table>
2019
total: 154
blogumentation: 73
tags:
<table>
<tr>
<th>
Tag
</th>
<th>
Number of posts
</th>
</tr>
<tr>
<td>www.jvt.me</td>
<td>46</td>
</tr>
<tr>
<td>nablopomo</td>
<td>32</td>
</tr>
<tr>
<td>indieweb</td>
<td>29</td>
</tr>
<tr>
<td>announcement</td>
<td>19</td>
</tr>
<tr>
<td>events</td>
<td>18</td>
</tr>
</table>
2020
total: 114
blogumentation: 74
tags:
<table>
<tr>
<th>
Tag
</th>
<th>
Number of posts
</th>
</tr>
<tr>
<td>java</td>
<td>27</td>
</tr>
<tr>
<td>command-line</td>
<td>16</td>
</tr>
<tr>
<td>www.jvt.me</td>
<td>15</td>
</tr>
<tr>
<td>ruby</td>
<td>13</td>
</tr>
<tr>
<td>certificates</td>
<td>10</td>
</tr>
</table>
2021
total: 111
blogumentation: 73
tags:
<table>
<tr>
<th>
Tag
</th>
<th>
Number of posts
</th>
</tr>
<tr>
<td>java</td>
<td>40</td>
</tr>
<tr>
<td>testing</td>
<td>20</td>
</tr>
<tr>
<td>ruby</td>
<td>15</td>
</tr>
<tr>
<td>chef</td>
<td>12</td>
</tr>
<tr>
<td>gradle</td>
<td>10</td>
</tr>
</table>
2022
total: 143
blogumentation: 109
tags:
<table>
<tr>
<th>
Tag
</th>
<th>
Number of posts
</th>
</tr>
<tr>
<td>go</td>
<td>41</td>
</tr>
<tr>
<td>java</td>
<td>31</td>
</tr>
<tr>
<td>spring-boot</td>
<td>24</td>
</tr>
<tr>
<td>testing</td>
<td>18</td>
</tr>
<tr>
<td>openapi</td>
<td>16</td>
</tr>
</table>
Plus a mix of looking at i.e. https://stats.jvt.me/index.php?module=CoreHome&action=index&date=last7&period=range&idSite=1#?idSite=1&period=range&date=2023-01-01,2023-12-31&category=General_Actions&subcategory=General_Pages and https://stats.jvt.me/index.php?module=CoreHome&action=index&date=last7&period=range&idSite=1#?idSite=1&period=range&date=2023-01-01,2023-12-31&category=General_Visitors&subcategory=General_Overview
Edited by Jamie Tanna