Poniżej przedstawiono przykładową konfiguracje Barcode Readera:
<?xml version="1.0"?> <configuration> <tempDirectory>D:/temp</tempDirectory> <workingThreads>4</workingThreads> <debug>false</debug> <filters></filters> <unit name="DokumentyKosztowe"> <source> <directory path="D:/BarcodeReader/PiP/DokumentyKosztowe/input" recursive="true" pattern="(^.*\.[pP][dD][fF]$)" /> </source> <barcodes multiple="false"> <barcode name="Faktury" type="CODE_128" pattern="(^[0-9]{7,8}$)" skipNextIdentical="true" /> </barcodes> <classify> <class name="Faktury"> <start> <barcode>Faktury</barcode> </start> <end> <barcode>Faktury</barcode> <lastpage/> </end> <indexes> <index name="Index1" type="barcode">Faktury</index> </indexes> <destination split="false"> <filename>${Index1}.pdf</filename> <directory path="D:/Praca/BarcodeReader/PiP/DokumentyKosztowe/Faktury" flat="false" /> </destination> </class> </classify> <actions> <success> <move> <destination> <filename>${filename}</filename> <directory path="D:/Praca/BarcodeReader/PiP/DokumentyKosztowe/success"/> </destination> </move> </success> <!-- Akcje jeżeli wystąpił jakikolwiek błąd --> <error> <move> <destination> <filename>${filename}</filename> <directory path="D:/Praca/BarcodeReader/PiP/DokumentyKosztowe/error"/> </destination> </move> </error> </actions> </unit> </configuration>
Przykład z C Hartwig, konfiguracja zawiera przenoszenie plików z nierozpoznanymi kodami do katalogu unclassified
<?xml version="1.0"?> <configuration> <tempDirectory>/home/plusworkflow/plusworkflow-prod-home/temp/</tempDirectory> <workingThreads>4</workingThreads> <debug>true</debug> <filters> <step> <filter type="threshold" value="130" /> </step> <step> <filter type="median" /> </step> <step> <filter type="autothreshold" /> </step> </filters> <unit name="Faktury_CHG"> <source> <directory path="/home/plusworkflow/plusworkflow-prod-home/Skany/chg-skany" recursive="true" pattern="(^.*\.[pP][dD][fF]$)" /> </source> <barcodes multiple="true"> <barcode name="KodFaktury_CHG" type="CODE_128" pattern="(^CHG_*[A-Z]{2}_*[A-Z]{1}[0-9]{7,8}$)" skipNextIdentical="true" /> </barcodes> <classify> <class name="Faktury"> <start> <barcode>KodFaktury_CHG</barcode> </start> <end> <barcode>KodFaktury_CHG</barcode> <lastpage/> </end> <indexes> <index name="Index1" type="barcode">KodFaktury_CHG</index> </indexes> <destination split="false"> <filename>${Index1}.pdf</filename> <directory path="/home/plusworkflow/plusworkflow-prod-home/config/barcode-reader/BarcodeReader_files/splited/chg-skany" flat="false" /> </destination> </class> <class name="Niesklasyfikowane"> <start> <unclassified /> </start> <end> <classified /> <lastpage/> </end> <indexes> </indexes> <destination> <filename>${filename}</filename> <directory path="/home/plusworkflow/plusworkflow-prod-home/config/barcode-reader/BarcodeReader_files/unclassified" flat="false" /> </destination> </class> </classify> <actions> <success> <move> <destination> <filename>${filename}</filename> <directory path="/home/plusworkflow/plusworkflow-prod-home/config/barcode-reader/BarcodeReader_files/success_orginal_backup/chg-skany"/> </destination> </move> </success> <error> <move> <destination> <filename>${filename}</filename> <directory path="/home/plusworkflow/plusworkflow-prod-home/config/barcode-reader/BarcodeReader_files/error/chg-skany"/> </destination> </move> </error> </actions> </unit> </configuration>
Podstawowe elementy
Element configuration
Jest to główny element konfiguracji. Wewnątrz niego zawarte musza być wszystkie inne elementy konfiguracyjne.
Element tempDirectory
Element definiuje ścieżkę do katalogu gdzie będą przechowywane pliki tymczasowe wykorzystywane w trakcie pracy Barcode Readera
Element workingThreads
Element definiuje liczbę wątków na ilu działa Barcode Reader
Element debug
Element umożliwia włączenie lub wyłączenie trybu debug. Tryb debug pozwala na zrzut przetwarzanych obrazów przed binaryzacją obrazu jak i po niej. Domyślnie tryb debug jest wyłączony.
Element filters
Umożliwia zdefiniowanie filtrów do polepszenia obrazu. Więcej opisane jest w Barcode Reader.
Pozostałe elementy zostały opisane na stronie - Barcode Reader
Add Comment