X-Authentication-Warning: delorie.com: mail set sender to geda-help-bounces using -f X-Recipient: geda-help AT delorie DOT com Message-ID: <1392933984.2139.17.camel@AMD64X2.fritz.box> Subject: Re: [geda-help] Is it possible to convert units mm2mil or mil2mm inside footprint file? From: Stefan Salewski To: geda-help AT delorie DOT com Date: Thu, 20 Feb 2014 23:06:24 +0100 In-Reply-To: <1392932353.2139.12.camel@AMD64X2.fritz.box> References: <5306587D DOT 6040808 AT gmail DOT com> <1392932353 DOT 2139 DOT 12 DOT camel AT AMD64X2 DOT fritz DOT box> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Reply-To: geda-help AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-help AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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...