Message Boards Message Boards

Deploy part of a notebook to a web page?

Posted 6 years ago

I am a beginner and have subscribed to Mathematica Online. I would like to deploy part of a notebook to a web page but it seems that the menu option "Publish" only deploys an entire notebook without an option to select only part of the notebook.

Any help appreciated

POSTED BY: Lawrence Berry
4 Replies
Posted 6 years ago

Give this a try. We'll make a button that can deploy the current selection in a notebook:

Button["Deploy",
 Print@CloudDeploy[
   Notebook@Flatten@{NotebookRead@EvaluationNotebook[]}, 
   Permissions -> "Public"]
 ]

You can tune that call however you like--I'm not gonna bother making the interface nice.

Then select some cells in your notebook, click the button, and only those cells will deploy.

POSTED BY: b3m2a1 ​ 
Anonymous User
Anonymous User
Posted 6 years ago

you might be asking for too much. you already have the bull by the horns don't you?

if you had to maintain a website and find a way to get HTML into web pages dynamically - wow. it's already saving you a ton of work

but for the sake of argument. let's say you had a page deployed. then if you wanted you could cut and paste just part of a page on the page and re-deploy it.

how would you save or delete a deployment had you not opened or closed a file (have a filename)? i'm unsure you want what your asking for.

POSTED BY: Anonymous User

Lawrence,

Look at CloudDeploy[] and related functions. You can specify what gets sent to the cloud this way.

Regards,

Neil

POSTED BY: Neil Singer
Posted 6 years ago

b3m2a1: that's very helpful. Many thanks, also to Neil Singer and John Hendrickson for your help.

Lawrence

POSTED BY: Lawrence Berry
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract