• Modifications

    From Barmed@21:4/127 to All on Wednesday, January 20, 2021 06:39:01
    So after plenty of procrastination, I mean deep thoughts about how to modify
    my BBS, I have an idea for something, just no clue how to do it.

    Basically, I'd like to do something along the lines of the bot posts I see in the various messages areas, except as either part of the login sequence or as auto created Bulletins.

    So I'm guessing the first thing is howw do do you do bot posts?

    --- Mystic BBS v1.12 A46 2020/08/26 (Raspberry Pi/32)
    * Origin: theoasisbbs.ddns.net:1357 (21:4/127)
  • From Al@21:4/106.1 to Barmed on Wednesday, January 20, 2021 18:52:08
    Re: Modifications
    By: Barmed to All on Wed Jan 20 2021 06:39 am

    Basically, I'd like to do something along the lines of the bot posts I see in the various messages areas, except as either part of the login sequence or as auto created Bulletins.

    So I'm guessing the first thing is howw do do you do bot posts?

    Mutil has a handy PostTextFiles option you can use to do that.

    Make sure your posts are no more than 79 characters wide. Anything beyond that will get truncated.

    Ttyl :-),
    Al

    ... Diets are for those who are thick and tired of it.
    --- SBBSecho 3.12-Linux
    * Origin: The Rusty MailBox - Penticton, BC Canada (21:4/106.1)
  • From Warpslide@21:3/110 to Barmed on Wednesday, January 20, 2021 22:03:39
    On 20 Jan 2021, Barmed said the following...

    So I'm guessing the first thing is howw do do you do bot posts?

    I use mutil's PostTextFiles stanza to post weather & horoscopes:

    e.g: ./mutil weather.ini

    [General]
    PostTextFiles = true

    [PostTextFiles]
    totalfiles = 1

    file1_name = weather.txt
    file1_baseidx = 125
    file1_from = Northern Realms
    file1_to = All
    file1_subj = Southern Ontario Weather
    file1_addr = 1:229/664
    file1_delfile = true


    I have a bash script that downloads the weather data and strips out the HTML, etc and then posts the data.


    Jay

    --- Mystic BBS v1.12 A47 2021/01/16 (Raspberry Pi/32)
    * Origin: Northern Realms (21:3/110)
  • From Warpslide@21:3/110 to Al on Wednesday, January 20, 2021 22:04:19
    On 20 Jan 2021, Al said the following...

    ... Diets are for those who are thick and tired of it.

    I resemble that remark... ;)


    Jay

    --- Mystic BBS v1.12 A47 2021/01/16 (Raspberry Pi/32)
    * Origin: Northern Realms (21:3/110)
  • From Al@21:4/106.1 to Warpslide on Wednesday, January 20, 2021 19:16:12
    Re: Re: Modifications
    By: Warpslide to Al on Wed Jan 20 2021 10:04 pm

    ... Diets are for those who are thick and tired of it.

    I resemble that remark... ;)

    I keep thinking I should update that tagline file sometime!

    Ttyl :-),
    Al

    ... Epithaph on McCoy's Gravestone: I'm dead, Jim!
    --- SBBSecho 3.12-Linux
    * Origin: The Rusty MailBox - Penticton, BC Canada (21:4/106.1)
  • From Barmed@21:4/127 to Al on Thursday, January 21, 2021 07:07:46
    On 20 Jan 2021, Al said the following...
    So I'm guessing the first thing is howw do do you do bot posts?

    Mutil has a handy PostTextFiles option you can use to do that.

    Make sure your posts are no more than 79 characters wide. Anything
    beyond that will get truncated.

    I had seen that option, just not real sure how to implement it. I'm guessing it posts to whatever message area it's directed to.

    Would it also autopost/create Bulletins or the like?

    --- Mystic BBS v1.12 A46 2020/08/26 (Raspberry Pi/32)
    * Origin: theoasisbbs.ddns.net:1357 (21:4/127)
  • From Barmed@21:4/127 to Warpslide on Thursday, January 21, 2021 07:19:47
    On 20 Jan 2021, Warpslide said the following...

    So I'm guessing the first thing is howw do do you do bot posts?

    I use mutil's PostTextFiles stanza to post weather & horoscopes:

    e.g: ./mutil weather.ini

    [General]
    PostTextFiles = true

    [PostTextFiles]
    totalfiles = 1

    file1_name = weather.txt
    file1_baseidx = 125
    file1_from = Northern Realms
    file1_to = All
    file1_subj = Southern Ontario Weather
    file1_addr = 1:229/664
    file1_delfile = true


    I have a bash script that downloads the weather data and strips out the HTML, etc and then posts the data.


    So how do you get the data that you use to create them? Or rather from where?

    For example, if I wanted to do a similar weather report for my city or Statr

    Ultimately, what I'm looking for is to be able to auto create either like custom welcome screens or Bulletuns with things like weather, today in
    history, horoscopes, maybe News headslines.

    --- Mystic BBS v1.12 A46 2020/08/26 (Raspberry Pi/32)
    * Origin: theoasisbbs.ddns.net:1357 (21:4/127)
  • From Warpslide@21:3/110 to Barmed on Thursday, January 21, 2021 11:19:56
    On 21 Jan 2021, Barmed said the following...

    So how do you get the data that you use to create them? Or rather from where?

    I get my weather data from here: https://weather.gc.ca/forecast/public_bulletins_e.html?Bulletin=fpcn11.cwto

    You'd of course have to find where to get weather local to your region.


    And I get my Horoscope data from here:
    https://nypost.com/horoscopes

    Basically I just use wget to download the .html file and use grep or sed to cut out the pieces I need. The weather was easier to than the horoscope page due to the number of images.

    And as Al mentioned, you need to make sure the text is not more than 79 characters wide otherwise Mystic will just cut it off.

    Another thing I discovered is that Mystic doesn't like UTF8 text when posting via mutil. I had to figure out how to convert UTF8 text to CP437 using iconv so that every hyphen or apostrophe didn't come out weird in the bot post.
    It was an interesting exercise and I'm glad I got it working. I learned a little more about using linux by going through it, though I'm not sure anyone ever reads them... lol


    Jay

    --- Mystic BBS v1.12 A47 2021/01/16 (Raspberry Pi/32)
    * Origin: Northern Realms (21:3/110)
  • From Barmed@21:4/127 to Warpslide on Thursday, January 21, 2021 10:36:31
    On 21 Jan 2021, Warpslide said the following...
    So how do you get the data that you use to create them? Or rather fro where?

    I get my weather data from here: https://weather.gc.ca/forecast/public_bulletins_e.html?Bulletin=fpcn11.cwt

    You'd of course have to find where to get weather local to your region.


    Of course. But that does give me an idea of what I'm looking for.

    And I get my Horoscope data from here:
    https://nypost.com/horoscopes

    Basically I just use wget to download the .html file and use grep or sed to cut
    out the pieces I need. The weather was easier to than the horoscope
    page due to the number of images.
    And as Al mentioned, you need to make sure the text is not more than 79 characters wide otherwise Mystic will just cut it off.

    That's a shame that it doesn't wrap better, although even at 79 characters
    its an adventure on my setup.

    Another thing I discovered is that Mystic doesn't like UTF8 text when posting via mutil. I had to figure out how to convert UTF8 text to
    CP437 using iconv so that every hyphen or apostrophe didn't come out
    weird in the bot post. It was an interesting exercise and I'm glad I got it working. I learned a little more about using linux by going through it, though I'm not sure anyone ever reads them... lol

    I've been told some of my copy/paste messages look weird onsome peoples systems, although I hadn't noticed. Someone had suggested that it mighy be
    due to the fact that Mystic messages don't seem to have a CHRS$ kludge so
    other systems didn't know how to interpret.

    I suppose a conversion to CP437 is a better overall solution.

    And I do at least skim those messages.

    --- Mystic BBS v1.12 A46 2020/08/26 (Raspberry Pi/32)
    * Origin: theoasisbbs.ddns.net:1357 (21:4/127)
  • From Al@21:4/106.1 to Barmed on Thursday, January 21, 2021 15:07:36
    Re: Re: Modifications
    By: Barmed to Al on Thu Jan 21 2021 07:07 am

    I had seen that option, just not real sure how to implement it. I'm guessing it posts to whatever message area it's directed to.

    Yes, the PostTextFiles section of mutil.ini needs to start with the number of text files you want to post, totalfiles = 2 (or how ever many to post).

    Then you need a section for each area you want to post in with file1_name = bbsad.txt or whatever the filename is, file1_baseidx = 2 or whatever the area actually is, then file2_name etc for the next area.

    Would it also autopost/create Bulletins or the like?

    There is also a GenerateTopLists section that will create top users files that you can display. The bulletins can be changed but also, I don't think you can change them automatically but you can edit the bullet?.asc and bulletin.asc files.

    Ttyl :-),
    Al

    ... Romulans, Ferengi, and Borgs. Oh My!!
    --- SBBSecho 3.12-Linux
    * Origin: The Rusty MailBox - Penticton, BC Canada (21:4/106.1)
  • From Al@21:4/106.1 to Barmed on Thursday, January 21, 2021 16:40:55
    Re: Re: Modifications
    By: Barmed to Warpslide on Thu Jan 21 2021 10:36 am

    I suppose a conversion to CP437 is a better overall solution.

    Yep, that can be an issue sometimes. I use a command like "iconv -f utf8 -t cp437 filename.txt -o newfilename.txt" to get a cp437 encoded file to import.

    Ttyl :-),
    Al

    ... When your work speaks for itself, don't interrupt
    --- SBBSecho 3.12-Linux
    * Origin: The Rusty MailBox - Penticton, BC Canada (21:4/106.1)
  • From Adept@21:2/108 to Warpslide on Saturday, January 30, 2021 22:46:01
    weird in the bot post. It was an interesting exercise and I'm glad I got it working. I learned a little more about using linux by going through it, though I'm not sure anyone ever reads them... lol

    I'm a bit late in replying to this, but it was an interesting thing for you to share.

    I've mostly ignored the weather, since it's pretty solidly irrelevant to me, but now you've gone and made it interesting as a BBS topic.

    --- Mystic BBS v1.12 A46 2020/08/26 (Linux/64)
    * Origin: Storm BBS (21:2/108)