• WxCenter - Weather reader for Synchronet

    From Codefenix@1337:3/150 to All on Sat Jun 24 16:10:16 2023
    WxCenter is a weather forecast viewer I've been working on on-and-off for the last couple years. I finally feel like it's worthy of being shared with other Syncronet sysops, so here it is:

    https://github.com/codefenix-ConChaos/wxcenter.js

    It makes use of several APIs to display forecast info for any location the user specifies, based on either text input or IP address, and presents the results in a customizable ANSI layout.

    It can also optionally display SIXEL weather maps in SyncTerm or other compatible SIXEL-capable terminals like MagiTerm.

    In addition to WxCenter, I also have available my RSS News reader, SixelGallery, and a Top Fives bulletin generator.

    https://github.com/codefenix-ConChaos

    Enjoy!

    |01<|09co|03d|11e|15Ÿ|11e|03n|09ix|01>|07|08

    ...Chuck Norris can hear sign language and speak Braille.
    --- SBBSecho 3.20-Win32
    * Origin: -=[conchaos.synchro.net | ConstructiveChaos BBS]=- (1337:3/150)
  • From DaveW@1337:1/101 to Codefenix on Mon Sep 4 05:47:35 2023
    WxCenter is a weather forecast viewer I've been working on on-and-off
    for the last couple years. I finally feel like it's worthy of being
    shared with other Syncronet sysops, so here it is:

    https://github.com/codefenix-ConChaos/wxcenter.js

    Codefenix,
    I just wanted to compliment you on the WxCenter program. It is an excellent program. I am always looking for things to improve my BBS and this was one of the best additions so far!!!! If i get more traffic to my BBS.

    Thank you,
    DaveW
    Port of Call BBS
    BBS.PCTechDr.com Port:2323
    https://BBS>PCTechDr.xyz

    ... My software never has bugs. It just develops random features...

    --- Mystic BBS v1.12 A48 2022/07/15 (Linux/64)
    * Origin: thE qUAntUm wOrmhOlE, rAmsgAtE, uK. bbs.erb.pw (1337:1/101)
  • From DaveW@1337:3/184 to Codefenix on Tue Sep 5 00:18:29 2023
    Re: Re: WxCenter - Weather reader for Synchronet
    By: DaveW to Codefenix on Mon Sep 04 2023 05:47 am

    WxCenter is a weather forecast viewer I've been working on on-and-off for the last couple years. I finally feel like it's worthy of being shared with other Syncronet sysops, so here it is:

    https://github.com/codefenix-ConChaos/wxcenter.js

    Hello,
    I actually got the API key and it is working except for Option 4. I am getting the following error and i do not know enough about JS to figure it out.

















































































































































































































































































































































    Here is the error:

    !JavaScript wxcenter.js line 253: TypeError: wxObj[period] is undefined

    Is there a quick change i could do to fix this issue? Thank you for your Time!!

    DaveW
    Port of Call BBS
    BBS.PCTechDr.com Port:2323
    https://BBS.PCTechDr.xyz

    DaveW
    Port of Call BBS
    BBS.PCTechDr.com Port:2323
    https://BBS.PCTechDr.xyz
    --- SBBSecho 3.14-Win32
    * Origin: Port of Call BBS - BBS.PCTechDr.com:2323 (1337:3/184)
  • From DaveW@1337:3/184 to Codefenix on Tue Sep 5 01:05:12 2023
    Re: Re: WxCenter - Weather reader for Synchronet
    By: DaveW to Codefenix on Tue Sep 05 2023 12:18 am

    Hello,
    I actually got the API key and it is working except for Option 4. I am getting the following error and i do not know enough about JS to figure it out. Here is the error:

    !JavaScript wxcenter.js line 253: TypeError: wxObj[period] is undefined

    Is there a quick change i could do to fix this issue? Thank you for your Time!!
    Hello,
    I actually figured out the issue. OpenWeatherMap didnt seem to like my BBS

















































































































































































































































































































































    location. The BBS is located in Port Charlotte, Fl and it would give me that error. I went into my BBS config and changed the location of my BBS to very local towns next to mine. I chose Murdock, FL and now when i use the program, OpenWeatherMaps gives me Port Charlotte, Fl now that i use Murdock, FL in my BBS config. very weird but it seems to be an issue with OpenWeatherMaps and not

















































































































































































































































































































































    the JS code. :)

    Dave W
    Port of Call BBS
    BBS.PCTechDr.com Port:2323
    https://BBS.PCTechDr.xyz


    DaveW
    Port of Call BBS
    BBS.PCTechDr.com Port:2323
    https://BBS.PCTechDr.xyz
    --- SBBSecho 3.14-Win32
    * Origin: Port of Call BBS - BBS.PCTechDr.com:2323 (1337:3/184)
  • From Codefenix@1337:3/150 to DaveW on Tue Sep 5 08:31:18 2023
    Re: Re: WxCenter - Weather reader for Synchronet
    By: DaveW to Codefenix on Tue Sep 05 2023 01:05 am

    I actually figured out the issue. OpenWeatherMap didnt seem to like my BBS location. The BBS is located in Port Charlotte, Fl and it would give me that error. I went into my BBS config and changed the location of my BBS to very local towns next to mine. I chose Murdock, FL and now when i use the program, OpenWeatherMaps gives me Port Charlotte, Fl now that i use Murdock, FL in my BBS config. very weird but it seems to be an issue with OpenWeatherMaps and not the JS code. :)

    Hey DaveW! Thanks for the feedback. I'm glad you're enjoying WxCenter.

    So there are two issues going on here:

    First, when wxcenter.js validates the location through the geocode.maps.co API,

















































































































































































































































































































































    it filters out results with a type not matching administrative, city, town, or village. Looks like Port Charlotte, FL has type values not matching any of these, so that's why it's not finding it (https://geocode.maps.co/search?q=Port%20Charlotte,+Fl). I went ahead and added

















































































































































































































































































































































    the type "census", so now it validates that location OK.

    Second, looks like the showForecast function crashes the script when no results

















































































































































































































































































































































    are returned. This is a legitimate bug I need to fix, so thanks for bringing it

















































































































































































































































































































































    to my attention.

    For now, go ahead and try the latest wxcenter.js from GitHub again for Port Charlotte, FL and let me know how it goes for you.

    |01<|09co|03d|11e|15Ÿ|11e|03n|09ix|01>|07


    ...Double your pleasure, Double your fun. Xerox your pay-cheques.
    --- SBBSecho 3.20-Win32
    * Origin: -=[conchaos.synchro.net | ConstructiveChaos BBS]=- (1337:3/150)
  • From DaveW@1337:3/184 to Codefenix on Tue Sep 5 23:21:54 2023
    Re: Re: WxCenter - Weather reader for Synchronet
    By: Codefenix to DaveW on Tue Sep 05 2023 08:31 am

    First, when wxcenter.js validates the location through the geocode.maps.co API, it filters out results with a type not matching administrative, city, town, or village. Looks like Port Charlotte, FL has type values not matching any of these, so that's why it's not finding it (https://geocode.maps.co/search?q=Port%20Charlotte,+Fl). I went ahead and added the type "census", so now it validates that location OK.

    Second, looks like the showForecast function crashes the script when no results are returned. This is a legitimate bug I need to fix, so thanks for bringing it to my attention.

    For now, go ahead and try the latest wxcenter.js from GitHub again for Port Charlotte, FL and let me know how it goes for you.

    Hello,
    I went and changed the BBS location in the main Config to Port Charlotte, Fl and I am getting the same error. It is weird because when i change my BBS location to Murdock, Fl (a subdivision of Port Charlotte) the results from the weather app will come back and give me the weather for Port Charlotte. haha That is a little weird but i guess it is an easy workaround.. :) So it will give me the weather for Port Charlotte only if my BBS location is Murdock, Fl..
















































































































































































































































































































































    lol

    I hope this helps you. This is an awesome program though. The Sixel weathermaps
















































































































































































































































































































































    are amazing for a BBS.

    DaveW
    Port of Call BBS
    BBS.PCTechDr.com Port:2323
    https://BBS.PCTechDr.xyz

    DaveW
    Port of Call BBS
    BBS.PCTechDr.com Port:2323
    https://BBS.PCTechDr.xyz
    --- SBBSecho 3.14-Win32
    * Origin: Port of Call BBS - BBS.PCTechDr.com:2323 (1337:3/184)
  • From Codefenix@1337:3/150 to DaveW on Wed Sep 6 07:59:31 2023
    Re: Re: WxCenter - Weather reader for Synchronet
    By: DaveW to Codefenix on Tue Sep 05 2023 11:21 pm

    Hello,
    I went and changed the BBS location in the main Config to Port Charlotte, Fl and I am getting the same error. It is weird because when i change my BBS location to Murdock, Fl (a subdivision of Port Charlotte) the results from the weather app will come back and give me the weather for Port Charlotte. haha That is a little weird but i guess it is an easy workaround.. :) So it will give me the weather for Port Charlotte only if my BBS location is Murdock, Fl.. lol

    Hey DaveW,

    I tried temporarily setting my BBS location to Port Charlotte, FL, and it's working for me here. Did you remember to grab the latest wxcenter.js from GitHub before you tried it again?

    Watch your Terminal Server log when you run it. You should see something similar to this:

    9/6 07:45:37a Node 1 <Codefenix> running external program: Weather Center
    9/6 07:45:43a Node 1 <Codefenix> Viewing forecast from Weather.gov (TBW) for Port Charlotte,FL after 0 retries.
    9/6 07:45:43a Node 1 <Codefenix> There are 9 warning(s) in FL.
    9/6 07:45:43a Node 1 <Codefenix> 0 warning(s) found in the area for https://api.weather.gov/zones/forecast/FLZ162.

    If you're getting something different, let me know.

    Even though you found a workaround, I'd still like to figure this out.

    I hope this helps you. This is an awesome program though. The Sixel weathermaps are amazing for a BBS.

    Thanks again for the feedback! I enjoyed working on it and that was a fun bonus
















































































































































































































































































































































    feature to add in.

    |01<|09co|03d|11e|15Ÿ|11e|03n|09ix|01>|07


    ...Old fishermen never die, they just smell that way.
    --- SBBSecho 3.20-Win32
    * Origin: -=[conchaos.synchro.net | ConstructiveChaos BBS]=- (1337:3/150)
  • From DaveW@1337:3/184 to Codefenix on Thu Sep 7 00:00:28 2023
    Re: Re: WxCenter - Weather reader for Synchronet
    By: Codefenix to DaveW on Wed Sep 06 2023 07:59 am

    I tried temporarily setting my BBS location to Port Charlotte, FL, and it's working for me here. Did you remember to grab the latest wxcenter.js from GitHub before you tried it again?
    Hello,
    I looked at the files. I am not 100% sure it is the newest but i think it is. I downloaded it about 2 or 3 weeks ago. I looked in the readme and the JS code and saw no version or date. I may have missed it though. :)

    Watch your Terminal Server log when you run it. You should see something similar to this:

    9/6 07:45:37a Node 1 <Codefenix> running external program: Weather Center
    9/6 07:45:43a Node 1 <Codefenix> Viewing forecast from Weather.gov (TBW) for Port Charlotte,FL after 0 retries.
    9/6 07:45:43a Node 1 <Codefenix> There are 9 warning(s) in FL.
    9/6 07:45:43a Node 1 <Codefenix> 0 warning(s) found in the area for https://api.weather.gov/zones/forecast/FLZ162.

    If you're getting something different, let me know.

    I went and did the test again and changed the BBS location to Port Charlotte, Fl and still get that error. I took some screenshots of the terminal server log















































































































































































































































































































































    as there is a lot to type and i am not sure what is relevant so i am sending you a couple of pictures to the email in the readme file for the WxCenter. :)


    Even though you found a workaround, I'd still like to figure this out.

    I always feel bad as if i am bothering someone. :) I am willing to help you figure this out. :) If you need me to test anything, feel free to let me know. Also, look out for the screenshots in your email.

    I hope this helps you. This is an awesome program though. The Sixel weathermaps are amazing for a BBS.

    Thanks again for the feedback! I enjoyed working on it and that was a fun bonus feature to add in.
    If you need anything at all. Feel free to reach out. :)


    DaveW
    Port of Call BBS
    BBS.PCTechDr.com Port:2323
    https://BBS.PCTechDr.xyz
    --- SBBSecho 3.14-Win32
    * Origin: Port of Call BBS - BBS.PCTechDr.com:2323 (1337:3/184)
  • From Codefenix@1337:3/150 to DaveW on Thu Sep 7 09:47:44 2023
    Re: Re: WxCenter - Weather reader for Synchronet
    By: DaveW to Codefenix on Thu Sep 07 2023 12:00 am

    I always feel bad as if i am bothering someone. :) I am willing to help you figure this out. :) If you need me to test anything, feel free to let me know. Also, look out for the screenshots in your email.

    Don't sweat it, happy to help.

    It sounds like for whatever reason the geocode API is not validating "Port Charlotte, FL" for you, even though it validates for me just fine. So I just committed a fix that uses the system's IP address in case of any issue using the system's location.

    Please download the latest wxcenter.js from GitHub and overwrite the old one on















































































































































































































































































































































    your system. Try it again for your desired system location name and let me know















































































































































































































































































































































    the outcome.

    https://github.com/codefenix-ConChaos/WxCenter

    This fix is probably good to have anyway, for those sysops who like to enter cute location names for their systems, like "Anytown" or "The Universe". :P

    |01<|09co|03d|11e|15Ÿ|11e|03n|09ix|01>|07


    ...Send in competition answers with your name, age and how old you are.
    --- SBBSecho 3.20-Win32
    * Origin: -=[conchaos.synchro.net | ConstructiveChaos BBS]=- (1337:3/150)
  • From DaveW@1337:3/184 to Codefenix on Thu Sep 7 23:53:50 2023
    Re: Re: WxCenter - Weather reader for Synchronet
    By: Codefenix to DaveW on Thu Sep 07 2023 09:47 am

    Please download the latest wxcenter.js from GitHub and overwrite the old one on your system. Try it again for your desired system location name and let me know the outcome.
    Hello,
    I sent you a screenshot of the data you were asking about in email. I will overwrite the old wxcenter with the new one in your Github and let you know if your fix works. :)


    https://github.com/codefenix-ConChaos/WxCenter

    This fix is probably good to have anyway, for those sysops who like to enter cute location names for their systems, like "Anytown" or "The Universe". :P

    I hear the weather in Anytown is excellent but it is very cold in the Universe!!! :)


    DaveW
    Port of Call BBS
    BBS.PCTechDr.com Port:2323
    https://BBS.PCTechDr.xyz
    --- SBBSecho 3.14-Win32
    * Origin: Port of Call BBS - BBS.PCTechDr.com:2323 (1337:3/184)
  • From DaveW@1337:3/184 to Codefenix on Fri Sep 8 00:10:49 2023
    Re: Re: WxCenter - Weather reader for Synchronet
    By: Codefenix to DaveW on Thu Sep 07 2023 09:47 am

    Please download the latest wxcenter.js from GitHub and overwrite the old one on your system. Try it again for your desired system location name and let me know the outcome.

    https://github.com/codefenix-ConChaos/WxCenter

    Hello,
    I just wanted to let you know that it is working now. I have Port Charlotte, Fl as the BBS location in my configuration and I am getting the correct weather. Thanks for the help with this. I wish i knew Javascript well enough to write programs. I can sometimes edit existing code to find things but














































































































































































































































































































































    this issue was way over my head. I was fighting over a Word of the Day JS program that no longer works. It has not been updated in many years.
    Are there some good Youtube channels to learn some JavaScript that would be














































































































































































































































































































































    handy with SynchroNet?
    Anyway, if there is anything you need from me to further test this, feel free to let me know. I would be more than happy to help you.


    DaveW
    Port of Call BBS
    BBS.PCTechDr.com Port:2323
    https://BBS.PCTechDr.xyz
    --- SBBSecho 3.14-Win32
    * Origin: Port of Call BBS - BBS.PCTechDr.com:2323 (1337:3/184)
  • From Codefenix@1337:3/150 to DaveW on Fri Sep 8 07:47:41 2023
    Re: Re: WxCenter - Weather reader for Synchronet
    By: DaveW to Codefenix on Fri Sep 08 2023 12:10 am

    I just wanted to let you know that it is working now. I have Port Charlotte, Fl as the BBS location in my configuration and I am getting the correct weather. Thanks for the help with this.

    Awesome! Glad to know it's doing what it should for you now.

    Are there some good Youtube channels to learn some JavaScript that would be handy with SynchroNet?

    While I haven't personally used (or found) Youtube channels on the subject, there are lots of great resources. For general JS stuff, like basic structure and syntax, W3Schools is a great place to start (https://www.w3schools.com/js).














































































































































































































































































































































    For all the Sync specific JS stuff, check the Sync wiki site (https://wiki.synchro.net/custom:javascript) and the JS Object Model
    reference page (http://www.synchro.net/docs/jsobjs.html).

    |01<|09co|03d|11e|15Ÿ|11e|03n|09ix|01>|07


    ...The hookworm larvae enters the human body through the soul.
    --- SBBSecho 3.20-Win32
    * Origin: -=[conchaos.synchro.net | ConstructiveChaos BBS]=- (1337:3/150)
  • From DaveW@1337:3/184 to Codefenix on Fri Sep 8 22:01:19 2023
    Re: Re: WxCenter - Weather reader for Synchronet
    By: Codefenix to DaveW on Fri Sep 08 2023 07:47 am

    While I haven't personally used (or found) Youtube channels on the subject, there are lots of great resources. For general JS stuff, like basic structure and syntax, W3Schools is a great place to start (https://www.w3schools.com/js). For all the Sync specific JS stuff, check the Sync wiki site (https://wiki.synchro.net/custom:javascript) and the JS Object Model
    reference page (http://www.synchro.net/docs/jsobjs.html).
    Hello,
    I would be an abolute beginner. I have been in IT for a while but on the server and router side. I didnt do much with programming. I was thinking of what i would like to do.. Maybe have a modest goal.. I was thinking of an option on logoff where you can directly telnet somewhere else. Kind of like what they have on the Quantam Wormhole exit screen. I know there is JS files to













































































































































































































































































































































    telnet out already within the SBBS setup. I figure it could be a reason to learn a little. :)
    Are you planning on any new projects in the near future?


    DaveW
    Port of Call BBS
    BBS.PCTechDr.com Port:2323
    https://BBS.PCTechDr.xyz
    --- SBBSecho 3.14-Win32
    * Origin: Port of Call BBS - BBS.PCTechDr.com:2323 (1337:3/184)
  • From Codefenix@1337:3/150 to DaveW on Sun Sep 10 12:12:35 2023
    Re: Re: WxCenter - Weather reader for Synchronet
    By: DaveW to Codefenix on Fri Sep 08 2023 10:01 pm

    Are you planning on any new projects in the near future?

    Not a lot. I've pondered the idea of a door for tracking sports scores, but I haven't put a lot of thought into how to design it yet.

    |01<|09co|03d|11e|15Ÿ|11e|03n|09ix|01>|07


    ...A short cut is the longest distance between two points.
    --- SBBSecho 3.20-Win32
    * Origin: -=[conchaos.synchro.net | ConstructiveChaos BBS]=- (1337:3/150)
  • From DaveW@1337:3/184 to Codefenix on Sun Sep 10 23:48:48 2023
    Re: Re: WxCenter - Weather reader for Synchronet
    By: Codefenix to DaveW on Sun Sep 10 2023 12:12 pm

    Re: Re: WxCenter - Weather reader for Synchronet
    By: DaveW to Codefenix on Fri Sep 08 2023 10:01 pm

    Are you planning on any new projects in the near future?

    Not a lot. I've pondered the idea of a door for tracking sports scores, but I haven't put a lot of thought into how to design it yet.

    Hello,
    I saw one of those on a gihub but i could not get it to work. I think because it needed to contact a BBS for the scores. I think there was another option to run a background python script to give the scores to the Javascript but i had no idea on how to achieve that. I assume that you just get an API from one of those sport services and program a way to display the scores. I am no programmer though. :)


    DaveW
    Port of Call BBS
    BBS.PCTechDr.com Port:2323
    https://BBS.PCTechDr.xyz
    --- SBBSecho 3.14-Win32
    * Origin: Port of Call BBS - BBS.PCTechDr.com:2323 (1337:3/184)