• Success: Post multiple text files with changing subject

    From goto_KCM@21:1/218 to All on Sun Sep 19 16:05:00 2021
    Hi!

    So i wrote some scripts for my BBS so that textfiles are pulled from a FTP Server and moved to a local folder and s semaphore files is created.

    Then another script that is triggered by the semaphore starts and creates a temporary ini file for mutil. The subject of the post is the name of the textfile. After the post the textfiles are moved to an "old" directory and
    the semaphore is deleted.

    In that way i only have to write a textfile like "Mystic_BBS_is_awesome.txt" with some text in it and after the workflow a new message ist posted with "Mystic_BBS_is_awesome" as subject.

    Works great so far :-). If there is someone who could use those scripts i can provide a copy of them. I am not the greatest scripter so there is surly some room to make the scripts better :-).

    So long,
    Andreas

    -=Kautzner-Computer-Museum=-
    zahrl.ddns.net:2023
    https://kcm.or.at

    --- Mystic BBS v1.12 A46 2020/08/26 (Raspberry Pi/32)
    * Origin: KCM BBS (21:1/218)
  • From paulie420@21:2/150 to goto_KCM on Sun Sep 19 18:06:05 2021
    Works great so far :-). If there is someone who could use those scripts
    i can provide a copy of them. I am not the greatest scripter so there is surly some room to make the scripts better :-).

    Great work; I'm interested, I don't fully grasp how semaphores work and would like to see what you're doing. I assume you just 'touch semaphore.sem' and Mystic sees that file - but I'm also always learning more about bash scripting and... yea. I'd like the share. paulie420@gmail.com , or post right here for everyone to enjoy. :P

    Glad you figured out a solution to something you wanted to do on yer BBS and thanks for sharing. w00t w00t!



    |07p|15AULIE|1142|07o
    |08.........

    --- Mystic BBS v1.12 A47 2021/08/29 (Raspberry Pi/32)
    * Origin: 2o fOr beeRS bbs>>>20ForBeers.com:1337 (21:2/150)
  • From Avon@21:1/101 to goto_KCM on Mon Sep 20 14:45:22 2021
    On 19 Sep 2021 at 04:05p, goto_KCM pondered and said...

    Works great so far :-). If there is someone who could use those scripts
    i can provide a copy of them. I am not the greatest scripter so there is surly some room to make the scripts better :-).

    If you wanted to zip them up and upload to Agency I can hatch them out if you wanted :)

    --- Mystic BBS v1.12 A46 2020/08/26 (Linux/64)
    * Origin: Agency BBS | Dunedin, New Zealand | agency.bbs.nz (21:1/101)
  • From goto_KCM@21:1/218 to Avon on Mon Sep 20 18:51:03 2021
    If you wanted to zip them up and upload to Agency I can hatch them out
    if you wanted :)

    Hey Avon, i uploaded a zip with the two shell scripts and the template ini on your Agency BBS.

    The scripts get the textfiles from a FTP server and post them afterwards.

    Usage:
    Copy both shell scripts to the Mystic BBS directory. Create the directories "news", "old_news", "templates" and "newstemp".

    Copy the template.ini file into the templates directory and edit the file to match your needs.

    Now edit the "get_news_from_ftp.sh" and replace the URL of the FTP Server, username and password.

    Now create an event in Mystic BBS that runs hourly and executes the "/mystic/get_news_from_ftp.sh" to get the text files from the FTP Server.

    Create another event that is type semaphore and waits for a file called "news.txt" and runs the script "/mystic/post_news.sh".

    Finished.

    Now when the first task is run, the textfiles are moved from the FTP server
    to the "/mystic/news" dir and the semaphore file "news.txt" is created.
    Then the second event is triggered and for every text file in the news dir a ini file is created to run mutil with it.

    So, hope this helps.

    Regards
    Andreas

    -=Kautzner-Computer-Museum=-
    zahrl.ddns.net:2023
    https://kcm.or.at

    --- Mystic BBS v1.12 A46 2020/08/26 (Raspberry Pi/32)
    * Origin: KCM BBS (21:1/218)
  • From Avon@21:1/101 to goto_KCM on Wed Sep 22 19:09:29 2021
    On 20 Sep 2021 at 06:51p, goto_KCM pondered and said...

    If you wanted to zip them up and upload to Agency I can hatch them ou if you wanted :)

    Hey Avon, i uploaded a zip with the two shell scripts and the template
    ini on your Agency BBS.

    Thank you I will look to hatch this out in the coming days. :)

    --- Mystic BBS v1.12 A46 2020/08/26 (Linux/64)
    * Origin: Agency BBS | Dunedin, New Zealand | agency.bbs.nz (21:1/101)
  • From paulie420@21:2/150 to Avon on Fri Sep 24 08:05:01 2021
    Hey Avon, i uploaded a zip with the two shell scripts and the templat ini on your Agency BBS.

    Thank you I will look to hatch this out in the coming days. :)

    I'll watch out for it, thanks guys...



    |07p|15AULIE|1142|07o
    |08.........

    --- Mystic BBS v1.12 A47 2021/08/29 (Raspberry Pi/32)
    * Origin: 2o fOr beeRS bbs>>>20ForBeers.com:1337 (21:2/150)