{"id":24206571,"url":"https://github.com/andyg2/basic-remote-css-asset-downloader--renamer.","last_synced_at":"2025-03-03T14:13:35.210Z","repository":{"id":72757131,"uuid":"479496137","full_name":"andyg2/Basic-remote-CSS-asset-downloader--renamer.","owner":"andyg2","description":null,"archived":false,"fork":false,"pushed_at":"2022-04-08T22:25:41.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-14T00:35:41.665Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andyg2.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-04-08T18:20:16.000Z","updated_at":"2022-04-08T18:21:20.000Z","dependencies_parsed_at":"2023-09-18T03:30:18.115Z","dependency_job_id":null,"html_url":"https://github.com/andyg2/Basic-remote-CSS-asset-downloader--renamer.","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyg2%2FBasic-remote-CSS-asset-downloader--renamer.","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyg2%2FBasic-remote-CSS-asset-downloader--renamer./tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyg2%2FBasic-remote-CSS-asset-downloader--renamer./releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyg2%2FBasic-remote-CSS-asset-downloader--renamer./manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andyg2","download_url":"https://codeload.github.com/andyg2/Basic-remote-CSS-asset-downloader--renamer./tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241678155,"owners_count":20001682,"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":"2025-01-14T00:34:33.871Z","updated_at":"2025-03-03T14:13:35.204Z","avatar_url":"https://github.com/andyg2.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Very basic remote CSS downloader\n\n### **Usage** for PHP CLI (space separated parameters)\n\nUsage: `php  ./parse.php remote_css_url [filename_find] [filename_replace]`\n\n* arg-1: (required) URL of CSS\n* arg-2: (otional) filename text search\n* arg-3: (otional) filename text replacement\n\n### Example 1 (minimal)\n\n`php ./parse.php https://ds.fusioncharts.com/2.0.42/css/ds.css`\n\nThis will download ds.css into the current directory and any referenced urls to css assets into their respective directories (images, fonts, icons)\n\n### Optional - Rename Downloaded Files\n\n* arg-2 can be a string or a comma separated list\n* arg-3 can be a string or a comma separated list\n\nThis uses `str_replace([find,strings], [replace,string], $subject)`\n\n### Example 2\n\nRename downloaded files from `*sourcesanspro*.*` to `*dgtepro*.*`\n\n`php ./parse.php https://ds.fusioncharts.com/2.0.42/css/ds.css sourcesanspro dgtepro`\n\nThis will download ds.css into the current directory and any referenced urls to css assets into their respective directories (images, fonts, icons), replacing sourcesanspro with dgtepro in css asset filenames.\n\n### Example 3\n\nRename downloaded files from *sourcesanspro*.* to *sanspro*.* and *sourcecodepro*.* to *codepro*.*\n\n`php ./parse.php https://ds.fusioncharts.com/2.0.42/css/ds.css sourcesanspro,sourcecodepro sanspro,codepro`\n\nAs above, replacing sourcesanspro and sourcecodepro with sanspro and codepro respectively.\n\n### Example 4\n\nRemove sourcesanspro and sourcecodepro from all filenames\n\n`php ./parse.php https://ds.fusioncharts.com/2.0.42/css/ds.css sourcesanspro,sourcecodepro`\n\nAs above, **removing** sourcesanspro and sourcecodepro from css asset filenames\n\n## Or run with docker\n\n#### Build\n\n`docker build -t css-asset-dl .`\n\n#### Run - docker will fire up the container, download and rewrite the CSS into a folder (css) in the current host directory.\n\n`docker run -it --name css-asset-dl -v ${pwd}/css:/usr/src/css_asset_dl/css --rm css-asset-dl php parse.php https://ds.fusioncharts.com/2.0.42/css/ds.css sourcecode,sourcesans code,sans`\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandyg2%2Fbasic-remote-css-asset-downloader--renamer.","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandyg2%2Fbasic-remote-css-asset-downloader--renamer.","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandyg2%2Fbasic-remote-css-asset-downloader--renamer./lists"}