You are not logged in.
Pages: 1
Hey, i know its been covered somewhere how to set up but i cant find ( searching for few hours now ). i found only long version using dig and million other letters , but is much sorter way typing "wiki foo " and gives u answer. its trough dns server, and need to set up mysql and few more bits.
p.s do not get mistaken, im not looking for wiki docs
Thanks ![]()
Last edited by Efka (2014-05-17 23:52:03)
IBM Lenovo ThinkPad T61 ; Lenovo ThinkPad X220; Lenovo ThinkPad T440p; Lenovo Thinkpad W520; Lenovo Thinkpad P71; ThinkPad X1 Yoga Gen1; FrankenPad T25
Asus Z10PE D-16 WS; 2x Intel Xeon E-5 2690V4; 256GB ECC; nVidia Titan V CEO; Intel Core Ultra 7 265K Gigabyte Z890M Gaming X Klevv 7200Mhz 32GB
Offline
sudo pacman -S surfraw
sr archwiki surfrawMoving to NC...
Offline
sudo pacman -S surfraw sr archwiki surfrawMoving to NC...
sorry, thats where i thought i was typing this... sorry again, too many tabs ![]()
p.s quick edit ...i need link where it was complete guide ( step by step ) .. newbie style.
by the way , thanks for this as well ![]()
Last edited by Efka (2014-05-17 19:36:00)
IBM Lenovo ThinkPad T61 ; Lenovo ThinkPad X220; Lenovo ThinkPad T440p; Lenovo Thinkpad W520; Lenovo Thinkpad P71; ThinkPad X1 Yoga Gen1; FrankenPad T25
Asus Z10PE D-16 WS; 2x Intel Xeon E-5 2690V4; 256GB ECC; nVidia Titan V CEO; Intel Core Ultra 7 265K Gigabyte Z890M Gaming X Klevv 7200Mhz 32GB
Offline
or
function archwiki() {
S="$@"
dwb "https://wiki.archlinux.org/index.php?title=Special%3ASearch&search=${S// /+}&go=Go"
}replace dwb by your browser of choice.
You may also link using "lynx --dump" in place of the browser, then adding to the end of that line "| less":
function archwiki() {
S="$@"
lynx --dump "https://wiki.archlinux.org/index.php?title=Special%3ASearch&search=${S// /+}&go=Go" | less
}Last edited by Trilby (2014-05-17 23:15:26)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Trilby it was different way .. "dig +short txt <keyword>.wp.dg.cx" like this but is shorter just only wiki <keywor> only ( if my memory does not lie )
IBM Lenovo ThinkPad T61 ; Lenovo ThinkPad X220; Lenovo ThinkPad T440p; Lenovo Thinkpad W520; Lenovo Thinkpad P71; ThinkPad X1 Yoga Gen1; FrankenPad T25
Asus Z10PE D-16 WS; 2x Intel Xeon E-5 2690V4; 256GB ECC; nVidia Titan V CEO; Intel Core Ultra 7 265K Gigabyte Z890M Gaming X Klevv 7200Mhz 32GB
Offline
Huh?
So you are not looking for a way to do what you want, you are looking for the way you used to do it? How are we supposed to know what you used to do?
Are you just looking for a way to take a dig command and shorten it? If so, that's what functions/aliases are for.
Last edited by Trilby (2014-05-17 19:45:33)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
once i was googling pages about linux and found this "dig +short txt <keyword>.wp.dg.cx" and later i found proper set up for "wiki: keyword" by instaling mysql, apache, dnstools ... and this is the way for me to use wiki in terminal, because it was step by step set up and it takes few minutes to set up, and because im complete newbie with linux experience im looking for this particular setup. sorry if i couldnt explain better .
thanks.
IBM Lenovo ThinkPad T61 ; Lenovo ThinkPad X220; Lenovo ThinkPad T440p; Lenovo Thinkpad W520; Lenovo Thinkpad P71; ThinkPad X1 Yoga Gen1; FrankenPad T25
Asus Z10PE D-16 WS; 2x Intel Xeon E-5 2690V4; 256GB ECC; nVidia Titan V CEO; Intel Core Ultra 7 265K Gigabyte Z890M Gaming X Klevv 7200Mhz 32GB
Offline
This?
wiki() { dig +short txt $1.wp.dg.cx; }Offline
This?
wiki() { dig +short txt $1.wp.dg.cx; }
yeah, something like this ( I posted above one line ) ... is sorter >> wiki:<keyword> and thats it ... nothing else
and for short version i need mysql, apache server, dnstools and manual to set it up, and this is what im looking for
Last edited by Efka (2014-05-17 20:31:33)
IBM Lenovo ThinkPad T61 ; Lenovo ThinkPad X220; Lenovo ThinkPad T440p; Lenovo Thinkpad W520; Lenovo Thinkpad P71; ThinkPad X1 Yoga Gen1; FrankenPad T25
Asus Z10PE D-16 WS; 2x Intel Xeon E-5 2690V4; 256GB ECC; nVidia Titan V CEO; Intel Core Ultra 7 265K Gigabyte Z890M Gaming X Klevv 7200Mhz 32GB
Offline
Efka, do you now how shell functions work. The function jwr posted would make it so you could type "wiki <keyword>" and nothing else.
But if you know you are looking for those three tools, install them, they are all in the repos. They come with manuals.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
tools and soft are not a problem, problem is setting up as im newbie and a column which i found contained information and step by step guide
sorry if i explained incorrectly, hopefuly now i made a bit more clearer ![]()
IBM Lenovo ThinkPad T61 ; Lenovo ThinkPad X220; Lenovo ThinkPad T440p; Lenovo Thinkpad W520; Lenovo Thinkpad P71; ThinkPad X1 Yoga Gen1; FrankenPad T25
Asus Z10PE D-16 WS; 2x Intel Xeon E-5 2690V4; 256GB ECC; nVidia Titan V CEO; Intel Core Ultra 7 265K Gigabyte Z890M Gaming X Klevv 7200Mhz 32GB
Offline
It really isn't clear what you are trying to do, other than the fact that you want a step-by-step guide to do it.
English is clearly not your native language: try posting in the Other Languages board in your mother tongue where you can properly articulate what it is you are looking for.
Offline
We have no way of knowing what guide you followed previously, so we can't possibly locate it for you. We can help you set it up again. And how much more step-by-step can you get than copying and pasting a three line function? What is wrong with the functions provided above? If they don't do what you want, we can improve them - but you need to communicate better.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
While we're waiting for more complete details, I'll just add that IMO installing mysql, apache, and dnsutils just so you can search wikis from the command line is bloat, overkill, and more bloat.
Offline
nothing wrong i just dont know where to put them
this is the reason why im looking for this particular article/setup ... it was simple and easy for me to understand (like arch beginers guide), and i dont like to keep poping in and keep asking questions about simple ( for others) scripts, installations ect ect, and, maybe that article would be helpfull for others like me ![]()
jason ... in my language is not many forums about linux and all of them very quiet.
IBM Lenovo ThinkPad T61 ; Lenovo ThinkPad X220; Lenovo ThinkPad T440p; Lenovo Thinkpad W520; Lenovo Thinkpad P71; ThinkPad X1 Yoga Gen1; FrankenPad T25
Asus Z10PE D-16 WS; 2x Intel Xeon E-5 2690V4; 256GB ECC; nVidia Titan V CEO; Intel Core Ultra 7 265K Gigabyte Z890M Gaming X Klevv 7200Mhz 32GB
Offline
You'd put it in your shellrc file ![]()
Every guide has to have some starting assumptions. We all (I suspect) assumed you knew how to use shell functions - not all archers do, but then not all archers want to have handy commands to use in the terminal. As you asked for a way to do this in the terminal, I gathered you use the terminal regularly - and I can't imagine someone using the terminal regularly and not knowing how to edit the shellrc files.
So step by step: open ~/.bashrc (if you use bash) in your favorite text editor. Paste one of the functions above into it. (re)start your terminal. Then you can type "wiki searchword". Note each of the functions about work slightly differently, and all may need to be adjusted to do exactly what you want - but any of them should be a start.
As for asking simple questions - I think this forum is very welcoming to any level of question, as long as the person asking is willing to participate in the process and learn.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
jason ... in my language is not many forums about linux and all of them very quiet.
Offline
While we're waiting for more complete details, I'll just add that IMO installing mysql, apache, and dnsutils just so you can search wikis from the command line is bloat, overkill, and more bloat.
well, as im not that geeky i dont care if its overkill or no , at the minute its very very handy and quick , mutch quicker to use terminal ( press F1) tilda pops out, type in wiki keyword pres enter and thats it. for me its time saving "module" i should say. and on another side ... mysql, apache is for web pages as well , and sometimes i like to fiddle about with web pages (i went to colledge to study IT and web design many many years ago) so i still have a bit of atraction to web design ( once in a blue moon ) so one shot two rabbits
.
Efka wrote:jason ... in my language is not many forums about linux and all of them very quiet.
I would love to see this forum ( languages i know ) active but....
You'd put it in your shellrc file
Every guide has to have some starting assumptions. We all (I suspect) assumed you knew how to use shell functions - not all archers do, but then not all archers want to have handy commands to use in the terminal. As you asked for a way to do this in the terminal, I gathered you use the terminal regularly - and I can't imagine someone using the terminal regularly and not knowing how to edit the shellrc files.
So step by step: open ~/.bashrc (if you use bash) in your favorite text editor. Paste one of the functions above into it. (re)start your terminal. Then you can type "wiki searchword". Note each of the functions about work slightly differently, and all may need to be adjusted to do exactly what you want - but any of them should be a start.
As for asking simple questions - I think this forum is very welcoming to any level of question, as long as the person asking is willing to participate in the process and learn.
emm, thats the point... "handy commands to use in terminal" . I know how to edit things, but if no exponation what file to edit - im pretty useless,, plus i know that terminal is linux main command window , so i need to utillise what is given to me by the system
and its easy to use ( i use terminal more then file manager) because i know some commands and its quick easy and handy ![]()
barshrc i know this file and i have this file , and now i know where to put these command lines
Thank you , my search for other easy steps is over as long as it gives me what i want and if not, i will look for other options/improvents ![]()
IBM Lenovo ThinkPad T61 ; Lenovo ThinkPad X220; Lenovo ThinkPad T440p; Lenovo Thinkpad W520; Lenovo Thinkpad P71; ThinkPad X1 Yoga Gen1; FrankenPad T25
Asus Z10PE D-16 WS; 2x Intel Xeon E-5 2690V4; 256GB ECC; nVidia Titan V CEO; Intel Core Ultra 7 265K Gigabyte Z890M Gaming X Klevv 7200Mhz 32GB
Offline
use terminal ( press F1) tilda pops out, type in wiki keyword pres enter and thats it.
sudo pacman -S surfraw sr archwiki surfraw
Seriously. And it doesn't require mysql, apache or any of that other unnecessary bloat.
Read this: https://wiki.archlinux.org/index.php/Surfraw
Offline
I think surfraw will be your best bet for this too. I like the simpler functions - but they may require some tinkering. Surfraw will "just work". Or at least it will once you define the surfraw browser variable.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
i dont want results in web browser, im very multi tabie person, and im allways 10+ tabs, so surfraw does not work , well it works but not in the way i want
i need complete terminal based thing
f1 + wiki moon + enter - quick read in this same terminal + Esc = info is in my head
no tabbing, no web browsers
You know ... arch way
by the way ... just got one idea ... can i make allias for "dig +short txt <keyword>.wp.dg.cx" , shall we say allias wiki = dig +short txt <$keyword or $name>.wp.dg.cx ... or im going into different direction and its all wrong?
IBM Lenovo ThinkPad T61 ; Lenovo ThinkPad X220; Lenovo ThinkPad T440p; Lenovo Thinkpad W520; Lenovo Thinkpad P71; ThinkPad X1 Yoga Gen1; FrankenPad T25
Asus Z10PE D-16 WS; 2x Intel Xeon E-5 2690V4; 256GB ECC; nVidia Titan V CEO; Intel Core Ultra 7 265K Gigabyte Z890M Gaming X Klevv 7200Mhz 32GB
Offline
That's the right idea - but aliases can only fill in a prefix essentially - they can't take parameters. So you'll need to use a function. See JWR's example in post #8. I have no idea how the dig command works, but if that command does what you want, JWR's function should produce the results you want. Or see my edit to post #4 for another approach.
Last edited by Trilby (2014-05-17 23:15:50)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
JWR`s line produces good results but only small section of article ( this same with my posted line ) and i need to go to wikipedia to read rest of the article which isnt better then surfraw
...shame i cant remmember a thing about setup with mysql so i cant tell if i found what i want or no
oh well .... for the start i think this should b enough ... maybe in the future i will find what im looking for.
Thank You all for the support !
i will mark this thread solved and move to the next articles
its a lot to learn and a lot to read and much more to write
Cheers .
IBM Lenovo ThinkPad T61 ; Lenovo ThinkPad X220; Lenovo ThinkPad T440p; Lenovo Thinkpad W520; Lenovo Thinkpad P71; ThinkPad X1 Yoga Gen1; FrankenPad T25
Asus Z10PE D-16 WS; 2x Intel Xeon E-5 2690V4; 256GB ECC; nVidia Titan V CEO; Intel Core Ultra 7 265K Gigabyte Z890M Gaming X Klevv 7200Mhz 32GB
Offline
i dont want results in web browser, im very multi tabie person, and im allways 10+ tabs, so surfraw does not work , well it works but not in the way i want
i need complete terminal based thing
f1 + wiki moon + enter - quick read in this same terminal + Esc = info is in my head
no tabbing, no web browsers
You know ... arch way
If you bothered to read the surfraw documentation, you'd see that the results are returned in w3m/3links/links/your terminal browser of choice. Or, if you are really insistent on bypassing the browser, you can have surfraw just dump the output into the term, but that doesn't help if you want to access any linked material.
Offline
Efka wrote:i dont want results in web browser, im very multi tabie person, and im allways 10+ tabs, so surfraw does not work , well it works but not in the way i want
i need complete terminal based thing
f1 + wiki moon + enter - quick read in this same terminal + Esc = info is in my head
no tabbing, no web browsers
You know ... arch way
If you bothered to read the surfraw documentation, you'd see that the results are returned in w3m/3links/links/your terminal browser of choice. Or, if you are really insistent on bypassing the browser, you can have surfraw just dump the output into the term, but that doesn't help if you want to access any linked material.
i did, but i couldnt find anything about terminal option ( my bad ) ... so i will try surfraw then ! and i will read surfraw column again
Thank You ![]()
IBM Lenovo ThinkPad T61 ; Lenovo ThinkPad X220; Lenovo ThinkPad T440p; Lenovo Thinkpad W520; Lenovo Thinkpad P71; ThinkPad X1 Yoga Gen1; FrankenPad T25
Asus Z10PE D-16 WS; 2x Intel Xeon E-5 2690V4; 256GB ECC; nVidia Titan V CEO; Intel Core Ultra 7 265K Gigabyte Z890M Gaming X Klevv 7200Mhz 32GB
Offline
Pages: 1