On Nov 28, 2007 8:30 PM, jonhanke <[EMAIL PROTECTED]> wrote: > > > On Nov 29, 4:59 am, "William Stein" <[EMAIL PROTECTED]> wrote: > > On Nov 28, 2007 5:47 PM, jonhanke <[EMAIL PROTECTED]> wrote: > > > > > I am moving between versions of SAGE (2.8.12 -> 2.8.14), and would > > > like to move my old worksheets to the new installation. In principle > > > I could move my old worksheets to the new version by exporting them to > > > files, and then loading them in, however I can't get the old SAGE to > > > build/run to do this. I was wondering if I can just copy the > > > unprocessed worksheet files directly to their new home, and where they > > > are located? Also, if I could get the server running, is there a way > > > to migrate all worksheets at once? Thanks, > > > > Luckily, the format of the sage notebook hasn't changed at all in 6 > > months -- You should > > just be able to use all your Sage notebooks from any version of sage from > > the last 6 months with any other one automatically. > > > > If you want to make a copy or move a sage_notebook directory, just copy > > or move it. > > Great, but now where are they?
Worksheets are stored in a the directory sage_notebook (or whatever you called it). The state of the whole notebook and associated data files is stored in that directory. > I looked around (in the file system > and in the documentation), but couldn't find where the worksheet data > is stored. For instance, none of the following seem very promising: E.g., if you do cd my_favoriate_directory then sage -notebook a directory my_favoriate_directory/sage_notebook is created and inside of that the notebook state is stored. I have probably a dozen different sage_notebook directories just on my laptop. E.g., if I'm working on a paper I often make a sage_notebook directory in the same directory as the paper, and gather all relevant worksheets there. > > [EMAIL PROTECTED]/Documents/sage-2.8]: find . -name sage_notebook > ./devel/doc-2.8/overviews/a_tour_of_sage/sage_notebook > ./devel/doc-main/.hg/data/overviews/a_tour_of_sage/sage_notebook > ./devel/doc-main/overviews/a_tour_of_sage/sage_notebook > > > Apologies if I misunderstand your questions -- if so, please clarify. > > I was also wondering if there was a way to allow for migrating > worksheets in there were changes to the notebook format between > versions. You can take a sage_notebook directory from any version of the notebook that I have ever released and type sage -notebook and it should work with no loss of data. There was exactly one format change in the history of the notebook in I think June, and if your notebook is older than this, it will be migrated and the old worksheets will appear under "published". > I assumed that the "save worksheet to file" option would > automatically account for such format changes when importing a saved > worksheet from an older version of Sage, so this would be the correct > (i.e. safe) way of migrating worksheets. If this is true, then it > would be nice to have a "save all worksheets to a file" option, and if > not then I'm asking if there is a safe way of migrating worksheets > between Sage versions. You just don't have to worry about any of that -- Sage should (and does) read old worksheets. By the way, worksheets themselves are just stored as plain text files. E.g., if I do cd /Users/was/sage_notebook/worksheets/admin/0 on my laptop, there is a file worksheet.txt with these contents: justin system:sage {{{id=0| def CompSum(a,b): return a+b }}} {{{id=1| CompSum(3,4) /// 7 }}} {{{id=3| 2+2 /// 4 }}} {{{id=4| Q.<i,j,k>=QuaternionAlgebra(QQ,-3,4) ... }}} So you needn't be afraid of worksheets being stored in some weird internal database or binary file -- they're just in the directory sage_notebook/worksheets/username/number/worksheet.txt One nice benefit of this is if you want to find all worksheets on your computer in any directory that contain "this worksheet proves the Riemann Hypothesis", say, then you can just do a full text search and you'll find them. William --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~----------~----~----~----~------~----~------~--~---