{"id":46829658,"url":"https://github.com/kshji/viestihajonta","last_synced_at":"2026-03-10T09:47:33.414Z","repository":{"id":144255049,"uuid":"540765182","full_name":"kshji/viestihajonta","owner":"kshji","description":"Suunnistuksen viestihajontojen tarkistus - Variant checking of Orienteering  courses","archived":false,"fork":false,"pushed_at":"2025-12-05T06:16:54.000Z","size":2095,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-08T13:56:18.624Z","etag":null,"topics":["awk","courses","csv","golang","ocad","orienteering","xml"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kshji.png","metadata":{"files":{"readme":"README.EN.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-09-24T08:47:04.000Z","updated_at":"2025-12-05T06:15:19.000Z","dependencies_parsed_at":"2023-05-29T08:45:43.662Z","dependency_job_id":null,"html_url":"https://github.com/kshji/viestihajonta","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kshji/viestihajonta","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kshji%2Fviestihajonta","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kshji%2Fviestihajonta/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kshji%2Fviestihajonta/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kshji%2Fviestihajonta/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kshji","download_url":"https://codeload.github.com/kshji/viestihajonta/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kshji%2Fviestihajonta/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30329177,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T05:25:20.737Z","status":"ssl_error","status_checked_at":"2026-03-10T05:25:17.430Z","response_time":106,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["awk","courses","csv","golang","ocad","orienteering","xml"],"created_at":"2026-03-10T09:47:32.312Z","updated_at":"2026-03-10T09:47:33.399Z","avatar_url":"https://github.com/kshji.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Orienteering forking/variants checking  - VariantChecker\n\n(c) Jukka Inkeri  2022-\n\nVariant checking of orienteering.\nCheck variant using legs (control to control pairs) used by competitor/team. Not only variantcode.\n\nEven if the variant codes seems to be in order, course data can include mistakes. \nThis checking system checks that all teams/competitors have completed exactly the same course. \n\nAll teams to have run the same leg variations at the end of the relay. When counting control to control in pairs, \nthe count has to be same at the end.\n\n1st team is the default value which is used to comparing variations for other teams in the same class.\nIf the 1st team contains a mistake, all the rest of the teams go to the mistake list.\n\nCheck can be done already before taking courses in the result system, as long as there is a course file in XML IOF 2.0.3 or 3.0 format with forking.csv including course codes for each team/competitor. \n\nThere is also online service:[Awot variantcheck](https://awot.fi/variantcheck/en/).\n\n## Feedback ##\nbox: variantcheck\ndomain: awot.fi\n\nOR [Discussion](https://github.com/kshji/viestihajonta/discussions) \n\nJukka Inkeri\n\n## Pre install\n### Linux ja OS-X\nDefault: all these are already installed\n * bash\n * gawk\n * sort\n * grep\n * sed\n * tr\n\n### Windows\nIf you are using WSL or WSL2 (Linux subsystem for Windows), then commands works just like as in the native Linux.\n\nIf you have Windows, but are not using WSL, then the easiest method is to install \n[Git for Windows](https://gitforwindows.org/). This will give you access for the required commands in Windows also.\nOn the desktop you have shortcut **GitBash**\n\n##  Install\n\n```sh\ngit clone https://github.com/kshji/viestihajonta.git\ncd viestihajonta\n# execute in this directory using CLI\n```\n\nOr download ZIP from Github and unzip it to the some directory.\n[Download ZIP-file](https://github.com/kshji/viestihajonta/archive/refs/heads/main.zip)\n\n## Execute in Windows\n* execute GitBash above\n* navigate to the working directory where you have unziped packet\n* ex. C:\\variantcheck\n```sh\ncd /c/variantcheck\n```\n\n## Examples\nIn the directory **sourcedata/examples** there are some example files. You can try CLI using those examples.\n\"Kenraali\" has three legs, using Farsta. \"virhe\" file include mistakes. \n\nThe example directory has test commands testi1.sh - testi7.sh. You can look those how to run some test competition.\n\nCLI will always create directory ./tmp, where result files will be after executing.\n```sh\n./testi1.sh\n```\n## Executing access rights for .sh files\nIf .sh files do not include execute access rights, then add it:\n```sh\nchmod a+rx *.sh sourcedata/examples/*.sh\n```\n## How it works\n * convert source data into the normalized format (csv using delimiter |), used by this system\n * checking has done always using same normalized format \n * if you need import new format, then you need to create own sourcedata command (source.XXXX.sh), \nwhich process the new source format into the  normalized format\n * tmp/XXXX/**results** directory includes normalized file examples to reviewed. They are in CSV-format with | as a separator. \n * source data can be located anywhere, but the package above includes **sourcedata** directory that use. In there you may create subdirectory for every competition.\n   * directory and filenames is more safety to use if names include only US-ASCII7 chars: a-z or 0-9. No No special characters such as öäå, nor spaces. dot . and underline _ are okay.\n\n## Ocad instructions\n\nOnline server include instructions.\n\n# Checking - execute\n## Data Source version 1 - method ocad -  Cources (XML 3.0) and teamsvariations (txt) from Ocad\n**radat.xml** ja **joukkuehajonnat.txt** OR \n**courses.xml** ja **teamvariants.txt**\n\nCreate courses using Ocad, relay variant or ex. individual butterfly variant\n* Export from Ocad course.xml (IOF 3.0)\n* Export from Ocad team variations teamvariants.txt \n\nThis checking return always OK. If not, then you have big mistakes in the courses or Ocad include mistake.\n\nYou can also use those result files and make manual editing for variants used by teams.\nExample compare same club teams 1,2,3,... or comparing the best teams variant and make sure that they are running same forking at same time.\n\nThis checking is being done using special csv file  **hajonta.lst**. You can edit those variants for teams and then use checking method **csv**.\n\n### check method ocad\n* check.variants.sh -c coursefile(xml) -t teamvariant(txt) -m 1 \n* check.variants.sh -c coursefile(xml) -t teamvariant(txt) -m ocad\n```sh\n./check.variants.sh -c sourcedata/examples/relay1.course.Courses.v3.xml -t sourcedata/examples/relay1.course.Variations.txt -m ocad\n# or\n./check.variants.sh -c sourcedata/examples/radat.ocad.v3.xml -t sourcedata/examples/joukkuehajonnat.txt -m 2 \n```\n\n## Data source version 2 - csv - coursefile (XML) ja team variant using csv-file (Pirilä lst)\n**radat.xml** and **hajonta.csv** / **hajonta.lst** OR\n**course.xml** and **variant.csv** / **variant.lst** \n\n * Ex. Export Cource from Ocad using IOF XML 2.0.3 or 3.0 format \n   *  Course information: Course Setting - Export - Courses IOF XML 3.0, name file courses...xml. Filename have to include **radat** or **course**\n * Teams variant in file **hajonta.csv** (or **variant.csv**)\n   *  Pirilä-format (csv), look sourcedata/examples/hajonta.kenraali.csv\n     * Sarja=Class,Rata-1 = Leg-1, ...\n   *  there could be other columns, but this system use only cols Sarja, No, Rata-1, Rata-2, ..., Rata-25\n   *  all classes in the same file\n\nExample: hajonta.csv - variant.csv\n```csv\nSarja;No;Rata-1;Rata-2;Rata-3\nH21;1;AA;BB;CC\nH21;2;AB;BA;CC\nH21;3;BA;CB;AC\n```\nName those files example:\n * radat.xml  or course.xml  - file have to include those strings, you can add any other strings to the filenames\n * hajonta.csv or variant.csl (or .lst), file have to include those strings, you can add any other strings to the filenames\n\n### check method csv\ncheck.variants.sh -c coursefile(xml) -t variant(csv) -m 2 \ncheck.variants.sh -c coursefile(xml) -t variant(csv) -m csv\n```sh\n./check.variants.sh -c sourcedata/examples/radat.v2.kenraali.xml -t sourcedata/examples/hajonta.kenraali.csv -m csv\n```\n## Sourcematerial version 3 - pirila - Pirilä-software - coursefile (XML) and  competitiondata (XML)\n**radat.xml** ja **pirilasta.xml**\n\nThis is example how to process checking when you have set data to the resultsoftware. The last check.\nExport data from resultsystem and then make checking.\n\n### check method pirila\n* check.variants.sh -c coursefile(xml) -t competitiondata_including_teamvariants(csv) -m 3 \n* check.variants.sh -c coursefile(xml) -t competitiondata_including_teamvariants(csv) -m pirila\n```sh\n./check.variants.sh -c sourcedata/examples/radat.v2.kenraali.xml -t sourcedata/examples/pirilasta.kenraali.xml -m pirila\n```\n\n## Data source version  4 - raw - sourcedata has been  already done into the normalized format (csv, delimiter |)\nDirectory sourcedata/genericformat include example files, \nexternal software has done this VariantChecker generic csv format.\n  * Class : check.class.csv\n  * Variants with controls :  check.controls.csv\n  * Teams variants: check.teams.csv\n\n### check method raw\n* check.variants.sh -c coursefile(csv) -t variant(csv) --classfile classes(csv) -m 4 \n* check.variants.sh -c coursefile(csv) -t variant(csv) --classfile classes(csv) -m raw\n```sh\n./check.variants.sh -c sourcedata/genericformat/check.controls.csv -t sourcedata/genericformat/check.teams.csv --classfile sourcedata/genericformat/check.class.csv  -m raw\n```\n\n## Data source version 5 - os.en - SportSoftware OS12 (english) \nDirectory sourcedata/examples file **os.teamvariants.csv**, created using SportSoftware OS12 (english)\n\nSee separate instructions: [https://github.com/kshji/viestihajonta/raw/main/VariantChecker.SourceData.OS12.pdf](VariantChecker.SourceData.OS12.pdf)\ndescribes in more detail how to generate the files from the Sport Software OS12 message program.\n\n  * The file is generated from the OS12 program:\n    * Courses :: Reports :: Course distribution :: Export :: Standard \n        * Select **Columns separated by character (CSV)**, the Delimiter is a semicolon (;) and the String Delimiter can also be off or a quotation mark \"\n        * give the file name something starting with **os.team** and ending with **csv**. In between, there may be a competition identifier or be missing\n  * the final result is os.team.csv, the name must be **os.team**, that's how the format is identified by the checker\n    * this file contains everything needed, no separate track file is needed\n\n### check method os.en\n* check.variants.sh -t teamvariantsfile(csv)  -m os.en\n```sh\n./check.variants.sh -t sourcedata/examples/os.teamvariants.csv  -m os.en\n```\n\n\n## Result\n* Separate report directory with result files is being created after every time checking is executed\n\nIf there is an error in some class, those class names will be printed and mistakes highlighted.\nExample: If M21 includes an errors, then file **M21.check.txt** includes the error report.\n\n```tmp/SomeDirectory/results```\n* normalized data **check.*.csv**\n* method raw need this kind of source data\n\n```tmp/SomeDirectory/results/tmp```\nFile for every teams. Teamfile include used control pairs with counter\n\n## Variant checking\n\nAfter checking has done, results direcory include:\n* check.teams.csv,  check.controls.csv,  check.class.csv\n* error report CLASS.check.txt for every classes\n* if there are no errors, only 1 line = every team has done same variants after legs\n* if there are mistakes, report includes the team number and which control pairs are not the same as on the comparison team (the first team as described earlier)\n\n### Example error\nVER-line is the variant for the 1st team\n\n* 313 team does not have 0-33, should be once\n* 313 team does not have 33-129, should be once\n* 313 team hae 32-129 twice, should be once\n* 313 team has 0-32 twice, should be once\n\n```text\nVER :0-31|1|0-32|1|0-33|1|129-52|1|129-61|1|129-888|1|31-129|1|32-129|1|33-129|1|52-741|1|61-741|1|741-M|2|888-M|1\n 313:0-31|1|0-32|2|129-52|1|129-61|1|129-888|1|31-129|1|32-129|2|52-741|1|61-741|1|741-M|2|888-M|1\nDIFF-ERO: 0-33 = teamid:310 counter:1 teamid:313 counter:0\nDIFF-ERO: 33-129 = teamid:310 counter:1 teamid:313 counter:0\nDIFF-ERO: 32-129 = teamid:310 counter:1 teamid:313 counter:2\nDIFF-ERO: 0-32 = teamid:310 counter:1 teamid:313 counter:2\n 316:0-31|1|0-32|2|129-52|1|129-61|1|129-888|1|31-129|1|32-129|2|52-741|1|61-741|1|741-M|2|888-M|1\nDIFF-ERO: 0-33 = teamid:310 counter:1 teamid:316 counter:0\nDIFF-ERO: 33-129 = teamid:310 counter:1 teamid:316 counter:0\nDIFF-ERO: 32-129 = teamid:310 counter:1 teamid:316 counter:2\nDIFF-ERO: 0-32 = teamid:310 counter:1 teamid:316 counter:2\n```\n\n# tmp - remove files from tmp directory\n**tmp** you can empty the tmp folder, unless competition you wish to store competition results in there\n```sh\ncd tdm -rf [0-9]*\n```\n# Example coursefile Ocad\nDirectory maps include Ocad examplefiles\n* relay1 has used in testi6.sh \n\n# History\n\n* 2022-10-14 added support for SportSoftware OS12 (finnish version)\n* 2022-09-24 version 1 VariantChecker has published\n* 2022 Finnish Championship relay - discarded seven classes\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkshji%2Fviestihajonta","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkshji%2Fviestihajonta","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkshji%2Fviestihajonta/lists"}