f
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -3,4 +3,5 @@ deluge_conf
|
|||||||
bin/
|
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:<EFBFBD><EFBFBD>f<EFBFBD><<3C><>z<EFBFBD><7A><EFBFBD><EFBFBD>#<23>&<07>uDj<44>r<EFBFBD>t#;<3B>~N<><4E>,eee4:authd0:d6:lengthi56e11:pieces root32:)<29><><1E><11>j<EFBFBD><6A><EFBFBD><EFBFBD>&<26><>=<3D><>?<3F>p27<32>dC@w\<5C>[<5B>ee9:core.confd0:d6:lengthi2823e11:pieces root32:<3A><0B>4-<2D><>=i<>[<5B>%v<><76>i(<28>3<19><><EFBFBD><EFBFBD>R<EFBFBD>7<EFBFBD><08>ee13:core.conf.bakd0:d6:lengthi2815e11:pieces root32:C<>΄V<CE84>R<EFBFBD><52><EFBFBD>z<EFBFBD>,<2C><><EFBFBD>VW<56><57>C<>İ@<40>
|
d7:comment9:Cool Test10:created by18:My Torrent Creator13:creation datei1705158309e4:infod9:file treed9:readme.mdd0:d6:lengthi74e11:pieces root32:E<EFBFBD>~w<><77>"<22>1q;[<5B><>E<EFBFBD>5$9a<39>Ԁ<1A>n7a<37><15>eee12:meta versioni2e4:name9:readme.md12:piece lengthi16384ee12:piece layersdee
|
||||||
3]ee11:deluged.logd0:d6:lengthi0eee11:deluged.pidd0:d6:lengthi11e11:pieces root32:<3A><><EFBFBD><EFBFBD>x1<78><31><EFBFBD>TI<54>><3E><>|<7C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=&
|
|
||||||
<16><>)<29> Uee14:extractor.confd0:d6:lengthi124e11:pieces root32:<3A><><EFBFBD>)<29>$(h<><68>21<10><>u<><쒺<08><>#c{<7B>wee13:hostlist.confd0:d6:lengthi252e11:pieces root32:C<>(<28><1E><10><><EFBFBD>G4<47>YP<59><50>:<3A>b <20>l<EFBFBD>k<EFBFBD>o-2mee3:ssld11:daemon.certd0:d6:lengthi977e11:pieces root32:Y<>G<EFBFBD><47>+Z<><5A><EFBFBD><EFBFBD><<3C>0<EFBFBD><30><EFBFBD><EFBFBD>=X<><58><EFBFBD><EFBFBD><EFBFBD>7/ee11:daemon.pkeyd0:d6:lengthi1704e11:pieces root32:p<>6p<18><1F><><0C><1C><>1<EFBFBD><31>/+<01>c<EFBFBD><63><EFBFBD><EFBFBD>Feee5:stated17:.safe_state_checkd0:d6:lengthi0eee14:torrents.stated0:d6:lengthi80e11:pieces root32:yP<79><50>03<>
|
|
||||||
<EFBFBD><01>
|
|
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<><4E>L<EFBFBD><4C>0{k8<6B><38>i<><69>Y<EFBFBD><59>E<0E><><EFBFBD><EFBFBD><EFBFBD>:-<2D>
|
|
Reference in New Issue
Block a user