Removing youtube and other proprietary services from my NewPipe subscriptions:

$ sed 's/\({"service_id\)/\n\1/g' newpipe_subscriptions_202211192224.json |grep -vie youtube.com -e soundcloud.com > newpipe_subscriptions_peertube-only.json

#ManuallyParsingJSONinBashBecauseIcan
#Fediverse
#WINNING

@RL_Dane jq(1) would like to have a word with you 😂

@retronav

Can you give me some pointers on telling jq to filter out any items where the "url" contains "youtube" or "soundcloud?" :D

I'm very new to this. I'm an old csv guy XD (or colon separated, or <specialtag> separated, etc. ;)

Documents $ jq .[] < newpipe_subscriptions_202211192224.json |head
"0.24.1"
991
[
{
"service_id": 0,
"url": "https://www.youtube.com/channel/UCJk5KVaJVBEEl_jP5gKjoDw",
"name": "3D Printing Professor"
},
{
"service_id": 0,

3D Printing Professor

Welcome to 3D Printing Professor. Weekly upload of 3D printing, 3D modeling, cool projects, tutorials, do it yourself solutions, and family friendly fun. If you would like to send me anything, you can post it to: 3D Printing Professor Joe Larson P.O. Box 689 Hurricane, UT 84737 USA

YouTube
@RL_Dane I would pluck out the .url and .name properties, print both of them in a tabular form (jq has something to display in csv form, or seperate them using any seperator character) and run grep on that. I don't have access to me desktop so I can't give a better example now.

@retronav

I broke down and just deleted all 170ish YouTube subs from within NewPipe 😂

It wasn't too hard to do, mentally:
if (num_subscriptions > 2000) {
delete_sub();
}

lol

#PeerTubeNeedsSomeLove