delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2014/03/10/12:12:18

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
X-Mailer: exmh version 2.8.0 04/21/2012 (debian 1:2.8.0~rc1-2) with nmh-1.5
X-Exmh-Isig-CompType: repl
X-Exmh-Isig-Folder: inbox
From: karl AT aspodata DOT se
To: geda-user AT delorie DOT com
Subject: Re: [geda-user] identical symbol names
In-reply-to: <CAGRhJMajnGHi8WembiDtBPV9V8E0hXOUgaDoWXHyQ-BMXNiMYg@mail.gmail.com>
References: <CAG4ve9LgHNoVZoGaGgF67tadJ_n=L6Uy1g=UPPrkM0fL6Rgufw AT mail DOT gmail DOT com> <20140127234944 DOT 924148045B78 AT turkos DOT aspodata DOT se> <CAG4ve9+3jhFJ1Cr6CLUyLX_y02uigJECiUCwxjUWdP=heVocqg AT mail DOT gmail DOT com> <20140128201110 DOT DF7D78045B78 AT turkos DOT aspodata DOT se> <20140129072550 DOT GA24560 AT localhost DOT localdomain> <CAG4ve9+v9QxNRaPSFkmGfr6bKsv7km-Gt_gwXF7Eh4TX+AmNug AT mail DOT gmail DOT com> <CAOP4iL2JBUdF93kZF-iQ9Rv+VTN3iXoT+6C4LoBi5qaMxof=sA AT mail DOT gmail DOT com> <CAG4ve9+QsUf=nVXPe-f3VddGiqHn8sjZUJNkdu3QV1cOQDWiAg AT mail DOT gmail DOT com> <86CABBE6-EE80-4347-B7AA-3F5A8DA4C658 AT noqsi DOT com> <CAG4ve9LX0mYk2a1zpfWJJC=OP5Weq9pt3PF7_Nqx5vX4wpR=Bg AT mail DOT gmail DOT com> <1394402434 DOT 2151 DOT 28 DOT camel AT AMD64X2 DOT fritz DOT box> <20140309235005 DOT 783608020170 AT turkos DOT aspodata DOT se> <531D222C DOT 8060101 AT ecosensory DOT com> <20140310103056 DOT E1B1D8020170 AT turkos DOT aspodata DOT se> <CAGRhJMajnGHi8WembiDtBPV9V8E0hXOUgaDoWXHyQ-BMXNiMYg AT mail DOT gmail DOT com>
Comments: In-reply-to Joshua Lansford <joshua DOT lansford AT laserlinc DOT com>
message dated "Mon, 10 Mar 2014 07:42:06 -0400."
Mime-Version: 1.0
Message-Id: <20140310161148.5BB628020170@turkos.aspodata.se>
Date: Mon, 10 Mar 2014 17:11:48 +0100 (CET)
X-Virus-Scanned: ClamAV using ClamSMTP
Reply-To: geda-user AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: geda-user AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

Joshua:
> Create an external perl, python, eh... fortran ... script which symlinks
> all the symbols into the same directory with a new symbol name of
>  "<date>.<username>.<orignalName>.sym"  This puts each contributor's in
> their own user space, allows usage of new symbols without breaking old
> schematics and doesn't require any code change in gschem.  You can then
> filter by date or contributor in gschem.

 You mean someting like:

$ cat find_sym.sh
#!/bin/sh

time2iso() {
    s=$1; shift
    date -d "1970-01-01 UTC $s seconds" "$@"
}

fileModTime() {
    stat -c%Y "$@"
}

work() {
    i=$1
    author=$2
    a=$3

    dir=`dirname $a`
    file=`basename $a`
    ver=`grep $file $dir/CVS/Entries | ( IFS=/ read a b c d; echo $c )`

    s=`fileModTime $i`
    Date=`time2iso $s +%Y_%m_%d`
    # remove the echo if you trust this
    echo ln -s $a $tgt/${author}_v${ver}_${Date}_$file
}

Find() {
    root=$1
    tgt=$2

    for i in $root/*
    do
	author=`basename $i`
	find $i -type f -name \*.sym |
	while read a
	do
	    work $i $author $a
	done
    done
}

Find "$@"
$ find_sym.sh /Net/cvs/cvs.gedasymbols.org/www/user symbols | head -1
ln -s /Net/cvs/cvs.gedasymbols.org/www/user/ales_hvezda/symbols/lm2852y-1.sym symbols/ales_hvezda_v1.1_2013_11_30_lm2852y-1.sym
$

Would people be satisfied with that ?

Regards,
/Karl Hammar

-----------------------------------------------------------------------
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden
+46 173 140 57


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019