{"id":25506559,"url":"https://github.com/blackducksoftware/option-mapper","last_synced_at":"2025-09-13T05:36:07.397Z","repository":{"id":138805159,"uuid":"279908947","full_name":"blackducksoftware/option-mapper","owner":"blackducksoftware","description":null,"archived":false,"fork":false,"pushed_at":"2020-11-03T18:35:54.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-20T02:50:32.245Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blackducksoftware.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,"zenodo":null}},"created_at":"2020-07-15T15:41:37.000Z","updated_at":"2020-11-03T18:35:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"d52638cb-34fd-4465-a7be-b43de7298cee","html_url":"https://github.com/blackducksoftware/option-mapper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/blackducksoftware/option-mapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackducksoftware%2Foption-mapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackducksoftware%2Foption-mapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackducksoftware%2Foption-mapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackducksoftware%2Foption-mapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blackducksoftware","download_url":"https://codeload.github.com/blackducksoftware/option-mapper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackducksoftware%2Foption-mapper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274920250,"owners_count":25373994,"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","status":"online","status_checked_at":"2025-09-13T02:00:10.085Z","response_time":70,"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":"2025-02-19T06:58:28.970Z","updated_at":"2025-09-13T05:36:07.366Z","avatar_url":"https://github.com/blackducksoftware.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# option-mapper\n\nMaps multiple instances of the same command line option to multiple invocation of a target program.\n\nI.e.\n\n```\n\noption-mapper.sh. --map-option=1 --map-option=2 --map-option=3 --common-option-one=one --common-option-two=two\n\n```\n\nWill be mapped into threee invocations of the target program as following:\n\n```bash\n\ntarget.sh --map-option=1 --common-option-one=one --common-option-two=two\ntarget.sh --map-option=2 --common-option-one=one --common-option-two=two\ntarget.sh --map-option=3 --common-option-one=one --common-option-two=two\n\n```\n\nMapper supports dependent options to prevent collisions between multiple invocations.\n\n## Example:\n\n```\noption-mapper.sh. --map-option=1 --map-option=2 --map-option=3 --common-option-two=one --dependent-option-one=two\n```\n\nWill be mapped as following:\n\n```bash\n\ntarget.sh --map-option=1 --common-option-one=one --dependent-option-one=invocation_1_two\ntarget.sh --map-option=2 --common-option-one=one --dependent-option-one=invocation_2_two\ntarget.sh --map-option=3 --common-option-one=one --dependent-option-one=invocation_3_two\n\n```\n\n## Synopsys Detect Example\n\ndetect-example.sh will utilize option mapper to allow specifying multiple --detect.source.path options at once.\n\nThis will place scans generated by each invocation of synopsys detect under the same project and version.\n\n\n## PowerShell Detect example\n\ndetect-option-mapper.ps1 will implement similar functionality with windows PowerShell\n\nE.g.\n\n```\n\n   \u0026 .\\detect-option-mapper.ps1 `\n     --detect.source.path=part1 `\n     --detect.source.path=part2 `\n\t   --detect.source.path='part 3'  `\n\t   --blackduck.trust.cert=true `\n\t   --blackduck.url='https://ec2-3-236-71-181.compute-1.amazonaws.com' `\n\t   --blackduck.api.token='MTNlMDZhMjItNmU3ZC00OThhLWJkMGItOGNjZjE5YTg5N2UzOmM3ZmJjZDZmLWVkODUtNDZiYS1hZjE2LWQ4NGNjMGQ2NGI0NA==' `\n\t   --detect.project.name=FOO `\n\t   --detect.project.version.name=BAR\n\n```\n\t   \n  Will be translated into the following invocation sequence:\n\n```\n    powershell \"[Net.ServicePointManager]::SecurityProtocol = 'tls12'; Invoke-RestMethod https://detect.synopsys.com/detect.ps1?$(Get-Random) | Invoke-Expression ; detect \" `\n\t--detect.source.path=part1 `\n\t--blackduck.trust.cert=true `\n\t--blackduck.url=https://ec2-3-236-71-181.compute-1.amazonaws.com `\n\t--blackduck.api.token=MTNlMDZhMjItNmU3ZC00OThhLWJkMGItOGNjZjE5YTg5N2UzOmM3ZmJjZDZmLWVkODUtNDZiYS1hZjE2LWQ4NGNjMGQ2NGI0NA== `\n\t--detect.project.name=FOO `\n\t--detect.project.version.name=BAR\n\n. . .\n    powershell \"[Net.ServicePointManager]::SecurityProtocol = 'tls12'; Invoke-RestMethod https://detect.synopsys.com/detect.ps1?$(Get-Random) | Invoke-Expression ; detect \" `\n\t--detect.source.path=part2 `\n\t--blackduck.trust.cert=true `\n\t--blackduck.url=https://ec2-3-236-71-181.compute-1.amazonaws.com `\n\t--blackduck.api.token=MTNlMDZhMjItNmU3ZC00OThhLWJkMGItOGNjZjE5YTg5N2UzOmM3ZmJjZDZmLWVkODUtNDZiYS1hZjE2LWQ4NGNjMGQ2NGI0NA== `\n\t--detect.project.name=FOO `\n\t--detect.project.version.name=BAR\n\n. . .\n    powershell \"[Net.ServicePointManager]::SecurityProtocol = 'tls12'; Invoke-RestMethod https://detect.synopsys.com/detect.ps1?$(Get-Random) | Invoke-Expression ; detect \" `\n\t--detect.source.path=part` 3 `\n\t--blackduck.trust.cert=true `\n\t--blackduck.url=https://ec2-3-236-71-181.compute-1.amazonaws.com `\n\t--blackduck.api.token=MTNlMDZhMjItNmU3ZC00OThhLWJkMGItOGNjZjE5YTg5N2UzOmM3ZmJjZDZmLWVkODUtNDZiYS1hZjE2LWQ4NGNjMGQ2NGI0NA== `\n\t--detect.project.name=FOO `\n\t--detect.project.version.name=BAR\n\n. . .\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackducksoftware%2Foption-mapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblackducksoftware%2Foption-mapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackducksoftware%2Foption-mapper/lists"}