Is there a way to save a leaflet-shiny script as a single executable HTML file? For example for a leaflet script you can use:
saveWidget(map, file = "mymap.html")
Then the html file will contain all the script and infromation that can be opened in a web browser and the script will run as in Rstudio.
This does not seem to work once shiny was integrated.
I don't think you can do that.
Below are listed the available options to deploy a Shiny App
https://shiny.rstudio.com/deploy/
The following also looks promising for what you are looking to do
Share as R scripts (assumes R Studio is installed)
https://shiny.rstudio.com/tutorial/written-tutorial/lesson7/
Related
I am trying to learn a bit about web technologies therefore I am trying to create a catalogue for my files.
The situation is the following:
I have a folder with N sub folders;
in each of there sub folders there is an image with always the same name (ie: image.jpg)
in each of there sub folders there is also a certain swg file with always the same name (ie: test.swg)
I would like to create an HTML file which read all the sub folders and create a preview using image.jpg, and when one clicks on the preview test.swg should be launched (not in the browser if possible)
The HTML files should contains all these preview like a catalogue.
How can I do this? should I have a local web server which runs in my machine? is it possible to do this with non web page technologies?
Thank you!
As far as i know Javascript & HTML doesn't have access to the filesystem as it's running on your browser and shouldn't be possible to go through the files iteratively because it would be some kind of breach in security.
If you ask me it's possible or not without a server, it should be possible but it is going to use other technology, for example:
Using a Command Line Interface in Linux or Windows based os you could write a shell script that iteratively will go through the files and folder path, and possibly create a JSON from it. From there the javascript could technically load that file like below.
<script type="text/javascript" src="data.json"></script>
<script type="text/javascript" src="javascript.js"></script>
But do note that you should periodically run the shell script periodically with something like scheduler or refresh it manually.
If you want to do it the normal way you could use many different server side language, for example NodeJs, or PHP as I think both of them require only little configuration.
You could post follow up question if you've decided on which language you want to use.
Below is some reference that you can use to start working on reading the directories
NodeJS
Node.js fs.readdir recursive directory search
Get all files recursively in directories NodejS
PHP
List all the files and folders in a Directory with PHP recursive function
How to recursively iterate through files in PHP?
After reading the directories & Files you just need to pass the data to the "rendering" part, and use some javascript to invoke the .swg when the image is clicked
But I'm not really sure about the .swg file can be invoked to the desktop app directly or not you could do some research on it
Open online file with desktop applications?
I have a simple batch (let's call it run_job.bat) job that I set up in VSTS as release definition. VSTS reads this file from the remote git repository that is also set up in VSTS.
The agent is configured on a remote machine to access certain folder, say C:\AllScans\FolderWhereScanIsRunning\ bring the necessary batch file in there and start the run. The job runs some scan against web application and generates report file with some unknown for me extension.
Another job then runs as queue in VSTS (let's call it run_report.bat) that transforms this unckown file to zip file where .html, .css and .js files are sitting. Simply exporting this manually to another folder and double clicking on the index.html file shows nicely looking html report on how the scan is run, and if there were any failures during it.
My question: is it possible to access this zip file C:\AllScans\FolderWhereScanIsRunning\report.zip, unzip it and bring this index.html file within the VSTS UI? I want be able for my other coworkers to see the results of the scan in html format without leaving VSTS interface? Thanks for the help
There isn't any way to achieve this by default.
A workaround would be deploy the html files to a web page which allow iframe embedding and then use "Embedded Webpage" widget in VSTS to show the content.
I am making SharePoint spaces for various departments in insurance company. One of them wants to save and share their outputs via SharePoint. That outputs are maps with risk areas. Because maps includes many data layers, all the files are in one folder.
I have uploaded a folder with CSS, JSON, JS and HTML files to the library in SharePoint, but when I doubleclicked on HTML file, the page will not load. I think it's due to the JSON files.
What I need is to run whole page correctly with simple doubleclick.
Can anyone give me advice how to run other files supporting HTML with doubleclicking on HTML file?
Thank you.
I've had this same issue. To get the HTML to play in the browser (without SharePoint trying to make you download it), you need to rename the HTML file to an ASPX file.
To do this, you need to be in the Windows Explorer view (from a document library, go Library > Open with Explorer). Then change the file name from index.html to index.aspx.
However, if you're also using JSON files, that could be an issue. SharePoint prohibits you from uploading JSON files unfortunately.
I would like to be able to load document files into my webserver / application server (docx, xslx, pptx, pdf). I need to view the files in WYSYIG and be able to copy and paste.
I found several libraries however it's either not fully WYSIYG or not enable copy/paste.
Let me know if there is library like this, even if it requires some plugin.
I want to use R language in HTML. Is there any R library or other method so I can put graph created by R in html page?
R will create the graph and then those graph should be shown in html page. It is a continuous process (i.e. r will continuously create graph and html will use them.)
To embed charts (and R code) into a simple html page just use knitr as suggested in the above comment. But if you need something more try Rook which is a web server interface for R. You'll be able not just to put chart and code but also to make the user able to send requests to R (and get the responses, e.g. re-plot a chart, display different variables, etc). Basic 'getting started' here
Another package I am just looking at now is hwriter
The simplest way is to export graph to a ftp location from where your webpage is sourcing it's graph. I already using same solution just for private use, I export png to google drive subdirectory on my computer, google drive application sync it automatically to cloud space.