summaryrefslogtreecommitdiffstats
path: root/scripts/popupdate.py
AgeCommit message (Collapse)AuthorFilesLines
2016-10-17Make maintenance scripts installableLukas Fleischer1-26/+0
Add wrappers for the maintenance scripts to the setuptools configuration. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-29scripts: Do not use UNIX_TIMESTAMPLukas Fleischer1-2/+5
Avoid using UNIX_TIMESTAMP which is not part of the SQL standard. See f2a6bd2 (git-interface: Do not use UNIX_TIMESTAMP, 2016-08-05) for related changes. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-29Use config and db in scriptsLukas Fleischer1-27/+13
Instead of using configparser and mysql.connector directly, change all Python scripts to use the config and db Python modules which are now accessible from a common location. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-29Add a main() method to all Python scriptsLukas Fleischer1-12/+19
Move the main program logic of all scripts to main() methods such that they can be used as modules and easily be invoked by setuptools wrapper scripts. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-03-01popupdate: Avoid NULL entries in the popularity fieldLukas Fleischer1-1/+1
The popularity field is declared as "NOT NULL" in the database schema. Fix the popularity update query such that it uses a popularity of 0.0 instead of NULL for packages with no votes. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-27popupdate: Drop unused variableLukas Fleischer1-2/+0
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-11Add a field for package base popularityLukas Fleischer1-0/+5
Create a new field Popularity in the PackageBases table. The field is updated by the popupdate script and reflects the popularity of a package. Popularity is the sum of all votes with each vote being weighted with a factor of 0.98 per day since its creation. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-11Add popupdate scriptLukas Fleischer1-0/+27
This adds a simple script that can be used to recalculate the number of votes per package. It can be used in a cronjob. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>