Re: [sage-support] Re: Short question about saving the source of a Sage notebook

5 views
Skip to first unread message
Message has been deleted

Dan Drake

unread,
Nov 24, 2009, 10:06:20 PM11/24/09
to sage-s...@googlegroups.com
On Wed, Nov 25, 2009 at 4:01 AM, Bernhard Esslinger <bernhard....@db.com> wrote:
> My question is: Is there an easy way to move *.PY files instead of *.SWS
> files, as the SWS file are very big?

SWS files are just bzip'ed tar files. You can do

$ tar jtf foo.sws

to see the files inside a worksheet. If the .sws file is very big, it's
probably because there are lots of snapshots stored in it, so you could
extract the files, delete all the snapshot files, and then recompress
it. The actual code of the worksheet is in the file worksheet.txt.

Dan

--
--- Dan Drake
----- http://mathsci.kaist.ac.kr/~drake
-------

signature.asc

William Stein

unread,
Nov 24, 2009, 10:10:30 PM11/24/09
to sage-support
On Tue, Nov 24, 2009 at 7:06 PM, Dan Drake <dr...@kaist.edu> wrote:
> On Wed, Nov 25, 2009 at 4:01 AM, Bernhard Esslinger <bernhard....@db.com> wrote:
>> My question is: Is there an easy way to move *.PY files instead of *.SWS
>> files, as the SWS file are very big?
>
> SWS files are just bzip'ed tar files. You can do
>
> $ tar jtf foo.sws
>
> to see the files inside a worksheet. If the .sws file is very big, it's
> probably because there are lots of snapshots stored in it, so you could
> extract the files, delete all the snapshot files, and then recompress
> it. The actual code of the worksheet is in the file worksheet.txt.


(1) in sage >= 4.2 snapshots are never saved in worksheet files. I
think they might be saved in older version.

(2) the file is named worksheet.html now, instead of worksheet.txt
(like it used to be).

William

be

unread,
Nov 25, 2009, 2:10:32 PM11/25/09
to sage-support
On 25 Nov., 04:10, William Stein <wst...@gmail.com> wrote:
>   (1) in sage >= 4.2 snapshots are never saved in worksheet files.  I
> think they might be saved in older version.
> William

That the snapshots are no more saved in SWS files already saved a lot
of space.
But I hope you still can consider our request.

We moved an updated course of 8 worksheets from the Sage server in
Siegen to the sagenb server (".../pub/1126/" etc).
The move succeeded, but we would have wished that it's easier to bring
worksheets into a sage server:
- I'd prefer that sage notebook offers a download of the texts
additionally to the sws files.
Our 8 files made up 1767 KB as SWS files (zipped together), but
only 49 KB as text files (also zipped together).
At the end both have the same "real" content, isn't it?
- The 8 worksheets contained some links to each other.
Unfortunately we found no way to use relative links (like .\other-
file-name.html),
so we had to change this manually.
I guess courses often have their content split up in different
worksheets and so have this need.

Thanks, Bernhard

William Stein

unread,
Dec 9, 2009, 8:13:15 PM12/9/09
to sage-s...@googlegroups.com
On Wed, Nov 25, 2009 at 11:10 AM, be <bernhard....@db.com> wrote:
> On 25 Nov., 04:10, William Stein <wst...@gmail.com> wrote:
>>   (1) in sage >= 4.2 snapshots are never saved in worksheet files.  I
>> think they might be saved in older version.
>> William
>
> That the snapshots are no more saved in SWS files already saved a lot
> of space.
> But I hope you still can consider our request.
>
> We moved an updated course of 8 worksheets from the Sage server in
> Siegen to the sagenb server (".../pub/1126/" etc).
> The move succeeded, but we would have wished that it's easier to bring
> worksheets into a sage server:
> - I'd prefer that sage notebook offers a download of the texts
> additionally to the sws files.
>  Our 8 files made up  1767 KB as SWS files (zipped together), but
> only 49 KB as text files (also zipped together).
>  At the end both have the same "real" content, isn't it?

This is now:

http://trac.sagemath.org/sage_trac/ticket/7647

> - The 8 worksheets contained some links to each other.
>  Unfortunately we found no way to use relative links (like .\other-
> file-name.html),
>  so we had to change this manually.
>  I guess courses often have their content split up in different
> worksheets and so have this need.

We have been brainstorming about introducing a label system.

William
Reply all
Reply to author
Forward
0 new messages