Skip to content

Commit 8cbd3ee

Browse files
author
Ole Liabø
committed
Support batch mode exports. Reverted bad commit.
1 parent e93042d commit 8cbd3ee

32 files changed

+1377
-2444
lines changed

formats/epjark.conf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,16 @@ INFOVIEW_FOLDER_TYPE_REGEXP_NN=rapportMappe
4848
; 1. Node regexp
4949
; 2. Pages wildcard
5050
; 3. OCR wildcard
51-
INFO_VIEW_JOURNAL_TYPE_REGEXP=pasientjournal@%rootdir%/../objekter/????????_%fanearkidentifikator%_?_?.jpg@%rootdir%/../derivater/????????_%fanearkidentifikator%_?_?.xml
51+
INFO_VIEW_JOURNAL_TYPE_REGEXP=pasientjournal@%rootdir%/../objekter/????????_%fanearkidentifikator%_*_?.jpg@%rootdir%/../derivater/????????_%fanearkidentifikator%_*_?.xml
5252

5353
; Tool responsible for converting journal pages and optional ocr files into PDF document
5454
; %FILESFILE% - File containing pages to be included, one page per line: <page-image-file>;<page-ocr-file>
5555
; %OUT% - Create PDF filename
5656
; %TEMP% - Output folder
5757
JOURNAL_PDF_CREATOR_TOOL="./pdf/create-pdf.cmd %OUT% %FILESFILE% %TEMP%"
58+
59+
; Auto select nodes will be selected when importing XML
60+
TREEVIEW_AUTO_SELECT_REGEXP=pasientjournal@diagnose
61+
62+
; Auto collapse nodes will be collapsed when importing XML
63+
TREEVIEW_AUTO_COLLAPSE_REGEXP=derivater@objekter@metadata

insight.conf

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,12 @@ REPORTS_DIR=".\\rapporter"
3939

4040
; Dataset to load at startup, useful for testing
4141
;STARTUP_LOAD_FILE=../arkivstruktur2.xml
42-
;STARTUP_LOAD_FILE=arkivstruktur2.xml
42+
;STARTUP_LOAD_FILE="./testdata/noark-5/arkivstruktur.xml"
4343
;STARTUP_LOAD_FILE=arkivstruktur.xml"
4444
;STARTUP_LOAD_FILE=e:/archivator/innsyn/noark5-stor/arkivstruktur.xml"
4545
;STARTUP_LOAD_FILE=e:/archivator/innsyn/noark5-stor/arkivstruktur-medium.xml"
46-
46+
; Format of startup file
47+
;STARTUP_LOAD_FILE_FORMAT=
4748

4849

4950

@@ -64,5 +65,8 @@ INDEXER_TOOL=index.cmd %REPORTS_DIR% %ATTACHMENT_DIR% %NAME%
6465
;SEARCH_DEAMON_TOOL=searchd --config %CONFIG_FILE% --nodetach --logdebugvv
6566
SEARCH_DEAMON_TOOL=searchd --config %CONFIG_FILE% --logdebugvv
6667

67-
; Supress question box "attachments should be parsed? Y/N"
68-
;ATTACHMENT_PARSING_DONT_ASK_USER=true
68+
; Parse attachments:
69+
; - YES
70+
; - NO
71+
; - ASK: Display question box "attachments should be parsed? Y/N"
72+
;ATTACHMENT_PARSING=ASK

insight.pro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ include( src/thirdparty/yxml/yxml.pri )
185185

186186
SOURCES += src/main.cpp \
187187
src/drunguard.cpp \
188+
src/dregexp.cpp \
188189
src/dxmlparser.cpp \
189190
src/ddirparser.cpp \
190191
src/dattachmentindexer.cpp \

lesmeg.org

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,13 @@ Ved feilrapportering legg ved loggfiler og ved programkrasj /insight.dmp/ hvis d
185185

186186
* Historikk
187187

188+
** innsyn-v1.2.0-beta3
189+
*** Nye funksjoner
190+
- Støtte for automatisk nodevalg, settes per format med /TREEVIEW_AUTO_SELECT_REGEXP/ variablen.
191+
- Støtte for automatisk skjuling av barne noder ved import med /TREEVIEW_AUTO_COLLAPSE_REGEXP/ variablen.
192+
- Journaler inkluderes ved eksport.
193+
- Bakgrunnsmodus: Støtter autoeksport med kommandolinjeparameterene /--file/, /--file-format/ og /--auto-export/.
194+
188195
** innsyn-v1.2.0-beta1
189196
*** Nye funksjoner
190197
- Støtte for standard ut mappe ved eksport, settes med konfigurasjonsvariablen /FIXED_REPORT_EXPORT_FOLDER/.
@@ -281,5 +288,10 @@ sudo apt install libquazip5-dev
281288
sudo apt install qttools5-dev-tools
282289

283290
** Windows
291+
#+BEGIN_SRC
292+
setup-win64.cmd
293+
qmake -tp vc
294+
#+END_SRC
295+
284296
Her må man bygge poppler manuelt.
285297

nha-sip-convert.cmd

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
setlocal
2+
set IN=%1
3+
echo %0
4+
echo %dirname%
5+
6+
for %%F in (%0) do set dirname=%%~dpF
7+
8+
; set PATH=%PATH%;%dirname%
9+
cd %dirname%
10+
11+
12+
set timestamp=%date%_%time:~0,-3%
13+
set timestamp=%timestamp::=_%
14+
set timestamp=%timestamp:.=_%
15+
set timestamp=%timestamp:/=_%
16+
set timestamp=%timestamp: =_%
17+
18+
set OUT=export-%timestamp%.pdf
19+
20+
set PLATFORM=-platform windows:dpiawareness=0
21+
22+
insight %PLATFORM% --file %IN% --file-format "Norsk Helsearkiv SIP" --auto-export %OUT%
23+
24+
pause

pdf/HocrConverter

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 25d84bafc17b4191d7492260e65fe5a17e266182

pdf/alto2hocr.cmd

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,24 @@ setlocal
33
set XSLT_TOOL="C:\Program Files\Saxonica\SaxonHE10.5N\bin\transform"
44
set ALTO2HOCR_XSLT=alto__hocr.xsl
55

6+
set ERRORLOG=%2
7+
shift /2
8+
9+
%XSLT_TOOL% -? > nul
10+
if not %ERRORLEVEL% equ 0 (
11+
echo %0: %XSLT_TOOL% not in path >> %errorlog%
12+
EXIT /B 1
13+
)
14+
15+
if not exist %ALTO2HOCR_XSLT% (
16+
echo %0: %ALTO2HOCR_XSLT% not in path >> %errorlog%
17+
EXIT /B 1
18+
)
19+
20+
621
if "%2" NEQ "" SET OUTHOCR="-o:%2"
722

23+
echo %XSLT_TOOL% -s:%1 -xsl:%ALTO2HOCR_XSLT% %OUTHOCR% >> %errorlog%
824
%XSLT_TOOL% -s:%1 -xsl:%ALTO2HOCR_XSLT% %OUTHOCR%
925

1026

pdf/alto2pdf.cmd

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,26 @@
1-
@echo off
21
setlocal
32
set IN_JPG=%1
43
set IN_ALTO=%2
54
set OUT=%3
5+
set ERRORLOG=%4
6+
7+
python --help > nul
8+
if not %ERRORLEVEL% equ 0 (
9+
echo %0: python not in path >> %ERRORLOG%
10+
EXIT /B 1
11+
)
12+
13+
set HOCR_SCRIPT=.\HocrConverter\HocrConverter.py
14+
if not exist %HOCR_SCRIPT% (
15+
echo ERROR %HOCR_SCRIPT% not found >> %ERRORLOG%
16+
)
617

718
rem set DEBUG_PARAMS=-b -v -t
819

9-
alto2hocr.cmd %IN_ALTO% | python .\HocrConverter\HocrConverter.py -i - -I -V -n -o %OUT% %DEBUG_PARAMS% %IN_JPG%
20+
rem echo "alto2hocr.cmd %IN_ALTO% | python %HOCR_SCRIPT% -i - -I -V -n -o %OUT% %DEBUG_PARAMS% %IN_JPG%" >> %ERRORLOG%
21+
22+
alto2hocr.cmd %IN_ALTO% %errorlog% | python %HOCR_SCRIPT% -i - -I -V -n -o %OUT% %DEBUG_PARAMS% %IN_JPG% >> %ERRORLOG% 2>&1
23+
if not %ERRORLEVEL% equ 0 (
24+
echo %0: ERROR executing "alto2hocr.cmd %IN_ALTO% | python %HOCR_SCRIPT% -i - -I -V -n -o %OUT% %DEBUG_PARAMS% %IN_JPG%" >> %ERRORLOG%
25+
exit /b 1
26+
)

0 commit comments

Comments
 (0)