zandergordan / pub2s3 Goto Github PK
View Code? Open in Web Editor NEWRStudio Addin to Publish Reports to S3 Buckets
License: Other
RStudio Addin to Publish Reports to S3 Buckets
License: Other
use_readmermd()
Or perhaps also copy it to the clipboard, though that is potentially dangerous if users have something important on their clipboard. Probably best to just print it to the console. Oh actually, rstudioapi::showDialog()
with the url
option is perfect for this.
The package is currently setup to publish each report into the top-level of the S3 bucket. It may be desirable to allow users to specify a subdirectory of the bucket, for instance organizing reports by project or time-period.
Relatedly, the Addin could also automatically update the index.html each time it publishes a new report. This would be done by grabbing the existing index.html
(if any), and adding the name of the new report as a new entry.
In some cases, rendering a report is computationally expensive. Consistent use of the cache
chunk option avoids this, but that may not always be the case. In case the user has already used the "knit" button to compile the report, it will be good for the addin to detect the existence of a compiled report, and offer to just upload that, rather than rendering again.
Perhaps easier than making multiple dialog boxes, perhaps this can just be a separate function, so that the package installs 2 Addins: "Publish" & "Render and Publish". In this case, "Publish" would return an error if there is no already-rendered version.
Ideally, there would be some way to detect if the current source code of the active .rmd is consistent with the previously-rendered version, but that sounds dicey.
The way I use the file.path
function currently to form the S3 object name means that on windows, the object name will be invalid, containing backslashes instead of forward slashes.
Currently, it is hard-coded into the Addin that the user is trying to publish an rmarkdown
report with an HTML output format. It is easy to imagine PDF being desired instead, and even .docx format could be accommodated as well.
Ideally, the prompt would offer users a radio button or dropdown box to select the bucket they want. It seems this is not possible, with rstudioapi
, so I would have to turn the Addin into a shiny gadget to make this happen, which is more complexity than I want.
I think it may be best to just change the message provided in the current prompt to something like "If you are not sure what bucket to use, please hit cancel and run aws.s3::bucketlist()
to view your currently accessible buckets". Changing buckets may not be that common anyway, so storing the last used bucket as a preference is probably good enough.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.