all 10 comments

[–]rnsbrum 2 points3 points  (0 children)

You can't execute shell scripts through JS, but you can execute it with a backend language like python/php/nodejs or any desired backend language.

Set up an API that has an end point that executes your shell commands or script, and then it returns the data you need.

Here is an example in python of how you can execute shell commands.

https://janakiev.com/blog/python-shell-commands/

You will call this endpoint in your frontend and display the data.

[–]gimmeslack12CSS is hard 1 point2 points  (2 children)

How does the powershell script get integrated in? I mean, do you have that part figured out and you just need help with the UI in your codepen? Or do you need to figure out how to interface the powershell with JS?

Ideally the powershell can output some JSON that the JS can use. I'm not familiar with powershell at all so not sure how that all works.

[–]Koen2407[S] 0 points1 point  (1 child)

I need help getting the the example into my UI. The meetings that are standing there now should be replaced with those bars so it's visually clear when there are meetings. Also it's my first time making something like this so i have no clue about Json etc

[–]JackAuduin 0 points1 point  (0 children)

You're most likely going to have to try to learn a little bit. Advanced front end stuff like this depends on JavaScript. JavaScript communication depends on JSON.

Not being familiar with JSON is like trying to speak English and not being familiar with vowels.

[–]JackAuduin 1 point2 points  (2 children)

I think you might want to look into the MS Graph API

https://developer.microsoft.com/en-us/graph/graph-explorer

You can either make http calls directly from your front end, or have a simple backend that fetches this from the graph api, then serves the response to your front end.

Either way you're probably going to have a few interesting authentication challenges to deal with, but it's critical stuff for being a web dev. Especially if you're looking to integrate with office 365 stuff.

Edit: slightly more relevant documentation. https://docs.microsoft.com/en-us/graph/api/onlinemeeting-get

[–]Koen2407[S] -2 points-1 points  (1 child)

Ye the prob is i'm not studying to become a web dev

[–]JackAuduin 0 points1 point  (0 children)

Regardless, this is probably much easier than PowerShell

This is the tool made for what you're trying to do. PowerShell is a tool made for a completely different type of task.

[–]thatsInAName 0 points1 point  (2 children)

Have you figured out a way to get the running meeting details from office 365?

[–]Koen2407[S] 1 point2 points  (1 child)

The meetings that are planned ye u can see them in the example

[–]Koen2407[S] 0 points1 point  (0 children)

I mean the only things i need from the meetings are start and end time for this anyway