From owner-freebsd-questions@FreeBSD.ORG Thu Oct 30 14:47:10 2008 Return-Path: Delivered-To: freebsd-questions@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 632921065673 for ; Thu, 30 Oct 2008 14:47:10 +0000 (UTC) (envelope-from zhangweiwu@realss.com) Received: from bossdog.realss.com (bossdog.realss.com [211.157.114.130]) by mx1.freebsd.org (Postfix) with ESMTP id E17328FC0C for ; Thu, 30 Oct 2008 14:47:09 +0000 (UTC) (envelope-from zhangweiwu@realss.com) Received: from localhost (unknown [127.0.0.1]) by bossdog.realss.com (Postfix) with ESMTP id EB0EE1C004C for ; Thu, 30 Oct 2008 22:47:35 +0800 (CST) Received: from bossdog.realss.com ([127.0.0.1]) by localhost (bossdog.realss.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 16307-04 for ; Thu, 30 Oct 2008 22:47:32 +0800 (CST) Received: from [192.168.1.101] (unknown [61.48.220.248]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by bossdog.realss.com (Postfix) with ESMTP id 99C041C0001 for ; Thu, 30 Oct 2008 22:47:32 +0800 (CST) Message-ID: <4909C8E7.60904@realss.com> Date: Thu, 30 Oct 2008 22:47:03 +0800 From: Zhang Weiwu Organization: Real Softservice User-Agent: Thunderbird 2.0.0.14 (X11/20080621) MIME-Version: 1.0 To: freebsd-questions@FreeBSD.org X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at bossdog.realss.com Cc: Subject: improvement idea of man page of strfile X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 14:47:10 -0000 Original text: OTHER USES What can you do with this besides printing sarcastic and obscene mes- sages to the screens of lusers at login or logout? There are some other possibilities. 1 Include strfile.h into a news reading/posting program, to gener- ate random signatures. Tin(1) does something similar, in a much more complex manner. 2 Include it in a game. While strfile doesn't support 'fields' or 'records', there's no reason that the text strings can't be con- sistent: first line, a die roll; second line, a score; third and subsequent lines, a text message. 3 Use it to store your address book. Hell, some of the guys I know would be as well off using it to decide who to call on Fri- day nights (and for some, it wouldn't matter whether there were phone numbers in it or not). 4 Use it in 'lottery' situations. If you're an ISP, write a script to store login names and GECOS from /etc/passwd in str- file format, write another to send 'congratulations, you've won' to the lucky login selected. The prize might be a month's free service, or if you're AOL, a month free on a real service provider. My improvement ideas: 5 Those who study a foreign language may find it useful to have a word-bank that shows sentences you want to understand better by reading them randomly and include in shell start script. Maybe you can start by picking your favorite novel from wikiquotes and convert the quotes into a format acceptable for strfile, and enjoy one quote every time opening a terminal. 6 Tip-of-the-day for message to show when user started your application. 7 A website of environmental protection can show a tip how to do things with least harm to the environment for every visitor, which simply invoke fortune on every page request, e.g. by using SSI. I know these things work well because I implemented all of use 5, 6 and 7. But being an infrequent participate of OSS I don't know how to contribute this information back to the author / maintainer of the manual (not mentioned in the manual itself). I also worry improving something that hasn't been changed for 10 years could be difficult because nobody wish to move them. What should I do or who should I contact to let them decide if they include my idea in their manual as well? In fact I think the 4th lottery idea isn't better than any of 5, 6, 7 because it is not a full use of strfile, which can produce random text repeatedly (in case of 4, random text is only needed as many time as you decide to give price to someone). And is the change going to spread to other systems that uses strfile? e.g. many Linux distributions contain the strfile manual from BSD distributions.