• message base & python

    From Edmund Wong@1:153/7083 to All on Tue Dec 7 15:16:42 2021
    Hi,

    Does anyone know if it's possible to use a system-binary python
    to post messages directly into the Mystic message base? I'm hoping
    to create a script to post messages directly to a local message
    base.

    Thanks

    Edmund

    ... I have a really good memory, except it's short.

    --- Mystic BBS v1.12 A47 2021/12/01 (Linux/32)
    * Origin: Eagle's BBS (1:153/7083)
  • From Jay Harris@1:229/664 to Edmund Wong on Tue Dec 7 07:52:20 2021
    On 07 Dec 2021, Edmund Wong said the following...

    Does anyone know if it's possible to use a system-binary python
    to post messages directly into the Mystic message base? I'm hoping
    to create a script to post messages directly to a local message
    base.

    I don't know about python, but you can use mutil to post messages to any base you like.

    [ --- begin weather.ini --- ]
    [General]
    PostTextFiles = true
    logfile = mutil.log
    logcache = true
    loglevel = 2
    logtype = 1
    maxlogfiles = 3
    maxlogsize = 1000

    [PostTextFiles]
    totalfiles = 3

    file1_name = /tmp/weather.txt
    file1_baseidx = 29
    file1_from = Northern Realms
    file1_to = All
    file1_subj = Southern Ontario Weather
    file1_addr = 21:3/110
    file1_delfile = false
    [...]
    [ --- end weather.ini --- ]

    In this example I use a script to fetch the weather and put it into a text file (/tmp/weather.txt). The baseidx is the index number of the message base you want to post to. Fill out the other details and then just run ./mutil weather.ini and your message is posted.


    Jay

    ... When the cows are sleeping in the field, it's pasture bed!
    --- Mystic BBS v1.12 A47 2021/12/06 (Raspberry Pi/32)
    * Origin: Northern Realms (1:229/664)
  • From g00r00@1:129/215 to Edmund Wong on Tue Dec 7 11:06:00 2021
    Does anyone know if it's possible to use a system-binary python
    to post messages directly into the Mystic message base? I'm hoping
    to create a script to post messages directly to a local message
    base.

    I am not sure what you mean by system-binary python, but you can post a message from a text file to a message base using a menu command while online with BBS.

    You can also access menu commands from Mystic Python and MPL both of which can be executed from the command line (meaning you can run a MPL or Python script to post messages from a command line if you wanted to).

    You can also use MUTIL to post a text file to a message. It will also do things like split up large tet files into multiple messages and so on.
    In all cases Mystic will take are of things like kludge lines or anything else required to send the message so you just have to create a text file with the contents and point Mystic to it, and it will do the rest.

    ... The dog ate my .REP packet

    --- Mystic BBS v1.12 A47 2021/12/06 (Windows/64)
    * Origin: Sector 7 * Mystic WHQ (1:129/215)
  • From Edmund Wong@1:153/7083 to g00r00 on Wed Dec 8 11:22:34 2021
    Hi g00r00,

    I am not sure what you mean by system-binary python, but you can post a message from a text file to a message base using a menu command while online with BBS.

    I meant just directly using /usr/bin/python.

    That said, I'll just use mutil to post messages. Seems to make life easier.

    Thanks

    Edmund

    ... A truly wise man never argues with a Unicorn

    --- Mystic BBS v1.12 A47 2021/12/01 (Linux/32)
    * Origin: Eagle's BBS (1:153/7083)
  • From Edmund Wong@1:153/7083 to Jay Harris on Wed Dec 8 11:24:10 2021
    Hi Jay,

    In this example I use a script to fetch the weather and put it into a
    text file (/tmp/weather.txt). The baseidx is the index number of the message base you want to post to. Fill out the other details and then just run ./mutil weather.ini and your message is posted.

    Thanks for pointing that out. I had the initial urge to use python
    to directly write to the message base; but this makes it less likely
    to corrupt it. :)

    Edmund

    ... A penny saved is not very much

    --- Mystic BBS v1.12 A47 2021/12/01 (Linux/32)
    * Origin: Eagle's BBS (1:153/7083)
  • From Robert Wolfe@1:116/18 to Edmund Wong on Fri Dec 10 12:49:20 2021
    On 08 Dec 2021, Edmund Wong said the following...

    Hi g00r00,

    I am not sure what you mean by system-binary python, but you can post message from a text file to a message base using a menu command while online with BBS.

    I meant just directly using /usr/bin/python.

    That said, I'll just use mutil to post messages. Seems to make life easier.

    And better than re-inventing the wheel :)

    ... It said "insert disk #3", but only two will fit...

    --- Mystic BBS v1.12 A47 2021/09/29 (Linux/64)
    * Origin: fidonet.winserver.org * Cordova, TN USA (1:116/18)