You are not logged in.

#1 2013-08-02 04:55:49

thiagowfx
Member
Registered: 2013-07-09
Posts: 586

Yaourt: sorting by number of votes

Is there any way of sorting the packages of a yaourt search by their number of votes / rating? Can any parameters / flags of yaourt or configs in .yaourtrc do that?

Actually, my question is a duplicate of this one: https://bbs.archlinux.org/viewtopic.php?id=118141, but I didn't want to post in this old thread. I couldn't find anything in the forums, neither in the man page or the wiki.

Note that I can go to the AUR website, search a package there, and them order by the votes by clicking in the votes column. But I want to do this directly from yaourt, in the command line.

Last edited by thiagowfx (2013-08-02 05:36:31)

Offline

#2 2013-08-02 12:01:04

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Yaourt: sorting by number of votes

I prefer cower:

$ cower --format "%n %o" -s firefox | grep firefox | grep -v extension | sort -nk 2 | column -t
firefox-adblock-plus-hg             0
firefox-hg-gstreamer                0
firefox-nightly-cs                  0
firefox-nightly-debug               0
firefox-nightly-symbols             0
firefox-oldbar                      0
firefox-spell-es-mx                 0
justbrowsing-firefox-profile        0
arch-firefox-forumsearch-it         1
firefox-aurora-uk                   1
firefox-extention-kwallet-git       1
firefox-https-everywhere-git        1
firefox-nightly-hg                  1
firefox-nightly-l10n-ru             1
firefox-nightly-uk                  1
firefox-nightly-zh                  1
firefox-theme-ft-silverglow         1
firefox-aurora-fr                   2
firefox-downthemall-svn             2
firefox-mod                         2
firefox-spell-en-us                 2
firefox-spell-es-es                 2
minecraft-firefox-search            2
firefox-aurora-pl                   3
firefox-aurora-pt_br                3
firefox-aurora-replacement          3
firefox-firesheep-nohal             3
firefox-firetray-git                3
firefox-flashblock                  3
firefox-nightly-de                  3
firefox-theme-adwaita-git           3
firefox-beta-bin-uk                 4
firefox-firesheep                   4
firefox-nightly-fr                  4
firefox-nightly-ru                  4
firefox-os-simulator                4
firefox-spell-pt-br                 4
firefox-theme-fxchrome              4
firefox-aurora-de                   5
firefox-search-duckduckgo           5
zeitgeist-dataprovider-firefox      5
esteidfirefoxplugin                 6
firefox-aurora-ru                   6
firefox-nightly-pl                  6
firefox-scrapbook                   6
zeitgeist-datasource-firefox        6
firefox-aurora-bin-it               7
firefox-xmarks                      7
firefox-vaccum                      8
firefox-beta-bin-fr                 10
firefox-theme-adwaita               11
firefox-plasma-plugin-git           12
firefox-esr-bin                     13
firefox-qt-hg                       13
mozilla-firefox-sync-server-hg      13
firefox-spell-ru-en                 16
kdeplasma-runners-firefoxbookmarks  17
firefox-beta-bin-all-localizations  19
firefox-raismth                     20
bin32-firefox-i18n                  27
firefox-beta-bin-ru                 28
firefox-gnome-keyring               28
firefox-firebug                     29
firefox-sync                        29
firefox-ux                          31
firefox-hg                          42
firefox-oxygen-kde                  75
firefox-qt                          100
bin32-firefox                       109
firefox-aurora                      146
firefox-moonlight                   158
firefox-kde-opensuse                330
firefox-beta-bin                    518
firefox-nightly                     716

Offline

#3 2013-08-03 23:02:10

thiagowfx
Member
Registered: 2013-07-09
Posts: 586

Re: Yaourt: sorting by number of votes

Thank you, karol! That is exactly what I want.

I won't mark the topic as [solved], though, because I want a yaourt version of this. Maybe somebody can still answer that.

Offline

#4 2013-08-04 00:19:04

oliver
Member
Registered: 2007-12-12
Posts: 448

Re: Yaourt: sorting by number of votes

can't answer your specific question, but don't forget you can build on karol's answer too - for example, to sort the output in reverse order you can add a 'r' to the sort command

$ cower --format "%n %o" -s firefox | grep firefox | grep -v extension | sort -nrk 2 | column -t | head -n 5
firefox-nightly                     716
firefox-beta-bin                    518
firefox-kde-opensuse                331
firefox-moonlight                   158
firefox-aurora                      146

Offline

#5 2013-08-04 00:28:08

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Yaourt: sorting by number of votes

or just 'cower --rsort=votes -s firefox' based on the last commit I just merged into cower.

Offline

Board footer

Powered by FluxBB