Re: Notebooks and CVS: how to automatically strip output?
- To: mathgroup at smc.vnet.net
- Subject: [mg33098] Re: Notebooks and CVS: how to automatically strip output?
- From: Tim Wichmann <wichmann at arboretum.itwm.uni-kl.de>
- Date: Sun, 3 Mar 2002 06:30:17 -0500 (EST)
- Organization: Universitaet Kaiserslautern
- References: <email@example.com>
- Sender: owner-wri-mathgroup at wolfram.com
Hi, Janus Wesenberg <jaw_remove at nospam.ifa.au.dk> writes: > What I need is a way to perform this action automatically from a > makefile: read a given notebook, strip the output (and cache) and write > the result to a new notebook file (which I will then send to the CVS). > > Any ideas? I have written a Perl script (called `rmnbcache') that strips all cache data from a Mathemetica notebook (i.e., ImageCache, ImageRangeCache, CellTagsIndex, NotebookOutline, etc.). This reduces the file size and prevents cvs from being confused by irrelevant differences in cache data. Thus you can say something like this in your Makefile: strip: $(NOTEBOOKS) rmnbcache $(NOTEBOOKS) We are using this Perl script for several years now in our group to commit notebooks to our cvs repository. Additionally we have a Perl script called `testnbcache' which is called by cvs (using `commitinfo'). This script denies commiting of notebook files which have not been stripped. If someone is interested in these Perl scripts, please contact me. I will then send you the files by email. Best regards, Tim -- Tim Wichmann, wichmann at itwm.fhg.de Fraunhofer Institute for Industrial Mathematics D-67663 Kaiserslautern, Germany Tel: +49(0)631/205-4475, Fax: ~-4139