{"id":26600737,"url":"https://github.com/thindil/rapporteur","last_synced_at":"2025-10-12T07:26:43.839Z","repository":{"id":246317950,"uuid":"820234495","full_name":"thindil/rapporteur","owner":"thindil","description":"Mirror of a simple server/client suite to auto send bug reports to the server","archived":false,"fork":false,"pushed_at":"2024-07-07T04:41:11.000Z","size":58,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"trunk","last_synced_at":"2025-10-12T07:26:43.662Z","etag":null,"topics":["bugs","nim","reporting-tool"],"latest_commit_sha":null,"homepage":"https://www.laeran.pl.eu.org/repositories/rapporteur/home","language":"Nim","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thindil.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"license.txt","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},"funding":{"liberapay":"thindil","open_collective":"laeran","github":"thindil"}},"created_at":"2024-06-26T04:34:34.000Z","updated_at":"2024-07-07T04:41:15.000Z","dependencies_parsed_at":"2025-03-23T18:45:20.863Z","dependency_job_id":null,"html_url":"https://github.com/thindil/rapporteur","commit_stats":null,"previous_names":["thindil/rapporteur"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/thindil/rapporteur","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thindil%2Frapporteur","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thindil%2Frapporteur/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thindil%2Frapporteur/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thindil%2Frapporteur/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thindil","download_url":"https://codeload.github.com/thindil/rapporteur/tar.gz/refs/heads/trunk","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thindil%2Frapporteur/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010654,"owners_count":26084784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"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":["bugs","nim","reporting-tool"],"created_at":"2025-03-23T18:34:18.099Z","updated_at":"2025-10-12T07:26:43.831Z","avatar_url":"https://github.com/thindil.png","language":"Nim","funding_links":["https://liberapay.com/thindil","https://opencollective.com/laeran","https://github.com/sponsors/thindil"],"categories":[],"sub_categories":[],"readme":"### General information\n\nRapporteur is a suite to automatically send bug reports from a program to the\nserver. **At this moment, the whole project is in alpha stage. It offers very\nbasic functionality and may contain bugs. Use at your own risk.** If you read\nthis file on GitHub: **please don't send pull requests here**. All will be\nautomatically closed. Any code propositions should go to the\n[Fossil](https://www.laeran.pl.eu.org/repositories/rapporteur) repository.\n\n**IMPORTANT:** If you read the file in the project code repository: This\nversion of the file is related to the future version of the project. It may\ncontain information not present in released versions of the program. For\nthat information, please refer to the README.md file included into the release.\n\n### Build from the source\n\nYou will need:\n\n* [Nim compiler](https://nim-lang.org/install.html)\n* [Contracts](https://github.com/Udiknedormin/NimContracts)\n\nYou can install them manually or by using [Nimble](https://github.com/nim-lang/nimble).\nIn that second option, type `nimble install https://github.com/thindil/rapporteur` to\ninstall the project and all dependencies. Generally it is recommended to use\n`nimble release` to build the project in release (optimized) mode or\n`nimble debug` to build it in the debug mode. This step will install the library and\nbuild the CGI script to use on a server. You can cross compile the CGI script from\nLinux to Linux ARM with command `nimble releasearm` or to Windows 64-bit with command\n`nimble releasewindows`.\n\n### Using Rapporteur in your code\n\n#### Setting the server\nThe first step is to set the Rapporteur's script on a server. It requires a\nHTTP server with support for CGI scripts. The CGI script will need writing\npermissions on the server to some directory. Additionally, you will need to create\na shell script and configuration file for the CGI script. Detailed instructions\nmay vary and depends on the operating system of the server.\n\n1. Compile the CGI script with one of the commands mentioned above.\n2. Place the CGI script somewhere on the server, and give the server permissions\n   to run the script.\n3. Create a configuration file for the CGI script. It must contain two options:\n\n   `keys = \"key1;key2;key3\"` - the list of keys for applications which are allowed\n    to send reports. Separated by semicolon. Generally, very basic authentication.\n   `datadir = \"/path/to/dir/with/reports\"` - the full path to the directory where\n    the reports will be stored. The web server must have permissions to write to\n    that directory.\n4. Create a simple CGI script which will run the project's server. The script must\n   be in the path where the server expect CGI script. Usually it is directory *cgi-bin*\n   etc. It depends on the server configuration. The script must contain the\n   environment variable `RAPPORT_CONFIG` with full path to the project's\n   configuration file, created in the step 3. For example, for Linux the shell\n   script could look that:\n\n        #!/usr/bin/sh\n        export RAPPORT_CONFIG=/path/to/config.cfg\n        /path/to/bin/rapporteur\n\nAnd the server should be set up. :)\n\n#### Sending a report to the server\nThe second step is to send a report from your code. It is done with two steps:\n\n1. Initialize the `rapporteur` module somewhere in your code, but before the\n   first message which will be sent to the server. Initialization is made by\n   calling procedure `initRapport` to set the HTTP address of the project's\n   server and the key of the application used to authenticate the send request.\n   For example:\n\n        import rapporteur\n\n        initRapport(httpAddress = \"https://www.myserver.com/rapporteur\".parseUri, key = \"myKey\")\n\n   It is a good idea to not store the key value in the code, but read it, for\n   example, from an environment variable during compilation. The key is the\n   simple authentication method for requests, to prevent spam, etc. Setting\n   the key value to **DEADBEEF** will disable sending reports to the server.\n\n2. Send a report by calling procedure `sendRapport` with content of the report\n   to send. The procedure returns a tuple with response from the server: the\n   response's status code and the response's content. For example:\n\n        import rapporteur\n\n        let response = sendRapport(content = \"hello\")\n        if response.status in {201, 208}:\n          echo \"OK\"\n        else:\n          echo response.body\n\n   The server returns status code *201* when the report was created, *208* when\n   the same report exists on the server, *400* when an invalid data was sent,\n   *401* when the application key is invalid (the application isn't authorized\n   to send reports) and *500* when something wrong was on the server side. In\n   that situation, the response body contains more technical information about\n   what was wrong.\n\nYou can find an example how to send a report in *tools* directory, the file\n*testrapport.nim*\n\n#### Note\nIf you want to send reports to the server via HTTPS, which means usually, you\nhave to compile your code with parameter \"-d:ssl\". For example:\n`nim c -d:ssl myapp.nim`\n\n### License\n\nThe project released under 3-Clause BSD license.\n\n---\nThat's all for now, as usual, I have probably forgotten about something important ;)\n\nBartek thindil Jasicki\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthindil%2Frapporteur","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthindil%2Frapporteur","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthindil%2Frapporteur/lists"}