From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,ecfa1c75092dbeec X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!goblin3!goblin1!goblin.stu.neva.ru!feeder.news-service.com!feeder.news-service.com!94.75.214.39.MISMATCH!aioe.org!.POSTED!not-for-mail From: "John B. Matthews" Newsgroups: comp.lang.ada Subject: Re: Ann: Corporate Bullshit Generator Date: Mon, 20 Jun 2011 12:26:32 -0400 Organization: The Wasteland Message-ID: References: <26d40fa3-eeda-4660-8925-6cdd9c8a0f0c@b1g2000yql.googlegroups.com> NNTP-Posting-Host: LQJtZWzu+iKlBROuDg+IUg.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) X-Notice: Filtered by postfilter v. 0.8.2 Xref: g2news1.google.com comp.lang.ada:19964 Date: 2011-06-20T12:26:32-04:00 List-Id: In article <26d40fa3-eeda-4660-8925-6cdd9c8a0f0c@b1g2000yql.googlegroups.com>, Gautier write-only wrote: > Is there anybody here who could help setting up a JVM applet (through > jgnat) with the CBSG and some HTML or JS code to have the applet > generating, say, an HTML frame or whatever in that fashion? Indeed > any solution with a button on web page titled "More bullshit, > please!" would be welcome. Sorry, I've not used jgnat, but I was thinking about deployment. Client side: ----------- Assuming that jgnat's output is JARable bytecode, JApplet is a reasonable choice, but an application distributed via Java Web Start should work, too. Here's a hybrid example: JEditorPane with setEditable(false) is a convenient container for simple markup (~HTML 3.2). Server side: ----------- If a hosted servlet container is available, here's a simple Java servlet that sends the standard output of a command via an HttpServletResponse: Hosted applications at SourceForge include Trac. I'm not sure if you can add your own wiki macro or if gnat is installed; but here's an example, analogous to the servlet above, that invokes fortune: from trac.wiki.macros import WikiMacroBase import commands class FortuneMacro(WikiMacroBase): """ Return a random fortune. """ revision = "$Rev$" url = "$URL$" def expand_macro(self, formatter, name, args): """ Return a random fortune. """ fortune = commands.getoutput('/usr/games/fortune') fortune = fortune.replace('\n', '
') return fortune Would writing to standard output, as is done in fortune, be a useful default? Yes, I too wish to leverage functional enterprise content interactively! -- John B. Matthews trashgod at gmail dot com