Skip to content

Commit db81660

Browse files
authored
Remove visitors tracking (#69)
Unblocks the generation. Until we figure out a way to fetch stats after access changes in Plausible. Refs #68.
1 parent 292a772 commit db81660

File tree

4 files changed

+1
-47
lines changed

4 files changed

+1
-47
lines changed

generate.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
# "gitpython",
55
# "potodo",
66
# "jinja2",
7-
# "requests",
87
# "docutils",
98
# ]
109
# ///
@@ -25,7 +24,6 @@
2524

2625
import contribute
2726
import build_status
28-
from visitors import get_number_of_visitors
2927
from completion import branches_from_devguide, get_completion, TranslatorsData
3028
from repositories import get_languages_and_repos, Language
3129

@@ -70,12 +68,10 @@ def get_project_data(
7068
built = language.code in languages_built
7169
if repo:
7270
completion, translators_data, branch, change = get_completion(clones_dir, repo)
73-
visitors_num = get_number_of_visitors(language.code, http) if built else 0
7471
else:
7572
completion = 0.0
7673
translators_data = TranslatorsData(0, False)
7774
change = 0.0
78-
visitors_num = 0
7975
branch = None
8076
return LanguageProjectData(
8177
language,
@@ -84,7 +80,6 @@ def get_project_data(
8480
completion,
8581
change,
8682
translators_data,
87-
visitors_num,
8883
built,
8984
in_switcher=languages_built.get(language.code),
9085
uses_platform=language.code in contribute.pulling_from_transifex,
@@ -100,7 +95,6 @@ class LanguageProjectData:
10095
completion: float
10196
change: float
10297
translators: TranslatorsData
103-
visitors: int
10498
built: bool
10599
in_switcher: bool | None
106100
uses_platform: bool

style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ th {
3939
.progress-bar.low + .progress-bar-outer-label {
4040
display: inline-block;
4141
}
42-
td[data-label="visitors"], td[data-label="translators"] {
42+
td[data-label="translators"] {
4343
text-align: right;
4444
}
4545
td[data-label="completion"] {

template.html.jinja

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
<tr>
1313
<th>language</th>
1414
<th>switcher</th>
15-
<th>visitors*</th>
1615
<th>translators</th>
1716
<th>completion</th>
1817
</tr>
@@ -30,15 +29,6 @@
3029
<a href="https://docs.python.org/{{ project.language.code }}/" target="_blank">✗</a>
3130
{% endif %}
3231
</td>
33-
<td data-label="visitors">
34-
{% if project.built %}
35-
<a href="https://plausible.io/docs.python.org?filters=((contains,page,(/{{ project.language.code }}/)))" target="_blank">
36-
{{ '{:,}'.format(project.visitors) }}
37-
</a>
38-
{% else %}
39-
{{ '{:,}'.format(project.visitors) }}
40-
{% endif %}
41-
</td>
4232
<td data-label="translators">
4333
{% if project.translators.link %}<a href="{{ project.translators.link }}" target="_blank">{% endif %}
4434
{{ project.translators.number }}
@@ -52,7 +42,6 @@
5242
{% endfor %}
5343
</tbody>
5444
</table>
55-
<p>* sum of <a href="https://plausible.io/data-policy#how-we-count-unique-users-without-cookies" target="_blank">daily unique visitors</a> since 8 June 2024</p>
5645
<p>For more information about translations, see the <a href="https://devguide.python.org/documentation/translating/" target="_blank">Python Developer’s Guide</a>.</p>
5746
<p>Last updated at {{ generation_time.strftime('%A, %-d %B %Y, %-H:%M:%S %Z') }} (in {{ duration // 60 }}:{{ "{:02}".format(duration % 60) }} minutes).</p>
5847
</body>

visitors.py

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)