Fortune 매크로 플러그인은 GNU fortune프로그램을 이용한 매크로입니다.

<!> 현재 유닉스만 지원하며 다음을 만족시켜야 합니다.
  1. fortune이 설치되어 있어야 한다. /usr/bin/fortune, /usr/share/games/fortune/
  2. 이게 맞지 않는다면 $fortune_dir="/to_my_fortune_dir";라는 식의 설정을 config.php에 넣어줍니다.
    • 모니위키 1.1.5 이전 버전의 경우에는 plugin/Fortune.php파일을 직접 수정해주어야 합니다.

사용예

[[Fortune]] (default art)
X windows: You'd better sit down. Don't laugh. It could be YOUR thesis project. Why do it right when you can do it wrong? Live the nightmare. Our bugs run faster. When it absolutely, positively HAS to crash overnight. There ARE no rules. You'll wish we were kidding. Everything you never wanted in a window system. And more. Dissatisfaction guaranteed. There's got to be a better way. The next best thing to keypunching. Leave the thrashing to us. We wrote the book on core dumps. Even your dog won't like it. More than enough rope. Garbage at your fingertips. Incompatibility. Shoddiness. Uselessness. X windows.


[[Fortune(love)]]
Love is the triumph of imagination over intelligence. -- H. L. Mencken


[[Fortune(*)]]
My cup hath runneth'd over with love.

특징

Fortune 매크로는 fortune파일의 인덱스를 직접 읽어들여 사용하므로 RandomQuote매크로보다 매우 빠릅니다. :)

Fortune 파일 직접 설치하기

fortune 파일을 직접 설치하실 수 있습니다. 예를 들어 data/fortune 디렉토리를 만들어 여기에 fortune 파일을 복사해 넣고, config.php$fortune_dir="data/fortune"; 식으로 디렉토리를 직접 지정해 넣으면 됩니다.
Retrieved from http://memorecycle.iptime.org/w/wiki.php/FortunePlugin
last modified 2025-05-25 06:22:06