X-Authentication-Warning: delorie.com: mail set sender to geda-help-bounces using -f X-Recipient: geda-help AT delorie DOT com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=Yom2xxRvPxDhSwl1xKC+Ix0yWcwsk02H5hHQvkojB2c=; b=wnpKuom+WOPzZt7fCidCURLVFdlYDKPnAq+QlA+xatfl3VUI35y5mslaKw9Qf04LRO Qy4VRPXtPBb6PxcDgOzjOBxXd0Qszu/Ai3WXo2uvnLGd17Ru42qZ8qDTG1OeShUQGRHu /3stR/x8Bd1W4mNwj7USjX1y7s9e6aLTxCfUa96s6RL0/i+rP+jUXu5s6TxqlwbJlUKt KLsC/BwU4mV9bcbI5eBSFRNyflNKDb7i1VRIwcEWKrLhfske9DLaEhUzNeJOCcCstYhv wwp/1dwkuzdc1xSFfvHQUFgaDGHN4tvtGV5CmjO78GLiudQyyuKYTVKZWd/LW0FscyA+ nDGQ== X-Received: by 10.15.73.134 with SMTP id h6mr11148133eey.15.1393021998496; Fri, 21 Feb 2014 14:33:18 -0800 (PST) Message-ID: <5307D42C.8090902@gmail.com> Date: Fri, 21 Feb 2014 23:33:16 +0100 From: =?UTF-8?B?SmnFmcOtIMSMZWprYQ==?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: geda-help AT delorie DOT com Subject: Re: [geda-help] Is it possible to convert units mm2mil or mil2mm inside footprint file? References: <5306587D DOT 6040808 AT gmail DOT com> <1392932353 DOT 2139 DOT 12 DOT camel AT AMD64X2 DOT fritz DOT box> <1392933984 DOT 2139 DOT 17 DOT camel AT AMD64X2 DOT fritz DOT box> In-Reply-To: <1392933984.2139.17.camel@AMD64X2.fritz.box> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Reply-To: geda-help AT delorie DOT com Dne 20.2.2014 23:06, Stefan Salewski napsal(a): > On Thu, 2014-02-20 at 22:39 +0100, Stefan Salewski wrote: >> I do not know about a program for converting units, > You may note that vim editor can convert units too. > Recently I did a conversion from mm to default units by this command: > > :%s@\(\d\+\.\?\d\+\)mm@\=printf('%.0f',(str2float(submatch(1))*1.0e6/254.0))@g > > Of course you have to invert it -- if you are using vim and wants to use > such a macro let me know, I can help you inverting it. Basically some > sort of regular expression pattern matching... > > Thank you for sharing. Unfortunately I don't use vim, although I'm using Debian GNU/Linux. I'm still a newbie in using it. I came from Windows world a time ago and like simply standalone repeatable solutions, and your proposal is not for newbie like me. I see how many typing errors I can do in that vim command so I'm wary of going this way every time I want to do some footprint conversion.