You are not logged in.

#1 2024-02-02 21:09:27

raphaelabb
Member
From: France
Registered: 2021-02-03
Posts: 22

[SOLVED] Search archlinux forum function

Hello,

I've added this function in my .bashrc file:

function archforum() {
	S="$@"
	firefox  "https://bbs.archlinux.org/search.php?keywords=${S}&action=search"
}

but it will search both in message text and topic subject.
How can I make it search in topic subject only?

Last edited by raphaelabb (2024-02-03 21:50:29)

Offline

#2 2024-02-02 23:13:50

seth
Member
Registered: 2012-09-03
Posts: 48,398

Re: [SOLVED] Search archlinux forum function

"&search_in=-1"

When you're using the search function with the desired configuration, you can see the complete action in the urlbar of your browser.

Offline

#3 2024-02-03 09:20:25

raphaelabb
Member
From: France
Registered: 2021-02-03
Posts: 22

Re: [SOLVED] Search archlinux forum function

seth wrote:

"&search_in=-1"

When you're using the search function with the desired configuration, you can see the complete action in the urlbar of your browser.

That's what I was trying to do but when I look in the urlbar after the search I get a search ID:

 https://bbs.archlinux.org/search.php?search_id=377615461 

However, your answer gave me the idea to look inside the source code of the page and I found the "&show_as=topics" parameter which I missed in the URL of my function.

I have tried with and without "&search_in=-1", with "&search_in=-1" the search only shows topics with the keyword in their title and without "&search_in=-1" the search also shows topics with the keyword in the posts. So I need this parameter as well.

firefox  "https://bbs.archlinux.org/search.php?keywords=${S}&action=search&show_as=topics&search_in=-1"

Thank you for the help.

Last edited by raphaelabb (2024-02-03 09:25:11)

Offline

#4 2024-02-03 13:51:13

lothar_m
Member
From: Cyberspace
Registered: 2010-04-25
Posts: 32

Re: [SOLVED] Search archlinux forum function

Perhaps surfraw could be of use here archwiki link.
Unfortunately it seems to be missing an way to search the arch forum (at least i could not find an elvi for it).

Last edited by lothar_m (2024-02-03 14:09:58)


“Clearly, Field Marshal Haig is about to make yet another gargantuan effort to move his drinks cabinet six inches closer to Berlin.”

Offline

Board footer

Powered by FluxBB