diff --git a/.gitignore b/.gitignore index 0b97aeb..696fe26 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ deluge_conf bin/ code/ nuscripts -nuscripts/* \ No newline at end of file +nuscripts/* +*.bin diff --git a/.vmodules/cache/README.md b/.vmodules/cache/README.md new file mode 100644 index 0000000..0ad0cc1 --- /dev/null +++ b/.vmodules/cache/README.md @@ -0,0 +1,4 @@ +This folder contains cached build artifacts from the V build system. +You can safely delete it, if it is getting too large. +It will be recreated the next time you compile something with V. +You can change its location with the VCACHE environment variable. diff --git a/.vmodules/freeflowuniverse/crystallib b/.vmodules/freeflowuniverse/crystallib new file mode 120000 index 0000000..1dbaed9 --- /dev/null +++ b/.vmodules/freeflowuniverse/crystallib @@ -0,0 +1 @@ +/Users/despiegk1/code/git.ourworld.tf/despiegk/torrent/code/crystallib/crystallib \ No newline at end of file diff --git a/.vmodules/freeflowuniverse/webcomponents b/.vmodules/freeflowuniverse/webcomponents new file mode 120000 index 0000000..c095303 --- /dev/null +++ b/.vmodules/freeflowuniverse/webcomponents @@ -0,0 +1 @@ +/Users/despiegk1/code/git.ourworld.tf/despiegk/torrent/code/webcomponents/webcomponents \ No newline at end of file diff --git a/README.md b/README.md index cc10fc2..11be7b9 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,30 @@ # torrent playground -- make sure nix is installed +- make sure nix & vscode is installed ```bash #following will start your virtual shell start.sh + #then in the shell open the hero shell (based on nushell, will set all paths to make this dir sandboxed) ./hero_shell.sh + #if you want hero and mycelium do herotools install_hero + #if you want mycelium herotools install_mycelium +#install v & crystallib +herotools install_crystal + + ``` +## torrent tests + +go to deluge dir, and see some python examples + +```bash +deluge/play.sh +``` \ No newline at end of file diff --git a/bash_shell.sh b/bash_shell.sh index d95ceaa..7ccc9fb 100755 --- a/bash_shell.sh +++ b/bash_shell.sh @@ -8,46 +8,5 @@ export NU_CONFIG_DIR=${BASE}/nushell/config export PATH=${BASE}/bin:${BASE}/v:${PATH} -run_hero() { - hero 2>&1 > /dev/null - exit_status=$? - if [ $exit_status -ne 0 ]; then - echo "Failed to start Hero Cmd." - echo "If you're on macOS and encountering security restrictions." - echo "You can do this in System Preferences > Security & Privacy." - echo "Under the Privacy tab, add the Terminal and other Apps from this Distro" - echo "to the list of applications with Access." - fi -} - -run_nu() { - nu -h 2>&1 > /dev/null - exit_status=$? - if [ $exit_status -ne 0 ]; then - echo "Failed to start Nushell." - echo "If you're on macOS and encountering security restrictions." - echo "You can do this in System Preferences > Security & Privacy." - echo "Under the Privacy tab, add the Terminal and other Apps from this Distro" - echo "to the list of applications with Access." - fi -} - -run_mycelium() { - mycelium -h 2>&1 > /dev/null - exit_status=$? - if [ $exit_status -ne 0 ]; then - echo "Failed to start Nushell." - echo "If you're on macOS and encountering security restrictions." - echo "You can do this in System Preferences > Security & Privacy." - echo "Under the Privacy tab, add the Terminal and other Apps from this Distro" - echo "to the list of applications with Access." - fi -} - - -run_hero -run_nu -run_mycelium - cd ${BASE} bash \ No newline at end of file diff --git a/deluge/my.torrent b/deluge/my.torrent index de43a32..ea97547 100644 --- a/deluge/my.torrent +++ b/deluge/my.torrent @@ -1,4 +1 @@ -d7:comment9:Cool Test10:created by18:My Torrent Creator13:creation datei1705127688e4:infod9:file treed7:archived32:state-2024-01-13T09-17-00.tar.xzd0:d6:lengthi268e11:pieces root32:f|=& -) Uee14:extractor.confd0:d6:lengthi124e11:pieces root32:)$(h21u<쒺#c{wee13:hostlist.confd0:d6:lengthi252e11:pieces root32:C(G4YP:b lko-2mee3:ssld11:daemon.certd0:d6:lengthi977e11:pieces root32:YG+Z<0=X7/ee11:daemon.pkeyd0:d6:lengthi1704e11:pieces root32:p6p 1/+cF eee5:stated17:.safe_state_checkd0:d6:lengthi0eee14:torrents.stated0:d6:lengthi80e11:pieces root32:yP03 - -Hkx0&YcӒceee7:ui.confd0:d6:lengthi61e11:pieces root32:M2Ga0=Q\"ee8:web.confd0:d6:lengthi1006e11:pieces root32:?^x(&j>wee12:web.conf.bakd0:d6:lengthi783e11:pieces root32:6Ie6*U`4(>U'eee12:meta versioni2e4:name11:deluge_conf12:piece lengthi16384ee12:piece layersdee \ No newline at end of file +d7:comment9:Cool Test10:created by18:My Torrent Creator13:creation datei1705158309e4:infod9:file treed9:readme.mdd0:d6:lengthi74e11:pieces root32:E~w"1q;[E5$9aԀn7aeee12:meta versioni2e4:name9:readme.md12:piece lengthi16384ee12:piece layersdee \ No newline at end of file diff --git a/deluge/play.sh b/deluge/play.sh new file mode 100755 index 0000000..ca4dda7 --- /dev/null +++ b/deluge/play.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +set -e + +export BASE="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +cd ${BASE} + +python3 torrent_test.py \ No newline at end of file diff --git a/deluge/torrent_test.py b/deluge/torrent_test.py index ef2252c..78198cb 100755 --- a/deluge/torrent_test.py +++ b/deluge/torrent_test.py @@ -44,7 +44,7 @@ def read_torrent_v2(file_path): print(f"File {i}: {file}, Size: {size}") # Example usage -create_torrent("deluge_conf","my.torrent") +create_torrent("readme.md","my.torrent") read_torrent_v2("existing.torrent") read_torrent_v2("my.torrent") diff --git a/done/nu_done_install_v b/done/nu_done_install_v new file mode 100644 index 0000000..e69de29 diff --git a/priv_key.bin b/priv_key.bin deleted file mode 100644 index 601a326..0000000 --- a/priv_key.bin +++ /dev/null @@ -1 +0,0 @@ -~NL0{k8iYE:- \ No newline at end of file diff --git a/shell.nix b/shell.nix index 2730215..4673056 100644 --- a/shell.nix +++ b/shell.nix @@ -17,6 +17,7 @@ pkgs.mkShell { python311Packages.ipdb python311Packages.rq rsync + boehmgc # rustc # dumptorrent # udpt