Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #203183

Re: librecad

From "Jeremy Nicoll" <jn.ml.dbn.25@letterboxes.org>
Newsgroups linux.debian.user
Subject Re: librecad
Date 2018-12-09 00:10 +0100
Message-ID <x2TTs-6Dd-7@gated-at.bofh.it> (permalink)
References <x2atk-47t-5@gated-at.bofh.it> <x2DF0-54s-1@gated-at.bofh.it> <x2KZP-16E-3@gated-at.bofh.it> <x2PZv-43D-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat, 8 Dec 2018, at 18:59, Gene Heskett wrote:

> ... but the lack of a plainly marked, multiple step undo gets 
> me into a dead end box that results in a quit w/o save every time. 

I had a similar problem with a music-typesetting package under
Windows.

I guess a versioning file system (as discussed here fairly recently)
would help, but I don't have one.

Eventually I solved it with a script which examines a set of files 
(I specify a pattern for those) in the folder I'm working in.   When 
it starts and every few seconds (eg 10 secs) afterwards, it looks at
the files whose name matches that pattern.

For every file it finds for which there is not a corresponding backup
copy, it makes one.  A backup copy of a file has

    (svd@yyyymmdd-hhmmss)

appended to its extensionless leafname, where the date & time 
correspond to the time the backed-up file was last saved (not 
the time that this script saved the backup). 

So as soon as the script starts it makes a copy of each matching 
file (assuming none of those had prior backup copies) then 
whenever such a file changes and is written to disk again, another
backup is made.    So eg 

    Some song or other.pqr                   could yield:
                                                     
    Some song or other (svd@20120716-184500).pqr         
    Some song or other (svd@20120716-190723).pqr   etc   


I experimented with the monitor delay, and found (on a modern 
PC) when not using a filename pattern that matched huge numbers
of files, that there was no performance hit at all whether I looked at
the files every second or two or a good deal less often.  I made the
script pop-up a message box though when it had successfully made
a copy, and got into the habit of waiting for that confirmation every
time I'd just saved a file.

Rather than writing the script, what took longest to do was getting 
used to remembering to save the file(s) I was working on so often.
I used to keep detailed notes about I was doing to the musical score, 
as well, and stored the incrementally changing backup filenames in
the notes so it was easy to go back to previous points.

Not only was this useful for undoing my mistakes, it proved useful
for finding bugs in the typesetter AND being able to send the author
of that test files and 'what to do to recreate the problem' notes.  It
was quite often a day or two after I made some change to a file that
I found repercussions of that change, so notes (to help me find the
key files) were really important.


The script itself would run until stopped.  I controlled that by 
having each script generate a carefully-named flagfile and as soon
as that was deleted the corresponding script would stop.    I could 
have multiple instances of the script running at once, and both the 
flagfiles and the typesetter (or whatever else) files were kept in folders 
visible from other machines/userids (all me though).  So flagfiles had 
in them

   - a representation of the monitored filename pattern
   - the monitor time interval
   - the machine name
   - the userid name
   - the time the script started
   - the pid under it was running

The pid was there so that when writing and testing the script
I could tell which was which in taskmanager, which saw them 
all as the same thing - an instance of the script language's 
interpreter being run.


The script is written in ooREXX; anyone who wants it can have
a copy.  I expect somethig similar could be written in loads of 
other langages, but it's the one I know best.

-- 
Jeremy Nicoll - my opinions are my own.

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

librecad Gene Heskett <gheskett@shentel.net> - 2018-12-06 23:40 +0100
  Re: librecad "hdv@gmail" <hdv.jadev@gmail.com> - 2018-12-06 23:50 +0100
    Re: librecad Yves <ydubeau@pm.me> - 2018-12-07 01:30 +0100
      Re: librecad Doug <dmcgarrett@optonline.net> - 2018-12-07 02:10 +0100
        Re: librecad Gene Heskett <gheskett@shentel.net> - 2018-12-07 03:10 +0100
      Re: librecad Gene Heskett <gheskett@shentel.net> - 2018-12-07 02:50 +0100
    Re: librecad Gene Heskett <gheskett@shentel.net> - 2018-12-07 01:50 +0100
      Re: librecad John Hasler <jhasler@newsguy.com> - 2018-12-07 02:50 +0100
        Re: librecad Gene Heskett <gheskett@shentel.net> - 2018-12-07 03:20 +0100
          Re: librecad John Hasler <jhasler@newsguy.com> - 2018-12-07 03:30 +0100
            Re: librecad Gene Heskett <gheskett@shentel.net> - 2018-12-07 04:40 +0100
            Re: librecad Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2018-12-07 19:50 +0100
              Re: librecad John Hasler <jhasler@newsguy.com> - 2018-12-07 20:20 +0100
                Re: librecad Greg Wooledge <wooledg@eeg.ccf.org> - 2018-12-07 20:30 +0100
                Re: librecad Gene Heskett <gheskett@shentel.net> - 2018-12-08 00:50 +0100
                Re: librecad John Hasler <jhasler@newsguy.com> - 2018-12-08 02:00 +0100
                Re: librecad Gene Heskett <gheskett@shentel.net> - 2018-12-08 03:50 +0100
                Re: librecad Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2018-12-08 05:20 +0100
                Re: librecad Gene Heskett <gheskett@shentel.net> - 2018-12-08 06:50 +0100
                Re: librecad John Hasler <jhasler@newsguy.com> - 2018-12-08 14:40 +0100
                Re: librecad Gene Heskett <gheskett@shentel.net> - 2018-12-08 20:00 +0100
                Re: librecad John Hasler <jhasler@newsguy.com> - 2018-12-08 20:50 +0100
                Re: librecad Gene Heskett <gheskett@shentel.net> - 2018-12-08 21:10 +0100
                Re: librecad John Hasler <jhasler@newsguy.com> - 2018-12-08 21:30 +0100
                Re: librecad Gene Heskett <gheskett@shentel.net> - 2018-12-08 22:00 +0100
                Unpacking a large zipfile, was Re: librecad David Wright <deblis@lionunicorn.co.uk> - 2018-12-09 00:20 +0100
                Re: librecad "Jeremy Nicoll" <jn.ml.dbn.25@letterboxes.org> - 2018-12-09 00:10 +0100
                Re: librecad John Hasler <jhasler@newsguy.com> - 2018-12-09 01:50 +0100
                Re: librecad Gene Heskett <gheskett@shentel.net> - 2018-12-09 02:50 +0100
                Re: librecad John Hasler <jhasler@newsguy.com> - 2018-12-09 03:20 +0100
                Re: librecad Gene Heskett <gheskett@shentel.net> - 2018-12-09 03:30 +0100
                Re: librecad "Jeremy Nicoll" <jn.ml.dbn.25@letterboxes.org> - 2018-12-09 03:30 +0100
              Re: librecad (was) Gene Heskett <gheskett@shentel.net> - 2018-12-08 00:40 +0100
        Re: librecad Gene Heskett <gheskett@shentel.net> - 2018-12-07 04:20 +0100
        Re: librecad Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2018-12-07 04:50 +0100
      Re: librecad "hdv@gmail" <hdv.jadev@gmail.com> - 2018-12-07 10:30 +0100
        Re: librecad Gene Heskett <gheskett@shentel.net> - 2018-12-07 14:50 +0100
          Re: librecad "hdv@gmail" <hdv.jadev@gmail.com> - 2018-12-07 15:10 +0100
      Re: librecad Joe <joe@jretrading.com> - 2018-12-07 11:00 +0100
        Re: librecad "hdv@gmail" <hdv.jadev@gmail.com> - 2018-12-07 11:30 +0100
  Re: librecad "Jeremy Nicoll" <jn.ml.dbn.25@letterboxes.org> - 2018-12-07 07:50 +0100
    Re: librecad Gene Heskett <gheskett@shentel.net> - 2018-12-07 14:50 +0100
      Re: librecad John Hasler <jhasler@newsguy.com> - 2018-12-07 16:20 +0100
        Re: librecad Erik Christiansen <dvalin@internode.on.net> - 2018-12-08 03:00 +0100
          Re: librecad Gene Heskett <gheskett@shentel.net> - 2018-12-08 04:30 +0100
        Re: librecad John Hasler <jhasler@newsguy.com> - 2018-12-08 04:50 +0100
    Re: librecad John Hasler <jhasler@newsguy.com> - 2018-12-07 15:10 +0100

csiph-web