Hallo Zusammen, ich mit fortune ein wenig am rumspielen. Wie habt ihr das gelöst, das bei jeder Mail ein anderer Spruch erscheint ? Gruß Michael -- The sunlights differ, but there is only one darkness. -- Ursula K. LeGuin, "The Dispossessed" Registered Linux User #228306 ICQ #151172379 http://counter.li.org GNU GPG-Key ID 0140F88B
Am Montag, 10. Juni 2002 06:11 schrieb Michael Raab:
Hallo Zusammen,
ich mit fortune ein wenig am rumspielen. Wie habt ihr das gelöst, das bei jeder Mail ein anderer Spruch erscheint ?
Hallo Michael, Wenn du KMail als Mailclient benutzt, dann kannst du das im Menü "Einstellungen" unter "Signatur" einrichten. Dort gibst du an "Signatur aus Datei benutzen" und aktivierst "Die Datei ist ein Programm". Anschließend musst du nur noch das Programm (z.B. fortune) in's Feld eintragen. Bei anderen MUAs kann ich dir das leider nicht sagen. Allerdings muss du dir die Signaturen genau angucken. Das Programm bietet zwar eine Option, dass nur kurze Sprüche ausgegeben werden sollen ("fortune -s" für short im Gegensatz zu "fortune -l" für long), aber mit meiner verwendeten Datenbank (das war "Humorix", die ich irgendwo aus dem Netz gesaugt habe und die hauptsächlich Sprüche und Kommentare über Linux enthielt) hat mir fortune trotz -s manchmal Signaturen über 20 Zeilen (!!!) ausgegeben. Also aufpassen, wenn du eine Mail verschickst, bei der die Signatur länger als der Inhalt ist (ist mir aus Versehen in der Liste hier passiert *g*). Falls du auf die Weisheiten von fortune verzichten kannst und lieber selbst bestimmen willst, was als "Zufallssignatur" unter deiner Mail steht, dann kann ich dich leider nur auf google verweisen :o/. Ich meine mich zu erinnern, dass ich da irgendwann mal auf eine Mail von Bernd Brodesser (???) gestoßen bin, der vor ein paar Monaten/Jahren genau das erklärt hat. Das ganze wurde so gelöst, dass man in ein Verzeichnis mehrere Textdateien abgelegt hat und dann per Skript eine beliebige davon ausgewählt hat. Leider hat das Skript bei mir nie funktioniert :o( Tschau, Christian -- Zeilen zu lang? HTML-Mail erhalten? TOFU produziert? Wetter zu schlecht? Bitte Hinweis als PM schicken.
Hallo, at Mon, 10 Jun 2002 11:04:29 +0200 Christian Marker wrote:
Am Montag, 10. Juni 2002 06:11 schrieb Michael Raab:
Hallo Zusammen,
ich mit fortune ein wenig am rumspielen. Wie habt ihr das gelöst, das bei jeder Mail ein anderer Spruch erscheint ?
Wenn du KMail als Mailclient benutzt, dann kannst du das im Menü "Einstellungen" unter "Signatur" einrichten.
Ich nutze die claws Version von Sylpheed. Dort kann man - also es lohnt sich doch die Dokus zu lesen ;) - mittels Pipe ein Signaturgenerator einbauen. Und jedesmal, wenn man eine Mail schreiben will, wird dieses Script aufgerufen und die Ausgabe wird als Sig eingefügt. Man braucht nicht den umständlichen weg zu gehen und zuvor eine keine Datei basteln.
aber mit meiner verwendeten Datenbank (das war "Humorix", die ich irgendwo aus dem Netz gesaugt habe
Hättest Du mal einen Link dazu ? Besser wäre noch ein Link, wie man sich eine eigene fortune Datenbank aufbaut. Gruß Michael -- Remember, Grasshopper, falling down 1000 stairs begins by tripping over the first one. -- Confusion Registered Linux User #228306 ICQ #151172379 http://counter.li.org GNU GPG-Key ID 0140F88B
Michael Raab schrieb am 10.06.2002 (11:25):
Hättest Du mal einen Link dazu ? Besser wäre noch ein Link, wie man sich eine eigene fortune Datenbank aufbaut.
Aus dem Gedächtnis: Textdatei erstellen, bei der die einzelnen Sprüche durch Zeilen, die nur "%" enthalten, getrennt sind, strfile drüberjagen. ,--[/usr/share/fortune/eigenesprueche]-- | Linux ist toll | % | noch'n toller Spruch. | % | Die Dinger dürfen auch | mal mehrzeilig sein... | % | blablubb... You get the idea `---- strfile /usr/share/fortune/eigenesprueche Danach liegt in /usr/share/fortune/ eine eigenesprueche.dat, die nach jeder Änderung an der Quelldatei neu erzeugt werden muß. Seine Sprüche bekommt man dann mit dem Aufruf "fortune eigenesprueche", denn man prima in mutt als signature reinpipen kann. Weiteres und zur Fehlerbehebung dieser ungetesteten Anleitung siehe bitte "man fortune" und "man strfile". Gruß, Antje -- Calculating in binary code is as easy as 01,10,11.
Hallo Antje, at Mon, 10 Jun 2002 15:52:29 +0200 Antje M. Bendrich wrote:
Michael Raab schrieb am 10.06.2002 (11:25):
Hättest Du mal einen Link dazu ? Besser wäre noch ein Link, wie man sich eine eigene fortune Datenbank aufbaut.
Aus dem Gedächtnis:
Wie Du es geschildert hast, habe ich es auch irgendwo bei google gefunden. ;) Bye Michael -- excessive collisions & not enough packet ambulances Registered Linux User #228306 ICQ #151172379 http://counter.li.org GNU GPG-Key ID 0140F88B
Hallo, On Mon, 10 Jun 2002, Antje M. Bendrich wrote:
Michael Raab schrieb am 10.06.2002 (11:25):
Hättest Du mal einen Link dazu ? Besser wäre noch ein Link, wie man sich eine eigene fortune Datenbank aufbaut.
Hab ich hier schon mehrfach geschrieben ;)
Aus dem Gedächtnis: Textdatei erstellen, bei der die einzelnen Sprüche durch Zeilen, die nur "%" enthalten, getrennt sind, strfile drüberjagen.
,--[/usr/share/fortune/eigenesprueche]-- % | Linux ist toll | % | noch'n toller Spruch. | % | Die Dinger dürfen auch | mal mehrzeilig sein... | % | blablubb... You get the idea % `----
Hier fehlt eine erste und letzte Zeile mit '%'!!! Ich mach das wie folgt: $ type addsig sig siggrep addsig is aliased to `cat <<EOF >> ~/signatures && echo % >> ~/signatures && /usr/sbin/strfile -s ~/signatures ~/signatures.dat' sig is aliased to `/usr/bin/fortune /home/dh/signatures' siggrep is a function siggrep () { agrep -d'%' "$@" ~/signatures } Dazu hab ich von sig und addsig noch shell-scripte in ~/bin, die das gleiche wie die aliase enthalten, denn die aliase sind nicht in jedem Programm verfuegbar. In mutt, tin, usw. ist dann als signatur-generierendes Programm jew. 'sig' oder auch direkt 'fortune ~/signatures' angegeben, in mutt z.B. also: set signature="/usr/bin/fortune ~/signatures|" Ein script (angelehnt an das von Bernd damals) habe ich auch noch rumfahren... -dnh -- 67: Für mich steht die Kommunikation im Vordergrund Ich weiß, daß mein Gateway Mist baut, aber das ist mir egal. (Arno Eigenwillig)
On Mon, 10 Jun 2002 at 06:11 (+0200), Michael Raab wrote:
Hallo Zusammen,
ich mit fortune ein wenig am rumspielen. Wie habt ihr das gelöst, das bei jeder Mail ein anderer Spruch erscheint ?
* Verzeichnis .fortune angelegt * Neue Datei mit Sprüchen, bei mir news. * Dann "/usr/sbin/strfile news" aufgerufen (in dem Verzeichnis), um news.dat zu erzeugen. * Skript ~/.mutt/signature/random: #!/bin/sh echo -e "\n\nGruß,\nBernhard\n\n-- " fortune /home/berwal/.fortune/news * In der ~/.mutt/muttrc dann: set signature="~/.mutt/sigs/random|" Wie Du diese Lösung auf Dein Mailprogramm überträgst ist Dein Problem. Im Prinzip musst Du bloß schauen, wie man dafür sorgt, dass als Signatur nicht eine Datei ausgelesen wird sondern ein Programm aufgerufen wird und dessen Ausgabe als Signatur genommen wird. Geht das nicht, kannst Du natürlich von dem Skript die ~/.signature erneuern lassen, z. B. durch einen Cronjob ... Gruß, Bernhard -- Ich sag's ja, ...diese abolut warmduschende Meute von "Vollquotern" steigt. -- Clemens Wohld in suse-linux
Hallo Bernhard, at Mon, 10 Jun 2002 17:31:52 +0200 Bernhard Walle wrote:
On Mon, 10 Jun 2002 at 06:11 (+0200), Michael Raab wrote:
ich mit fortune ein wenig am rumspielen. Wie habt ihr das gelöst, das bei jeder Mail ein anderer Spruch erscheint ?
[ ... script ... ]
Wie Du diese Lösung auf Dein Mailprogramm überträgst ist Dein Problem.
Dieses habe ich auch schon gelöst. Läuft auch über die Pipe. ;)
Im Prinzip musst Du bloß schauen, wie man dafür sorgt, dass als Signatur nicht eine Datei ausgelesen wird sondern ein Programm aufgerufen wird und dessen Ausgabe als Signatur genommen wird.
Korrekt.
Geht das nicht, kannst Du natürlich von dem Skript die ~/.signature erneuern lassen, z. B. durch einen Cronjob ...
Was IMHO einwenig aufwendig wäre. Denn man braucht die Signatur ja erst dann, wenn man die Mail schreibt. Gruß Michael -- Windows found - Remove? (Y)es (S)ure (F)ine (O)K Registered Linux User #228306 ICQ #151172379 http://counter.li.org GNU GPG-Key ID 0140F88B
participants (5)
-
Antje M. Bendrich
-
Bernhard Walle
-
Christian Marker
-
David Haller
-
Michael Raab