ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 13 Nov 2013 06:12:28 +0100Track a sage worksheet in githttps://ask.sagemath.org/question/10731/track-a-sage-worksheet-in-git/I would like to track the changes to a sage worksheet in git so I can collaborate with github/bitbucket with a group who typically does not have access to a centralized machine. Right now I have been copying the sage .sws files to the repository for each version, but they are binary so much of the utility of version control is lost (the comments, feature tracking, etc still work)
I suggest a split between text/code and binary data and maybe having 2 files per worksheet instead of 1. I have already played with uncompressing the sws and version tracking the worksheet.html, but that doesn't integrate as nicely into a workflow. Wed, 13 Nov 2013 05:13:28 +0100https://ask.sagemath.org/question/10731/track-a-sage-worksheet-in-git/Answer by tmonteil for <p>I would like to track the changes to a sage worksheet in git so I can collaborate with github/bitbucket with a group who typically does not have access to a centralized machine. Right now I have been copying the sage .sws files to the repository for each version, but they are binary so much of the utility of version control is lost (the comments, feature tracking, etc still work)</p>
<p>I suggest a split between text/code and binary data and maybe having 2 files per worksheet instead of 1. I have already played with uncompressing the sws and version tracking the worksheet.html, but that doesn't integrate as nicely into a workflow. </p>
https://ask.sagemath.org/question/10731/track-a-sage-worksheet-in-git/?answer=15693#post-id-15693You can work with `.rst` (`ReStructuredText`) files since these can be imported in a notebook and that there are ways to convert from `.sws` to `.rst` in both directions:
sage -advanced
tells you:
File conversion:
-rst2txt [...] -- Generates Sage worksheet text file from standalone
reStructuredText source.
-rst2sws [...] -- Generates Sage worksheet (.sws) from standalone
reStructuredText source.
-sws2rst <sws doc> -- Generates a reStructuredText source file from
a Sage worksheet (.sws) document.
Also, all the documentation and tutorials are written in `ReStructuredText`, and can be used as worksheets. They can be a good source of example to start with.
Wed, 13 Nov 2013 06:12:28 +0100https://ask.sagemath.org/question/10731/track-a-sage-worksheet-in-git/?answer=15693#post-id-15693