Large worksheet upload to notebook
asked 2011-12-05 07:30:46 -0500
This post is a wiki. Anyone with karma >750 is welcome to improve it.
It has been a problem to upload the large single worksheet files or archives to Sage Notebook server for quite a long time (see for example this and this mailing list threads) and seems to have no comprehensive answer or recipe.
I found a simple solution to the problem of uploading large files to the local Sage Notebook server (running on my own PC). Here it is:
Let's assume we downloaded a large (about 30 MB) single "MyWorksheet.sws" file from some remote Sage Notebook server in order to add it to our local one, and put it into the "Downloads" folder.
First of all we need to unpack this file. Since the .sws files are actually the .tar.bz2 archives, we can simply do the following
tar -xvf MyWorksheet.sws
which gives us a directory named "sage_worksheet" which contains all the worksheet stuff.
Next we should go to the directory
where the "system_user_name" is a name we use to login (assuming that we start our local Sage Notebook server from this account also) and "sage_user_name" is a name of the user account we want to add the "MyWorksheet" worksheet to.
There should be some catalogs named consequently "1", "2", "3", ... in this directory. We need to find the biggest number (let's assume it will be "41") and create an empty catalog with the name larger by one ("42" in our example).
Next we have to move all the contents from the unpacked "sage_worksheet" directory to this newly created one:
mv -t 42/ ~/Downloads/sage_worksheet/*
Let's check what we have now:
If everything is done correctly, we shoul see something like this:
cells worksheet.html worksheet.txt worksheet_conf.pickle
Now we can (re)start our local Sage Notebook server, log in and see that the MyWorksheet is there in the worksheets list.