DEP-5: an example parser, choice of syntax for Files:

2009-09-13 Thread Jon Dowland
Given that DEP-5 is supposed to be about machine- readability, I thought it would be worthwhile trying to write something to parse the proposed format. Please find attached a short python script that I have written based on the current text of DEP-5 at dep.debian.net[1]. It's designed to be run f

Re: DEP-5: an example parser, choice of syntax for Files:

2009-09-13 Thread Benjamin Drung
Am Sonntag, den 13.09.2009, 23:58 +0100 schrieb Jon Dowland: > Most of the examples given in DEP-5 containing the path > character will not work, either, e.g. > > Files: debian/* > > Assuming they are passed into a find(1) invocation like so > > find . -path 'debian/*' > > (note the pre

Re: DEP-5: an example parser, choice of syntax for Files:

2009-09-14 Thread Chris Lamb
Benjamin Drung wrote: > You can get rid of those './' by replacing . with *: > > find * -path 'debian/*' That's not entirely equivalent; shells do not expand globs to include files beginning with "." by default. Jon, I would suggest using os.walk and fnmatch - it will cover this issue and w

Re: DEP-5: an example parser, choice of syntax for Files:

2009-09-14 Thread Charles Plessy
Le Sun, Sep 13, 2009 at 11:58:46PM +0100, Jon Dowland a écrit : > Please find attached a short python script that I have written based on the > current text of DEP-5 at dep.debian.net[1]. > It will print out a list of each Files: stanza found in the copyright, > followed by the list of files whic

Re: DEP-5: an example parser, choice of syntax for Files:

2009-09-15 Thread Jon Dowland
[ brief response, I hope to respond in more detail to much of this thread soon ] On Tue, Sep 15, 2009 at 08:54:05AM +0900, Charles Plessy wrote: > I think that DEP 5 still needs some work, so I hope that > you will not be too annoyed if some changes during the > discussions on the draft will break

Re: DEP-5: an example parser, choice of syntax for Files:

2009-09-20 Thread lkcl
apologies, i didn't find this thread until i talked on #debian-devel today, so um... i wrote my own :) http://pyjamas.svn.sourceforge.net/viewvc/pyjamas/trunk/contrib/copyright_check.py?view=log pyjamas has 2,000 files, from a wide range of projects and sources: (fckeditor, python, random win32 m