I am trying to publish to rpubs a html file generated from a rmd using knithtml. However, the knitting takes too long to run and i would not want to rerun the whole knit process again just to make minor changes to the appearance of the html document.
I cannot seem to find the publish button the moment i close the html file and reopen it again.
Install the package markdown then you can try the code:
result <- rpubsUpload(title='Your title',htmlFile='your_html_file_and_path.html',method=getOption('rpubs.upload.method','auto')
A successful upload would return 2 values in result, which are website addresses. Copy and paste the continueUrl into your browser to complete the upload.
Or you can use the function:
browseURL(result$continueUrl)
to go straight the webpage using the default browser.
Note that I am sure there is an automated way of uploading without using the browser but this is the only way I know right now.
Execute Following Commands- First set the PATH then execute other commands
setwd("C:/Users/MK10181/Desktop")
result <- rpubsUpload(title='SPC',contentFile='Report.html', originalDoc = 'Report.html')
result
$id
[1] "https://api.rpubs.com/api/v1/document/507696/c26dc92b5fe046488a4bfa8c670dab26"
$continueUrl
[1] "http://rpubs.com/publish/claim/507696/dc025c9952da401db86aef1f0f234734"
browseURL(result$continueUrl)
After this Your RPub's accounts page will open in the browser then you will see your document.
Related
I fail to understand some options in the dumpBackup.php maintenance script of Mediawiki.
What is the effect of --include-files? In my test wiki, dumpBackup.php --current --include-files and dumpBackup.php --current both contain the pages of the File: namespace and I see no difference.
What is the effect of --uploads? In my test wiki I see that the xml file contains a tiny bit more of xml but, to me, it looks like this is all information which is there already as part of the File: page. What is the use of this flag?
When I add both --include-files and --uploads I get the next surprise. I actually expected the combined effect of both options, but what I get is the file content of the uploaded files and the upload record. Why did I not get the file contents when I used --include-files alone?
When I use only --include-files and --uploads but no --current I would have expected to get the content of the uploaded files and the upload record (and none of the other pages). However ,I get the warning no valid action specified and no further information at all
I am completely confused since I do not understand the logic behind all of this.
I'm working on a flow to take data from a SharePoint list, and add it to a specific point in HTML. I am just saving the outputted HTML file to my OneDrive whilst testing.
I have found that when pasting my HTML code into a compose block, then outputting this, it works fine and I'm left with a normal looking HTML page when opened in a browser.
However, as soon as I add dynamic data in place of certain HTML elements it all seems to go wrong.
Firstly, the outputted HTML file now contains '/n' in place of every line break. I have also noticed that the outputted HTML code has now been changed to an array.
I've attached screenshots of my flow below.
Get Items:
Compose:
Create File:
Create File Peek Code:
Compose Output:
Create Output:
Create Output Raw:
Outputted HTML File:
Are you processing the output from that Compose action?
What you are doing is correct and it would not matter if you are using a single or multiple lines of text.
It seems to me that you are using the output of the compose somewhere else or maybe the file content box in the OneDrive action has an expression?
Please check the following:
The output of the compose should look normally
Make sure your OneDrive's action parameters look like this when you "Peek code" (Click on the action's ellipses). If it looks different, you'll have to track the variable/output you are using or review the expression.
I have replicated what you are doing and it is working fine, see attached images.
Edit mode:
Run:
Compose action
OneDrive action
Created File in OneDrive:
EDIT: Update response to use the result from SharePoint in two different ways.
Use the OneDrive action inside the 'Apply to each' if there is only 1 result, it will run once anyway.
You can omit the 'Apply to each' action using the expression box to set the values in the Compose, this is the syntax you can use.
outputs('Get_items')?['body']?['value']?[rowIndex]?['ColumnName']
In case there are several rows in the result, you'll have to validate which is the one you need.
I am trying to run a basic html Page in VS code.
Expected: I want to see my code output in browser window opened within VS code
Actual : I was not able to see anything happening
when I try to find the answers, it was mentioned to modify tasks.json file which I was not able to find anywhere
I found the solution
The reason why I was not able to find the tasks.json file/workspace settings is I created the file in this way
Open VS code>>file>>new>>save as html extension -- Wrong way of creating a file
Actual way we should create the file is
Open VS code>>file>>Open folder>>(you can create a folder and html file inside)>>file>>preference>>settings>>workspace setting(right corner this is enabled now)>>you can also type ctrl+shift+p and type "Configure Task Runner">>Other>>tasks.json(this is available now)
Conclusion -- You should create a working folder (workspace) to write or save files
Background
I use Onenote at work like a scrapbook, keeping track of assigned tasks and my progress through those tasks. Tasks are assigned via an automated email (outlook) typically these tasks involve manually reading web pages and filling in other webpages with results.
So far I've used the email arrival to trigger a VBA script which use uses data in the email to save the "requirements.html" page and the "ingredients.html" page locally. I then use python to parse and do some initial verification on the ingredients.html. This results in an augmented "requirements.html" containg colour coded status of parts.
my question
I've pretty much cut'n'pasted this code and managed to add a new page to section X of notebook Y (where x and y are strings passed to the function) or creating a new section by copying section.one file into the notebook folder DEST = "C:\Documents and Settings\Me\My Documents\OneNote Notebooks\Tasks\" + rqst_section + ".one"
while the code adds plain text to the page adding raw html source code in place of the plain text results in a object error when line
oneNote.UpdatePageContent doc.XML
is executed.
Has anyone managed to get the same result using VBA as this manual sequence,
select all text in browser window and copy 'n' paste it into a page in onenote.
I was getting a "UpdatePageContent" in "IApplication" failed error message, found out I had a Form Feed (chr(12) or vbFormFeed) character in a textfile I was trying to insert text into a page. Stripped that out and everything else seemed to work fine. Run the offending data through a hex editor, or strip it down little-by-little until you find the problem area.
Hope this helps.
When I run my ruby script, I want the output to be rendered as HTML, preferably with a browser (e.g. Chrome). However, I would very much prefer if I didn't have to start a webservice, because I'm not making a website. I've tried sinatra, and the problem with it, is that I have to restart the server every time I do changes to my code, plus it features requests (like GET/POST-arguments) which I don't really need.
I simply prefer the output from my Ruby program to appear as HTML as opposed to console-text -- since html allows for more creative/expressive output. Is there a good/simple/effective way to do this? (I'm using notepad++ to edit my code, so if its possible to combine the above with it somehow, that would be awesome).
Thanks alot :)
Using the gem shotgun you can run a Sinatra app that automatically reloads changes without restarting the server.
Alternatively, using a library like awesome_print which has HTML formatting, you could write a function which takes the output and saves it to a file. Then open the file in Chrome.
If you don't want to have to manually refresh the page in Chrome, you could take a look at guard-livereload (https://github.com/guard/guard-livereload) which will monitor a given file using the guard gem and reload Chrome. Ryan Bates has a screenshot on guard here, http://railscasts.com/episodes/264-guard.
Here's a function that overrides Kernel#puts to print the string to STDOUT and write the HTML formatted version of it to output.html.
require 'awesome_print'
module Kernel
alias :old_puts :puts
def puts(string)
old_puts string
File.open("output.html", "w") do |file|
file.puts string.ai(:html => true)
end
end
end
puts "test"