Conversation
Notices
-
Embed this notice
Jake (formerly sjw) :lain_sneed: (j@bae.st)'s status on Friday, 13-Sep-2024 05:16:42 JST Jake (formerly sjw) :lain_sneed: @lanodan @hj what would be the postgres query to export a user's followers? -
Embed this notice
:blank: (i@declin.eu)'s status on Friday, 13-Sep-2024 05:16:28 JST :blank: @j @shitpisscum @lanodan @hj psql | xargs -n 16 cp -t dest ... to do it in smaller batches, or psql | xargs -I AAA cp AAA dest/ to do one file at a time
or readline, or any other for loop, but bash substitution -
Embed this notice
Jake (formerly sjw) :lain_sneed: (j@bae.st)'s status on Friday, 13-Sep-2024 05:16:29 JST Jake (formerly sjw) :lain_sneed: @i @shitpisscum @lanodan @hj now isn't this some shit?
How can I tie split into this to make it work?
Screenshot_20240912-102611~2.png -
Embed this notice
:blank: (i@declin.eu)'s status on Friday, 13-Sep-2024 05:16:30 JST :blank: @j @shitpisscum @lanodan @hj select split_part(upload->>'href','/', 5) from (select jsonb_array_elements(data->'url') as upload from objects where data->>'actor' = (select ap_id from users where nickname = 'CHANGEME')) where upload->>'type' = 'Link'; -
Embed this notice
Jake (formerly sjw) :lain_sneed: (j@bae.st)'s status on Friday, 13-Sep-2024 05:16:31 JST Jake (formerly sjw) :lain_sneed: @shitpisscum @i @lanodan @hj what about to get a list of all the files uploaded by a user so I can hard link them in a directory and then tar them up? -
Embed this notice
shitpisscum (shitpisscum@mrhands.horse)'s status on Friday, 13-Sep-2024 05:16:32 JST shitpisscum @i @j @lanodan @hj
>easier to run two queries
Why not just union these queries?
select concat(nickname, '@bae.st')
from users
join (
select following_id
from following_relationships
where follower_id = (
select id
from users
where nickname = 'CHANGEME'
)
) as _user on users.id = _user.following_id
where users.local = 't'
union
select nickname
from users
join (
select following_id
from following_relationships
where follower_id = (
select id
from users
where nickname = 'CHANGEME'
)
) as _user on users.id = _user.following_id
where users.local = 'f'; -
Embed this notice
:blank: (i@declin.eu)'s status on Friday, 13-Sep-2024 05:16:34 JST :blank: @j @lanodan @hj probably easier to run two queries than complicate the sql futher
select concat(nickname, '@bae.st') from users join (select following_id from following_relationships where follower_id = (select id from users where nickname = 'CHANGEME')) as _user on users.id = _user.following_id where users.local = 't';
select nickname from users join (select following_id from following_relationships where follower_id = (select id from users where nickname = 'CHANGEME')) as _user on users.id = _user.following_id where users.local = 'f'; -
Embed this notice
Jake (formerly sjw) :lain_sneed: (j@bae.st)'s status on Friday, 13-Sep-2024 05:16:35 JST Jake (formerly sjw) :lain_sneed: @i @lanodan @hj how can I make it add the @domain.tld to local accounts so it can be imported on other servers? -
Embed this notice
:blank: (i@declin.eu)'s status on Friday, 13-Sep-2024 05:16:36 JST :blank: @j @lanodan @hj select nickname instead of ap_id and csv import will work -
Embed this notice
Jake (formerly sjw) :lain_sneed: (j@bae.st)'s status on Friday, 13-Sep-2024 05:16:37 JST Jake (formerly sjw) :lain_sneed: @i @hj @lanodan wait can this resulting list be able to be imported in pleroma setting? That's what I need. Pleroma can't do more than 1 page so I have to pull it for people from the database directly so they can import it on other servers. -
Embed this notice
Jake (formerly sjw) :lain_sneed: (j@bae.st)'s status on Friday, 13-Sep-2024 05:16:38 JST Jake (formerly sjw) :lain_sneed: @i @lanodan @hj thank you -
Embed this notice
:blank: (i@declin.eu)'s status on Friday, 13-Sep-2024 05:16:39 JST :blank: @j @lanodan @hj single quote ' not double " quote for sql -
Embed this notice
Jake (formerly sjw) :lain_sneed: (j@bae.st)'s status on Friday, 13-Sep-2024 05:16:40 JST Jake (formerly sjw) :lain_sneed: ERROR: column "nepiant" does not exist
-
Embed this notice
:blank: (i@declin.eu)'s status on Friday, 13-Sep-2024 05:16:41 JST :blank: @j @lanodan @hj this
select ap_id from users join (select following_id from following_relationships where follower_id = (select id from users where nickname = 'CHANGE ME')) as _user on users.id = _user.following_id; -
Embed this notice
pistolero (p@fsebugoutzone.org)'s status on Thursday, 03-Oct-2024 22:52:09 JST pistolero @i @j @hj @lanodan What I do is just pipe it through awk.
psql -q -A -t -f query | '$0!~/@/{print $0 "@bae.st";next} 1;' > x.csvAnother Linux Walt Alt likes this.
-
Embed this notice