This commit is contained in:
despiegk 2024-01-13 15:05:52 +00:00
parent 31bffebdbb
commit 1708439fd7
Signed by: despiegk
GPG Key ID: 99E4E1492F73BC18
12 changed files with 33 additions and 49 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@ bin/
code/
nuscripts
nuscripts/*
*.bin

4
.vmodules/cache/README.md vendored Normal file
View File

@ -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.

View File

@ -0,0 +1 @@
/Users/despiegk1/code/git.ourworld.tf/despiegk/torrent/code/crystallib/crystallib

View File

@ -0,0 +1 @@
/Users/despiegk1/code/git.ourworld.tf/despiegk/torrent/code/webcomponents/webcomponents

View File

@ -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
```

View File

@ -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

View File

@ -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¯<ˆÐzžÙã±#«&§uDj³rŸt#;ä~N†Ý,eee4:authd0:d6:lengthi56e11:pieces root32:)ýƒþšjÀÆÎ&ÿÅ=òô?¬p27ÑdC@w\ã[¹ee9:core.confd0:d6:lengthi2823e11:pieces root32:£ Ã4-»ó=iÁ[Ä%vÈþi(¦3€²­üR¶7àÎee13:core.conf.bakd0:d6:lengthi2815e11:pieces root32:CµÎ„V¦RçåÒzÄ,“ŽªVW¢þÄ°@è 3]ee11:deluged.logd0:d6:lengthi0eee11:deluged.pidd0:d6:lengthi11e11:pieces root32:µªŽÜx1ÍØòTI‰>‘§|ãäÜè¦ø=&
þ÷)Ò Uee14:extractor.confd0:d6:lengthi124e11:pieces root32:ãøá)Ý$(hÁ®21ˆÔuø<ì’º <>#c{¶wee13:hostlist.confd0:d6:lengthi252e11:pieces root32:CÓ(¤ÕÎñ›G4ÖYPÐ÷:<3A>b ˆlØkÂo-2mee3:ssld11:daemon.certd0:d6:lengthi977e11:pieces root32:YìG ©+Z…¹éÎ<Ê0éÎý·=XœØç<C398>7/ee11:daemon.pkeyd0:d6:lengthi1704e11:pieces root32:pé6p»–“ ï—Í1÷û/+—cÖòôÓF eee5:stated17:.safe_state_checkd0:d6:lengthi0eee14:torrents.stated0:d6:lengthi80e11:pieces root32:yP©Þ03ˆ
ª
Hkx˜â0& YcÞÏÓceee7:ui.confd0:d6:lengthi61e11:pieces root32:Â<1A>Mâ«þ³2ãG•œ´¸öa²0=Qº\Ô"­<C2AD>Ôee8:web.confd0:d6:lengthi1006e11:pieces root32:?ûÉ^xèíÃÞ©(¾&<>æ<EFBFBD>j>à¡Þëw µ«ee12:web.conf.bakd0:d6:lengthi783e11:pieces root32:š6Ie<36><C2A2><EFBFBD>*U`£ÿÃ4ªÿ(õ›>U'…¶eee12:meta versioni2e4:name11:deluge_conf12:piece lengthi16384ee12:piece layersdee
d7:comment9:Cool Test10:created by18:My Torrent Creator13:creation datei1705158309e4:infod9:file treed9:readme.mdd0:d6:lengthi74e11:pieces root32:E·~w§¯"ú1q;[¯ÅEš5$9a¿Ô€Ën7a™Ãeee12:meta versioni2e4:name9:readme.md12:piece lengthi16384ee12:piece layersdee

7
deluge/play.sh Executable file
View File

@ -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

View File

@ -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")

0
done/nu_done_install_v Normal file
View File

View File

@ -1 +0,0 @@
~N¢ÏLÄÛ0{k8¾ÄióÚYåŠE<0E>˜õŠÐ:-œ

View File

@ -17,6 +17,7 @@ pkgs.mkShell {
python311Packages.ipdb
python311Packages.rq
rsync
boehmgc
# rustc
# dumptorrent
# udpt