{"id":19543473,"url":"https://github.com/vascocosta/bargo","last_synced_at":"2025-04-26T17:32:20.653Z","repository":{"id":231610154,"uuid":"782200823","full_name":"vascocosta/bargo","owner":"vascocosta","description":"BASIC build system and package manager.","archived":false,"fork":false,"pushed_at":"2024-04-18T11:37:16.000Z","size":36,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-04-24T04:38:51.656Z","etag":null,"topics":["agon","agon-console8","agon-light","agonlight","agonlight2","basic","basic-programming","build","build-system","build-tool","console8","ez80","package-manager","programming","toolchain","z80"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/vascocosta.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":"2024-04-04T20:41:10.000Z","updated_at":"2024-04-18T17:12:36.000Z","dependencies_parsed_at":"2024-11-11T03:19:19.857Z","dependency_job_id":"642c829b-79d1-4683-998a-00c178ae320d","html_url":"https://github.com/vascocosta/bargo","commit_stats":null,"previous_names":["vascocosta/bargo"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vascocosta%2Fbargo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vascocosta%2Fbargo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vascocosta%2Fbargo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vascocosta%2Fbargo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vascocosta","download_url":"https://codeload.github.com/vascocosta/bargo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251026209,"owners_count":21524935,"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":["agon","agon-console8","agon-light","agonlight","agonlight2","basic","basic-programming","build","build-system","build-tool","console8","ez80","package-manager","programming","toolchain","z80"],"created_at":"2024-11-11T03:19:05.813Z","updated_at":"2025-04-26T17:32:20.420Z","avatar_url":"https://github.com/vascocosta.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bargo\n\nBASIC build system and package manager.\n\nBargo is a tool to make it simpler to program in the BASIC programming language. Early versions of BASIC, like for instance BBC BASIC up to version 4 required the user to include line numbers and didn't allow the code to be split into different files, one for each dependency/module. Bargo abstracts these and other limitations from the programmer, allowing to code without using line numbers and spliting the code into multiple files, one per dependency/module.\n\n## Features\n\n* Automatic line numbering\n* Customisable line numbering\n* Customisable newline chars\n* Dependency/module management\n* Project cleaning\n* Project creation\n* Project build\n* Project tracking with Git\n\n## Build\n\nTo build `bargo` you need the `Rust toolchain` as well as these `dependencies`:\n\n* serde = \"1.0.197\"\n* toml = \"0.8.12\"\n\nFollow these steps to fetch and compile the source of `bargo` and its `dependencies`:\n\n```\ngit clone https://github.com/vascocosta/bargo.git\ncd bargo\ncargo build --release\n```\n\n## Install\n\nSimply copy `bargo/target/release/bargo` to a folder in your path (ex: `$HOME/bin`).\n\n## Usage example\n\nBargo allows you to create a project template for your BASIC program, so that editing your code is simpler.\n\nFollow the steps below to create a new project template, cd into the project, edit some files with your favourite editor (replace $editor with your favourite editor) and finally build it.\n\n```bash\nbargo new age\ncd age\n$editor Bargo.toml \n$editor src/main.bas\n$editor src/utils.bas\nbargo build\n```\n\n1. Create a new project called `age`.\n2. Change the current folder to your project folder called `age`.\n3. Edit `Bargo.toml`, which is the configuration file of your project.\n4. Edit `src/main.bas` which by convention is where you define your main program.\n5. Edit `src/utils.bas` which is a dependency/module used by your main program.\n6. Build your project.\n\nThe final step builds your project by merging `src/main.bas` with all the dependencies/modules your project uses into a single file called `age.bas` at the root of your project folder and automatically numbering the lines for you.\n\nIn this simple example there's only `src/utils.bas`, but you could use any number of dependencies/modules. For each dependency/module you should create a bas file with the name of that dependency/module inside `src` and add the name to the `[dependencies]` section of `Bargo.toml`, plus its version. For now the version isn't important, but it will be used in the future. For example, if you were to add another dependency/module called `math`, you would need to create `src/math.bas` with math related procedures/functions and then add `math = \"0.1.0\"` to `Bargo.toml` under the `[dependencies]` section.\n\nBelow you can see a listing of all the files used in this example, plus the final source code of `age.bas` that is generated for you.\n\n### Bargo.toml\n\nYour BASIC project is configured by editing `age/Bargo.toml`:\n\n```toml\n[package]\nname = \"age\"\ncarriage_return = true\nnumbering = 10\nversion = \"0.1.0\"\n\n[dependencies]\nutils = \"\"\n```\n\n### src/main.bas\n\nYour main source file is created by editing `age/src/main.bas`:\n\n```basic\nPROC_INIT_SCREEN\nPRINT \"Hello!\"\nPRINT\nPRINT \"What is the current year?\"\nINPUT CURRENT_YEAR%\nPRINT \"What year were you born in?\"\nINPUT BIRTH_YEAR%\nAGE% = FN_CALCULATE_AGE%(CURRENT_YEAR%, BIRTH_YEAR%)\nPRINT \"You are \" + STR$(AGE%) + \" years old.\"\nEND\n```\n\n### src/utils.bas\n\nYour utils dependency is created by editing `age/src/utils.bas`:\n\n```basic\nDEF PROC_INIT_SCREEN\nMODE 3\nCLS\nENDPROC\n:\nDEF FN_CALCULATE_AGE%(CURRENT_YEAR%, BIRTH_YEAR%)\n= CURRENT_YEAR% - BIRTH_YEAR%\nENDDEF\n```\n\n### age.bas\n\nYour final source code `age.bas` is generated by `bargo build`:\n\n```basic\n 10 PROC_INIT_SCREEN\n 20 PRINT \"Hello!\"\n 30 PRINT\n 40 PRINT \"What is the current year?\"\n 50 INPUT CURRENT_YEAR%\n 60 PRINT \"What year were you born in?\"\n 70 INPUT BIRTH_YEAR%\n 80 AGE% = FN_CALCULATE_AGE%(CURRENT_YEAR%, BIRTH_YEAR%)\n 90 PRINT \"You are \" + STR$(AGE%) + \" years old.\"\n100 END\n110 :\n120 REM ============================================================================\n130 REM IMPORT UTILS.BAS\n140 REM ============================================================================\n150 :\n160 DEF PROC_INIT_SCREEN\n170 MODE 3\n180 CLS\n190 ENDPROC\n200 :\n210 DEF FN_CALCULATE_AGE%(CURRENT_YEAR%, BIRTH_YEAR%)\n220 = CURRENT_YEAR% - BIRTH_YEAR%\n230 ENDDEF\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvascocosta%2Fbargo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvascocosta%2Fbargo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvascocosta%2Fbargo/lists"}