{"id":17693389,"url":"https://github.com/ttytm/lvbag","last_synced_at":"2026-01-11T02:34:43.044Z","repository":{"id":205635349,"uuid":"714709154","full_name":"ttytm/LVbag","owner":"ttytm","description":"A large and handy file bag for V. It simplifies carrying files with your programs by generating embed file lists for directories based on your specifications.","archived":false,"fork":false,"pushed_at":"2024-05-17T16:32:32.000Z","size":30,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T19:11:50.167Z","etag":null,"topics":["cli","cli-tool","embed-files","utility","v"],"latest_commit_sha":null,"homepage":"","language":"V","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/ttytm.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":"2023-11-05T16:44:59.000Z","updated_at":"2024-12-13T23:39:20.000Z","dependencies_parsed_at":"2024-05-16T08:55:18.969Z","dependency_job_id":"b40f99d3-f515-4b77-9862-a9ae17340716","html_url":"https://github.com/ttytm/LVbag","commit_stats":null,"previous_names":["ttytm/lvbag"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttytm%2FLVbag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttytm%2FLVbag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttytm%2FLVbag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttytm%2FLVbag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ttytm","download_url":"https://codeload.github.com/ttytm/LVbag/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246390864,"owners_count":20769478,"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":["cli","cli-tool","embed-files","utility","v"],"created_at":"2024-10-24T13:44:54.261Z","updated_at":"2026-01-11T02:34:42.196Z","avatar_url":"https://github.com/ttytm.png","language":"V","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LVbag\n\n[badge__build]: https://img.shields.io/github/actions/workflow/status/ttytm/LVbag/ci.yml?style=flat-rounded\u0026branch=main\u0026logo=github\u0026logoColor=C0CAF5\u0026labelColor=333\n[badge__version]: https://img.shields.io/github/v/release/ttytm/LVbag?style=flat-rounded\u0026logo=task\u0026logoColor=C0CAF5\u0026labelColor=333\n[badge__license]: https://img.shields.io/github/license/ttytm/LVbag?style=flat-rounded\u0026logo=opensourcehardware\u0026label=License\u0026logoColor=C0CAF5\u0026labelColor=333\n\n[![][badge__build]](https://github.com/ttytm/LVbag/actions?query=branch%3Amain)\n[![][badge__version]](https://github.com/ttytm/LVbag/releases/latest)\n[![][badge__license]](https://github.com/ttytm/LVbag/blob/main/LICENSE)\n\n\u003e Generate embedded file lists for directories. LVbag can serve as an occasional helper with static\n\u003e directories or become a part of the build process to assist in embedding dynamic files\n\n```\nUsage: lvb [flags] [commands] \u003cpath\u003e\n\nA large and handy file bag for V. It simplifies carrying files with your programs\nby generating embed file lists for directories based on your specifications.\n\nFlags:\n  -o    --output       The output file name. If none is set, the result is printed to stdout.\n  -a    --append       Append the result to the output file.\n  -f    --force        Overwrite the output file if it already exists.\n  -I    --ignore       Ignore the paths in the target directories if they contain these strings.\n  -r    --regex        Treat the ignore string as a regex pattern.\n  -h    --hidden       Include hidden files.\n  -bag  --lv_bag       The name of the handbag variable [default: `lv_bag`].\n  -mod  --mod_name     Specify the module name used in the output.\n  -v    --verbose      Enable extended information prints.\n        --skip-format  Skip formatting of the output file.\n        --help         Prints help information.\n        --version      Prints version information.\n\nCommands:\n  help                 Prints help information.\n  version              Prints version information.\n```\n\n## Installation\n\n- The projects [GitHub releases page](https://github.com/ttytm/LVbag/releases) provides prebuilt binaries for GNU/Linux, Windows and macOS.\n\n## Usage Examples\n\n- Add a path without additional flags to print the output to the terminal.\n\n  ```sh\n  lvb examples/gui_project/ui\n  ```\n\n  ```v\n  const lv_bag = [\n  \t$embed_file('/home/t/Dev/vlang/lvb/examples/gui_project/ui/src/main.js')\n  \t$embed_file('/home/t/Dev/vlang/lvb/examples/gui_project/ui/src/style.css')\n  \t$embed_file('/home/t/Dev/vlang/lvb/examples/gui_project/ui/src/index.html')\n  ]\n  ```\n\n- Append to an existing file, specify a \"bag\" name (specifying a single file as path won't create an array).\n\n  ```sh\n  # Append to an existing file `foo.v`\n  lvb -bag icon -o foo.v -a assets/icon.ico\n  ```\n\n  ```v\n  // foo.v\n  module main\n\n  const foo = \"foo\"\n\n  const icon = $embed_file('\u003cpath\u003e/ui_project/assets/icon.ico')\n  ```\n\n- Add a module name to the output, make the output print verbose.\n\n  ```sh\n  lvb -mod bar -v examples/ui_project/ui\n  ```\n\n  ![lvb](https://github.com/ttytm/webview/assets/34311583/6c3697eb-65a7-4c96-8619-13af37945051)\n\n## App examples\n\nSimple Application examples that utilize this tool can be found in the [\u003ckbd\u003e.examples/\u003c/kbd\u003e](https://github.com/ttytm/LVbag/tree/main/examples) directory.\n\nAn example application that uses LVbag to embed the files of a dynamic npm build output is [emoji-mart-desktop](https://github.com/ttytm/emoji-mart-desktop)\n\n## Development\n\nTo compile the app yourself, clone the repository and build the release version.\n\n```sh\n# Clone the repository\ngit clone https://github.com/ttytm/LVbag.git\ncd LVbag\n\n# Install dependencies - LVB uses PCRE\nv install --once\n\n# Build and run as usual in development\nv run .\n\n# Build the release version\nv -cc gcc -prod -o lvb .\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fttytm%2Flvbag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fttytm%2Flvbag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fttytm%2Flvbag/lists"}