main #1
Loading…
Reference in a new issue
No description provided.
Delete branch "vintagefuture/youtube-to-opml:main"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi! Thank you so much for this, it was exactly what I needed!
I managed to run the process on macOS with these minimal changes. We lose parallelism without the --max-procs flag, which is not supported on macOs's version of xargs.
Alternatively we could do something like
NUM_PROCS=$(shell uname | grep -q "Darwin" && sysctl -n hw.ncpu || nproc)
to check if we're on Linux or mac, but I think it's overcomplicating it.Also I was having issues because the json folder wasn't created automatically, not sure if this is due to the different OS.
Thanks. Yeah I didn't do any work to make this portable since it just needed to run on my Linux machine.
@ -12,3 +12,2 @@
channel-json: subscriptions.txt
# nproc is not portable :-/
xargs -n1 --max-procs=$$(nproc) --arg-file subscriptions.txt --verbose ./generate-json-opml
cat subscriptions.txt | xargs -n1 --verbose ./generate-json-opml
The parallelism was important to me as I had hundreds of subscriptions to process and a 16c/32t CPU to keep busy so I'd like to keep it.
--max-procs
can be replaced with-P
which is supported by the BSD xargs used on macOS as well as GNU.That seems mostly fine. Suggest changing it to use
uname -s
though.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.