[Plugin][GitHub] FeedStatistics - simple stats on your feeds

Post plugins and custom CSS snippets here
jsoares
Bear Rating Trainee
Bear Rating Trainee
Posts: 7
Joined: 05 Jul 2014, 16:16

[Plugin][GitHub] FeedStatistics - simple stats on your feeds

Postby jsoares » 05 Jul 2014, 17:10

Attachments
ttrss-plugin-feedstatistics-v1.04.zip
(9.59 KiB) Downloaded 258 times
Last edited by jsoares on 08 Jul 2014, 23:37, edited 5 times in total.

dariottolo
Bear Rating Trainee
Bear Rating Trainee
Posts: 27
Joined: 05 Jul 2014, 18:57

Re: [Plugin][GitHub] FeedStatistics - simple stats on your f

Postby dariottolo » 05 Jul 2014, 19:00

I followed the instructions and installed the plugin, but nothing happened. The "Statistics" pane is empty.
I am using Tiny Tiny RSS 1.12 and PostGRE sql.
Let me know if you need additional information.
Regards

jsoares
Bear Rating Trainee
Bear Rating Trainee
Posts: 7
Joined: 05 Jul 2014, 16:16

Re: [Plugin][GitHub] FeedStatistics - simple stats on your f

Postby jsoares » 05 Jul 2014, 21:02

It's probably obvious: I forgot that date operations vary depending on the SQL dialect. Thanks for the heads-up, I'll move it to php and post a new version.

vidar
Bear Rating Trainee
Bear Rating Trainee
Posts: 13
Joined: 06 May 2013, 00:19

Re: [Plugin][GitHub] FeedStatistics - simple stats on your f

Postby vidar » 05 Jul 2014, 21:10

Also, PostGgeSQL does not support backticks around column names, that's a MySQL abomination.

User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

Re: [Plugin][GitHub] FeedStatistics - simple stats on your f

Postby sleeper_service » 05 Jul 2014, 21:16


User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: [Plugin][GitHub] FeedStatistics - simple stats on your f

Postby fox » 05 Jul 2014, 21:29

lots of people literally don't know anything but mysql+php

jsoares
Bear Rating Trainee
Bear Rating Trainee
Posts: 7
Joined: 05 Jul 2014, 16:16

Re: [Plugin][GitHub] FeedStatistics - simple stats on your f

Postby jsoares » 05 Jul 2014, 23:14

I have no preference for MySQL, and I absolutely hate php. It just happened to be what I was working with. In any case, backticks fixed, date operations fixed, pgSQL not being able to sum booleans and defaulting to integer division also fixed. Deployed an instance and did some quick testing, should work fine with both backends now.

If you happen to find other bugs, please let me know. As you can probably guess, this was a spur-of-the-moment thing...

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: [Plugin][GitHub] FeedStatistics - simple stats on your f

Postby fox » 05 Jul 2014, 23:18

lol sum booleans what the christ

jsoares
Bear Rating Trainee
Bear Rating Trainee
Posts: 7
Joined: 05 Jul 2014, 16:16

Re: [Plugin][GitHub] FeedStatistics - simple stats on your f

Postby jsoares » 06 Jul 2014, 01:27


nippon
Bear Rating Trainee
Bear Rating Trainee
Posts: 15
Joined: 26 Jun 2013, 05:42

Re: [Plugin][GitHub] FeedStatistics - simple stats on your f

Postby nippon » 06 Jul 2014, 03:58


jsoares
Bear Rating Trainee
Bear Rating Trainee
Posts: 7
Joined: 05 Jul 2014, 16:16

Re: [Plugin][GitHub] FeedStatistics - simple stats on your f

Postby jsoares » 06 Jul 2014, 12:23

Hey nippon, thanks for testing. Unfortunately, it seems I messed up the items/day calculation while testing pgsql (left a hardcoded 30, not accounting for lower purge limits). Uploaded the fix now. Sorry for the annoyance.

AngryChris
Bear Rating Master
Bear Rating Master
Posts: 135
Joined: 08 Apr 2013, 02:42

Re: [Plugin][GitHub] FeedStatistics - simple stats on your f

Postby AngryChris » 08 Jul 2014, 01:49


jsoares
Bear Rating Trainee
Bear Rating Trainee
Posts: 7
Joined: 05 Jul 2014, 16:16

Re: [Plugin][GitHub] FeedStatistics - simple stats on your f

Postby jsoares » 08 Jul 2014, 23:20

Ok, I'll agree with you on language. Summing booleans is conceptually weird. Counting booleans by adding their numerical representations isn't, it's just a practical trick made possible by there being a bijective mapping between the types. In other words, True + True != VeryTrue, but Truth + Truth = 2 Truths. Or just write this off as an old-style embedded system programmer rusty on database languages. Speaking of which, taking your ASCII example, capitalise(char) := char - ' ', although a xor would be smarter ;)

Back on topic, I again updated the plugin to consider feeds with no activity in the period: these will now show in the table, and be counted in the "From your X subscriptions...".

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: [Plugin][GitHub] FeedStatistics - simple stats on your f

Postby fox » 08 Jul 2014, 23:23

if only sql had a count() function hmm

jsoares
Bear Rating Trainee
Bear Rating Trainee
Posts: 7
Joined: 05 Jul 2014, 16:16

Re: [Plugin][GitHub] FeedStatistics - simple stats on your f

Postby jsoares » 08 Jul 2014, 23:41

It wasn't count() that I was overlooking (I just don't like the case notation) but, rather obtusely, nullif(). Thanks fox, sums replaced.


Return to “Themes and plugins”

Who is online

Users browsing this forum: No registered users and 2 guests