{"id":18084954,"url":"https://github.com/jwodder/demagnetize","last_synced_at":"2025-10-10T06:40:00.539Z","repository":{"id":174454776,"uuid":"652270700","full_name":"jwodder/demagnetize","owner":"jwodder","description":"Convert magnet links to .torrent files","archived":false,"fork":false,"pushed_at":"2025-09-08T21:21:40.000Z","size":193,"stargazers_count":21,"open_issues_count":14,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-27T16:02:16.130Z","etag":null,"topics":["available-on-pypi","bittorrent","magnet-link","python","torrent"],"latest_commit_sha":null,"homepage":"","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/jwodder.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.md","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":"2023-06-11T16:15:26.000Z","updated_at":"2025-09-08T21:21:43.000Z","dependencies_parsed_at":"2023-09-23T18:54:34.322Z","dependency_job_id":"49b4a4c4-cc87-4abb-ae08-3144eadfc642","html_url":"https://github.com/jwodder/demagnetize","commit_stats":null,"previous_names":["jwodder/demagnetize"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/jwodder/demagnetize","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwodder%2Fdemagnetize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwodder%2Fdemagnetize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwodder%2Fdemagnetize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwodder%2Fdemagnetize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jwodder","download_url":"https://codeload.github.com/jwodder/demagnetize/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwodder%2Fdemagnetize/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002969,"owners_count":26083489,"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-10-10T02:00:06.843Z","response_time":62,"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":["available-on-pypi","bittorrent","magnet-link","python","torrent"],"created_at":"2024-10-31T15:08:46.701Z","updated_at":"2025-10-10T06:40:00.523Z","avatar_url":"https://github.com/jwodder.png","language":"Python","readme":"|repostatus| |ci-status| |coverage| |pyversions| |license|\n\n.. |repostatus| image:: https://www.repostatus.org/badges/latest/active.svg\n    :target: https://www.repostatus.org/#active\n    :alt: Project Status: Active — The project has reached a stable, usable\n          state and is being actively developed.\n\n.. |ci-status| image:: https://github.com/jwodder/demagnetize/actions/workflows/test.yml/badge.svg\n    :target: https://github.com/jwodder/demagnetize/actions/workflows/test.yml\n    :alt: CI Status\n\n.. |coverage| image:: https://codecov.io/gh/jwodder/demagnetize/branch/master/graph/badge.svg\n    :target: https://codecov.io/gh/jwodder/demagnetize\n\n.. |pyversions| image:: https://img.shields.io/pypi/pyversions/demagnetize.svg\n    :target: https://pypi.org/project/demagnetize/\n\n.. |license| image:: https://img.shields.io/github/license/jwodder/demagnetize.svg\n    :target: https://opensource.org/licenses/MIT\n    :alt: MIT License\n\n`GitHub \u003chttps://github.com/jwodder/demagnetize\u003e`_\n| `PyPI \u003chttps://pypi.org/project/demagnetize/\u003e`_\n| `Issues \u003chttps://github.com/jwodder/demagnetize/issues\u003e`_\n| `Changelog \u003chttps://github.com/jwodder/demagnetize/blob/master/CHANGELOG.md\u003e`_\n\n``demagnetize`` is a Python program for converting one or more BitTorrent\n`magnet links`_ into ``.torrent`` files by downloading the torrent info from\nactive peers.\n\n.. _magnet links: https://en.wikipedia.org/wiki/Magnet_URI_scheme\n\nAt the moment, ``demagnetize`` only supports basic features of the BitTorrent\nprotocol.  The following notable features are supported:\n\n- BitTorrent protocol v1\n- HTTP (including compact and IPv6 extensions) and UDP trackers\n- magnet URIs with info hashes encoded in either hexadecimal or base32\n- Fast extension (`BEP 6`_)\n- UDP tracker protocol extensions (`BEP 41`_)\n\n.. _BEP 6: https://www.bittorrent.org/beps/bep_0006.html\n.. _BEP 41: https://www.bittorrent.org/beps/bep_0041.html\n\n``demagnetize`` has also been translated by the author into Rust; you can find\nthe Rust version at \u003chttps://github.com/jwodder/demagnetize-rs\u003e.\n\n\nInstallation\n============\n``demagnetize`` requires Python 3.10 or higher.  Just use `pip\n\u003chttps://pip.pypa.io\u003e`_ for Python 3 (You have pip, right?) to install it::\n\n    python3 -m pip install demagnetize\n\n\nUsage\n=====\n\n::\n\n    demagnetize [\u003cglobal options\u003e] \u003csubcommand\u003e ...\n\nThe ``demagnetize`` command has two subcommands, ``get`` (for converting a\nsingle magnet link) and ``batch`` (for converting a file of magnet links), both\ndetailed below.\n\nGlobal Options\n--------------\n\n-l LEVEL, --log-level LEVEL\n                        Set the log level to the given value.  Possible values\n                        are \"``CRITICAL``\", \"``ERROR``\", \"``WARNING``\",\n                        \"``INFO``\", \"``DEBUG``\", and \"``TRACE``\" (all\n                        case-insensitive).  [default value: ``INFO``]\n\n\n``demagnetize get``\n-------------------\n\n::\n\n    demagnetize [\u003cglobal options\u003e] get [\u003coptions\u003e] \u003cmagnet-link\u003e\n\nConvert a single magnet link specified on the command line to a ``.torrent``\nfile.  (Note that you will likely have to quote the link in order to prevent it\nfrom being interpreted by the shell.)  By default, the file is saved at\n``{name}.torrent``, where ``{name}`` is replaced by the value of the ``name``\nfield from the torrent info, but a different path can be set via the\n``--outfile`` option.\n\nOptions\n^^^^^^^\n\n-o PATH, --outfile PATH\n                        Save the ``.torrent`` file to the given path.  The path\n                        may contain a ``{name}`` placeholder, which will be\n                        replaced by the (sanitized) name of the torrent, and/or\n                        a ``{hash}`` placeholder, which will be replaced by the\n                        torrent's info hash in hexadecimal.  Specifying ``-``\n                        will cause the torrent to be written to standard\n                        output.  [default: ``{name}.torrent``]\n\n\n``demagnetize batch``\n---------------------\n\n::\n\n    demagnetize [\u003cglobal options\u003e] batch [\u003coptions\u003e] \u003cfile\u003e\n\nRead magnet links from ``\u003cfile\u003e``, one per line (ignoring empty lines and lines\nthat start with ``#``), and convert each one to a ``.torrent`` file.  By\ndefault, each file is saved at ``{name}.torrent``, where ``{name}`` is replaced\nby the value of the ``name`` field from the torrent info, but a different path\ncan be set via the ``--outfile`` option.\n\nOptions\n^^^^^^^\n\n-o PATH, --outfile PATH\n                        Save the ``.torrent`` files to the given path.  The\n                        path may contain a ``{name}`` placeholder, which will\n                        be replaced by the (sanitized) name of each torrent,\n                        and/or a ``{hash}`` placeholder, which will be replaced\n                        by each torrent's info hash in hexadecimal.  [default:\n                        ``{name}.torrent``]\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwodder%2Fdemagnetize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjwodder%2Fdemagnetize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwodder%2Fdemagnetize/lists"}