You are not logged in.

#1 2010-11-14 15:58:43

infested999
Member
Registered: 2010-10-02
Posts: 48

Can everything be done in a script?

Everything in the Wiki looks like it is just a list of commands that you must type one by one.

Could we make a new standard that at the end of every section, all the code must be lined up all in one code box, so that we can easily copy paste the while bash script and run all the commands at once?

Offline

#2 2010-11-14 16:00:53

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Can everything be done in a script?

While that does sound convenient, there's a big risk all people will do is just copy/paste, and skip the reading.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#3 2010-11-14 22:40:20

lavandero
Member
Registered: 2010-11-13
Posts: 6

Re: Can everything be done in a script?

so, in short, "no because people are stupid"?

isnt that the polar opposite of simple implementation vs simple as in retard-proof?


anyway, the {{codeline}} template could act as an >> operator in sh, and with some wiki magic the content could be automatically concatenated at the end of the article if the total {{codeline}} added lines are over number x, so as to not to repeat when it doesn't make sense.

otherwise, i don't think expecting editors to copy paste everything, including quick, intermediate edits, is realistic. that would effectively double the maintenance cost, if characters inputted passes as a credible metric, for not enough gain.

Last edited by lavandero (2010-11-14 22:41:17)

Offline

#4 2010-11-14 22:55:48

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Can everything be done in a script?

If you come here expecting to copy and paste, you are doing it wrong...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2010-11-14 22:57:31

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: Can everything be done in a script?

infested999 wrote:

Everything in the Wiki looks like it is just a list of commands that you must type one by one.

I disagree. For example, the wiki pages I wrote for Seq24 and Udiskie are full of information, usage instructions, and quirks, but only a few CLI commands.

Even the Beginner's Guide is much more about information than it is about retyping commands from it in my opinion. Also, I skipped a LOT in the Beginner's Guide, such as WiFi setup, Nvidia driver setup, KDE and GNOME setup, and so on, because I don't use them.

Instead of the Arch Wiki, would something like the Arch Linux Afterglow Edition be what you are looking for?

Offline

#6 2010-11-14 23:09:24

lavandero
Member
Registered: 2010-11-13
Posts: 6

Re: Can everything be done in a script?

hmm, i guess that's right. deciphering a script with conditionals is too scary for casual users; it's best to lay it out in christian.

Offline

#7 2010-11-14 23:34:02

sisco311
Member
From: Romania
Registered: 2008-05-23
Posts: 112

Re: Can everything be done in a script?

If you are using firefox,  check out the foxrunner extension.


don't drink unwashed fruit juice.
i never make predictions, especially about the future.

Offline

#8 2010-11-15 01:45:11

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,231
Website

Re: Can everything be done in a script?

lavandero wrote:

so, in short, "no because people are stupid"?

Yup. Then us in the forums have to deal with the "I copied and pasted without understanding anything" posts.

Offline

#9 2010-11-15 15:55:13

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: Can everything be done in a script?

There are a lot of commands in the wiki that require some level of understanding. Sometimes multiple commands could be used to carry out one basic goal. Think of a script that would partition your hard drive or setup a raid. Could you imagine what could go wrong with a copy and paste script? Arch is a do-it-yourself distro... not a copy and paste distro.

You use ARCH to UNDERSTAND your SYSTEM!


Website - Blog - arch-home
Arch User since March 2005

Offline

#10 2010-11-15 16:35:50

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

Re: Can everything be done in a script?

lavandero wrote:

anyway, the {{codeline}} template could act as an >> operator in sh, and with some wiki magic the content could be automatically concatenated.

Speaking of magic... if you really want to extract all {{codeline}} into a script, and you're not already doing it, you're not a very good magician.
For example, something like this

curl -s $url_to_wiki_page | sed 's/<\/\?pre>/\n&\n/g' | sed '/<pre>/,/<\/pre>/!d' | html2text | sed '/^[#$] \(.*\)$/!d;s//\1/'

might get you started.


This silver ladybug at line 28...

Offline

#11 2010-11-15 18:02:40

lavandero
Member
Registered: 2010-11-13
Posts: 6

Re: Can everything be done in a script?

lolilolicon wrote:
lavandero wrote:

anyway, the {{codeline}} template could act as an >> operator in sh, and with some wiki magic the content could be automatically concatenated.

Speaking of magic... if you really want to extract all {{codeline}} into a script, and you're not already doing it, you're not a very good magician.
For example, something like this

curl -s $url_to_wiki_page | sed 's/<\/\?pre>/\n&\n/g' | sed '/<pre>/,/<\/pre>/!d' | html2text | sed '/^[#$] \(.*\)$/!d;s//\1/'

might get you started.

The middle pipe could be done with a single sed call, but instead of getting anal on your script, I'll try to draw attention to the topic. Besides, that would have to be adapted to handle <pre> and *indent*<nowiki> etc.

Seems funny, but since MediaWiki is already doing the job of parsing its syntax, it'd be a whole lot easier to make it dump it as well. And by that I mean no one should attempt to improve a MediaWiki parser in sed or, god forbid, perl, awk, etc.

Offline

#12 2010-11-15 18:57:20

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

Re: Can everything be done in a script?

lavandero wrote:

The middle pipe could be done with a single sed call, but instead of getting anal on your script, I'll try to draw attention to the topic. Besides, that would have to be adapted to handle <pre> and *indent*<nowiki> etc.

Instead of picking on my one-liner and calling it a script, why didn't you read a bit carefully where I said "to get you started"? By the way, that "you" wasn't about you, but infested999, actually.
Also, you are talking about OT, where the topic is infested999 asking if he can have all the code extracted into one script and hence, I was providing him a solution. Your disagreeing with my solution does not bend the truth that I, with my solution, was perfectly on topic.

lavandero wrote:

Seems funny, but since MediaWiki is already doing the job of parsing its syntax, it'd be a whole lot easier to make it dump it as well. And by that I mean no one should attempt to improve a MediaWiki parser in sed or, god forbid, perl, awk, etc.

No one is attempting to improve a MediaWiki parser. While naturally the server side parsing always is "a whole lot easier", by that, you are asking the server to add a redundant block of code on almost every wiki page, which will cause unnecessary server load, bandwidth usage, annoyance and other problems already mentioned in this thread.

Bitching aside, I insist we looked into satisfying the OP's need and getting the job done. Anyway, I'm done with this shit.

Last edited by lolilolicon (2010-11-15 19:09:52)


This silver ladybug at line 28...

Offline

#13 2010-11-16 01:01:54

lavandero
Member
Registered: 2010-11-13
Posts: 6

Re: Can everything be done in a script?

lol

Offline

#14 2010-11-16 01:10:24

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Can everything be done in a script?

lavandero, if you don't have anything constructive to add to the conversation, don't post. And the minimum requirement here is to show respect for the other members of the forum:

https://wiki.archlinux.org/index.php/Fo … ther_Users


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#15 2010-11-18 20:58:18

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: Can everything be done in a script?

infested999 wrote:

Can everything be done in a script?

Yes, yes. That has been done already.

Offline

#16 2010-11-18 22:49:21

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,231
Website

Re: Can everything be done in a script?

Misfit138 wrote:

Yes, yes. That has been done already.

Win.

Offline

#17 2010-11-24 02:33:46

crouse
Arch Linux f@h Team Member
From: Iowa - USA
Registered: 2006-08-19
Posts: 907
Website

Re: Can everything be done in a script?

Misfit138 wrote:
infested999 wrote:

Can everything be done in a script?

Yes, yes. That has been done already.


There you guys go again... forcing me to have to clean my laptop screen again.

/me notes not to take a drink of pop before reading forum posts again....

Back On Topic...
Having all the commands "nicely" rolled up into one script for you totally defeats the purpose of this distro, for me at least.
No offense intended here, but, if your not able to do that yourself, for yourself... this distro probably isn't for you anyway, imho.

Last edited by crouse (2010-11-24 02:37:49)

Offline

#18 2010-11-24 03:53:02

Julius2
Member
From: Canada
Registered: 2009-05-13
Posts: 68
Website

Re: Can everything be done in a script?

I'm going to weigh in on this one by saying that it's a singularly bad idea. Most wiki pages exist to examine different possible options. Furthermore, the actual codelines are usually only basic stuff (the install command, for instance). What is important is the information about usage and configuration that would be why people (hopefully) read it in the first place. I hope that every Arch user is able to install something using pacman; learning about the software is another thing.

Also, saying that it's "retard-proof" (as you so eloquently put it) rather than "simple implementation" -- I would like to disagree, and to say that your option is more "retard-enabling". It's the same reason why Arch isn't autoconfigured (or, at least, not autoconfigured to the extent that something like Ubuntu is). If people are going to learn about the (generally Arch-specific) main configuration files, they're never going to even get as far as ... well, anything beyond a fresh install and a command line with a cursor blinking at them. To support autoconfiguration, Arch would need to already ship with window manager and perhaps a desktop environment already pre-packaged along with a lot of other software. Suddenly, you start to get something that resembles a large cholesterol-induced blockage more and more ...

Your idea for a script that simply scrapes the wiki page for commands and code is a similar idea; to stop it from being too harmful, people would have to limit what they put on wiki pages in terms of direct commands. Suddenly you're decreasing the human readability while trying to increase the machine readability.

In summary: bad, bad, bad. If you want to make something like that, go ahead, but don't expect good results.


Blog .:. AUR .:. Wiki Contributions
Registered Linux User #506070.

Offline

#19 2010-11-24 05:15:51

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: Can everything be done in a script?

Arch is already "retard-proof". Retards bungle their installations and leave exasperated.

+1 to Julius2's comment


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#20 2010-11-28 17:27:15

trusktr
Banned
From: .earth
Registered: 2010-02-18
Posts: 907
Website

Re: Can everything be done in a script?

haha that's exactly right fsckd!


joe@trusktr.io - joe at true skater dot io.

Offline

#21 2011-01-06 18:44:59

daniel2010
Member
Registered: 2010-12-01
Posts: 2

Re: Can everything be done in a script?

If you need to learn more about linux commands just visit that site

Offline

#22 2011-01-06 21:52:54

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,231
Website

Re: Can everything be done in a script?

Welcome to the forums, but please...
https://wiki.archlinux.org/index.php/Fo … Bumping.27

Offline

#23 2011-01-06 22:01:01

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: Can everything be done in a script?

fukawi2 wrote:

Welcome to the forums, but please...
https://wiki.archlinux.org/index.php/Fo … Bumping.27

It's from November 2010. Not that old if you ask me. wink

Offline

#24 2011-01-06 22:04:00

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Can everything be done in a script?

Not that old, but definitely done.

Closing...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB