mirror of
https://github.com/Findus23/matomo-utils.git
synced 2024-09-19 15:13:44 +02:00
select time range
This commit is contained in:
parent
37f765c851
commit
98097676c5
2 changed files with 5 additions and 2 deletions
|
@ -21,7 +21,9 @@ actions = {
|
||||||
def print_count(project, year, month, csv=False):
|
def print_count(project, year, month, csv=False):
|
||||||
for action, action_name in actions.items():
|
for action, action_name in actions.items():
|
||||||
params = {
|
params = {
|
||||||
"action": action
|
"action": action,
|
||||||
|
"timestamp_after": f"{year}-{month}-01T00:00:00+00:00",
|
||||||
|
"timestamp_before": f"{year}-{month + 1}-01T00:00:00+00:00"
|
||||||
}
|
}
|
||||||
|
|
||||||
r = s.get(url + f"projects/{project}/changes/", params=params)
|
r = s.get(url + f"projects/{project}/changes/", params=params)
|
||||||
|
|
|
@ -66,6 +66,7 @@ while data["next"]:
|
||||||
components[comp["slug"]] = comp
|
components[comp["slug"]] = comp
|
||||||
|
|
||||||
assert len(components) == count
|
assert len(components) == count
|
||||||
|
print(f"{count} components")
|
||||||
|
|
||||||
phpcomponents = {slug: comp for slug, comp in components.items() if not comp["is_glossary"]}
|
phpcomponents = {slug: comp for slug, comp in components.items() if not comp["is_glossary"]}
|
||||||
|
|
||||||
|
@ -79,7 +80,7 @@ core_repo_components = {slug: comp for slug, comp in components.items() if
|
||||||
non_core_repo_components = diff_dicts(phpcomponents, core_repo_components)
|
non_core_repo_components = diff_dicts(phpcomponents, core_repo_components)
|
||||||
non_core_repo_components = diff_dicts(non_core_repo_components, community_components)
|
non_core_repo_components = diff_dicts(non_core_repo_components, community_components)
|
||||||
|
|
||||||
for slug, comp in phpcomponents.items():
|
for slug, comp in community_components.items():
|
||||||
print(slug, comp["name"])
|
print(slug, comp["name"])
|
||||||
addon_ids, addon_configs = get_addons(comp["addons"])
|
addon_ids, addon_configs = get_addons(comp["addons"])
|
||||||
license = comp["license"]
|
license = comp["license"]
|
||||||
|
|
Loading…
Reference in a new issue