WikiTaskTutorial/Text

From BITPlan Wiki
Revision as of 09:23, 27 April 2020 by Wf (talk | contribs) (pushed from https://partner.bitplan.com)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


This is an example for accessing a Text document from a Wikitask.

The example document is http://artscene.textfiles.com/history/essays/pcascii.txt


you may also try ...

template

@args() {
  org.sidif.wiki.WikiTask wikiTask
}
@import java.net.URL
@{ 
  class Text {
    String text;
    Throwable error;

    public Text(String url) {
      try {
        InputStream is = new URL(url).openStream();
        text=org.apache.commons.io.IOUtils.toString(is, "UTF-8");
      } catch (Throwable th) { 
        error=th;
      }
    }
  }
  Text text=new Text(wikiTask.getInput());
}
The text @(wikiTask.getInput())
@if(text.error) {  
can not be opened due to error @(text.error.getMessage())
} else { 
has the following content:
<pre>
@text.text
</pre>
}

wikitask

{{wikitask|cmd=runtemplate|input= http://artscene.textfiles.com/history/essays/pcascii.txt|engine=Rythm|template={{FULLPAGENAMEE}}#template|targetpage={{FULLPAGENAMEE}}#result}}

runtemplate -> WikiTaskTutorial/Text#result

result

The text http://artscene.textfiles.com/history/essays/pcascii.txt has the following content:


History of the PC Ascii Scene 
(As viewed by the eyes of one that lived it.) 
by Necromancer, 06-Mar-1998

(Text taken in most part from a previous article in The Product 
2, but I had to update quit a bit of it.) 
Ascii Art as an idea coalesced into existence bceause people 
wanted more. They wanted more than just your standard Hercules 
display Atari or your Monochrome Commodore 64. To meet this 
demand, one singular artist, whose name is lost to the annals of 
history decided to take the plunge. Instead of text, he (or she) 
had the ingenuity to use the characters /, \, |, -, _ and 
whatever else came to mind to create words. An amazing idea. 

And a perfect one. People latched onto this. Anyone that could 
display text could display ascii art. It was fast, compact, 
independant of platform type, and one group in particular set 
their sights on it the most, the then-thriving Amiga scene. It 
was perfect for Bulletin Board Systems, text-based adventures, 
for anything they could think of. Perfect then, and to this day 
for file descriptions. 

While ascii dominated the Amiga scene, the PC scene was giving 
birth to an art medium of their own, ANSI. Colored blocks. Oh, 
the wonders. But there were people that weren't satisfied with 
ANSI, they had seen ascii art, and it had captivated their 
imaginations. Some people believe that demand creates supply, 
and because of this, ascii was tentatively introduced to the PC 
scene as an art form. 

Tinyz, a member of the Amiga scene warez group Katharsis, 
recognized the demand, and started in on the supply. A one-man 
art group was created by Tinyz, and this introduced what had 
long been Amiga-only art (and previously Commodore 64, but not 
to the extent of the Amiga scene) into the PC art scene. 
Katharsis!Ascii was implemented in March of 1994. Tinyz soon 
found kindred spirits, and more artists joined Katharsis!Ascii, 
now known as plain Katharsis, or KTS. Others tried to duplicate 
Tinyz and the way he brought ascii art to the scene, but to no 
avail. Tinyz was the first to establish a true ascii-only art 
group in the PC art scene. Previous to Tinyz, there were only a 
few ascii artists that were as known as Tinyz, one of those 
being Piromaniak of TRiBE.But no one had the grip on the 
proverbial ascii testicles in the PC scene that KTS!Ascii did. 
That is, until Remorse rose out of the dirt and mooned Katharsis 
with it's hairy collective buttocks. 

I, along with Necronite (then of ex-Union, Shiver) felt that our 
art wasn't the quality KTS was looking for, so we decided to 
start our own ascii art group, dubbed Remorse, and started in 
October of 1994. Originally, it was meant to be in homage to 
Tinyz and KTS, but it didn't quite turn out that way. Remorse 
quickly gained members that produced quality art, and was KTS's 
first actual competition. Oh, RMRS and KTS didn't realize it at 
first, but within a few months, Remorse spurred KTS's release of 
"THE-NME.TXT," which was one giant "I'm better than you" 
directed towards Remorse. 

While the Remorse death/rebirth drama was being acted out (I'll 
exclude that from this -- you can find the history of Remorse 
elsewhere), several groups decided to follow in the footsteps of 
Remorse and KTS. But it wasn't until the year-long torpor of 
Remorse and the birth of Whodini's love child, Trank, that any 
of these groups started to thrive. With Trank, Whodini recruited 
most of the quality artists from the then-defunct Remorse and 
several new faces. A few of the members of these new groups 
started imitating the style of ts, K-Spiff, KXMode, Mr. Kite and 
Lord Jazz. With this wide-spread imitation came a division to 
the ascii scene: Newschool and oldschool. 

Newschool was more than just the use of the standard /, \, |, -, 
and _. It didn't limit itself to merely an outline, it went a 
step further to add filling and shading. Several artists arose 
that awed the scene with their innovation. Artists such as 
Asphixia (aka J. Hale), Killa Hertz, Nuremberg, later on several 
artists from groups like s0ap (Sons of Ascii Prophets) and 
Noname, artists like Mr. Self Destruct, Discyple, Cain, 
countless others, all showing creativity and talent in the way 
they designed their asciis. 

Unfortunately, the times of the great ascii art era appeared to 
have waned. Not many groups thrive still, Remorse is still 
around, being the longest lived group, along with Odelay and a 
few other smaller ones. The Amiga ascii scene also is not 
thriving as much as it once was, many of the older, once 
highly-active artists are no longer participating as they used 
to. The once deemed unstoppable momentum of the ascii community 
appears to be slowly winding down to a halt. 

But have faith. We will prevail. We were here before you, and we 
will be here long after you. Ascii art has existed since before 
people used hard drives, back when you had to plug your 
Commodore 64 into the TV. It's not just an artform, it's an 
expression, a style. The creative process can never be stifled 
completely, and we will overcome. 

Long live ascii.