From 3d15a2e80e0a3ac3a9e3a9ea631059797a954832 Mon Sep 17 00:00:00 2001 From: despiegk Date: Sat, 13 Jan 2024 09:32:52 +0300 Subject: [PATCH] init --- .gitignore | 2 ++ deluge/cookie_deluge.txt | 5 ++++ deluge/curl.cfg | 10 ++++++++ deluge/deluge_start.sh | 7 ++++++ deluge/existing.torrent | Bin 0 -> 13592 bytes deluge/my.torrent | 4 +++ deluge/readme.md | 1 + deluge/torrent_test.py | 51 +++++++++++++++++++++++++++++++++++++++ nupower | 1 + shell.nix | 25 +++++++++++++++++++ start.sh | 4 +++ 11 files changed, 110 insertions(+) create mode 100644 .gitignore create mode 100644 deluge/cookie_deluge.txt create mode 100644 deluge/curl.cfg create mode 100755 deluge/deluge_start.sh create mode 100644 deluge/existing.torrent create mode 100644 deluge/my.torrent create mode 100644 deluge/readme.md create mode 100755 deluge/torrent_test.py create mode 120000 nupower create mode 100644 shell.nix create mode 100755 start.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3dd031a --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.mypy_cache +deluge_conf \ No newline at end of file diff --git a/deluge/cookie_deluge.txt b/deluge/cookie_deluge.txt new file mode 100644 index 0000000..e5ab99b --- /dev/null +++ b/deluge/cookie_deluge.txt @@ -0,0 +1,5 @@ +# Netscape HTTP Cookie File +# https://curl.se/docs/http-cookies.html +# This file was generated by libcurl! Edit at your own risk. + +localhost FALSE /json FALSE 1705130407 _session_id c04d013df838035551095d3b91e7d344d0e6411531d7cb281aa92e4703b8f4264176 diff --git a/deluge/curl.cfg b/deluge/curl.cfg new file mode 100644 index 0000000..449054c --- /dev/null +++ b/deluge/curl.cfg @@ -0,0 +1,10 @@ +request = "POST" +compressed +cookie = "cookie_deluge.txt" +cookie-jar = "cookie_deluge.txt" +header = "Content-Type: application/json" +header = "Accept: application/json" +url = "http://localhost:8112/json" +write-out = "\n" + +# curl -d '{"method": "web.add_torrents", "params": [[{"path":/Users/despiegk1/Downloads/vlc-3.0.20-arm64.dmg", "options":null}]], "id": 1}' -K curl.cfg \ No newline at end of file diff --git a/deluge/deluge_start.sh b/deluge/deluge_start.sh new file mode 100755 index 0000000..72c1701 --- /dev/null +++ b/deluge/deluge_start.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +deluge -c deluge_conf -s web +deluge -c deluge_conf web +echo "default passwd is 'deluge'" +open http://localhost:8112/ + +# curl -d '{"method": "web.add_torrents", "params": [[{"path":/Users/despiegk1/Downloads/vlc-3.0.20-arm64.dmg", "options":null}]], "id": 1}' -K curl.cfg \ No newline at end of file diff --git a/deluge/existing.torrent b/deluge/existing.torrent new file mode 100644 index 0000000000000000000000000000000000000000..8ad4c7eab07617e0c2b5c53df29c58d629cf3566 GIT binary patch literal 13592 zcmaiaWl$Ymvo-GSF2S9Hb8vTe*MqyeYj6k_+$}gkgS)!~g1fs1_;~Mk|J-`ss%L&o z)zqHq?zMLJn%+}w4qyeExqwXEK;~qo-k%S4)~0TbE-oMkHvs$pU$J&{AT$4b!5YBH z%gV~j&BnP@B&GO;IPBGa^1CSzmv za5QDMcj7Q-1)6gK?LZEeZdTT8+?<>MZdM);004Bd2AP3e$y^*A-PqZH!EZumgG2o} zb(+V7ey*Lq^(1}Z1mtj%96f~Zl+Y*7AP_qzP|V829%Kjl49wJqFb(c}NP;|1_=vGMS-{nK61taP5D$j^<%acP(@r-dPv!p0!pSiD3tfuIsa z7Jg+Ah=UC%ZsKD58J;~Et(qIi&d$Vzkqp4g%fUz{VsC9}LM9=mMn@*C@(++)oa~$& ztepRJ8V{I9&7~S*x3oI;qQ<}q27ByElvht%X{Hh-e}oXyKd- zjQ1Mh%?!ui{o5hfIbPehGG(hwB`LuN0s%OICa&g8F78fl?k=Ez0Au4~=i&x%aQ&C< zJ0cbc4CRIDCqj72Qf`o2UW{NC@M#=hmc<8jS4q)xk%ANMHv>ND(Nybsp~e~u`B$W~AF0mn zlj^deb+jPV1#utTPl7-IHlRJo&4kPYB`U1$?<4f(o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FswEtRT0yHbA8h-gI(Ca5IJ(J4ac&nW{TY`HLj_ zx)TdcDNb4TbLQf_L>ftImbT@LKLq7j^v?4*o3d!s9}UrUR2sc?64Sfy8PTGWMnw;v z!pq5JoBTB}N2>_ECJLo(O!9}2tl-X~$&Tww3gm-5SH8@x3rNBPhVqNb^AfJg9puGj zvLfxy-?YUIy6Z4_i3_fuMioLsNS~*h=QVgynOtpq#g>GzmphY9>>^I3KIV+BHx%u? zTX$AHJP2tKl;#F9W(`l4dU5&%v2JE2TsCsvh#hQCf>0EVM@xBFi^G!MM#+;*Z<0W}^4*rF{Nxqe{TJol0D>sN)rf zsX0BOGxW)8WP-%syvU8w5YJmPswsEHqo+}6FZ+iW(NKi6E|u0H>@9jRnsGfj-`0VV z7>#S2e&t^DKc z7N@WR&xrYx(jd*xgHhe`Rv;FG?AmpxfS_({W%?qpq4aNy{9Ni^LSQe??ebz?qb;Xz z2?-5$Rn|L7Fg(CfYg)~B-rV>aYz@$Wi;-#;N$bVjeDsxI5bXU5&K1-X>f66iiM<>4 zQw3)}j6Dx;wOdx0uFV(;i$k99hcUlQau>;tn5Rc1#dY9^bLeQ%7>l zxhlM}ROlU9mInVhB$C?zaVwvmN|(l*+;LrmRY3U=dq!7Ur4x4@x=}+=SfaW$noLtS zX5XXY@yJyhze~qvR|eH1s;TQXKJOF6a~w=g)8%;%h8h}$>w#pND(m*u5ePmyygFxvkG?)_K& z=DboMmmJczlElm}SQI7+ipuh~#d$`X1X8SvKAOLFRS7z$>pD?6tomNM#c_GDq{vQ# lQ|PmZtx`IoXM)*EZT*dW1gK|u82s9*=X?Tk->*QR{|6IpornMc literal 0 HcmV?d00001 diff --git a/deluge/my.torrent b/deluge/my.torrent new file mode 100644 index 0000000..1b97968 --- /dev/null +++ b/deluge/my.torrent @@ -0,0 +1,4 @@ +d7:comment9:Cool Test10:created by18:My Torrent Creator13:creation datei1705127067e4:infod9:file treed7:archived32:state-2024-01-13T09-17-00.tar.xzd0:d6:lengthi268e11:pieces root32:fئtF?Rl2oee11:deluged.logd0:d6:lengthi0eee11:deluged.pidd0:d6:lengthi11e11:pieces root32:x1TI>|=& +) Uee13: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:lengthi783e11:pieces root32:6Ie6*U`4(>U'eee12:meta versioni2e4:name11:deluge_conf12:piece lengthi16384ee12:piece layersdee \ No newline at end of file diff --git a/deluge/readme.md b/deluge/readme.md new file mode 100644 index 0000000..da654da --- /dev/null +++ b/deluge/readme.md @@ -0,0 +1 @@ +https://deluge.readthedocs.io/en/latest/devguide/how-to/curl-jsonrpc.html diff --git a/deluge/torrent_test.py b/deluge/torrent_test.py new file mode 100755 index 0000000..ef2252c --- /dev/null +++ b/deluge/torrent_test.py @@ -0,0 +1,51 @@ +#!/usr/bin/env python3 +import libtorrent as lt +import time + +def create_torrent(directory, torrent_file_name): + # Create a new file storage object + fs = lt.file_storage() + + # Add files from the directory to the file storage + lt.add_files(fs, directory) + + # Create a new create_torrent object + t = lt.create_torrent(fs, flags=lt.create_torrent_flags_t.v2_only) + + # Add tracker + # t.add_tracker("http://your-tracker.com/announce") + + # Set comment or other properties (optional) + t.set_comment("Cool Test") + t.set_creator("My Torrent Creator") + + # Generate the torrent + lt.set_piece_hashes(t, ".") # Second argument is the root directory for the files + torrent = t.generate() + + # Write the torrent file + with open(torrent_file_name, "wb") as f: + f.write(lt.bencode(torrent)) + + +def read_torrent_v2(file_path): + # Create a torrent_info object from the file path + info = lt.torrent_info(file_path) + + # Accessing various properties of the torrent + print("Torrent Name:", info.name()) + print("Number of Files:", info.num_files()) + print("Total Size:", info.total_size()) + + # Loop through each file in the torrent + for i in range(info.num_files()): + file = info.files().file_path(i) + size = info.files().file_size(i) + print(f"File {i}: {file}, Size: {size}") + +# Example usage +create_torrent("deluge_conf","my.torrent") +read_torrent_v2("existing.torrent") +read_torrent_v2("my.torrent") + + diff --git a/nupower b/nupower new file mode 120000 index 0000000..1ff2e6d --- /dev/null +++ b/nupower @@ -0,0 +1 @@ +/Users/despiegk1/code/git.ourworld.tf/freeflowuniverse/nu/nupower \ No newline at end of file diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..50e2d69 --- /dev/null +++ b/shell.nix @@ -0,0 +1,25 @@ +let + nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-23.11"; + pkgs = import nixpkgs { config = {}; overlays = []; }; +in + +pkgs.mkShell { + packages = with pkgs; [ + git + nushell + mc + jq + # vscode + deluge + libtorrent-rasterbar + python311Packages.libtorrent-rasterbar + python311Full + python311Packages.ipython + python311Packages.ipdb + python311Packages.rq + # dumptorrent + # udpt + # buildtorrent + + ]; +} \ No newline at end of file diff --git a/start.sh b/start.sh new file mode 100755 index 0000000..55d41c1 --- /dev/null +++ b/start.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +set -ex +export NIXPKGS_ALLOW_UNFREE=1 +nix-shell \ No newline at end of file