{"id":18451513,"url":"https://github.com/scotow/mego","last_synced_at":"2025-04-08T02:32:32.036Z","repository":{"id":55613644,"uuid":"167835262","full_name":"scotow/mego","owner":"scotow","description":"A simple megadl wrapper with auto-retry and download list","archived":false,"fork":false,"pushed_at":"2023-02-06T10:06:27.000Z","size":27,"stargazers_count":24,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-19T05:56:16.098Z","etag":null,"topics":["command","command-line","go","golang","mega","megatools"],"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/scotow.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":"2019-01-27T17:11:55.000Z","updated_at":"2023-12-10T21:08:58.000Z","dependencies_parsed_at":"2023-02-19T06:15:30.668Z","dependency_job_id":null,"html_url":"https://github.com/scotow/mego","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scotow%2Fmego","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scotow%2Fmego/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scotow%2Fmego/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scotow%2Fmego/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scotow","download_url":"https://codeload.github.com/scotow/mego/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223300110,"owners_count":17122515,"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":["command","command-line","go","golang","mega","megatools"],"created_at":"2024-11-06T07:28:54.842Z","updated_at":"2024-11-06T07:28:54.929Z","avatar_url":"https://github.com/scotow.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mego 💾\n\nMego is a simple [megatools](https://megatools.megous.com) command wrapper, allowing you to use the `megatools dl` command with a list of links and adds an auto-try tool.\n\n### Idea\n\nMegatools is a collection of programs used to access [mega.nz](https://mega.nz) services from the command line.\n\n#### Auto-retry\n\nWhile using the `megatools dl` command to download a bunch of large files, I often found myself being blocked by Mega for reaching the allowed quota (aka. error 509).\n\nIndeed, Mega allows users to download a few GB per day (apparently not fixed).\n\nBy default `megatools dl` only retries 3 times when this error occurred, preventing the download of file during the night or while being away from the computer. To fix this problem, `mego` checks the error code returned by `megatools dl`, and retry if the command failed.\n\n#### List of files\n\nAnother problem that I found while using `megatools dl` is the lack of options to download multiple files at once, and keeping track of the completed ones.\n\nTo solve this problem, `mego` accepts as arguments a path of file(s) containing a list of Mega download links. `mego` will open the file and start downloading the files listed in it. Once the download of the file successfully terminated, `mego` will add a `#` before the link and write it in the file, preventing the next execution to re-download the file. `mego` will also mark invalid links it found with the `#-` string.\n\n#### Compatibility\n\nBecause this script is a wrapper around the `megatools` command, it heavily depends on the outputs of the command. If you have problems using this script, be sure to use the version 1.11.0 (04.04.20) of `megatools`. You can download the latest version [here](https://megatools.megous.com/builds/experimental/) or use the [megatools.PKGBUILD](https://github.com/scotow/mego/blob/master/megatools.PKGBUILD) file available in this repo.\n\n### Usage\n\n```\nUsage of mego:\n\n  mego [-c COMMAND_PATH] [-s SPEED] [-p] [-r INTERVAL] LINK... LINK_PATH...\n\nApplication Options:\n  -s, --speed-limit=SPEED       Speed limit passed to megatools dl as --limit-speed (default: 0)\n  -p, --pipe-outputs            Pipe megatools's stdout and stderr\n  -r, --retry=INTERVAL          Interval between two retries (default: 15min)\n  -c, --command=COMMAND_PATH    Path to the megatools command (default: megatools)\n```\n\nNB: The whole content of a list file is read and kept in memory. Every time a file is downloaded, the content of the list file will be overwritten. So please do not use a list file as a queue during execution.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscotow%2Fmego","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscotow%2Fmego","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscotow%2Fmego/lists"}