main #1

Open
vintagefuture wants to merge 2 commits from vintagefuture/youtube-to-opml:main into main
First-time contributor

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.

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.
vintagefuture added 2 commits 2024-11-08 17:52:06 +00:00
wezm requested changes 2024-11-11 04:47:18 +00:00
wezm left a comment
Owner

Thanks. Yeah I didn't do any work to make this portable since it just needed to run on my Linux machine.

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
Owner

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.

the --max-procs flag, which is not supported on macOs's version of xargs.

--max-procs can be replaced with -P which is supported by the BSD xargs used on macOS as well as GNU.

we could do something like NUM_PROCS=$(shell uname | grep -q "Darwin" && sysctl -n hw.ncpu || nproc)

That seems mostly fine. Suggest changing it to use uname -s though.

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. > the --max-procs flag, which is not supported on macOs's version of xargs. `--max-procs` can be replaced with `-P` which is supported by the BSD xargs used on macOS as well as GNU. > we could do something like NUM_PROCS=$(shell uname | grep -q "Darwin" && sysctl -n hw.ncpu || nproc) That seems mostly fine. Suggest changing it to use `uname -s` though.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u main:vintagefuture-main
git checkout vintagefuture-main

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.

git checkout main
git merge --no-ff vintagefuture-main
git checkout vintagefuture-main
git rebase main
git checkout main
git merge --ff-only vintagefuture-main
git checkout vintagefuture-main
git rebase main
git checkout main
git merge --no-ff vintagefuture-main
git checkout main
git merge --squash vintagefuture-main
git checkout main
git merge --ff-only vintagefuture-main
git checkout main
git merge vintagefuture-main
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: wezm/youtube-to-opml#1
No description provided.