mirror of
https://github.com/idanoo/go-mastodon-stats
synced 2025-07-02 22:32:19 +00:00
Fix link, order by most users desc, fix date
This commit is contained in:
parent
5a884fe3d9
commit
ac25bbc896
3 changed files with 3 additions and 3 deletions
|
@ -30,7 +30,7 @@ var (
|
||||||
MATRIX_IDENTIFIDER: "https://mtrx.nz",
|
MATRIX_IDENTIFIDER: "https://mtrx.nz",
|
||||||
MASTODON_IDENTIFIER: "https://mastodon.nz",
|
MASTODON_IDENTIFIER: "https://mastodon.nz",
|
||||||
MOBILIZON_IDENTIFIER: "https://openevents.nz",
|
MOBILIZON_IDENTIFIER: "https://openevents.nz",
|
||||||
PEERTUBE_IDENTIFIER: "https//peertube.nz",
|
PEERTUBE_IDENTIFIER: "https://peertube.nz",
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pixelfed
|
// Pixelfed
|
||||||
|
|
|
@ -19,7 +19,7 @@ func Run() {
|
||||||
if len(updatedMetrics) > 0 {
|
if len(updatedMetrics) > 0 {
|
||||||
// Sort by counts!
|
// Sort by counts!
|
||||||
sort.Slice(updatedMetrics, func(i, j int) bool {
|
sort.Slice(updatedMetrics, func(i, j int) bool {
|
||||||
return updatedMetrics[i].MetricValue < updatedMetrics[j].MetricValue
|
return updatedMetrics[i].MetricValue > updatedMetrics[j].MetricValue
|
||||||
})
|
})
|
||||||
|
|
||||||
sendToMatrix(updatedMetrics)
|
sendToMatrix(updatedMetrics)
|
||||||
|
|
|
@ -27,7 +27,7 @@ func postToMastodon(metrics []metric) {
|
||||||
|
|
||||||
// Build status
|
// Build status
|
||||||
startOfDay := getStartofDay()
|
startOfDay := getStartofDay()
|
||||||
msg := fmt.Sprintf("Weekly user counts @ %s :laserkiwi:\n\n", startOfDay.String())
|
msg := fmt.Sprintf("Weekly user counts @ %d-%d-%d :laserkiwi:\n\n", startOfDay.Local().Year(), startOfDay.Local().Month(), startOfDay.Local().Day())
|
||||||
for _, m := range metrics {
|
for _, m := range metrics {
|
||||||
msg = msg + getPrintableString(m) + "\n"
|
msg = msg + getPrintableString(m) + "\n"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue