{"id":19549135,"url":"https://github.com/bsfishy/osd-styling-uploader","last_synced_at":"2025-10-29T03:38:15.812Z","repository":{"id":182101673,"uuid":"667956096","full_name":"BSFishy/osd-styling-uploader","owner":"BSFishy","description":"This project scans through all the custom styling in OpenSearch Dashboards (or any project really, but it's setup for OSD) and puts that data into an OpenSearch index.","archived":false,"fork":false,"pushed_at":"2023-10-24T18:17:10.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-08T20:09:42.950Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/BSFishy.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}},"created_at":"2023-07-18T17:20:28.000Z","updated_at":"2023-07-18T17:23:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"a1be7e73-ddf8-4827-9580-fc7c1a5f0e27","html_url":"https://github.com/BSFishy/osd-styling-uploader","commit_stats":null,"previous_names":["bsfishy/osd-styling-uploader"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BSFishy%2Fosd-styling-uploader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BSFishy%2Fosd-styling-uploader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BSFishy%2Fosd-styling-uploader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BSFishy%2Fosd-styling-uploader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BSFishy","download_url":"https://codeload.github.com/BSFishy/osd-styling-uploader/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240806831,"owners_count":19860760,"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","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-11T03:58:01.415Z","updated_at":"2025-10-29T03:38:10.778Z","avatar_url":"https://github.com/BSFishy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OS Styling Uploader\n\nThis project scans through all the custom styling in OpenSearch Dashboards (or any project really, but it's setup for OSD) and puts that data into an OpenSearch index.\n\n## Setup\n\n### Prerequisites\n\n * A newer version of Node\n   * I used v18.16.0\n * Yarn\n   * I used v1.22.19\n * Docker\n   * I used v20.10.21\n * An OpenSearch instance\n   * I used v2.8.0\n * An init service if you want to automate it to run at some time\n\n### Configuring\n\nMain configuration is done in a `.env` file.\nA template is provided in [`.env.template`](.env.template).\nYou can rename that to `.env` and fill it out.\n\n| Name | Required | Description |\n| --- | --- | --- |\n| `OPENSEARCH_CLIENT_URL` | Yes | This is the URL to use to connect to OpenSearch. |\n| `OPENSEARCH_ALLOW_INSECURE` | No | This allows connecting to OpenSearch in an insecure environment. This is useful if you have OpenSearch and OSD on the same machine and don't expose OpenSearch to the public but have self-signed certificates setup with the security plugin. |\n| `DEFAULT_PATH` | Yes | The default path to search for files in if a path isn't specified. |\n\n### Running\n\nRunning this project is done by running the [`run.sh`](run.sh) script.\nThis will update the logs directory, rotating the entries and deleting old entries.\nNext, it will start the [`Dockerfile`](Dockerfile).\n\nThe `Dockerfile` clones OSD, and all official OSD plugins into `/dashboards`.\nIt then builds and starts the program, which will scan through `/dashboards` for `.scss` files, pass them through `postcss` and uploads results to the OpenSearch instance you have running.\n\n### Scheduling\n\nTo set the uploader on a schedule, you need to set it up with your init system.\n\nI used systemd and my config looked like this:\n\n`/etc/systemd/system/uploader.service` (Make sure to update your path to uploader)\n```\n[Unit]\nDescription=OSD CSS info uploader\nWants=uploader.timer\n\n[Service]\nType=oneshot\nExecStart=/usr/bin/bash [path to uploader]/run.sh\n\n[Install]\nWantedBy=multi-user.target\n```\n\n`/etc/systemd/system/uploader.timer`\n```\n[Unit]\nDescription=Start the uploader at an interval\nRequires=uploader.service\n\n[Timer]\nUnit=uploader.service\nOnCalendar=*-*-* 10:00:00\n\n[Install]\nWantedBy=timers.target\n```\n\nThis config will start the uploader every day at 2AM PST.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsfishy%2Fosd-styling-uploader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbsfishy%2Fosd-styling-uploader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsfishy%2Fosd-styling-uploader/lists"}