{"id":15089547,"url":"https://github.com/helloticket/superfile","last_synced_at":"2026-04-29T03:04:43.570Z","repository":{"id":55583675,"uuid":"255464529","full_name":"helloticket/superfile","owner":"helloticket","description":"Parser de configuração de layouts bancários e outros","archived":false,"fork":false,"pushed_at":"2025-12-05T02:32:42.000Z","size":322,"stargazers_count":12,"open_issues_count":1,"forks_count":2,"subscribers_count":11,"default_branch":"master","last_synced_at":"2026-01-15T07:26:57.787Z","etag":null,"topics":["arquivo","cnab","go","yml"],"latest_commit_sha":null,"homepage":"","language":"Go","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/helloticket.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-04-13T23:36:51.000Z","updated_at":"2022-08-09T23:53:35.000Z","dependencies_parsed_at":"2022-08-15T03:40:23.940Z","dependency_job_id":null,"html_url":"https://github.com/helloticket/superfile","commit_stats":null,"previous_names":["helderfarias/cnab-go","helderfarias/superfile"],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/helloticket/superfile","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helloticket%2Fsuperfile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helloticket%2Fsuperfile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helloticket%2Fsuperfile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helloticket%2Fsuperfile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/helloticket","download_url":"https://codeload.github.com/helloticket/superfile/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helloticket%2Fsuperfile/sbom","scorecard":{"id":460488,"data":{"date":"2025-08-11","repo":{"name":"github.com/helloticket/superfile","commit":"b9767c6f44263f1ff6f77ae85962b65199b0b643"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T11:00:08.103Z","repository_id":55583675,"created_at":"2025-08-19T11:00:08.104Z","updated_at":"2025-08-19T11:00:08.104Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32408447,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T02:37:21.628Z","status":"ssl_error","status_checked_at":"2026-04-29T02:36:50.947Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["arquivo","cnab","go","yml"],"created_at":"2024-09-25T09:00:47.180Z","updated_at":"2026-04-29T03:04:43.555Z","avatar_url":"https://github.com/helloticket.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# superfile\n\nParser de arquivos de configuração cnab e outros layouts.\n\n\n## Instalação\n\n```bash\ngo get github.com/helloticket/superfile\n```\n\n## Debug de layout\n\n```go\n  go run cmd/main.go\n```\n\n## Arquivo de remessa\n\n```go\n  source := strings.NewReader(itau.CNAB240Pagamentos)\n  layout, err := superfile.NewLayout(source)\n  remessa := superfile.NewRemessa(layout)\n\n  remessa.Header[\"tipo_inscricao\"] = 0\n  remessa.Header[\"inscricao_numero\"] = 00000000000000\n  remessa.Header[\"agencia_debito\"] = 00000\n  remessa.Header[\"conta_debito\"] = 000000000000\n  remessa.Header[\"dac_debito\"] = 0\n  remessa.Header[\"nome_empresa\"] = \"0\"\n  remessa.Header[\"nome_banco\"] = \"0\"\n  remessa.Header[\"data_geracao\"] = 00000000\n  remessa.Header[\"hora_geracao\"] = 000000\n\n  lote := remessa.NovoLote(1)\n\n  lote.Header[\"codigo_lote\"] = 0000\n  lote.Header[\"tipo_pagamento\"] = 00\n  lote.Header[\"forma_pagamento\"] = 00\n  lote.Header[\"tipo_inscricao_debito\"] = 0\n  lote.Header[\"inscricao_numero\"] = 00000000000000\n  lote.Header[\"identificacao_lancamento\"] = \"0\"\n  lote.Header[\"agencia_debito\"] = 00000\n  lote.Header[\"conta_debito\"] = 000000000000\n  lote.Header[\"dac_debito\"] = 0\n  lote.Header[\"nome_empresa\"] = \"0\"\n  lote.Header[\"finalidade_lote\"] = \"0\"\n  lote.Header[\"historico_cc_debito\"] = \"0\"\n  lote.Header[\"endereco_empresa\"] = \"0\"\n  lote.Header[\"numero\"] = 00000\n  lote.Header[\"cidade\"] = \"0\"\n  lote.Header[\"cep\"] = 00000000\n  lote.Header[\"estado\"] = \"0\"\n  lote.Header[\"codigo_ocorrencias\"] = \"0\"\n\n  detalhe := lote.NovoDetalhe()\n  detalhe[\"segmento_a\"][\"codigo_lote\"] = 0000\n  detalhe[\"segmento_a\"][\"numero_registro\"] = 00000\n  detalhe[\"segmento_a\"][\"tipo_movimento\"] = 000\n  detalhe[\"segmento_a\"][\"codigo_camara_centralizadora\"] = 000\n  detalhe[\"segmento_a\"][\"codigo_banco_favorecido\"] = 000\n  detalhe[\"segmento_a\"][\"agencia_favorecido\"] = \"0\"\n  detalhe[\"segmento_a\"][\"nome_favorecido\"] = \"0\"\n  detalhe[\"segmento_a\"][\"numero_doc\"] = \"0\"\n  detalhe[\"segmento_a\"][\"data_pagto\"] = 00000000\n  detalhe[\"segmento_a\"][\"codigo_ispb\"] = 00000000\n  detalhe[\"segmento_a\"][\"valor_pagto\"] = 000000000000000\n  detalhe[\"segmento_a\"][\"nosso_numero\"] = \"0\"\n  detalhe[\"segmento_a\"][\"data_efetiva\"] = 00000000\n  detalhe[\"segmento_a\"][\"valor_efetivo\"] = 000000000000000\n  detalhe[\"segmento_a\"][\"finalidade\"] = \"0\"\n  detalhe[\"segmento_a\"][\"num_documento\"] = 000000\n  detalhe[\"segmento_a\"][\"num_inscricao_favorecido\"] = 00000000000000\n  detalhe[\"segmento_a\"][\"finalidade_doc_status_funcionario\"] = \"0\"\n  detalhe[\"segmento_a\"][\"finalidade_ted\"] = \"0\"\n  detalhe[\"segmento_a\"][\"aviso\"] = \"0\"\n  detalhe[\"segmento_a\"][\"codigo_ocorrencias\"] = \"0\"\n\n  lote.InserirDetalhe(detalhe)\n\n  lote.Trailer[\"codigo_lote\"] = 0000\n  lote.Trailer[\"total_registros_lote\"] = 000000\n  lote.Trailer[\"total_valor_pagtos\"] = 0\n  lote.Trailer[\"codigos_ocorrencias\"] = \"0\"\n\n  remessa.InserirLote(lote)\n\n  remessa.Trailer[\"total_lotes_arquivo\"] = remessa.TotalLotes()\n  remessa.Trailer[\"total_registros\"] = remessa.TotalRegistros()\n\n  remessaFile := output.NewRemessaFile(remessa, \"itau-pagamentos-cnab240.rem\")\n\n  arquivo := remessaFile.Write()\n  log.Println(arquivo)\n```\n\n## Arquivo de retorno\n\n```go\n  source := strings.NewReader(itau.CNAB240Cobranca)\n  layout, err := superfile.NewLayout(source)\n\n  f, _ := os.Open(\"cobranca_itau_cnab240.ret\")\n  defer f.Close()\n  arquivo, err := superfile.NewRetornoFile(layout, f)\n  retorno := arquivo.Read()\n  log.Println(retorno)\n```\n\n## Melhorias no tratamento de erros para arquivo de retorno\n\nCada campo recebeu um adicional para tratar erros, por exemplo: **tipo_registro** recebe **tipo_registro_error**\n\nOutra melhoria foi captura erros linha a linha sem quebrar parse e decode.\n\n## Inspirado\n\nBaseado no projeto CNAB Layouts (http://glauberportella.github.io/cnab-layouts)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelloticket%2Fsuperfile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhelloticket%2Fsuperfile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelloticket%2Fsuperfile/lists"}