{"id":51467026,"url":"https://github.com/setanarut/indir","last_synced_at":"2026-07-06T12:30:37.627Z","repository":{"id":367898472,"uuid":"1282734971","full_name":"setanarut/indir","owner":"setanarut","description":"Go ile yazılmış çok bağlantılı HTTP dosya indirici paketi.","archived":false,"fork":false,"pushed_at":"2026-06-28T06:34:27.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-28T08:10:34.475Z","etag":null,"topics":["clt","downloader","go","http"],"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/setanarut.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":"2026-06-28T06:15:49.000Z","updated_at":"2026-06-28T06:34:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/setanarut/indir","commit_stats":null,"previous_names":["setanarut/indir"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/setanarut/indir","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/setanarut%2Findir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/setanarut%2Findir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/setanarut%2Findir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/setanarut%2Findir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/setanarut","download_url":"https://codeload.github.com/setanarut/indir/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/setanarut%2Findir/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35191767,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-06T02:00:07.184Z","response_time":106,"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":["clt","downloader","go","http"],"created_at":"2026-07-06T12:30:36.605Z","updated_at":"2026-07-06T12:30:37.616Z","avatar_url":"https://github.com/setanarut.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# indir\n\nGo ile yazılmış çok bağlantılı HTTP dosya indirici paketi.\n\n## Özellikler\n\n- **`-s` (segments)** — dosyayı N parçaya böler, her parça ayrı goroutine'de indirilir  \n- **`-x` (connections)** — aynı anda maksimum N bağlantı kullanır  \n- **Resume** — Ctrl-C ile duraklatınca durum `.dstate` dosyasına kaydedilir; aynı komutla kaldığı yerden devam eder  \n- **Progress** — yüzde, hız (EMA), kalan süre (ETA) tek satırda gösterilir  \n- **Range yoksa tek bağlantı** — sunucu `Accept-Ranges` başlığı göndermiyorsa otomatik fallback  \n\n## Paket olarak kullanım\n\n```go\nimport \"github.com/setanarut/indir\"\n\nd := indir.New(indir.Config{\n    URL:            \"https://example.com/file.iso\",\n    OutputPath:     \"file.iso\",\n    MaxConnections: 4,  // -x 4\n    Segments:       8,  // -s 8\n})\nif err := d.Download(); err != nil {\n    log.Fatal(err)\n}\n```\n\n## Dosya yapısı\n\n```\nindir/\n├── indir.go        # Config, Downloader, Download(), HTTP mantığı\n├── segment.go      # segment tipi, splitSegments()\n├── state.go        # JSON kayıt/yükleme (.dstate dosyası)\n├── progress.go     # terminal ilerleme çubuğu, formatlayıcılar\n└── go.mod\n```\n\n## Nasıl çalışır\n\n### Parçalama\n\n```\n[0 ─────────── 249 MB] segment 0  ─┐\n[250 ─────────── 499 MB] segment 1  ├─ eşzamanlı\n[500 ─────────── 749 MB] segment 2  ┤\n[750 ─────────── 999 MB] segment 3  ─┘\n\nTamamlandığında → file.iso olarak birleştirilir\n```\n\n### Resume\n\nHer segment `.file.iso.part0`, `.file.iso.part1`, … temp dosyasına indirilir.  \nDuraklatıldığında `.file.iso.dstate` JSON dosyasına her segmentin ne kadar indirildiği kaydedilir.  \nTekrar başlatıldığında state dosyası okunur, disk üzerindeki temp dosya boyutları doğrulanır, eksik kısımlar `Range: bytes=N-M` başlığıyla indirilir.\n\n### İlerleme çıktısı örneği\n\n```\n[████████████░░░░░░░░░░░░░░░░] 42.3%  422.34 MB / 1.00 GB  9.15 MB/s   ETA 1m1s\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsetanarut%2Findir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsetanarut%2Findir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsetanarut%2Findir/lists"}