{"id":19162823,"url":"https://github.com/centre-for-humanities-computing/logtocsv","last_synced_at":"2026-06-15T18:32:21.222Z","repository":{"id":99222811,"uuid":"327666036","full_name":"centre-for-humanities-computing/logToCSV","owner":"centre-for-humanities-computing","description":"logs http post request body to csv files","archived":false,"fork":false,"pushed_at":"2021-01-15T20:51:49.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-10T00:00:47.345Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/centre-for-humanities-computing.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-01-07T16:26:03.000Z","updated_at":"2021-01-15T20:51:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"2380b25f-5187-4cb3-acad-8c3608989b43","html_url":"https://github.com/centre-for-humanities-computing/logToCSV","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/centre-for-humanities-computing/logToCSV","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centre-for-humanities-computing%2FlogToCSV","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centre-for-humanities-computing%2FlogToCSV/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centre-for-humanities-computing%2FlogToCSV/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centre-for-humanities-computing%2FlogToCSV/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/centre-for-humanities-computing","download_url":"https://codeload.github.com/centre-for-humanities-computing/logToCSV/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centre-for-humanities-computing%2FlogToCSV/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34376122,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"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":[],"created_at":"2024-11-09T09:13:14.464Z","updated_at":"2026-06-15T18:32:21.206Z","avatar_url":"https://github.com/centre-for-humanities-computing.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HTTP CSV Logger\n\nappends log entries to csv files. CSV file names are configurable by request parameters. Any parameters can be logged to CSV. Post parameters must be application/x-www-form-urlencoded\n\n \n## write to csv file\n\nNon-existing files will be created with CSV header names. Existing files will be appended to.\n```\nPOST /api/logs/:participantId/:mode/:version\nbody: { \n    id: 'Sw4Dfks1',\n    stimulus: 'spawn_intro.wav',\n    'onset time': '22:45:11',\n    'response time': '22:45:25',\n    'onset time since experiment start': 2394735,\n    'response time since experiment start': 6036334\n}\n```\n\n### upsert CSV file with header\nupserts a file at `./data/${participantId}_${mode}_${version}.csv`\n\ncreates CSV header line by sorting request body keys alphabetically:\n```\nid,onset time,onset time since experiment start,response time,response time since experiment start,stimulus\n```\n\n### append log entry\ncreates CSV entry line by sorting request body keys alphabetically and joining values into:\n\n```\nSw4Dfks1,22:45:11,2394735,22:45:25,6036334,spawn_intro.wav\n```\n\n--------------\n\nWhen request body attributes are added, renamed, or deleted `:version` should be changed to avoid mixing old CSV data-formats. \n\n## list all logged files\n\n`GET /api/logs`\n\nexample result (single file): \n```angular2html\n[\n    {\n        \"name\": \"participant_mode_version.csv\",\n        \"path\": \"/etc/apps/logToCSV/data/participant_mode_version.csv\",\n        \"url\": \"data/participant_mode_version.csv\"\n    }\n]\n```\n\n## get a specific file\n\n`GET /api/logs/:participantId/:mode/:version`\n\nreturns the content of specified file.\n\n## delete a file\n\n`DELETE /api/logs/:participantId/:mode/:version`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcentre-for-humanities-computing%2Flogtocsv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcentre-for-humanities-computing%2Flogtocsv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcentre-for-humanities-computing%2Flogtocsv/lists"}