{"id":32319687,"url":"https://github.com/somerandomiosdev/gyb","last_synced_at":"2026-02-20T23:02:05.517Z","repository":{"id":56932125,"uuid":"419371696","full_name":"SomeRandomiOSDev/gyb","owner":"SomeRandomiOSDev","description":"A simple package for wrapping Apple's `gyb` tool.","archived":false,"fork":false,"pushed_at":"2021-10-27T01:25:15.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-15T10:30:04.583Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/SomeRandomiOSDev.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}},"created_at":"2021-10-20T14:47:08.000Z","updated_at":"2021-10-20T19:44:14.000Z","dependencies_parsed_at":"2022-08-21T05:50:40.055Z","dependency_job_id":null,"html_url":"https://github.com/SomeRandomiOSDev/gyb","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/SomeRandomiOSDev/gyb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SomeRandomiOSDev%2Fgyb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SomeRandomiOSDev%2Fgyb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SomeRandomiOSDev%2Fgyb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SomeRandomiOSDev%2Fgyb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SomeRandomiOSDev","download_url":"https://codeload.github.com/SomeRandomiOSDev/gyb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SomeRandomiOSDev%2Fgyb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29667119,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-20T19:49:36.704Z","status":"ssl_error","status_checked_at":"2026-02-20T19:44:05.372Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2025-10-23T11:45:22.328Z","updated_at":"2026-02-20T23:02:05.511Z","avatar_url":"https://github.com/SomeRandomiOSDev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GYB (Generate Your Boilerplate)\n\nA simple package for wrapping Apple's `gyb` tool. I take no credit for developing this tool and am simply re-packaging it for convenience and portability. See ATTRIBUTIONS for additional details and the accompanying license.\n\nThe remainder of the code in this package is licensed under the MIT license. See the `LICENSE` file for more info. \n\n## Installation\n\n### Swift Package Manager\n\n#### Package.swift\n\nTo install to a Swift Package that uses a `Package.swift` file, simply add the following line to your `Package.swift` file's dependencies:\n\n```swift\n.package(url: \"https://github.com/SomeRandomiOSDev/gyb\", from: \"0.1.0\")\n```\n\nThis will download `gyb` to a local cache in the Derived Data folder for your package. That can be found here: `~/Library/Developer/Xcode/DerivedData/\u003cpackage identifier\u003e/SourcePackages/checkouts/gyb`\n\n#### Xcode\n\nTo install to an Xcode project open your project's 'Package Dependencies' and add a remote package with the following URL: https://github.com/SomeRandomiOSDev/gyb\n\nThis will download `dyb` to a local cache in the Derived Data folder for your project. You can now invoke it with the following script in your Script Build Phase:\n\n```bash\nDERIVED_DATA_DIR=\"$(dirname \"$(dirname \"$(xcodebuild -project \"$PROJECT_FILE_PATH\" -showBuildSettings | grep -m 1 \"BUILD_DIR\" | grep -oEi \"\\/.*\")\")\")\"\n\n\"$DERIVED_DATA_DIR/SourcePackages/checkouts/gyb/gyb\" \u003carguments\u003e\n```\n\n### CocoaPods\n\nTo install via CocoaPods, first add the following line to your Podfile:\n\n```ruby\npod `gyb`\n```\n\nThis will download the sources/scripts to the `Pods/` directory during your next invocation of `pod install` and will allow you to invoke it via `${PODS_ROOT}/gyb/gyb` in your Script Build Phase.\n\n--------\n\nRegardless of the method with which you install it, given that `gyb` generates source files it should be run *before* your Compile Sources Build Phase or before you build your package so as to ensure your source files are generated prior to compilation.\n\n## Usage\n\n(Copied from the output of running `gyb -h`)\n\n```bash\nusage: gyb [-h] [-D NAME=VALUE] [-o TARGET] [--test] [--verbose-test] [--dump]\n           [--line-directive LINE_DIRECTIVE]\n           [file]\n\npositional arguments:\n  file                  Path to GYB template file (defaults to stdin)\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -D NAME=VALUE         Bindings to be set in the template's execution context\n  -o TARGET             Output file (defaults to stdout)\n  --test                Run a self-test\n  --verbose-test        Run a verbose self-test\n  --dump                Dump the parsed template to stdout\n  --line-directive LINE_DIRECTIVE\n                        Line directive format string, which will be provided 2\n                        substitutions, `%(line)d` and `%(file)s`. Example:\n                        `#sourceLocation(file: \"%(file)s\", line: %(line)d)`\n                        The default works automatically with the `line-\n                        directive` tool, which see for more information.\n\n    A GYB template consists of the following elements:\n\n      - Literal text which is inserted directly into the output\n\n      - %% or $$ in literal text, which insert literal '%' and '$'\n        symbols respectively.\n\n      - Substitutions of the form ${\u003cpython-expression\u003e}.  The Python\n        expression is converted to a string and the result is inserted\n        into the output.\n\n      - Python code delimited by %{...}%.  Typically used to inject\n        definitions (functions, classes, variable bindings) into the\n        evaluation context of the template.  Common indentation is\n        stripped, so you can add as much indentation to the beginning\n        of this code as you like\n\n      - Lines beginning with optional whitespace followed by a single\n        '%' and Python code.  %-lines allow you to nest other\n        constructs inside them.  To close a level of nesting, use the\n        \"%end\" construct.\n\n      - Lines beginning with optional whitespace and followed by a\n        single '%' and the token \"end\", which close open constructs in\n        %-lines.\n\n    Example template:\n\n          - Hello -\n        %{\n             x = 42\n             def succ(a):\n                 return a+1\n        }%\n\n        I can assure you that ${x} \u003c ${succ(x)}\n\n        % if int(y) \u003e 7:\n        %    for i in range(3):\n        y is greater than seven!\n        %    end\n        % else:\n        y is less than or equal to seven\n        % end\n\n    When run with \"gyb -Dy=9\", the output is\n\n          - Hello -\n\n        I can assure you that 42 \u003c 43\n\n        y is greater than seven!\n        y is greater than seven!\n        y is greater than seven!\n``` \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsomerandomiosdev%2Fgyb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsomerandomiosdev%2Fgyb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsomerandomiosdev%2Fgyb/lists"}