Coder Social home page Coder Social logo

Comments (4)

ncw avatar ncw commented on June 20, 2024 1

ok, this seems to be much faster:

nice!

what is the preferred way to demonize and kill rclone rcd in the background? (i will be running this script only in interactive shells, so i need to catch Ctrl+C to abort)

rclone rcd doesn't have a --daemon flag like rclone mount.

You can ask rclone rcd to stop with the core/quit command.

from rclone.

eadmaster avatar eadmaster commented on June 20, 2024

following this forum post I've came up with this bash function, but it is quite slow:

myonedrivefolder2m3u() {
	while read -r filename; do

		rclone link "my_onedrive:$1/$filename"
		
	done <<< "$(rclone lsf my_onedrive:$1 --include '*.mp3')"
}

myonedrivefolder2m3u  folder/to/share/recursively

from rclone.

ncw avatar ncw commented on June 20, 2024

Your script will run a lot quicker if you start an rclone rcd server then use rclone rc operations/publiclink as rclone won't have the overhead of starting up the backend each time.

It would be fairly easy to add -R to rclone publiclink though - is this something you'd like to help with? I could provide hints?

from rclone.

eadmaster avatar eadmaster commented on June 20, 2024

ok, this seems to be much faster:

printf "#EXTM3U\r\n"

rclone rcd --rc-no-auth &

# alwars terminate the server when finished
trap "pkill -P $$" EXIT INT

myonedrivefolder2m3u() {
	
	while read -r filename; do
		printf "#EXTINF:-1,$filename\r\n"

		rclone rc operations/publiclink fs=my_onedrive: remote="$1/$filename" | jq -r .url | sed -e 's/$/\r/'
		
	done <<< "$(rclone lsf onedrive:$1 --include '*.mp3')"  
}

myonedrivefolder2m3u  folder/to/share/recursively

what is the preferred way to demonize and kill rclone rcd in the background?
(i will be running this script only in interactive shells, so i need to catch Ctrl+C to abort)

from rclone.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.