Feature #1044

Feature #1045: RCP: X.X, new import parameters form field: 'words per page/mots par page'

TBX: x.x, new import parameter scripts variable 'pageSize'

Added by Serge Heiden almost 5 years ago. Updated over 4 years ago.

Status:Feedback Start date:10/08/2014
Priority:Normal Due date:
Assignee:- % Done:

90%

Category:Import Spent time: -
Target version:TXM 0.7.7

Description

Currently, the number of words per page is hardcoded in each *Loader.groovy script:
(output of '# grep 'new pager(' org.txm.toolbox/src/groovy/org/txm/importer/*/*Loader.groovy')

bfm/bfmLoader.groovy:    def ed = new pager(txmFile, outdir, txtname, NoSpaceBefore, NoSpaceAfter,600, corpusname, metadataXPath);
bvh/bvhLoader.groovy:    def ed = new pager(srcfile,resultfile, NoSpaceBefore, NoSpaceAfter,600);
corptef/corptefLoader.groovy:    def ed = new pager(srcfile,resultfile, NoSpaceBefore, NoSpaceAfter,600);
csv/csvLoader.groovy:    def ed = new pager(srcfile, resultfile, NoSpaceBefore, NoSpaceAfter, 500, imp.getMetaDatas(), basename);
discours/discoursLoader.groovy:    def ed = new pager(srcfile, outdir, txtname, NoSpaceBefore, NoSpaceAfter, 500, basename, "pb");
doc/docLoader.groovy:    def ed = new pager(txmFile, outdir, txtname, NoSpaceBefore, NoSpaceAfter, 99999, basename, "pb");
factiva/factivaLoader.groovy:    def ed = new pager(txmFile, outdir, txtname, NoSpaceBefore, NoSpaceAfter, 500, basename, "pb");
fleurs/fleursLoader.groovy:    def ed = new pager(srcfile,resultfile, NoSpaceBefore, NoSpaceAfter,500,basename);
frantext/frantextLoader.groovy:    def ed = new pager(txmFile, outdir, txtname, NoSpaceBefore, NoSpaceAfter,600, corpusname, metadataXPath);
hyperbase/hyperbaseLoader.groovy:    def ed = new pager(srcfile, outdir, txtname, NoSpaceBefore, NoSpaceAfter, 500, basename, "pb");
hyperprince/hyperprinceLoader.groovy:    def ed = new pager(srcfile,resultfile, NoSpaceBefore, NoSpaceAfter,500);
perrault/perraultLoader.groovy:    def ed = new pager(srcfile,resultfile, NoSpaceBefore, NoSpaceAfter,600);
quick/quickLoader.groovy:    def ed = new pager(srcfile, outdir, txtname, NoSpaceBefore, NoSpaceAfter, 500, basename, null);
RGAQCJ/rgaqcjLoader.groovy:    def ed = new pager(srcfile, resultfile, NoSpaceBefore, NoSpaceAfter, 600);
tigersearch/tigersearchLoader.groovy:    def ed = new pager(srcfile, outdir, txtname, NoSpaceBefore, NoSpaceAfter, 500, basename, "pb");
tmx/tmxLoader.groovy:        def ed = new pager(srcfile, outdir, txtname, NoSpaceBefore, NoSpaceAfter, 140, basename, null,splitTUs);
transcriber/transcriberLoader.groovy:        def ed = new pager(txmFile, htmlDir, txtname, NoSpaceBefore, NoSpaceAfter, 500, basename, "pb", metadatas);
wtc/wtcLoader.groovy:def ed = new pager(binWtcFile, outdir, NoSpaceBefore, NoSpaceAfter, 500, basename, registryFile !=null, c.pAttributesList);
xmltxm/xmltxmLoader.groovy:    def ed = new pager(srcfile, outdir, txtname, NoSpaceBefore, NoSpaceAfter, 500, basename, "pb");
xml/xmlLoader.groovy:    def ed = new pager(txmFile, outdir, txtname, NoSpaceBefore, NoSpaceAfter, 300, basename, "pb");

(possible values for words per page are currently: 140, 300, 500, 600)

We need to allow the user to choose the number of words per page, especially if we want to allow her to also use pagebreak XML tags.

Target
A) For a first step, for only the 'TXT+CSV' and 'XML/w+CSV' import modules, create a 'pageSize' groovy variable initialized by the import.xml file, initialized by default with the old hardcoded value.

B) Add a 'pageSize' import parameter in the import.xml parameters file, initialized by default with the old hardcoded value.

Validation step

  • Run an import module and set the "pageSize" parameter to "5"
  • check created edition pages

MD : OK tested with TXT+CSV and XML/W+CSV imports

History

#1 Updated by Serge Heiden almost 5 years ago

  • Category set to Import
  • Target version set to TXM 0.7.6

#2 Updated by Serge Heiden almost 5 years ago

  • Parent task set to #1045

#3 Updated by Sebastien Jacquot almost 5 years ago

  • Target version changed from TXM 0.7.6 to TXM 0.7.7

#4 Updated by Matthieu Decorde almost 5 years ago

  • % Done changed from 0 to 80

#5 Updated by Matthieu Decorde almost 5 years ago

  • Status changed from New to Feedback

#6 Updated by Matthieu Decorde over 4 years ago

  • Description updated (diff)
  • % Done changed from 80 to 100

#7 Updated by Serge Heiden over 4 years ago

  • % Done changed from 100 to 90

This ticket must be transfered to a next target for the second step to be developed.

Also available in: Atom PDF