Generating nixers introductions with the shell. - Programming On Unix
Users browsing this thread: 2 Guest(s)
|
|||
Hello, children. Today I will walk you through letting
the computer generate an introduction to the nixers forum, automatically! It is very easy. First, you run this command: Code: curl http://venam.nixers.net/nixers_intro.html | awk '/div class="code">/ { p=1 } p { print($0) } /<\/div/ { p=0}' | sed 's/<[^>]\+>//' | awk '$0!~/^$/ { print($0) }' | sed 's/^ //' >intros This downloads a bunch of existing nixers introductions from venams website (I really hope he updates that one day so that we have EVEN MORE DATA!). Then you download a neat little markov chain generator by mpu (godlike!): Code: curl http://c9x.me/cbits/markov.c >markov.c Now, we're ready to go! Our intro will contain of 10 unstructured, hilarious sentences. We run Code: ./markov -c 10 intros The result may look somewhat like this: Code: >>> god is here to learn. I especially like the last sentence generated. It sums up the community pretty well. This enthusiastic, but also slightly insane style of language. I hope you liked my little excurse into 'just using a utility'. Have a nice day. |
|||
Messages In This Thread |
Generating nixers introductions with the shell. - by pranomostro - 18-04-2016, 04:42 PM
RE: Generating nixers introductions with the shell. - by crypto - 18-04-2016, 04:53 PM
RE: Generating nixers introductions with the shell. - by neeasade - 18-04-2016, 04:55 PM
RE: Generating nixers introductions with the shell. - by crypto - 18-04-2016, 04:58 PM
RE: Generating nixers introductions with the shell. - by venam - 19-04-2016, 12:24 AM
RE: Generating nixers introductions with the shell. - by venam - 19-04-2016, 01:49 AM
RE: Generating nixers introductions with the shell. - by pranomostro - 19-04-2016, 05:36 AM
RE: Generating nixers introductions with the shell. - by venam - 19-04-2016, 06:04 AM
RE: Generating nixers introductions with the shell. - by pranomostro - 19-04-2016, 12:26 PM
RE: Generating nixers introductions with the shell. - by venam - 19-04-2016, 01:05 PM
|