{"id":26413033,"url":"https://github.com/mieuxvoter/majority-judgment-cli","last_synced_at":"2026-01-22T09:02:18.256Z","repository":{"id":46309094,"uuid":"418796062","full_name":"MieuxVoter/majority-judgment-cli","owner":"MieuxVoter","description":"CLI tool to rank proposals according to Majority Judgment, from an input CSV","archived":false,"fork":false,"pushed_at":"2023-02-16T16:38:49.000Z","size":180,"stargazers_count":6,"open_issues_count":6,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-06-05T10:12:27.899Z","etag":null,"topics":["cli","golang","golang-application","majority-judgment","poll"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MieuxVoter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-19T06:20:21.000Z","updated_at":"2024-08-14T17:42:03.000Z","dependencies_parsed_at":"2025-03-17T23:05:11.148Z","dependency_job_id":null,"html_url":"https://github.com/MieuxVoter/majority-judgment-cli","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/MieuxVoter/majority-judgment-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MieuxVoter%2Fmajority-judgment-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MieuxVoter%2Fmajority-judgment-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MieuxVoter%2Fmajority-judgment-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MieuxVoter%2Fmajority-judgment-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MieuxVoter","download_url":"https://codeload.github.com/MieuxVoter/majority-judgment-cli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MieuxVoter%2Fmajority-judgment-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28659891,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","golang","golang-application","majority-judgment","poll"],"created_at":"2025-03-17T22:53:51.295Z","updated_at":"2026-01-22T09:02:18.238Z","avatar_url":"https://github.com/MieuxVoter.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Majority Judgment CLI tool\n\n[![MIT](https://img.shields.io/github/license/MieuxVoter/majority-judgment-cli?style=for-the-badge)](LICENSE)\n[![Release](https://img.shields.io/github/v/release/MieuxVoter/majority-judgment-cli?include_prereleases\u0026style=for-the-badge)](https://github.com/MieuxVoter/majority-judgment-cli/releases)\n[![Build Status](https://img.shields.io/github/actions/workflow/status/MieuxVoter/majority-judgment-cli/go.yml?style=for-the-badge)](https://github.com/MieuxVoter/majority-judgment-cli/actions/workflows/go.yml)\n[![Code Quality](https://img.shields.io/codefactor/grade/github/MieuxVoter/majority-judgment-cli?style=for-the-badge)](https://www.codefactor.io/repository/github/mieuxvoter/majority-judgment-cli)\n[![A+](https://img.shields.io/badge/go%20report-A+-brightgreen.svg?style=for-the-badge)](https://goreportcard.com/report/github.com/mieuxvoter/majority-judgment-cli)\n![LoC](https://img.shields.io/tokei/lines/github/MieuxVoter/majority-judgment-cli?style=for-the-badge)\n[![Discord Chat](https://img.shields.io/discord/705322981102190593.svg?style=for-the-badge)](https://discord.gg/rAAQG9S)\n\nResolve Majority Judgment polls and compute the rank of each proposal.\n\n## Download\n\nHand-made builds for _Windows_ and _Linux/Mac_ are provided in the [Assets of each Release](https://github.com/MieuxVoter/majority-judgment-cli/releases).\n\n\u003e Remember to enable the execution bit: `chmod u+x ./mj`\n\n## Usage\n\nSay you have a tally `CSV` like so:\n\n         , reject, poor, fair, good, very good, excellent\n    Pizza,      3,    2,    1,    4,         4,        2\n    Chips,      2,    3,    0,    4,         3,        4\n    Pasta,      4,    5,    1,    4,         0,        2\n\nYou can run\n\n    ./mj example.csv\n\nand get\n\n![Merit profiles in ASCII art, with colors](example/screenshot_merit_color.png)\n\n\nYou probably want to `--sort` the proposals by their rank as well:\n\n    ./mj example.csv --sort\n\n![Merit profiles in ASCII art, with colors, and sorted](example/screenshot_merit_color_sorted.png)\n\nor use `-` to read from `stdin`:\n\n    cat example.csv | mj - --sort\n\n\nYou can also disable color with the flag `--no-color`:\n\n    ./mj example.csv --no-color\n\n    #2   Pizza 000000000000011111111222233333333|333333334444444444444444455555555\n    #1   Chips 000000001111111111111333333333333|333344444444444445555555555555555\n    #3   Pasta 000000000000000001111111111111111|111122223333333333333333355555555\n    \n       Legend: 0=reject  1=poor  2=fair  3=good  4=very good  5=excellent\n\n\n### Balancing\n\nMajority Judgment, to stay fair, requires tallies to be balanced ; **all proposals must have received the same amount of judgments**.\n\nIf your tally is not balanced, you may use a _default judgment strategy_:\n\n    mj example.csv --default 0\n    mj example.csv --default excellent\n    mj example.csv --default \"très bien\" --judges 42\n    mj example.csv --default majority\n    mj example.csv --normalize\n\nThe default balancing strategy is to replace missing votes with the \"worst\", most conservative vote, that is `--default 0`.\n\n### Formats\n\nYou can specify the format of the output:\n\n    ./mj example.csv --format json \u003e results.json\n    ./mj example.csv --format csv \u003e results.csv\n    ./mj example.csv --format yml \u003e results.yml\n    ./mj example.csv --format svg \u003e merit.svg\n\nAnd even format [gnuplot](http://www.gnuplot.info/) scripts that render charts:\n\n    ./mj example.csv --sort --format gnuplot | gnuplot\n\n![Linear merit profiles okf the proposals of a poll](example/screenshot_merit.png)\n\nYou can specify the kind of chart you want:\n\n    ./mj example.csv --format gnuplot --chart opinion | gnuplot\n\n![Opinion chart, the cumulative amounts of judgments per grade](example/screenshot_opinion.png)\n\nAvailable charts:\n- [x] `merit` (default)\n- [x] `opinion`\n- [ ] …\n- [ ] a LOT more would be possible with ballot data per participant\n\n\n## Install\n\nCopy the binary somewhere in your `PATH`.\n\nOr don't, and use it from anywhere.\n\n\n## Build\n\nYou can also grab the source and build it:\n\n    git clone https://github.com/MieuxVoter/majority-judgment-cli\n\nInstall [golang](https://golang.org/doc/install).\n\nExample:\n- Ubuntu: `sudo snap install go --classic`\n\nThen go into this project directory and run:\n\n    go get\n    go run .\n    go run . example/example.csv --sort\n    go build -o mj\n    ./mj\n    ./mj example/example.csv --sort\n\n\n### Build distributables\n\nWe have a convenience script `build.sh` that will handle version embedding from git,\nusing the clever `govvv`.\n\nBut basically, it's:\n\n    go build -ldflags \"-s -w\" -o mj\n\nYields a `mj` binary of about `5 Mio`.\n\n\u003e They say we should not `strip` go builds.\n\nYou can run `upx` on the binary to reduce its size:\n\n    upx mj\n\n\n#### For Windows\n\n    GOOS=windows GOARCH=amd64 go build -ldflags \"-s -w\" -o mj.exe\n\nSometimes, Go builds for Windows are [falsely detected](https://golang.org/doc/faq#virus) by antiviral software.\n\n\n## Run tests\n\n    go test -v\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmieuxvoter%2Fmajority-judgment-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmieuxvoter%2Fmajority-judgment-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmieuxvoter%2Fmajority-judgment-cli/lists"}