tremc remote file handling

This commit is contained in:
Alexander Bocken 2023-07-03 16:12:42 +02:00
parent cfcfd53574
commit 4ebe302095
Signed by: Alexander
GPG Key ID: 1D237BE83F9B05E8
2 changed files with 118 additions and 0 deletions

108
.config/tremc/settings.cfg Normal file
View File

@ -0,0 +1,108 @@
[Connection]
password = testpassword
username = transmission
port = 9091
host = 192.168.1.3
path = /transmission/rpc
ssl = False
[Sorting]
# Set startup torrent list sort order. Possible sort keys are:
# name, addedDate, percentDone, seeders, leechers, sizeWhenDone, status,
# uploadedEver, rateUpload, rateDownload, uploadRatio, peersConnected,
# downloadDir, mainTrackerDomain.
# Prepend ':' for reversed sort.
# Examples:
#
# order = :name
# Sorts by torrent name in reversed alphabetical order.
#
# order = sizeWhenDone
# Sorts by torrent size, small to large.
order = name
[Filtering]
# Set startup torrent list filter. Possible filter keys are:
# uploading, downloading, active, paused, seeding, incomplete, verifying,
# private, isolated, selected, honors.
# Use 'invert=True' to shoe only torrents not matching filter.
filter =
invert = False
[Misc]
lines_per_torrent = 3
torrentname_is_progressbar = True
file_viewer = dl_torrent_and_view.sh %%s
file_open_in_terminal = True
view_selected = False
rdns = True
geoip_database = /xyz
torrent_numbers = True
[Colors]
# Set colors of various interface elements.
# Each element has background and foreground color.
# Each color is default or one of the eight curses colors:
# Black, White, Red, Green, Blue, Cyan, Yellow, Magenta.
# Default is the default background or foreground color.
header = bg:white,fg:black
footer = bg:white,fg:black
title_seed = bg:green,fg:black
title_incomplete = bg:black,fg:white
title_download = bg:blue,fg:black
title_idle = bg:cyan,fg:black
title_verify = bg:magenta,fg:black
title_paused = bg:yellow,fg:black
title_error = bg:red,fg:default
download_rate = bg:default,fg:blue
upload_rate = bg:default,fg:red
eta+ratio = bg:default,fg:default
filter_status = bg:black,fg:red
multi_filter_status = bg:default,fg:blue
selection = bg:white,fg:black
window = bg:black,fg:white
dialog = bg:black,fg:white
dialog_important = bg:black,fg:red
file_prio_high = bg:black,fg:red
file_prio_normal = bg:black,fg:default
file_prio_low = bg:black,fg:yellow
file_prio_off = bg:black,fg:blue
[Profiles]
# Define filter/sort profiles. See README.md for details.
# Examples:
#
# profile1 = regex#=ubuntu#=:uploadRatio
# A profile named '1' shows only torrents whose name contains ubuntu (case
# insensitive match), sorted by upload ratio from large to small.
# This profile can be selected from the profile menu or by pressing '1'.
#
# profile2 = incomplete#=#=percentDone
# A profile named '2' shows incomplete torrents sorted by progress.
#
# profileABC = regex#=ubuntu#=:incomplete#= #& # location#=/torrents#=peersConnected
# A profile named 'ABC' shows only torrents that satisfy one of the
# conditions:
# 1. Name contains ubuntu and complete;
# 2. Download location is /torrents.
# The torrent list is sorted by number of peers connected.
# This profile can be selected from the profile menu.
# Show all torrents, sort by name:
profile0 =
[ListKeys]
# Configure keys in torrent list only.
backslash = select_search_torrent_fulltext
gt = select_search_torrent_regex_fulltext
y = toggle_torrent_numbers
[DetailsKeys]
# Configure keys in torrent details only.
y = view_file
[CommonKeys]
# Configure keys globally.
Y = verify_torrent
v = move_torrent

View File

@ -0,0 +1,10 @@
#!/bin/sh
filepath_remote="$(echo "$1" | sed 's/\[/\\[/g; s/\\]/\\]/g')"
filename="${1##*/}"
remote=rezepte.bocken.org
notify-send "Downloading $filename"
download_path="$HOME/dls"
download_file="$download_path/$filename"
rsync -rvPu "root@$remote:$filepath_remote" "$download_file"
clear
rifle "$download_file" || ranger $download_path