commit 02c2869e6cb0ef4fe9700a4805017711a9853dd7 Author: Diego Ripley Date: Tue Feb 3 16:55:38 2026 -0500 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7e25ad2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.pmtiles +*.torrent diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..8834af0 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Data for Canada + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/scripts/01_automate_creation_torrent_basic_tuning/pyproject.toml b/scripts/01_automate_creation_torrent_basic_tuning/pyproject.toml new file mode 100644 index 0000000..d45ef1c --- /dev/null +++ b/scripts/01_automate_creation_torrent_basic_tuning/pyproject.toml @@ -0,0 +1,7 @@ +[project] +name = "01-automate-torrent-file-creation" +version = "0.1.0" +requires-python = ">=3.14" +dependencies = [ + "py3createtorrent>=1.2.1", +] diff --git a/scripts/01_automate_creation_torrent_basic_tuning/run.sh b/scripts/01_automate_creation_torrent_basic_tuning/run.sh new file mode 100644 index 0000000..d43a552 --- /dev/null +++ b/scripts/01_automate_creation_torrent_basic_tuning/run.sh @@ -0,0 +1,10 @@ +CORES=$(nproc) +echo $CORES + +py3createtorrent + --threads 32 \ + --tracker "udp://tracker.labs.dataforcanada.org:6969/announce" \ + --webseed "https://data-01.labs.dataforcanada.org/processed/ca-ab_edmonton-2023A00054811061_orthoimagery_2023_075mm.pmtiles" \ + ca-ab_edmonton-2023A00054811061_orthoimagery_2023_075mm.pmtiles \ + --output ca-ab_edmonton-2023A00054811061_orthoimagery_2023_075mm.pmtiles.torrent \ + --force \ No newline at end of file diff --git a/scripts/01_automate_creation_torrent_basic_tuning/uv.lock b/scripts/01_automate_creation_torrent_basic_tuning/uv.lock new file mode 100644 index 0000000..c104920 --- /dev/null +++ b/scripts/01_automate_creation_torrent_basic_tuning/uv.lock @@ -0,0 +1,35 @@ +version = 1 +revision = 3 +requires-python = ">=3.14" + +[[package]] +name = "01-automate-torrent-file-creation" +version = "0.1.0" +source = { virtual = "." } +dependencies = [ + { name = "py3createtorrent" }, +] + +[package.metadata] +requires-dist = [{ name = "py3createtorrent", specifier = ">=1.2.1" }] + +[[package]] +name = "bencode-py" +version = "4.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e8/6f/1fc1f714edc73a9a42af816da2bda82bbcadf1d7f6e6cae854e7087f579b/bencode.py-4.0.0.tar.gz", hash = "sha256:2a24ccda1725a51a650893d0b63260138359eaa299bb6e7a09961350a2a6e05c", size = 19842, upload-time = "2020-06-12T04:34:05.734Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/15/9f/eabbc8c8a16db698d9c4bd24953763df2594b054237b89afe1ec56d3965e/bencode.py-4.0.0-py2.py3-none-any.whl", hash = "sha256:99c06a55764e85ffe81622fdf9ee78bd737bad3ea61d119784a54bb28860d962", size = 18975, upload-time = "2020-06-12T04:34:03.759Z" }, +] + +[[package]] +name = "py3createtorrent" +version = "1.2.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "bencode-py" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/74/d0/f58de0a87fffa2f420e083c79b9b7a5b2d166765f4c6111b6429f2305249/py3createtorrent-1.2.1.tar.gz", hash = "sha256:04d801adbbe8beb37547104935bd1fb81e02459341b524f85852629fa7dd326d", size = 16687, upload-time = "2024-06-08T11:33:29.386Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/15/38/6ecf7e0ed9a26db47e82a4f4804b78237a157db53737080c236c993da41a/py3createtorrent-1.2.1-py3-none-any.whl", hash = "sha256:dede7e87d869d2b013a633486f5f1fcedd6f057ff9f12d9ba9a370acfc496311", size = 15288, upload-time = "2024-06-08T11:33:27.88Z" }, +]