Page 1 of 1

ContentDB Top mods

PostPosted: Mon Oct 14, 2019 05:08
by Extex
I was looking at the "Top mods" section of the Content Database and thought that it was based on downloads but some mods which have more downloads are lower in the list
How are the mods sorted?

Re: ContentDB Top mods

PostPosted: Mon Oct 14, 2019 07:19
by Linuxdirk
Extex wrote:I was looking at the "Top mods" section of the Content Database and thought that it was based on downloads but some mods which have more downloads are lower in the list
How are the mods sorted?

If I understand the code correctly it is based on views of the forum topic, if it has a screenshot, and if it has a free license.

Re: ContentDB Top mods

PostPosted: Mon Oct 14, 2019 07:29
by rubenwardy
Linuxdirk is correct, it's based on the forum topic currently with certain things being penalised.

The algorithm was designed to obtain an initial ordering of packages which historically used the forums for distribution. This was intended to be temporary whilst I work out how to do it better, but I never got around to that. The algorithm calculates the average number of views per month to estimate interest

A package will be penalised by 20% for not having a screenshot, and 90% for not being completely free and open source

Code: Select all
self.score = 10

if self.forums:
   topic = ForumTopic.query.get(self.forums)
   if topic:
      days   = (datetime.datetime.now() - topic.created_at).days
      months = days / 30
      years  = days / 365
      self.score = topic.views / max(years, 0.0416) + 80*min(max(months, 0.5), 6)

if self.getMainScreenshotURL() is None:
   self.score *= 0.8

if not self.license.is_foss:
   self.score *= 0.1

Re: ContentDB Top mods

PostPosted: Tue Oct 15, 2019 12:29
by Wuzzy
A screenshot doesn't make sense for a variety of mods.

Re: ContentDB Top mods

PostPosted: Tue Oct 15, 2019 13:00
by Linuxdirk
Wuzzy wrote:A screenshot doesn't make sense for a variety of mods.

I just added random images to my "API-style" mods as screenshots.

Re: ContentDB Top mods

PostPosted: Tue Oct 15, 2019 17:48
by texmex
Linuxdirk wrote:
Wuzzy wrote:A screenshot doesn't make sense for a variety of mods.

I just added random images to my "API-style" mods as screenshots.

A simple logo is also useful for making the entry distinctive.