{"id":20629718,"url":"https://github.com/agile-lab-dev/articles-code","last_synced_at":"2026-07-06T13:31:39.177Z","repository":{"id":52504970,"uuid":"351464823","full_name":"agile-lab-dev/articles-code","owner":"agile-lab-dev","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-15T02:19:28.000Z","size":104,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-10-29T22:41:06.659Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/agile-lab-dev.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":"2021-03-25T14:25:18.000Z","updated_at":"2021-04-29T08:58:48.000Z","dependencies_parsed_at":"2025-03-08T17:37:13.999Z","dependency_job_id":null,"html_url":"https://github.com/agile-lab-dev/articles-code","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/agile-lab-dev/articles-code","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agile-lab-dev%2Farticles-code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agile-lab-dev%2Farticles-code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agile-lab-dev%2Farticles-code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agile-lab-dev%2Farticles-code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agile-lab-dev","download_url":"https://codeload.github.com/agile-lab-dev/articles-code/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agile-lab-dev%2Farticles-code/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35193679,"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-07-06T02:00:07.184Z","response_time":106,"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-16T14:05:46.284Z","updated_at":"2026-07-06T13:31:39.160Z","avatar_url":"https://github.com/agile-lab-dev.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Articles Code\n\nThis repository holds the source codes that are published in our articles.\nFor each article, there is an associated folder (with the same name of the article) which contains them.\n\nIn order to ease the process, you can use the script `carbon-image-generator.sh`. It takes the a folder, lists\nall the files in it and produces:\n- An output non-embedded Carbon image, to be used as a simple image\n- An output embedded Carbon image, to be used only on Medium\n\n## Usage\n\nYou can use the script as follow:\n\n```bash\n./carbon-image-generator.sh --sources \u003cfolder\u003e \n```\n\nThis setups a docker for you, creates a subfolder named `carbon_images` under the specified `folder` and:\n- for non-embedded images, it uses `carbon-now` to generate them\n- for the embedded images, an URL is built using a theme applied to the source code files.\n\nThe subfolder `carbon_images` will contain:\n- a set of PNG images produced from the source files\n- a file named `embedded_images_links` which contains, for each image, the associated embedded URL to be used on Medium\n\n### Details\n\nBy default, one file produces one embedded/non embedded image. For example, if the file is named `code.scala`, the resulting \nnon-embedded PNG image will be named `code.png`.\n\nHowever, if you have a single file which contains multiple sections, you can put your code only in a file and then produce `N` \ncode images. \nThis can be extremely useful if you have big chunks of code that \"logically\" fits together. \n\nYou can do this by using the character `§` in your source code file. For example, if we have a file named `awesome.scala` like this:\n\n```scala\nval a = \"wow\"\n\n§\n\nval b = \"incredible\"\n```\n\nThe tool will produce two images: `awesome_part0.png`, which will contain `val a = wow` and `awesome_part1.png` which will contain\n`val b = \"incredible\"`. Of course, this also leads to the generation of two embedded URL's in the file `embedded_images_links`:\n\n```bash\nawesome_part0.png ---\u003e URL\nawesome_part1.png ---\u003e URL\n```\n\n## How to contribute\n\nIn order to contribute, please fork this repo and create a Pull Request when ready.\n- Create a branch named `feature/\u003carticle_name\u003e` on your forked repo. The open a PR merging on `main`\n- In the Pull Request, specify the link to the original issue of the article.\n- The PR should contain a folder (named as the article) with all the sources under it\n- Please, do not commit your generated images. The only files allowed are your source code files.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagile-lab-dev%2Farticles-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagile-lab-dev%2Farticles-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagile-lab-dev%2Farticles-code/lists"}