Feature request

Sunday, 2 November 2014 · 4 messages · last reply 4 Nov 2014
PM
Pieter Masereeuw2 Nov 2014 18:12 #
Hi! It would be nice if there were a feature that basex could skip certain directories during the import. Now I have great trouble to remove (and later restore) all .svn-folders (Subversion) because I don't want them to be imported when I create a database. Perhaps this is already a feature, but then I could not find it. In that case, perhaps a more conspicuous place in the documentation would be a good idea. Thank you for an excellent product! Pieter Masereeuw
DK
Dirk Kirsten3 Nov 2014 09:34 #
Hello Pieter, sounds like a reasonable feature request to me. To be most flexible, I would suggest to allow regex in the input path. Christian, would do you think? In the meantime, you can already do the same thing using XQuery instead of database commands. Something like
for $f in file:list('your-directory')
where not(starts-with(file:name($f), '.'))
return db:add("DB", $f)
should emit adding files with a starting dot. Cheers, Dirk
Quoted text · Pieter Masereeuw · 16 lines
On 11/02/2014 06:12 PM, Pieter Masereeuw wrote: > Hi! > > It would be nice if there were a feature that basex could skip certain > directories during the import. Now I have great trouble to remove (and > later restore) all .svn-folders (Subversion) because I don't want them > to be imported when I create a database. > > Perhaps this is already a feature, but then I could not find it. In that > case, perhaps a more conspicuous place in the documentation would be a > good idea. > > Thank you for an excellent product! > > Pieter Masereeuw >
-- Dirk Kirsten, BaseX GmbH, http://basex.org |-- Firmensitz: Blarerstrasse 56, 78462 Konstanz |-- Registergericht Freiburg, HRB: 708285, Geschäftsführer: | Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle `-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22
CG
Christian Grün3 Nov 2014 15:21 #
Hi Dirk,
Quoted text · Dirk Kirsten · 1 line
> sounds like a reasonable feature request to me. To be most flexible, I would suggest to allow regex in the input path. Christian, would do you think?
Yes, this could be a viable option. Do you already have a concrete idea how you would do this? In Saxon, for example, a query string can be attached to the actual path [1]. Looking forward to more suggestions, Christian [1] http://www.xmlplease.com/collection
Quoted text · Dirk Kirsten · 35 lines
> > In the meantime, you can already do the same thing using XQuery instead of database commands. Something like > > for $f in file:list('your-directory') > where not(starts-with(file:name($f), '.')) > return db:add("DB", $f) > > should emit adding files with a starting dot. > > Cheers, > Dirk > On 11/02/2014 06:12 PM, Pieter Masereeuw wrote: >> Hi! >> >> It would be nice if there were a feature that basex could skip certain >> directories during the import. Now I have great trouble to remove (and >> later restore) all .svn-folders (Subversion) because I don't want them >> to be imported when I create a database. >> >> Perhaps this is already a feature, but then I could not find it. In that >> case, perhaps a more conspicuous place in the documentation would be a >> good idea. >> >> Thank you for an excellent product! >> >> Pieter Masereeuw >> > > -- > Dirk Kirsten, BaseX GmbH, http://basex.org > |-- Firmensitz: Blarerstrasse 56, 78462 Konstanz > |-- Registergericht Freiburg, HRB: 708285, Geschäftsführer: > | Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle > `-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22 >
MG
Marc van Grootel4 Nov 2014 09:04 #
Hi, .. and howdy Pieter, nice to hear from you Would you allow only glob-style patterns here or full regexps? Saxon and the proposal you cite only allow glob-style. Personally I am a proponent of the code based approach that Dirk suggested as it is more explicit. Not such a fan of an string based mini-language, too often have to look up the syntax again. A suggestion (especially when working with the somewhat weaker glob-patterns) is to allow a space or semi-colon separated list of glob-patterns and instead of select= use include= and exclude= - similar to Ant's filesets. --Marc
Quoted text · Christian Grün · 52 lines
On Mon, Nov 3, 2014 at 3:21 PM, Christian Grün <christian.gruen at gmail.com> wrote: > Hi Dirk, > >> sounds like a reasonable feature request to me. To be most flexible, I would suggest to allow regex in the input path. Christian, would do you think? > > Yes, this could be a viable option. Do you already have a concrete > idea how you would do this? In Saxon, for example, a query string can > be attached to the actual path [1]. > > Looking forward to more suggestions, > Christian > > [1] http://www.xmlplease.com/collection > > > >> >> In the meantime, you can already do the same thing using XQuery instead of database commands. Something like >> >> for $f in file:list('your-directory') >> where not(starts-with(file:name($f), '.')) >> return db:add("DB", $f) >> >> should emit adding files with a starting dot. >> >> Cheers, >> Dirk >> On 11/02/2014 06:12 PM, Pieter Masereeuw wrote: >>> Hi! >>> >>> It would be nice if there were a feature that basex could skip certain >>> directories during the import. Now I have great trouble to remove (and >>> later restore) all .svn-folders (Subversion) because I don't want them >>> to be imported when I create a database. >>> >>> Perhaps this is already a feature, but then I could not find it. In that >>> case, perhaps a more conspicuous place in the documentation would be a >>> good idea. >>> >>> Thank you for an excellent product! >>> >>> Pieter Masereeuw >>> >> >> -- >> Dirk Kirsten, BaseX GmbH, http://basex.org >> |-- Firmensitz: Blarerstrasse 56, 78462 Konstanz >> |-- Registergericht Freiburg, HRB: 708285, Geschäftsführer: >> | Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle >> `-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22 >>
-- --Marc

⚡Generated with XQuery