Mail Archives: geda-user/2011/12/04/17:19:56
--0016363b7f600a648a04b34b9871
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
On Sat, Dec 3, 2011 at 10:55 PM, Karl Hammar <karl AT aspodata DOT se> wrote:
> Luigi:
> > On Sat, Dec 3, 2011 at 2:33 PM, Karl Hammar <karl AT aspodata DOT se> wrote:
> ...
> > To manage $HOME substitution you need getenv:
> > (component-library-add-tree "cvs" (build-path (getenv "HOME")
> "/Net/cvs/
> > cvs.gedasymbols.org/www/user"))
>
> Hmm, my c version [1] got that for free. How should I do to take a
> string and substitute all $VAR's, it's annoying to do that manually
> in the gafrc file ?
>
libgeda already has s_expand_env_variables() method to do this, but is not
exported to scm (as i can see).
Before start writing new code someone could ask to developers if is it
possible to export it for use in guile.
> ...
> > > "personal/Generic capacitors"
> > > "personal/Generic capacitors/AVX Capacitors"
> > >
> > >
> > The version in attachment builds description in that way.
> > Now the first parameter is a prefix which adds to the folders.
> > The second parameter is the main folder and will be excluded from the
> > description string.
> >
> > so as example a line such:
> > (component-library-add-tree "cvs" (build-path (getenv "HOME") "/Net/cvs=
/
> > cvs.gedasymbols.org/www/user"))
> >
> > will produce as result:
> > cvs/Capacitors
> > cvs/Capacitors/AVX
> > ...
>
> Your script works fine, except that there can be a lot of directories
> without .sym files, see attachment to see what can happen.
>
I know this issue. I'm working on a fast method to solve this...
> BTW, wouldn't it be easier to write 'directory instead of
> (string->symbol "directory") ?
>
Sometimes i need strong mental concentration (especially when my children
are playing near me ) ;-)
Your script is much faster than mine [2], how could I speed it up?
>
>
Maybe the hash computation for each file could be the problem.
> Regards,
> /Karl Hammar
>
> [1] http://archives.seul.org/geda/user/May-2011/msg00556.html
> [2]
> http://www.delorie.com/archives/browse.cgi?p=3Dgeda-user/2011/12/03/15:41=
:27
>
> -----------------------------------------------------------------------
> Asp=F6 Data
> Lilla Asp=F6 148
> S-742 94 =D6sthammar
> Sweden
> +46 173 140 57
>
>
Regards,
Luigi
--0016363b7f600a648a04b34b9871
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<br><br><div class=3D"gmail_quote">On Sat, Dec 3, 2011 at 10:55 PM, Karl Ha=
mmar <span dir=3D"ltr"><<a href=3D"mailto:karl AT aspodata DOT se">karl AT aspodat=
a.se</a>></span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"ma=
rgin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Luigi:<br>
<div class=3D"im">> On Sat, Dec 3, 2011 at 2:33 PM, Karl Hammar <<a h=
ref=3D"mailto:karl AT aspodata DOT se">karl AT aspodata DOT se</a>> wrote:<br>
</div>...<br>
<div class=3D"im">> To manage $HOME substitution you need getenv:<br>
> =A0 (component-library-add-tree "cvs" (build-path (getenv &q=
uot;HOME") "/Net/cvs/<br>
> <a href=3D"http://cvs.gedasymbols.org/www/user" target=3D"_blank">cvs.=
gedasymbols.org/www/user</a>"))<br>
<br>
</div>Hmm, my c version [1] got that for free. How should I do to take a<br=
>
string and substitute all $VAR's, it's annoying to do that manually=
<br>
in the gafrc file ?<br></blockquote><div><br>libgeda already has s_expand_e=
nv_variables() method to do this, but is not exported to scm (as i can see)=
. <br>Before start writing new code someone could ask to developers if is i=
t possible to export it for use in guile.<br>
<br></div><blockquote class=3D"gmail_quote" style=3D"margin: 0pt 0pt 0pt 0.=
8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
...<br>
<div class=3D"im">> > "personal/Generic capacitors"<br>
> > "personal/Generic capacitors/AVX Capacitors"<br>
> ><br>
> ><br>
> The version in attachment builds description in that way.<br>
> Now the first parameter is a prefix which adds to the folders.<br>
> The second parameter is the main folder and will be excluded from the<=
br>
> description string.<br>
><br>
> so as example a line such:<br>
> (component-library-add-tree "cvs" (build-path (getenv "=
HOME") "/Net/cvs/<br>
> <a href=3D"http://cvs.gedasymbols.org/www/user" target=3D"_blank">cvs.=
gedasymbols.org/www/user</a>"))<br>
><br>
> will produce as result:<br>
> cvs/Capacitors<br>
> cvs/Capacitors/AVX<br>
> ...<br>
<br>
</div>Your script works fine, except that there can be a lot of directories=
<br>
without .sym files, see attachment to see what can happen.<br></blockquote>=
<div><br>I know this issue. I'm working on a fast method to solve this.=
..<br>=A0<br></div><blockquote class=3D"gmail_quote" style=3D"margin: 0pt 0=
pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;=
">
BTW, wouldn't it be easier to write 'directory instead of<br>
(string->symbol "directory") ?<br></blockquote><div>=A0</div><=
div>Sometimes i need strong mental concentration (especially when my childr=
en are playing near me ) ;-) <br><br></div><blockquote class=3D"gmail_quote=
" style=3D"margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, =
204); padding-left: 1ex;">
=A0</blockquote><blockquote class=3D"gmail_quote" style=3D"margin: 0pt 0pt =
0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Your script is much faster than mine [2], how could I speed it up?<br>
<br></blockquote><div><br>Maybe the hash computation for each file could be=
the problem.<br>=A0</div><blockquote class=3D"gmail_quote" style=3D"margin=
: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-lef=
t: 1ex;">
Regards,<br>
/Karl Hammar<br>
<br>
[1] <a href=3D"http://archives.seul.org/geda/user/May-2011/msg00556.html" t=
arget=3D"_blank">http://archives.seul.org/geda/user/May-2011/msg00556.html<=
/a><br>
[2] <a href=3D"http://www.delorie.com/archives/browse.cgi?p=3Dgeda-user/201=
1/12/03/15:41:27" target=3D"_blank">http://www.delorie.com/archives/browse.=
cgi?p=3Dgeda-user/2011/12/03/15:41:27</a><br>
<div class=3D"HOEnZb"><div class=3D"h5"><br>
-----------------------------------------------------------------------<br>
Asp=F6 Data<br>
Lilla Asp=F6 148<br>
S-742 94 =D6sthammar<br>
Sweden<br>
<a href=3D"tel:%2B46%20173%20140%2057" value=3D"+4617314057">+46 173 140 57=
</a><br>
<br>
</div></div></blockquote></div><br>Regards,<br>Luigi<br>
--0016363b7f600a648a04b34b9871--
- Raw text -