f
This commit is contained in:
parent
31bffebdbb
commit
1708439fd7
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@ bin/
|
|||||||
code/
|
code/
|
||||||
nuscripts
|
nuscripts
|
||||||
nuscripts/*
|
nuscripts/*
|
||||||
|
*.bin
|
||||||
|
4
.vmodules/cache/README.md
vendored
Normal file
4
.vmodules/cache/README.md
vendored
Normal 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.
|
1
.vmodules/freeflowuniverse/crystallib
Symbolic link
1
.vmodules/freeflowuniverse/crystallib
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
/Users/despiegk1/code/git.ourworld.tf/despiegk/torrent/code/crystallib/crystallib
|
1
.vmodules/freeflowuniverse/webcomponents
Symbolic link
1
.vmodules/freeflowuniverse/webcomponents
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
/Users/despiegk1/code/git.ourworld.tf/despiegk/torrent/code/webcomponents/webcomponents
|
16
README.md
16
README.md
@ -1,16 +1,30 @@
|
|||||||
# torrent playground
|
# torrent playground
|
||||||
|
|
||||||
- make sure nix is installed
|
- make sure nix & vscode is installed
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
#following will start your virtual shell
|
#following will start your virtual shell
|
||||||
start.sh
|
start.sh
|
||||||
|
|
||||||
#then in the shell open the hero shell (based on nushell, will set all paths to make this dir sandboxed)
|
#then in the shell open the hero shell (based on nushell, will set all paths to make this dir sandboxed)
|
||||||
./hero_shell.sh
|
./hero_shell.sh
|
||||||
|
|
||||||
#if you want hero and mycelium do
|
#if you want hero and mycelium do
|
||||||
herotools install_hero
|
herotools install_hero
|
||||||
|
|
||||||
#if you want mycelium
|
#if you want mycelium
|
||||||
herotools install_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
|
||||||
|
```
|
@ -8,46 +8,5 @@ export NU_CONFIG_DIR=${BASE}/nushell/config
|
|||||||
export PATH=${BASE}/bin:${BASE}/v:${PATH}
|
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}
|
cd ${BASE}
|
||||||
bash
|
bash
|
@ -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¢þCôÄ°@è
3]ee11:deluged.logd0:d6:lengthi0eee11:deluged.pidd0:d6:lengthi11e11:pieces root32:µªŽÜx1ÍØòTI‰>‘§|ãäÜè¦ø=&
|
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
|
||||||
þ÷)Ò 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ÖòôÓFeee5: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:š6Ie6¢<36><C2A2><EFBFBD>*U`£ÿÃ4ª‹ÿ(õ›>U'…¶eee12:meta versioni2e4:name11:deluge_conf12:piece lengthi16384ee12:piece layersdee
|
|
7
deluge/play.sh
Executable file
7
deluge/play.sh
Executable 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
|
@ -44,7 +44,7 @@ def read_torrent_v2(file_path):
|
|||||||
print(f"File {i}: {file}, Size: {size}")
|
print(f"File {i}: {file}, Size: {size}")
|
||||||
|
|
||||||
# Example usage
|
# Example usage
|
||||||
create_torrent("deluge_conf","my.torrent")
|
create_torrent("readme.md","my.torrent")
|
||||||
read_torrent_v2("existing.torrent")
|
read_torrent_v2("existing.torrent")
|
||||||
read_torrent_v2("my.torrent")
|
read_torrent_v2("my.torrent")
|
||||||
|
|
||||||
|
0
done/nu_done_install_v
Normal file
0
done/nu_done_install_v
Normal file
@ -1 +0,0 @@
|
|||||||
~N¢ÏLÄÛ0{k8¾ÄióÚYåŠE<0E>˜õŠÐ:-œ
|
|
Loading…
Reference in New Issue
Block a user