LibreTime: Radio Broadcast & Automation Platform
Go to file
Scott McGrath 644d2b9ce5
fix(legacy): additional specifics added to CSVexport.js for RFC 4180 (#3131)
### Description

The existing implementation for exporting playout logs to a CSV file
incorporates a very simplified CSV format. Some aspects of the complete
[RFC](https://www.rfc-editor.org/rfc/rfc4180) are missing, such as
escaping of quotes, and quoting of fields that contain certain
characters. This is problematic for common office spreadsheet tools, and
practically, anything else. Many radio stations rely on this
functionality to work well for exporting playout data, for example, in
order to compile data for reporting requirements.

**This is a new feature**:

The changes in this PR add quoting of fields containing a comma, as well
as those containing a CR/LF. It also escapes quotes by doubling them.
I'm not sure it makes CSVexport.js completely RFC 4180 compliant, but it
is much closer than it was.

**I have updated the documentation to reflect these changes**:

I don't think there are any documentation changes necessary; this is
probably expected behavior for anyone trying to use the CSV exporter.

### Testing Notes

**What I did:**

To validate this, I did a clean install of Debian, cloned from the
official libretime repo, and applied the code as a patch to the
installer. I then proceeded with the install and then loaded a database
from a running system (so that I had some playout data to test with). I
then performed the playout history export and examined the resulting CSV
file and after seeing previously problematic fields properly quoted, was
convinced it looked the way I expected. I loaded the csv file into
Libreoffice Calc and did not see any errors.

**How you can replicate my testing:**

See "What I did" above, basically run the patch after cloning the
installer from the repo. You could also apply the changes to a running
system by applying the patch to the file:
/usr/share/libretime/legacy/public/js/libs/CSVexport.js
Be sure to clear your browser cache and do a hard reload of the web
interface, before re-testing.

### **Links**

Closes: #2477
2025-01-09 08:34:13 +00:00
.github ci: make libretime test user owner of test database (#3130) 2025-01-08 16:53:45 +00:00
analyzer feat(analyzer): parse comment fields from mp3 files (#3082) 2024-11-22 18:28:06 +00:00
api feat(api): added filters on genre & md5 for files api (#3127) 2025-01-08 16:54:53 +00:00
api-client chore(main): release 4.2.0 (#3028) 2024-06-22 18:16:49 +02:00
dev chore: add mailpit to dev setup 2023-06-02 07:44:34 +01:00
docker feat!: use nginx to serve media files (#2860) 2023-12-30 18:59:15 +01:00
docs feat(legacy): trused header sso auth (#3095) 2024-12-07 10:21:57 +00:00
installer feat(installer): add the `--storage-path` flag (#2865) 2024-01-01 14:38:05 +01:00
legacy fix(legacy): additional specifics added to CSVexport.js for RFC 4180 (#3131) 2025-01-09 08:34:13 +00:00
playout chore: fix linting ignore comments (#3084) 2024-09-30 16:08:23 +01:00
shared chore(main): release 4.2.0 (#3028) 2024-06-22 18:16:49 +02:00
tools fix: pin pip version to <24.1 to allow installing pytz (celery) (#3043) 2024-06-22 17:35:30 +02:00
worker chore(main): release 4.2.0 (#3028) 2024-06-22 18:16:49 +02:00
.codespellignore chore: release 3.2.0 (#2754) 2023-10-16 21:26:59 +02:00
.dockerignore feat: add container setup 2022-09-14 11:09:52 +02:00
.env.dev chore: move dev env files to dev subfolder 2023-04-12 08:11:21 +01:00
.gitattributes Create .gitattributes to ensure proper cloning with Windows Git 2017-04-09 14:41:52 -04:00
.gitignore chore: use a secure dev environment 2023-04-12 08:11:21 +01:00
.pre-commit-config.yaml chore: add pre-commit API check (#3120) 2025-01-09 07:53:49 +00:00
.vale.ini chore: reenable vale rule after fix (#2965) 2024-03-02 14:15:50 +01:00
CHANGELOG.md chore(main): release 4.2.0 (#3028) 2024-06-22 18:16:49 +02:00
CONTRIBUTING.md chore: fix CONTRIBUTING symlink again 2023-04-03 12:39:24 +02:00
Dockerfile fix: docker warnings "keywords casing do not match" (#3048) 2024-06-29 20:26:44 +01:00
LEGACY.md Add Table of Content to LEGACY file 2021-09-02 20:55:16 +02:00
LICENSE Small update to LICENSE 2021-09-02 16:06:26 +02:00
Makefile build: replace custom release script with release-please (#2817) 2023-12-22 19:19:12 +01:00
README.md chore: fix broken link check (#3039) 2024-06-22 11:44:35 +02:00
SECURITY.md docs: move release docs in the release section 2023-04-12 16:50:04 +01:00
Vagrantfile feat(installer)!: change default listen port to 8080 (#2852) 2023-12-29 17:49:07 +01:00
cloud-init.yml feat: rewrite cloud-init config (#2853) 2023-12-29 17:57:59 +01:00
codecov.yml test(worker): setup testing 2022-09-09 14:44:37 +02:00
docker-bake.json ci: use bake file for container build 2023-02-26 20:37:27 +02:00
docker-compose.override.yml fix: remove obsolete docker compose version (#2982) 2024-04-13 14:37:04 +02:00
docker-compose.yml perf: optimize the rabbitmq health check (#3037) 2024-06-22 18:10:55 +02:00
install fix: pin pip version to <24.1 to allow installing pytz (celery) (#3043) 2024-06-22 17:35:30 +02:00
pyproject.toml chore: add isort pre-commit hook 2023-02-03 12:38:58 +01:00

README.md

LibreTime

Financial Contributors on Open Collective

LibreTime makes it easy to run your own online or terrestrial radio station. It is a community managed fork of the AirTime project.

It is managed by a friendly inclusive community of stations from around the globe that use, document and improve LibreTime. Join us in fixing bugs and in defining how we manage the codebase going forward.

Check out the documentation for more information and start broadcasting!

Please note that LibreTime is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

You can find details about our development process in the contributing guide.

Support

To get support for any questions or problems you might have using the software we have a forum at discourse.libretime.org. We are moving towards using the forum to provide community support and reserving the github issue queue for confirmed bugs and well-formed feature requests.

You can also contact us through Matrix (#libretime:matrix.org) where you can talk with other users and developers.

Contributors

Code Contributors

This project exists thanks to all the people who contribute.

Financial Contributors

Become a financial contributor and help us sustain our community on OpenCollective.

Individuals

Organizations

Support this project with your organization. Your logo will show up here with a link to your website.

License

LibreTime is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3 of the License.

Copyright (c) 2011-2017 Sourcefabric z.ú.

Copyright (c) 2017-2023 LibreTime Community

Please refer to the LEGACY file for more information.