├── .gitignore ├── API ├── ChangeLog ├── Makefile.am ├── README ├── TODO ├── config.h.for_cppcheck ├── configure.ac ├── contrib ├── getScannersTest.c ├── getScannersTest_build.sh ├── ocrTest.c ├── ocrTest_build.sh ├── openDIAS.png ├── phash_test.c ├── phash_test_build.sh ├── phash_tmp.cc ├── phash_tmp.h ├── testUUIDKeepingFileHandle.c └── testUUIDKeepingFileHandle_build.sh ├── i18n ├── Makefile.am ├── language.resource.de ├── language.resource.en └── language.resource.nl ├── scripts ├── api2html.pl ├── build-local-versions.pl └── generate_new_language_pack.pl ├── sql ├── Makefile.am ├── openDIAS.sqlite3.dmp.v1.sql ├── openDIAS.sqlite3.dmp.v2.sql ├── openDIAS.sqlite3.dmp.v3.sql ├── openDIAS.sqlite3.dmp.v4.sql ├── openDIAS.sqlite3.dmp.v5.sql ├── openDIAS.sqlite3.dmp.v6.sql └── openDIAS.sqlite3.dmp.v7.sql ├── src ├── Makefile.am ├── backpopulate.c ├── backpopulate.h ├── db.c ├── db.h ├── dbaccess.c ├── dbaccess.h ├── debug.c ├── debug.h ├── doc_editor.c ├── doc_editor.h ├── imageProcessing.c ├── imageProcessing.h ├── import_doc.c ├── import_doc.h ├── localisation.c ├── localisation.h ├── main.c ├── main.h ├── ocr_plug.cc ├── ocr_plug.h ├── odf_plug.c ├── odf_plug.h ├── opendias_worker.c ├── opendiasconfig.c ├── pageRender.c ├── pageRender.h ├── pdf_plug.cc ├── pdf_plug.h ├── phash_plug.cc ├── phash_plug.h ├── saneDispatcher.c ├── saneDispatcher.h ├── scan.c ├── scan.h ├── scanner.c ├── scanner.h ├── sessionmanagement.c ├── sessionmanagement.h ├── simpleLinkedList.c ├── simpleLinkedList.h ├── utils.c ├── utils.h ├── validation.c ├── validation.h ├── web_handler.c └── web_handler.h ├── test ├── README ├── clientSideTesting │ ├── README │ ├── clientTesting.html │ ├── deploy.sh │ ├── jquery.qunit.css │ ├── jquery.qunit.js │ └── tests │ │ ├── acquirePageTest.js │ │ ├── authenticationTest.js │ │ ├── detailPageTest.js │ │ ├── languageSelectionTest.js │ │ ├── listPageTest.js │ │ └── testrunning.js ├── config │ ├── appLogUnify.sed │ ├── defaultdatabase.sqlite3 │ ├── sane │ │ ├── dll.conf │ │ └── test.conf │ ├── testLogUnify.sed │ ├── testapp.conf │ ├── testappUnableToCreate.conf │ └── valgrindUnify.sed ├── harness.pl ├── i │ ├── 1_4_various_kills_are_ignored │ │ └── homeDir │ │ │ └── DEFAULTDB │ ├── 1_5_could_not_start_http_service │ │ └── homeDir │ │ │ └── DEFAULTDB │ ├── 1_9_usage_app │ │ └── homeDir │ │ │ └── DEFAULTDB │ ├── 1_a_usage_config │ │ └── homeDir │ │ │ └── DEFAULTDB │ ├── 3_1_doclist │ │ ├── homeDir │ │ │ └── DEFAULTDB │ │ └── intest │ │ │ ├── 1.sql │ │ │ └── 2.sql │ ├── 3_2_doclist_search │ │ ├── 1.sql │ │ └── homeDir │ │ │ └── DEFAULTDB │ ├── 3_3_getScannerList │ │ └── homeDir │ │ │ └── DEFAULTDB │ ├── 3_4_getDocDetails │ │ ├── 1.sql │ │ └── homeDir │ │ │ └── DEFAULTDB │ ├── 3_5_updateDocDetails │ │ ├── 1.sql │ │ └── homeDir │ │ │ └── DEFAULTDB │ ├── 3_6_moveTag │ │ ├── 1.sql │ │ └── homeDir │ │ │ └── DEFAULTDB │ ├── 3_7_deleteDoc │ │ ├── 1.sql │ │ └── homeDir │ │ │ └── DEFAULTDB │ ├── 3_8_autoComplete │ │ ├── 1.sql │ │ └── homeDir │ │ │ └── DEFAULTDB │ ├── 3_9_access │ │ ├── 1.sql │ │ ├── 2.sql │ │ └── homeDir │ │ │ └── DEFAULTDB │ ├── 3_a_scanning │ │ ├── 1.sql │ │ └── homeDir │ │ │ └── DEFAULTDB │ ├── 3_b_validation │ │ └── homeDir │ │ │ └── DEFAULTDB │ ├── 3_c_import │ │ ├── 1.sql │ │ ├── homeDir │ │ │ └── DEFAULTDB │ │ ├── test.jpg │ │ ├── test.odt │ │ └── test.pdf │ ├── 3_d_language_selection │ │ └── homeDir │ │ │ └── DEFAULTDB │ ├── 3_e_forbidden_requests │ │ └── homeDir │ │ │ └── DEFAULTDB │ ├── 3_f_update_user_n_user_permissions │ │ └── homeDir │ │ │ └── DEFAULTDB │ ├── 3_g_checkForSimilar │ │ ├── 1.sql │ │ └── homeDir │ │ │ └── DEFAULTDB │ └── 3_h_backpopulate │ │ ├── 1.sql │ │ └── homeDir │ │ ├── DEFAULTDB │ │ └── scans │ │ ├── 1_1.jpg │ │ ├── 2_thumb.jpg │ │ ├── 4_1.jpg │ │ └── 5_thumb.jpg ├── index.html ├── lib │ └── standardTests.pm ├── override_libs │ ├── README │ ├── build.sh │ ├── liblept │ │ └── liblept.c │ ├── libpHash │ │ └── libpHash.cc │ ├── libpoppler │ │ ├── libpoppler.cc │ │ └── poppler_override_output │ ├── libsane │ │ └── libsane.c │ └── libtesseract │ │ └── libtesseract.cc ├── r │ ├── 1_1_create_database │ │ ├── appLog.out │ │ ├── testLog.out │ │ └── valgrind.out │ ├── 1_2_failed_to_create_database │ │ ├── appLog.out │ │ ├── testLog.out │ │ └── valgrind.out │ ├── 1_3_missing_config_file │ │ ├── appLog.out │ │ ├── testLog.out │ │ └── valgrind.out │ ├── 1_4_various_kills_are_ignored │ │ ├── appLog.out │ │ ├── testLog.out │ │ └── valgrind.out │ ├── 1_5_could_not_start_http_service │ │ ├── appLog.out │ │ ├── testLog.out │ │ └── valgrind.out │ ├── 1_7_config_updates │ │ ├── appLog.out │ │ ├── testLog.out │ │ └── valgrind.out │ ├── 1_9_usage_app │ │ ├── appLog.out │ │ ├── testLog.out │ │ └── valgrind.out │ ├── 1_a_usage_config │ │ ├── appLog.out │ │ ├── testLog.out │ │ └── valgrind.out │ ├── 3_1_doclist │ │ ├── appLog.out │ │ ├── testLog.out │ │ └── valgrind.out │ ├── 3_2_doclist_search │ │ ├── appLog.out │ │ ├── testLog.out │ │ └── valgrind.out │ ├── 3_3_getScannerList │ │ ├── appLog.out │ │ ├── testLog.out │ │ └── valgrind.out │ ├── 3_4_getDocDetails │ │ ├── appLog.out │ │ ├── testLog.out │ │ └── valgrind.out │ ├── 3_5_updateDocDetails │ │ ├── appLog.out │ │ ├── testLog.out │ │ └── valgrind.out │ ├── 3_6_moveTag │ │ ├── appLog.out │ │ ├── testLog.out │ │ └── valgrind.out │ ├── 3_7_deleteDoc │ │ ├── appLog.out │ │ ├── testLog.out │ │ └── valgrind.out │ ├── 3_8_autoComplete │ │ ├── appLog.out │ │ ├── testLog.out │ │ └── valgrind.out │ ├── 3_9_access │ │ ├── appLog.out │ │ ├── testLog.out │ │ └── valgrind.out │ ├── 3_a_scanning │ │ ├── appLog.out │ │ ├── testLog.out │ │ └── valgrind.out │ ├── 3_b_validation │ │ ├── appLog.out │ │ ├── testLog.out │ │ └── valgrind.out │ ├── 3_c_import │ │ ├── appLog.out │ │ ├── testLog.out │ │ └── valgrind.out │ ├── 3_d_language_selection │ │ ├── appLog.out │ │ ├── testLog.out │ │ └── valgrind.out │ ├── 3_e_forbidden_requests │ │ ├── appLog.out │ │ ├── testLog.out │ │ └── valgrind.out │ ├── 3_f_update_user_n_user_permissions │ │ ├── appLog.out │ │ ├── testLog.out │ │ └── valgrind.out │ ├── 3_g_checkForSimilar │ │ ├── appLog.out │ │ ├── testLog.out │ │ └── valgrind.out │ └── 3_h_backpopulate │ │ ├── appLog.out │ │ ├── testLog.out │ │ └── valgrind.out ├── setupRun.sh ├── suppressions │ ├── cms.suppression │ ├── libcrypt.suppression │ ├── ocr.suppression │ ├── os.suppression │ ├── sane.suppression │ └── zzip.suppression ├── t │ ├── 1_1_create_database.pm │ ├── 1_2_failed_to_create_database.pm │ ├── 1_3_missing_config_file.pm │ ├── 1_4_various_kills_are_ignored.pm │ ├── 1_5_could_not_start_http_service.pm │ ├── 1_7_config_updates.pm │ ├── 1_9_usage_app.pm │ ├── 1_a_usage_config.pm │ ├── 3_1_doclist.pm │ ├── 3_2_doclist_search.pm │ ├── 3_3_getScannerList.pm │ ├── 3_4_getDocDetails.pm │ ├── 3_5_updateDocDetails.pm │ ├── 3_6_moveTag.pm │ ├── 3_7_deleteDoc.pm │ ├── 3_8_autoComplete.pm │ ├── 3_9_access.pm │ ├── 3_a_scanning.pm │ ├── 3_b_validation.pm │ ├── 3_c_import.pm │ ├── 3_d_language_selection.pm │ ├── 3_e_forbidden_requests.pm │ ├── 3_f_update_user_n_user_permissions.pm │ ├── 3_g_checkForSimilar.pm │ └── 3_h_backpopulate.pm └── testplan └── webcontent ├── LOCALISATION_README ├── Makefile.am ├── accessControls.tmpl ├── acquire.tmpl ├── body.tmpl ├── docDetail.tmpl ├── docList.tmpl ├── images ├── Makefile.am ├── actionrequired.png ├── arrow.png ├── cabinet.jpg ├── close.png ├── datepicker │ ├── Makefile.am │ ├── datepicker_b.png │ ├── datepicker_bl.png │ ├── datepicker_br.png │ ├── datepicker_l.png │ ├── datepicker_r.png │ ├── datepicker_t.png │ ├── datepicker_tl.png │ ├── datepicker_tr.png │ └── field.png ├── easySlider │ ├── Makefile.am │ ├── btn_next.png │ └── btn_prev.png ├── jquery-ui │ ├── Makefile.am │ ├── pbar-ani.png │ ├── ui-bg_diagonals-thick_90_eeeeee_40x40.png │ ├── ui-bg_flat_15_cd0a0a_40x100.png │ ├── ui-bg_glass_100_e4f1fb_1x400.png │ ├── ui-bg_glass_50_3baae3_1x400.png │ ├── ui-bg_glass_80_d7ebf9_1x400.png │ ├── ui-bg_highlight-hard_100_f2f5f7_1x100.png │ ├── ui-bg_highlight-hard_70_000000_1x100.png │ ├── ui-bg_highlight-soft_100_deedf7_1x100.png │ ├── ui-bg_highlight-soft_25_ffef8f_1x100.png │ ├── ui-icons_2694e8_256x240.png │ ├── ui-icons_2e83ff_256x240.png │ ├── ui-icons_3d80b3_256x240.png │ ├── ui-icons_72a7cf_256x240.png │ └── ui-icons_ffffff_256x240.png ├── openDIAS_64x64.ico ├── openDIAS_sml.png ├── opendias.jpg └── texture.png ├── includes ├── Makefile.am ├── footer.txt ├── header.txt ├── jquery-ui.min.js ├── jquery.canvas-loader.js ├── jquery.easySlider.js ├── jquery.gzoom.js ├── jquery.js ├── jquery.mousewheel.js ├── jquery.tagsinput.js ├── local │ ├── Makefile.am │ ├── generic.resource.de │ ├── generic.resource.en │ ├── generic.resource.nl │ ├── openDias.accessControls.js.resource.de │ ├── openDias.accessControls.js.resource.en │ ├── openDias.accessControls.js.resource.nl │ ├── openDias.acquire.js.resource.de │ ├── openDias.acquire.js.resource.en │ ├── openDias.acquire.js.resource.nl │ ├── openDias.docList.js.resource.de │ ├── openDias.docList.js.resource.en │ ├── openDias.docList.js.resource.nl │ ├── openDias.filter.js.resource.de │ ├── openDias.filter.js.resource.en │ ├── openDias.filter.js.resource.nl │ ├── openDias.loadDetails.js.resource.de │ ├── openDias.loadDetails.js.resource.en │ ├── openDias.loadDetails.js.resource.nl │ ├── openDias.saveDetails.js.resource.de │ ├── openDias.saveDetails.js.resource.en │ └── openDias.saveDetails.js.resource.nl ├── openDias.accessControls.js ├── openDias.accessMethods.js ├── openDias.acquire.js ├── openDias.docList.js ├── openDias.filter.js ├── openDias.loadDetails.js ├── openDias.saveDetails.js ├── openDias.userdetails.js └── sprintf-0.7-beta1.js ├── language.resource.de ├── language.resource.en ├── language.resource.nl └── style ├── Makefile.am ├── common.css ├── datepicker.css ├── jquery-ui.css ├── jquery.easyslider.css ├── jquery.gzoom.css ├── jquery.tagsinput.css └── print.css /Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | 3 | SUBDIRS = src sql webcontent i18n 4 | 5 | dist_doc_DATA = ChangeLog README TODO 6 | 7 | install-exec-hook: 8 | test ! -e ${VAR_DIR}/run && mkdir -p ${VAR_DIR}/run || echo Run directory already exists 9 | test ! -e ${VAR_DIR}/log/opendias && mkdir -p ${VAR_DIR}/log/opendias || echo Log directory already exists 10 | test ! -e ${libdir}/opendias && mkdir -p ${libdir}/opendias || echo Lib directory already exists 11 | test ! -e ${sysconfdir}/opendias && mkdir -p ${sysconfdir}/opendias || echo openDIAS config directory already exists 12 | test ! -e ${sysconfdir}/opendias/opendias.conf && echo ${libdir}/opendias >> ${sysconfdir}/opendias/opendias.conf || echo config file already exists 13 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | #################################################################################### 2 | ## EDITED THIS DOC? NOW GO UPDATE essesntialcollections.co.uk/opendias_website/todo.shtml ## 3 | #################################################################################### 4 | 5 | 6 | Version 0.9 [active] 7 | -------------------- 8 | 9 | Testing 10 | 11 | Migrate 8_* tests to use QUnit instead of HTMLUnit. ie remove 2.3 from tests/README 12 | 13 | Fix intermittent test failures (log timings mainly) & rationalise valgrind suppressions. 14 | 15 | Implement the remainder of the test plan 'test/regressionTests/testplan', check coverage. 16 | 17 | App Improvments 18 | 19 | [all done] 20 | 21 | Functionality 22 | 23 | [all done] 24 | 25 | Project 26 | 27 | Get included into major repositories 28 | 29 | 30 | 31 | Version 0.10 32 | ------------ 33 | 34 | Functionality 35 | 36 | Implement 'OCR now' on document detail page. 37 | 38 | Frontend remembers user options [not sure what options a user need opendias to remember] 39 | 40 | New doc detail data (doc meta data) by category or assigned tag. 41 | 42 | App Improvments 43 | 44 | Add a plugin framework 45 | 46 | 47 | Version 1.0 48 | ----------- 49 | 50 | Implement webservice to allow cloud backend datastores 51 | 52 | Turn OCR into a plugin 53 | 54 | 55 | 56 | After That (possible ideas) 57 | ---------- 58 | 59 | * Print doc details label (to stick onto doc after scanning) 60 | * document workflow 61 | * Updates versioning/audit 62 | * auto (learning) tagging of new docs 63 | 64 | 65 | ================================================== 66 | 67 | +-----------------------------------------------+ 68 | | RPM | DEB | 69 | +-----------------------------------------------+ 70 | | Package Built Y | Package Built Y | 71 | | rpmfusion.org | software center Y | 72 | | Fedora | getdeb.net | 73 | | OpenSUSE | Debian | 74 | | Mandriva | Ubuntu | 75 | +-----------------------------------------------+ 76 | 77 | 78 | -------------------------------------------------------------------------------- /contrib/getScannersTest.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #include 8 | #include 9 | 10 | /* 11 | * 12 | * Public Functions 13 | * 14 | */ 15 | int main (int argc, char **argv) { 16 | 17 | SANE_Status status; 18 | const SANE_Device **SANE_device_list; 19 | 20 | status = sane_init(NULL, NULL); 21 | if(status != SANE_STATUS_GOOD) { 22 | perror("sane did not start"); 23 | exit(EXIT_FAILURE); 24 | } 25 | 26 | status = sane_get_devices (&SANE_device_list, SANE_TRUE); 27 | if(status == SANE_STATUS_GOOD) { 28 | perror("sane_get_devices, was apparently GOOD"); 29 | } 30 | 31 | sane_exit(); 32 | 33 | exit(EXIT_SUCCESS); 34 | } 35 | 36 | -------------------------------------------------------------------------------- /contrib/getScannersTest_build.sh: -------------------------------------------------------------------------------- 1 | rm -f getScannersTest getScannersTest.o 2 | #gcc -I. -I../current_code/src/ -g -c -o getScannersTest.o getScannersTest.c 3 | #g++ -g -o getScannersTest getScannersTest.o ../current_code/src/utils.o ../current_code/src/debug.o -lsane 4 | gcc -I. -g -c -o getScannersTest.o getScannersTest.c 5 | g++ -g -o getScannersTest getScannersTest.o -lsane 6 | valgrind --leak-check=full --leak-resolution=high --error-limit=no --tool=memcheck --num-callers=50 --show-below-main=yes --track-origins=yes --track-fds=yes --show-reachable=yes ./getScannersTest 7 | -------------------------------------------------------------------------------- /contrib/ocrTest.c: -------------------------------------------------------------------------------- 1 | #include "config.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include "main.h" 10 | #include "ocr_plug.h" 11 | 12 | int main (int argc, char **argv) { 13 | 14 | int i; 15 | struct scanCallInfo infoData; 16 | int totbytes = 3359 * 4679; 17 | unsigned char *pic; 18 | 19 | (void) load_file_to_memory("./tmp2.pnm", &pic); 20 | // pic=(unsigned char *)malloc( totbytes+1 ); 21 | // for (i=0;i 4 | * 5 | * ocr_plug.c is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * ocr_plug.c is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | */ 18 | 19 | #include "config.h" 20 | 21 | #ifdef CAN_PHASH 22 | #include 23 | #include 24 | #include 25 | #include 26 | 27 | #include "phash_tmp.h" 28 | 29 | extern "C" unsigned long long calculateImagePhash(const char *filename) { 30 | 31 | ulong64 hash; 32 | 33 | if( ph_dct_imagehash( filename, hash ) < 0 ) { 34 | printf("Could not calculate the pHash of %s", filename); 35 | return 0; 36 | } 37 | return hash; 38 | } 39 | 40 | extern "C" int getDistance( unsigned long long hash0, unsigned long long hash1 ) { 41 | 42 | return ph_hamming_distance(hash0, hash1); 43 | } 44 | #endif /* CAN_PHASH */ 45 | 46 | -------------------------------------------------------------------------------- /contrib/phash_tmp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * phash_plug.h 3 | * Copyright (C) Clearscene Ltd 2008 4 | * 5 | * ocr_plug.h is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * ocr_plug.h is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | */ 18 | 19 | #ifndef PHASHING_PLUG 20 | #define PHASHING_PLUG 21 | 22 | #include "config.h" 23 | 24 | #ifdef CAN_PHASH 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif /* __cplusplus */ 29 | 30 | extern unsigned long long calculateImagePhash(const char *); 31 | extern int getDistance( unsigned long long, unsigned long long ); 32 | 33 | #ifdef __cplusplus 34 | } 35 | #endif /* __cplusplus */ 36 | 37 | #endif /* CAN_PHASH */ 38 | 39 | #endif /* PHASHING_PLUG */ 40 | -------------------------------------------------------------------------------- /contrib/testUUIDKeepingFileHandle.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | int main (int argc, char **argv) { 7 | 8 | char *test = "this is a test message."; 9 | printf("%s\n", test); 10 | printf("%s\n", test+2); 11 | 12 | uuid_t uu; 13 | char *fileid = malloc(36+1); 14 | uuid_generate(uu); 15 | uuid_unparse(uu, fileid); 16 | uuid_clear(uu); 17 | printf("uuid = %s\n", fileid); 18 | free(fileid); 19 | 20 | exit(0); 21 | } 22 | 23 | -------------------------------------------------------------------------------- /contrib/testUUIDKeepingFileHandle_build.sh: -------------------------------------------------------------------------------- 1 | rm main main.o 2 | gcc -I/usr/include/uuid -g -O2 -c -o main.o main.c 3 | g++ -g -O2 -o main main.o -luuid 4 | valgrind --leak-check=full --leak-resolution=high --error-limit=no --tool=memcheck --num-callers=50 --show-below-main=yes --track-origins=yes --track-fds=yes --gen-suppressions=all ./main 5 | -------------------------------------------------------------------------------- /i18n/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | sql_SCRIPTS = 3 | 4 | sql_DATA = \ 5 | $(srcdir)/language.resource.* 6 | 7 | sqldir = \ 8 | $(pkgdatadir) 9 | 10 | EXTRA_DIST = \ 11 | $(sql_DATA) 12 | 13 | ## File created by the gnome-build tools 14 | 15 | -------------------------------------------------------------------------------- /i18n/language.resource.nl: -------------------------------------------------------------------------------- 1 | LOCAL_ocr_default_text|--tekst werd niet herkend-- 2 | LOCAL_file_type_odf|ODF Document geïmporteerd 3 | LOCAL_file_type_pdf|PDF Document geïmporteerd 4 | LOCAL_file_type_image|Afbeelding geïmporteerd 5 | LOCAL_file_type_scanned|Gescand Document 6 | LOCAL_default_title|Nieuw (naamloos) document. 7 | LOCAL_bad_login|Gebruikersnam of wachtwoord incorrect 8 | LOCAL_login_retry_too_soon|Inlogpoging was te snel 9 | LOCAL_user_already_exists|De gebruikersnaam bestaat al 10 | LOCAL_no_date_set|- Geen datum ingesteld - 11 | LOCAL_page_delimiter|----------------- blz %d ----------------\n%s\n 12 | LOCAL_resolution_outside_range_to_attempt_ocr|Ingestelde resolutie ligt buiten de veilige marges voor OCR.\n. 13 | LOCAL_opendias_server|opendias server 14 | LOCAL_server_busy|De server is bezig, probeer het later nogeens. 15 | LOCAL_server_error|Er is een interne fout opgetreden. 16 | LOCAL_request_error|Uw opdracht had niet het formaat 'http://<host>(:<port>)/opendias/(<request>)'. 17 | LOCAL_access_denied|Toegang geweigerd 18 | LOCAL_no_access|U heeft onvoldoende rechten om deze opdracht uit te voeren 19 | LOCAL_processing_error|Uw opdracht kon niet uitgevoerd worden 20 | LOCAL_missing_support|Ondersteuning voor deze feature is niet meegecompileerd 21 | LOCAL_unsuported_file_type|Dit bestandstype wordt niet ondersteund 22 | -------------------------------------------------------------------------------- /scripts/generate_new_language_pack.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | 3 | use strict; 4 | use warnings; 5 | 6 | my @templates = qw( webcontent/includes/header.txt webcontent/includes/footer.txt ); 7 | my %option; 8 | my $count = 0; 9 | my $lang = ''; 10 | 11 | ######################################### 12 | # Collection options from the command line (ie what ./configure sends us) 13 | # and validate 14 | foreach my $opt ( @ARGV ) { 15 | if ( $opt =~ /^[a-z]{2}$/ ) { 16 | $lang = $opt; 17 | $count++; 18 | } 19 | else { 20 | print "Language prefix should be two lower case letters only.\n"; 21 | } 22 | } 23 | die "You should provide one language prefix only, as a parameter." if $count != 1; 24 | 25 | 26 | my @resource_files = qw( webcontent/language.resource.en i18n/language.resource.en ); 27 | opendir( DIR, 'webcontent/includes/local/' ); 28 | while( my $FILE = readdir( DIR ) ) { 29 | if ( $FILE =~ /\.resource\.en/ ) { 30 | push @resource_files, 'webcontent/includes/local/'.$FILE; 31 | } 32 | } 33 | closedir( DIR ); 34 | 35 | # Load the language pack 36 | foreach my $file (@resource_files) { 37 | 38 | my $file_out = $file; 39 | $file_out =~ s/en$/$lang/; 40 | 41 | die "Target file ($file_out) already exists." if -f $file_out; 42 | print "Creating $file_out\n"; 43 | 44 | open( SOURCE, $file ); 45 | open( TARGET, ">$file_out" ); 46 | while ( my $line = ) { 47 | chomp( $line ); 48 | next if $line =~ /^$/ || $line =~ /^#/ || $line =~ /^\/\//; 49 | if ( $file =~ /includes\/local/ ) { 50 | # A javascript localise resource file 51 | my ( $key, $data ) = $line =~ /^(.*) = '(.*)';/; 52 | print TARGET "$key = 'LOCALISE_ME - $data';\n"; 53 | } 54 | else { 55 | # An application resource file 56 | my ( $key, $data ) = split( /\|/, $line ); 57 | print TARGET "$key|LOCALISE_ME - $data\n"; 58 | } 59 | } 60 | close( TARGET ); 61 | close( SOURCE ); 62 | } 63 | 64 | __END__ 65 | -------------------------------------------------------------------------------- /sql/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | sql_SCRIPTS = 3 | 4 | sql_DATA = \ 5 | openDIAS.sqlite3.dmp.v1.sql \ 6 | openDIAS.sqlite3.dmp.v2.sql \ 7 | openDIAS.sqlite3.dmp.v3.sql \ 8 | openDIAS.sqlite3.dmp.v4.sql \ 9 | openDIAS.sqlite3.dmp.v5.sql \ 10 | openDIAS.sqlite3.dmp.v6.sql \ 11 | openDIAS.sqlite3.dmp.v7.sql 12 | 13 | sqldir = \ 14 | $(pkgdatadir) 15 | 16 | EXTRA_DIST = \ 17 | $(sql_DATA) 18 | 19 | -------------------------------------------------------------------------------- /sql/openDIAS.sqlite3.dmp.v2.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Do not edit this file. 3 | -- If you need to update the schema or default data, create a new file 4 | -- and update the DB version (in the 'version' table and DB_VERSION in src/main.c) 5 | -- 6 | BEGIN TRANSACTION; 7 | 8 | ALTER TABLE docs 9 | ADD COLUMN pages NUMERIC; 10 | 11 | CREATE TEMPORARY TABLE t1_backup(a,b); 12 | INSERT INTO t1_backup SELECT version, for_app_version FROM version; 13 | DROP TABLE version; 14 | CREATE TABLE version ( 15 | version INTEGER PRIMARY KEY, 16 | for_app_version TEXT); 17 | INSERT INTO version SELECT a,b FROM t1_backup; 18 | DROP TABLE t1_backup; 19 | 20 | UPDATE version 21 | SET version = 2, 22 | for_app_version = "0.2.2"; 23 | 24 | COMMIT; 25 | 26 | -------------------------------------------------------------------------------- /sql/openDIAS.sqlite3.dmp.v3.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Do not edit this file. 3 | -- If you need to update the schema or default data, create a new file 4 | -- and update the DB version (in the 'version' table and DB_VERSION in src/main.c) 5 | -- 6 | BEGIN TRANSACTION; 7 | 8 | CREATE TABLE "scan_params" ( 9 | "client_id" TEXT NOT NULL DEFAULT (0), 10 | "param_option" INTEGER NOT NULL DEFAULT (0), 11 | "param_value" TEXT 12 | ); 13 | 14 | CREATE UNIQUE INDEX "primary" on scan_params (client_id ASC, param_option ASC); 15 | 16 | CREATE TABLE scan_progress ( 17 | "status" INTEGER NOT NULL DEFAULT (0), 18 | "value" INTEGER, 19 | "client_id" CHAR(36) NOT NULL DEFAULT (' ') 20 | ); 21 | 22 | CREATE UNIQUE INDEX "client_id" on "scan_progress" (client_id ASC); 23 | 24 | CREATE TABLE "config" ( 25 | "config_option" TEXT NOT NULL, 26 | "config_value" TEXT NOT NULL 27 | ); 28 | 29 | CREATE UNIQUE INDEX "option" on config (config_option ASC); 30 | 31 | UPDATE version 32 | SET version = 3, 33 | for_app_version = "0.5"; 34 | 35 | COMMIT; 36 | 37 | -------------------------------------------------------------------------------- /sql/openDIAS.sqlite3.dmp.v4.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Do not edit this file. 3 | -- If you need to update the schema or default data, create a new file 4 | -- and update the DB version (in the 'version' table and DB_VERSION in src/main.c) 5 | -- 6 | BEGIN TRANSACTION; 7 | 8 | INSERT INTO tags VALUES(25,'Wages'); 9 | UPDATE tags SET tagname='Morgage' WHERE tagid=13; 10 | 11 | INSERT INTO config VALUES ("log_verbosity",3); 12 | INSERT INTO config VALUES ("scan_directory","__libdir__/opendias"); 13 | INSERT INTO config VALUES ("show_all_available",1); 14 | INSERT INTO config VALUES ("port",8988); 15 | INSERT INTO config VALUES ("log_directory","__localstatedir__/log/opendias"); 16 | 17 | CREATE TABLE access_role ( 18 | role INTEGER PRIMARY KEY, 19 | rolename char(25) NOT NULL, 20 | update_access INTEGER NOT NULL, 21 | view_doc INTEGER NOT NULL, 22 | edit_doc INTEGER NOT NULL, 23 | delete_doc INTEGER NOT NULL, 24 | add_import INTEGER NOT NULL, 25 | add_scan INTEGER NOT NULL 26 | ); 27 | 28 | INSERT INTO access_role VALUES (1,"admin",1,1,1,1,1,1); 29 | INSERT INTO access_role VALUES (2,"user",0,1,1,1,1,1); 30 | INSERT INTO access_role VALUES (3,"view",0,1,0,0,0,0); 31 | INSERT INTO access_role VALUES (4,"add",0,0,0,0,1,1); 32 | 33 | CREATE TABLE user_access ( 34 | username CHAR(36) NOT NULL, 35 | password CHAR(36) NOT NULL, 36 | role INTEGER NOT NULL 37 | ); 38 | 39 | CREATE UNIQUE INDEX "usr_acc" on user_access (username ASC); 40 | 41 | CREATE TABLE location_access ( 42 | location CHAR(15) NOT NULL, 43 | role INTEGER NOT NULL 44 | ); 45 | 46 | INSERT INTO location_access VALUES ('127.0.0.1', 1); 47 | 48 | CREATE UNIQUE INDEX "loc_acc" on location_access (location ASC); 49 | 50 | UPDATE version 51 | SET version = 4, 52 | for_app_version = "0.5.8"; 53 | 54 | COMMIT; 55 | 56 | -------------------------------------------------------------------------------- /sql/openDIAS.sqlite3.dmp.v5.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Do not edit this file. 3 | -- If you need to update the schema or default data, create a new file 4 | -- and update the DB version (in the 'version' table and DB_VERSION in src/main.c) 5 | -- 6 | BEGIN TRANSACTION; 7 | 8 | ALTER TABLE scan_progress 9 | ADD COLUMN lockexpires; 10 | 11 | ALTER TABLE docs 12 | ADD COLUMN actionrequired NUMERIC; 13 | 14 | UPDATE version 15 | SET version = 5, 16 | for_app_version = "0.6.4"; 17 | 18 | COMMIT; 19 | 20 | -------------------------------------------------------------------------------- /sql/openDIAS.sqlite3.dmp.v6.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Do not edit this file. 3 | -- If you need to update the schema or default data, create a new file 4 | -- and update the DB version (in the 'version' table and DB_VERSION in src/main.c) 5 | -- 6 | BEGIN TRANSACTION; 7 | 8 | CREATE TEMPORARY TABLE t1_backup(a); 9 | INSERT INTO t1_backup SELECT version FROM version; 10 | DROP TABLE version; 11 | CREATE TABLE version (version INTEGER PRIMARY KEY); 12 | INSERT INTO version SELECT a FROM t1_backup; 13 | DROP TABLE t1_backup; 14 | 15 | UPDATE version SET version = 6; 16 | 17 | CREATE TABLE doc_links ( 18 | doclinkid INTEGER PRIMARY KEY, 19 | docid NUMERIC, 20 | linkeddocid NUMERIC); 21 | 22 | CREATE INDEX doc_links_linkid_idx 23 | ON doc_links(docid ASC); 24 | 25 | ALTER TABLE docs 26 | ADD COLUMN hardcopyKept NUMERIC DEFAULT 1; 27 | 28 | CREATE TEMPORARY TABLE t1_backup("status" INTEGER, "value" INTEGER, "client_id" CHAR(36)); 29 | INSERT INTO t1_backup SELECT status, value, client_id FROM scan_progress; 30 | DROP TABLE scan_progress; 31 | CREATE TABLE scan_progress ( 32 | "status" INTEGER NOT NULL DEFAULT (0), 33 | "value" INTEGER, 34 | "client_id" CHAR(36) NOT NULL DEFAULT (' ') 35 | ); 36 | INSERT INTO scan_progress SELECT status, value, client_id FROM t1_backup; 37 | CREATE UNIQUE INDEX "client_id" on "scan_progress" (client_id ASC); 38 | DROP TABLE t1_backup; 39 | 40 | COMMIT; 41 | 42 | -------------------------------------------------------------------------------- /sql/openDIAS.sqlite3.dmp.v7.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Do not edit this file. 3 | -- If you need to update the schema or default data, create a new file 4 | -- and update the DB version (in the 'version' table and DB_VERSION in src/main.c) 5 | -- 6 | BEGIN TRANSACTION; 7 | 8 | UPDATE version SET version = 7; 9 | 10 | DELETE FROM config WHERE config_option = "scan_directory"; 11 | DELETE FROM config WHERE config_option = "show_all_available"; 12 | DELETE FROM config WHERE config_option = "log_directory"; 13 | 14 | DROP TABLE user_access; 15 | 16 | CREATE TABLE user_access ( 17 | username CHAR(36) NOT NULL, 18 | password CHAR(36) NOT NULL, 19 | realname CHAR(255) NOT NULL, 20 | last_access CHAR(255) NOT NULL, 21 | created CHAR(255) NOT NULL, 22 | role INTEGER NOT NULL 23 | ); 24 | 25 | CREATE INDEX user_access_username_idx 26 | ON user_access(username ASC); 27 | 28 | -- password = md5( ) 29 | -- Here the password is 'admin' 30 | INSERT INTO user_access 31 | VALUES ('admin','6e6a83f742b28434aea09d7e8534647a','Admin User',datetime('now'),'automatically',1); 32 | 33 | 34 | ALTER TABLE docs 35 | ADD COLUMN image_phash TEXT DEFAULT '0'; 36 | 37 | INSERT INTO config (config_option, config_value) VALUES ("backpopulate_phash", "yes"); 38 | 39 | COMMIT; 40 | 41 | -------------------------------------------------------------------------------- /src/backpopulate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * backpopulate.h 3 | * Copyright (C) Clearscene Ltd 2008 4 | * 5 | * backpopulate.h is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * imageProcessing.h is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | */ 18 | 19 | #ifndef BACKPOPULATE 20 | #define BACKPOPULATE 21 | 22 | #include "config.h" 23 | 24 | void backpopulate_phash(); 25 | 26 | #endif /* BACKPOPULATE */ 27 | -------------------------------------------------------------------------------- /src/db.h: -------------------------------------------------------------------------------- 1 | /* 2 | * db.h 3 | * Copyright (C) Clearscene Ltd 2008 4 | * 5 | * db.h is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * db.h is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | */ 18 | 19 | #ifndef DB 20 | #define DB 21 | 22 | #include "simpleLinkedList.h" 23 | 24 | #define DB_NULL "null" 25 | #define DB_TEXT "text" 26 | #define DB_INT "int" 27 | #define DB_DOUBLE "double" 28 | 29 | int connect_db (int); 30 | int open_db (char *); 31 | void close_db (void); 32 | void free_recordset (struct simpleLinkedList *); 33 | int last_insert(void); 34 | int runUpdate_db (char *, struct simpleLinkedList *); 35 | struct simpleLinkedList *runquery_db (char *, struct simpleLinkedList *); 36 | char *readData_db (struct simpleLinkedList *, char *); 37 | int nextRow (struct simpleLinkedList *); 38 | 39 | #endif /* DB */ 40 | -------------------------------------------------------------------------------- /src/debug.h: -------------------------------------------------------------------------------- 1 | /* 2 | * debug.h 3 | * Copyright (C) Clearscene Ltd 2008 4 | * 5 | * debug.h is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * debug.h is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | */ 18 | 19 | #ifndef DEBUG 20 | #define DEBUG 21 | 22 | #include 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | /* 27 | * a VERBOSITY setting of INFORMATION, will throw 'information, warning, error' 28 | */ 29 | extern int VERBOSITY; 30 | extern char *LOG_DIR; 31 | #else 32 | /* 33 | * a VERBOSITY setting of INFORMATION, will throw 'information, warning, error' 34 | */ 35 | int VERBOSITY; 36 | char *LOG_DIR; 37 | #endif /* __cplusplus */ 38 | 39 | enum { 40 | SILENT = 0, 41 | ERROR, 42 | WARNING, 43 | INFORMATION, 44 | DEBUGM, 45 | SQLDEBUG 46 | }; 47 | 48 | int trigger_log_verbosity( const int ); 49 | void oo_log(const char *, const int, const int, const char *, ...); 50 | #define o_log( a, b, ... ) oo_log( __FILE__, __LINE__, a, b, ##__VA_ARGS__ ) 51 | 52 | #ifdef __cplusplus 53 | } 54 | #endif /* __cplusplus */ 55 | 56 | #endif /* DEBUG */ 57 | -------------------------------------------------------------------------------- /src/doc_editor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * doc_editor.h 3 | * Copyright (C) Clearscene Ltd 2008 4 | * 5 | * doc_editor.h is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * doc_editor.h is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | */ 18 | 19 | #ifndef DOCEDITOR 20 | #define DOCEDITOR 21 | 22 | char *getDocDetail (char *, char *); 23 | char *updateDocDetails(char *, char *, char *); 24 | char *updateTagLinkage(char *, char *, char *); 25 | char *doDelete (char *); 26 | 27 | #endif /* DOCEDITOR */ 28 | -------------------------------------------------------------------------------- /src/imageProcessing.h: -------------------------------------------------------------------------------- 1 | /* 2 | * imageProcessing.h 3 | * Copyright (C) Clearscene Ltd 2008 4 | * 5 | * imageProcessing.h is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * imageProcessing.h is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | */ 18 | 19 | #ifndef IMAGEPROCESSING 20 | #define IMAGEPROCESSING 21 | 22 | #include "config.h" 23 | 24 | #include "simpleLinkedList.h" 25 | 26 | #ifdef CAN_OCR 27 | #include 28 | 29 | int isOCRLanguageAvailable( const char * ); 30 | #ifdef CAN_SCAN 31 | struct simpleLinkedList *getOCRAvailableLanguages(); 32 | #endif /* CAN_SCAN */ 33 | char *getTextFromImage(PIX *, int, char *); 34 | #endif /* CAN_OCR */ 35 | 36 | #ifdef CAN_PHASH 37 | unsigned long long getImagePhash_fn( const char * ); 38 | unsigned long long getImagePhash_px( PIX * ); 39 | #endif /* CAN_PHASH */ 40 | 41 | #endif /* IMAGEPROCESSING */ 42 | -------------------------------------------------------------------------------- /src/import_doc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * import_doc.h 3 | * Copyright (C) Clearscene Ltd 2008 4 | * 5 | * import_doc.h is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * import_doc.h is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | */ 18 | 19 | #ifndef IMPORTDOC 20 | #define IMPORTDOC 21 | 22 | char *extractThumbnail(char *); 23 | char *uploadfile(char *, char *, char *); 24 | 25 | #endif /* IMPORTDOC */ 26 | -------------------------------------------------------------------------------- /src/localisation.h: -------------------------------------------------------------------------------- 1 | /* 2 | * locaisation.h 3 | * Copyright (C) Clearscene Ltd 2008 4 | * 5 | * localisation.h is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * localisation.h is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | */ 18 | 19 | #include "config.h" 20 | 21 | #ifndef LOCAL 22 | #define LOCAL 23 | 24 | void locale_init( char * ); 25 | void locale_cleanup( void ); 26 | const char *getString( const char *, const char * ); 27 | struct simpleLinkedList *loadLangList( const char * ); 28 | 29 | #endif /* LOCAL */ 30 | -------------------------------------------------------------------------------- /src/main.h: -------------------------------------------------------------------------------- 1 | /* 2 | * main.h 3 | * Copyright (C) Clearscene Ltd 2008 4 | * 5 | * main.h is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * main.h is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | */ 18 | 19 | #ifndef MAIN 20 | #define MAIN 21 | 22 | #define QUEUE_LENGTH 3 23 | 24 | char *BASE_DIR; 25 | unsigned short PORT; 26 | 27 | enum { 28 | PLACE_HOLDER = 0, 29 | ODF_FILETYPE, 30 | SCAN_FILETYPE, 31 | PDF_FILETYPE, 32 | JPG_FILETYPE, 33 | }; 34 | 35 | struct services { 36 | int pid; 37 | int log; 38 | int locale; 39 | int db; 40 | int sane; 41 | int command; 42 | int httpd; 43 | int sessions; 44 | int backpopulate;; 45 | }; 46 | 47 | void server_shutdown(void); 48 | 49 | #endif /* MAIN */ 50 | -------------------------------------------------------------------------------- /src/ocr_plug.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ocr_plug.h 3 | * Copyright (C) Clearscene Ltd 2008 4 | * 5 | * ocr_plug.h is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * ocr_plug.h is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | */ 18 | 19 | #ifndef OCR_PLUG 20 | #define OCR_PLUG 21 | 22 | #include "config.h" 23 | 24 | #ifdef CAN_OCR 25 | #include 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif /* __cplusplus */ 30 | 31 | struct scanCallInfo { 32 | PIX *image_pix; 33 | int ppi; 34 | const char* language; 35 | char *ret; 36 | }; 37 | 38 | #define OCR_LANG_BRITISH "eng" /*International English */ 39 | #define OCR_LANG_GERMAN "deu" /*German */ 40 | #define OCR_LANG_FRENCH "fra" /*French */ 41 | #define OCR_LANG_SPANISH "spa" /*Spanish */ 42 | #define OCR_LANG_ITALIAN "ita" /*Italian */ 43 | #define OCR_LANG_DUTCH "nld" /*Dutch */ 44 | #define OCR_LANG_BPORTUGUESE "por" /*Brasilian Portuguese */ 45 | #define OCR_LANG_VIETNAMESE "vie" /*Vietnamese */ 46 | 47 | extern void runocr(struct scanCallInfo*); 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif /* __cplusplus */ 52 | 53 | #endif /* CAN_OCR */ 54 | 55 | #endif /* OCR_PLUG */ 56 | -------------------------------------------------------------------------------- /src/odf_plug.h: -------------------------------------------------------------------------------- 1 | /* 2 | * odf_plug.h 3 | * Copyright (C) Clearscene Ltd 2008 4 | * 5 | * odf_plug.h is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * odf_plug.h is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * windation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA 17 | */ 18 | 19 | #ifndef READ_ODF 20 | #define READ_ODF 21 | 22 | #include "config.h" 23 | 24 | #ifdef CAN_READODF 25 | char *get_odf_Text (const char *); 26 | void get_odf_Thumb (const char *, const char *); 27 | #endif /* CAN_READODF */ 28 | 29 | #endif /* READ_ODF */ 30 | -------------------------------------------------------------------------------- /src/opendias_worker.c: -------------------------------------------------------------------------------- 1 | /* 2 | * opendias_worker.c 3 | * Copyright (C) Clearscene Ltd 2008 4 | * 5 | * main.c is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * main.c is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | */ 18 | 19 | #include "config.h" 20 | #include 21 | #include 22 | 23 | #include "main.h" 24 | #include "db.h" 25 | #include "utils.h" 26 | #include "debug.h" 27 | #include "scan.h" 28 | #include "localisation.h" 29 | 30 | void close_all() { 31 | 32 | o_log( INFORMATION, "Worker Finished"); 33 | locale_cleanup(); 34 | close_db(); 35 | 36 | int i; 37 | // close handles to files opened by libs, who 'forgot' to close them themselves 38 | for (i = getdtablesize()-1; i > 1; --i) { // leaving stdout open 39 | close(i); 40 | } 41 | 42 | } 43 | 44 | int main (int argc, char **argv) { 45 | 46 | BASE_DIR = argv[1]; 47 | LOG_DIR = argv[2]; 48 | VERBOSITY = atoi(argv[3]); 49 | 50 | char *command = argv[4]; 51 | char *param = argv[5]; 52 | 53 | // Setup 54 | char *db = o_printf("%s/openDIAS.sqlite3", BASE_DIR); 55 | o_log(DEBUGM,"database file is %s",db); 56 | if(open_db (db)) { 57 | o_log(ERROR, "Could not connect to the database."); 58 | free(db); 59 | exit(EXIT_FAILURE); 60 | } 61 | free(db); 62 | locale_init( "en" ); 63 | 64 | // Let's do the work 65 | o_log( INFORMATION, "Worker started and ready to process: %s", command); 66 | sane_worker( command, param ); 67 | 68 | // Finish up now 69 | close_all(); 70 | exit(EXIT_SUCCESS); 71 | } 72 | 73 | -------------------------------------------------------------------------------- /src/pdf_plug.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ocr_plug.h 3 | * Copyright (C) Clearscene Ltd 2008 4 | * 5 | * ocr_plug.h is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * ocr_plug.h is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | */ 18 | 19 | #ifndef PDF_PLUG 20 | #define PDF_PLUG 21 | 22 | #include "config.h" 23 | 24 | #ifdef CAN_PDF 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif /* __cplusplus */ 29 | 30 | extern char *parse_pdf( const char *, const char *); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif /* __cplusplus */ 35 | 36 | #endif /* CAN_PDF */ 37 | 38 | #endif /* PDF_PLUG */ 39 | -------------------------------------------------------------------------------- /src/phash_plug.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * phash_plug.c 3 | * Copyright (C) Clearscene Ltd 2008 4 | * 5 | * ocr_plug.c is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * ocr_plug.c is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | */ 18 | 19 | #include "config.h" 20 | 21 | #ifdef CAN_PHASH 22 | #include 23 | #include 24 | #include 25 | #include 26 | 27 | #include "debug.h" 28 | 29 | #include "phash_plug.h" 30 | 31 | extern "C" unsigned long long calculateImagePhash(const char *filename) { 32 | 33 | ulong64 hash; 34 | 35 | o_log( INFORMATION, "Calculating pHash of image %s", filename); 36 | if( ph_dct_imagehash( filename, hash ) < 0 ) { 37 | o_log( ERROR, "Could not calculate the pHash of %s", filename); 38 | return 0; 39 | } 40 | return hash; 41 | } 42 | 43 | extern "C" int getDistance( unsigned long long hash0, unsigned long long hash1 ) { 44 | 45 | return ph_hamming_distance(hash0, hash1); 46 | } 47 | #endif /* CAN_PHASH */ 48 | 49 | -------------------------------------------------------------------------------- /src/phash_plug.h: -------------------------------------------------------------------------------- 1 | /* 2 | * phash_plug.h 3 | * Copyright (C) Clearscene Ltd 2008 4 | * 5 | * ocr_plug.h is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * ocr_plug.h is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | */ 18 | 19 | #ifndef PHASHING_PLUG 20 | #define PHASHING_PLUG 21 | 22 | #include "config.h" 23 | 24 | #ifdef CAN_PHASH 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif /* __cplusplus */ 29 | 30 | extern unsigned long long calculateImagePhash(const char *); 31 | extern int getDistance( unsigned long long, unsigned long long ); 32 | 33 | #ifdef __cplusplus 34 | } 35 | #endif /* __cplusplus */ 36 | 37 | #endif /* CAN_PHASH */ 38 | 39 | #endif /* PHASHING_PLUG */ 40 | -------------------------------------------------------------------------------- /src/saneDispatcher.h: -------------------------------------------------------------------------------- 1 | /* 2 | * saneDispatcher.h 3 | * Copyright (C) Clearscene Ltd 2008 4 | * 5 | * main.h is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * saneDispatcher.h is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | */ 18 | 19 | #ifndef SANEDISPATCHER 20 | #define SANEDISPATCHER 21 | 22 | #include "config.h" 23 | 24 | #ifdef CAN_SCAN 25 | 26 | extern void dispatch_sane_work(int); 27 | extern char *send_command(char *, char *); 28 | extern void freeSaneCache( void ); 29 | extern void waitForSaneProcesses( void ); 30 | #endif /* CAN_SCAN */ 31 | 32 | #endif /* SANEDISPATCHER */ 33 | -------------------------------------------------------------------------------- /src/scan.h: -------------------------------------------------------------------------------- 1 | /* 2 | * scan.h 3 | * Copyright (C) Clearscene Ltd 2008 4 | * 5 | * scan.h is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * scan.h is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | */ 18 | 19 | #ifndef SCAN 20 | #define SCAN 21 | 22 | #include "config.h" 23 | 24 | #ifdef CAN_SCAN 25 | enum { 26 | SCAN_PARAM_do_not_use = 0, 27 | SCAN_PARAM_DEVNAME, 28 | SCAN_PARAM_FORMAT, 29 | SCAN_PARAM_DO_OCR, // Do we do OCR? if so what language? 30 | SCAN_PARAM_REQUESTED_PAGES, 31 | SCAN_PARAM_REQUESTED_RESOLUTION, 32 | SCAN_PARAM_DOCID, 33 | SCAN_PARAM_ON_PAGE, 34 | SCAN_PARAM_RESERVED, // used to be CORRECT_FOR_SKEW, 35 | SCAN_PARAM_LENGTH, 36 | }; 37 | 38 | char *internalGetScannerList(char *); 39 | char *internalGetScannerDetails(char *, char *); 40 | char *internalDoScanningOperation(char *, char *); 41 | void sane_worker(char *, char *); 42 | #endif /* CAN_SCAN */ 43 | 44 | #endif /* SCAN */ 45 | -------------------------------------------------------------------------------- /src/scanner.h: -------------------------------------------------------------------------------- 1 | /* 2 | * scanner.h 3 | * Copyright (C) Clearscene Ltd 2008 4 | * 5 | * scan.c is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * scan.c is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | */ 18 | 19 | #ifndef SCANNER 20 | #define SCANNER 21 | 22 | #include "config.h" 23 | 24 | #ifdef CAN_SCAN 25 | void handleSaneErrors(char *, const char *, SANE_Status, int); 26 | const char * get_status_string (SANE_Status); 27 | const char * get_action_string (SANE_Action); 28 | void log_option (SANE_Int, const SANE_Option_Descriptor *); 29 | SANE_Status control_option (SANE_Handle, const SANE_Option_Descriptor *, SANE_Int, SANE_Action, void *, int *); 30 | int setDefaultScannerOption(SANE_Handle *, const SANE_Option_Descriptor *, int, int *); 31 | #endif /* CAN_SCAN */ 32 | 33 | #endif /* SCANNER */ 34 | -------------------------------------------------------------------------------- /src/sessionmanagement.h: -------------------------------------------------------------------------------- 1 | /* 2 | * sessionmanagement.h 3 | * Copyright (C) Clearscene Ltd 2008 4 | * 5 | * localisation.h is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * localisation.h is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | */ 18 | 19 | #include "config.h" 20 | 21 | #include "simpleLinkedList.h" 22 | 23 | #ifndef SESSION 24 | #define SESSION 25 | 26 | int MAX_SESSIONS; 27 | time_t MAX_AGE; 28 | 29 | struct session_data { 30 | time_t last_accessed; 31 | struct simpleLinkedList *session_container; 32 | }; 33 | 34 | void init_session_management(int, int); 35 | void clear_old_sessions(); 36 | char *create_session(); 37 | struct simpleLinkedList *get_session(); 38 | void cleanup_session_management(); 39 | 40 | #endif /* SESSION */ 41 | -------------------------------------------------------------------------------- /src/simpleLinkedList.h: -------------------------------------------------------------------------------- 1 | /* 2 | * simpleLinkedList.h 3 | * Copyright (C) Clearscene Ltd 2008 4 | * 5 | * db.h is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * db.h is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | */ 18 | 19 | #ifndef SIMPLELINKEDLIST 20 | #define SIMPLELINKEDLIST 21 | 22 | #ifndef NULL 23 | #define NULL 0L 24 | #endif /* NULL */ 25 | 26 | struct simpleLinkedList { 27 | char *key; 28 | void *data; 29 | struct simpleLinkedList *prev; 30 | struct simpleLinkedList *next; 31 | }; 32 | 33 | struct simpleLinkedList *sll_init(); 34 | struct simpleLinkedList *sll_createNewElement( void * ); 35 | struct simpleLinkedList *sll_findLastElement( struct simpleLinkedList * ); 36 | struct simpleLinkedList *sll_findFirstElement( struct simpleLinkedList * ); 37 | struct simpleLinkedList *sll_getNext( struct simpleLinkedList * ); 38 | struct simpleLinkedList *sll_searchKeys( struct simpleLinkedList *, const char * ); 39 | void sll_append( struct simpleLinkedList *, void * ); 40 | void sll_insert( struct simpleLinkedList *, char *, void * ); 41 | void sll_destroy( struct simpleLinkedList * ); 42 | void sll_delete( struct simpleLinkedList * ); 43 | int sll_count( struct simpleLinkedList * ); 44 | char *sll_dumper( struct simpleLinkedList * ); 45 | void sll_sort( struct simpleLinkedList * ); 46 | 47 | #endif /* SIMPLELINKEDLIST */ 48 | -------------------------------------------------------------------------------- /src/utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * utils.h 3 | * Copyright (C) Clearscene Ltd 2008 4 | * 5 | * utils.h is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * utils.h is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | */ 18 | 19 | #ifndef UTILS 20 | #define UTILS 21 | 22 | #include 23 | 24 | struct dateParts { 25 | char *year; 26 | char *month; 27 | char *day; 28 | }; 29 | 30 | char *o_strdup(const char *); 31 | char *itoa(long int, int); 32 | size_t load_file_to_memory(const char *, char **); 33 | void createDir_ifRequired(char *); 34 | void fcopy(char *, char *); 35 | int max(int, int); 36 | int min(int, int); 37 | char *dateHuman(char *, char *, char *, const char *); 38 | void conCat(char **, const char *); 39 | char *getTimeStr(); 40 | char *getTimeStr_iso8601(); 41 | void propper(char *); 42 | void lower(char *); 43 | void chop(char *); 44 | struct dateParts *dateStringToDateParts(char *); 45 | void addFileExt(char **, int); 46 | void replace(char *, char*, char*); 47 | char *o_printf(const char *, ...); 48 | void o_concatf(char **, const char *, ...); 49 | char *str2md5(const char *, int ); 50 | 51 | #endif /* UTILS */ 52 | -------------------------------------------------------------------------------- /src/validation.h: -------------------------------------------------------------------------------- 1 | /* 2 | * validation.h 3 | * Copyright (C) Clearscene Ltd 2008 4 | * 5 | * validation.h is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * validation.h is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | */ 18 | 19 | #ifndef VALIDATION 20 | #define VALIDATION 21 | 22 | #include "simpleLinkedList.h" 23 | 24 | char *getPostData(struct simpleLinkedList *, char *); 25 | int basicValidation(struct simpleLinkedList *); 26 | int validate(struct simpleLinkedList *, char *); 27 | int validateLanguage(const char *); 28 | int checkOCRLanguage(char *); 29 | 30 | #endif /* VALIDATION */ 31 | -------------------------------------------------------------------------------- /src/web_handler.h: -------------------------------------------------------------------------------- 1 | /* 2 | * web_handler.h 3 | * Copyright (C) Clearscene Ltd 2008 4 | * 5 | * main.h is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * main.h is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | */ 18 | 19 | #ifndef WEBHANDLER 20 | #define WEBHANDLER 21 | 22 | #include 23 | 24 | #ifdef THREAD_JOIN 25 | #include 26 | #endif /* THREAD_JOIN */ 27 | struct connection_info_struct { 28 | int connectiontype; 29 | struct MHD_PostProcessor *postprocessor; 30 | struct simpleLinkedList *post_data; 31 | #ifdef THREAD_JOIN 32 | pthread_t thread; 33 | #endif /* THREAD_JOIN */ 34 | char *lang; 35 | struct simpleLinkedList *session_data; 36 | char *session_id; 37 | }; 38 | 39 | #define POSTBUFFERSIZE 512 40 | #define MAXCLIENTS 5 41 | #define GET 0 42 | #define POST 1 43 | 44 | #define MIMETYPE_HTML "text/html" 45 | #define MIMETYPE_PNG "image/png" 46 | #define MIMETYPE_JPG "image/jpeg" 47 | #define MIMETYPE_CSS "text/css" 48 | #define MIMETYPE_JS "application/javascript" 49 | #define MIMETYPE_XML "text/xml" 50 | #define MIMETYPE_OGG "audio/ogg" 51 | #define MIMETYPE_JSON "text/x-json" 52 | #define MIMETYPE_PDF "application/pdf" 53 | #define MIMETYPE_ODT "application/vnd.oasis.opendocument.text" 54 | #define MIMETYPE_PNG "image/png" 55 | 56 | int answer_to_connection (void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **); 57 | void request_completed (void *, struct MHD_Connection *, void **, enum MHD_RequestTerminationCode ); 58 | 59 | #endif /* WEBHANDLER */ 60 | -------------------------------------------------------------------------------- /test/clientSideTesting/README: -------------------------------------------------------------------------------- 1 | 2 | 1. Make and install openDIAS 3 | 4 | 2. Deploy the testing files, using ./deploy.sh 5 | 6 | 3. Start openDIAS 7 | 8 | 4. Send clients to http://host[:port]/opendias/clientTesting.html, eg using 'testswarm' 9 | -------------------------------------------------------------------------------- /test/clientSideTesting/clientTesting.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | QUnit Test Suite 6 | 7 | 8 | 9 | 10 | 15 | 16 | 17 |
18 |
test markup
19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /test/clientSideTesting/deploy.sh: -------------------------------------------------------------------------------- 1 | # 2 | 3 | BASEDIR="/tmp/opendias_test/share/opendias" 4 | 5 | mkdir -p $BASEDIR/webcontent/includes/tests/ 6 | cp clientTesting.html $BASEDIR/webcontent/clientTesting.html 7 | cp jquery.qunit.css $BASEDIR/webcontent/style/jquery.qunit.css 8 | cp jquery.qunit.js $BASEDIR/webcontent/includes/jquery.qunit.js 9 | cd tests 10 | cp *.js $BASEDIR/webcontent/includes/tests/ 11 | 12 | cd ../ 13 | echo Now start opendias and visit http://host[:port]/opendias/clientTesting.html 14 | 15 | -------------------------------------------------------------------------------- /test/clientSideTesting/tests/detailPageTest.js: -------------------------------------------------------------------------------- 1 | (function(){ 2 | 3 | var doneload = 0; 4 | // ================================================ 5 | module("Filter", { 6 | setup : function(){ 7 | if( ! doneload ) { 8 | stop(); 9 | $q('#testframe').one('load', function() { 10 | $ = window.frames[0].jQuery; 11 | doneload = 1; 12 | start(); 13 | }); 14 | $q('#testframe').attr('src', "/opendias/docDetail.html?docid=1"); 15 | window.setTimeout( function() { 16 | if( ! doneload ) { 17 | ok( 0, "Did not load the list page."); 18 | } 19 | }, 5000); 20 | } 21 | }, 22 | teardown : function(){ } 23 | }); 24 | 25 | // ------------------------------------------------ 26 | asyncTest('some test', 1, function() { 27 | console.log("2. Running: title - filters down"); 28 | 29 | //setupWaitForValue( $('#filterProgress'), "Will return an estimated 2 docs" ); 30 | //$('#textSearch').val("v").change(); 31 | //waitForValue( $('#filterProgress'), 1000 ); 32 | ok( 1, "This is OK" ); 33 | start(); 34 | }); 35 | 36 | })(); 37 | -------------------------------------------------------------------------------- /test/config/appLogUnify.sed: -------------------------------------------------------------------------------- 1 | s/[0-9]*:[A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9]:/-date-:-thread-:/g 2 | s/[0-9]*:[A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9]:/-date-:-thread-:/g 3 | s/:[a-zA-Z0-9_]*.c:[0-9]* /:-file-:-line- /g 4 | s/Child process created [0-9]*/Child process created [CONFIG_FILE]/g 5 | s/Using config file: .*/Using config file: [CONFIG_FILE]/g 6 | s/t open database: .*/t open database: [ERROR]/g 7 | s/Run Query .[0-9A-Fa-f]*./Run Query [RECORDSET]/g 8 | s/Free recordset .[0-9A-Fa-f]*./Free recordset [RECORDSET]/g 9 | s/file: .*\/test\/config/file: [PATH]\/test\/config/g 10 | s/\w\{8\}-\w\{4\}-\w\{4\}-\w\{4\}-\w\{12\}/[ZZZZZZZZ-UUID-ZZZZ-ZZZZ-ZZZZZZZZZZZZ]/g 11 | s/[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [+-][0-9][0-9][0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9]/YYYY-MM-DD +-UTC HH:MM:SS/g 12 | s/in [0-9]* ms/in [__TIME__] ms/g 13 | s/openDIAS version 'opendias [0-9a-z\.]*' has been invoked/openDIAS version 'opendias [VERSION]' has been invoked/ 14 | s/openDIAS\. v\([0-9]\(\.[0-9]\)\+\)b\?/[VERSION STRING]/g 15 | s/\/tmp\/pHash_[A-F0-9]*\.jpg/\/tmp\/pHash_[THREAD].jpg/g 16 | -------------------------------------------------------------------------------- /test/config/defaultdatabase.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/test/config/defaultdatabase.sqlite3 -------------------------------------------------------------------------------- /test/config/sane/dll.conf: -------------------------------------------------------------------------------- 1 | test 2 | 3 | -------------------------------------------------------------------------------- /test/config/sane/test.conf: -------------------------------------------------------------------------------- 1 | number_of_devices 1 2 | mode Gray 3 | depth 8 4 | hand-scanner false 5 | three-pass false 6 | three-pass-order RGB 7 | resolution_min 50.0 8 | resolution_max 800.0 9 | resolution_quant 1 10 | resolution 50.0 11 | test-picture "Color pattern" 12 | invert-endianess false 13 | read-limit false 14 | read-limit-size 1 15 | read-delay false 16 | read-delay-duration 1000 17 | read-status-code "Default" 18 | fuzzy-parameters true 19 | ppl-loss 0 20 | non-blocking false 21 | select-fd false 22 | enable-test-options true 23 | geometry_min 0.0 24 | geometry_max 200.0 25 | geometry_quant 1.0 26 | tl_x 0.0 27 | tl_y 0.0 28 | br_x 80.0 29 | br_y 100.0 30 | -------------------------------------------------------------------------------- /test/config/testLogUnify.sed: -------------------------------------------------------------------------------- 1 | s/\w\{8\}-\w\{4\}-\w\{4\}-\w\{4\}-\w\{12\}/[ZZZZZZZZ-UUID-ZZZZ-ZZZZ-ZZZZZZZZZZZZ]/g 2 | s/Admin User','[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\} [0-9]\{2\}:[0-9]\{2\}:[0-9]\{2\}','automatically/Admin User','[YYYY-MM-DD HH:MM:SS]','automatically/g 3 | s/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\} [0-9]\{2\}:[0-9]\{2\}:[0-9]\{2\}/[YYYY-MM-DD HH:MM:SS]/g 4 | s/
  • opendias \([0-9]\(\.[0-9]\)\+\)b\?<\/li>/
  • [VERSION STRING]<\/li>/g 5 | s/

    opendias \([0-9]\(\.[0-9]\)\+\)b\? /

    [VERSION STRING] /g 6 | s/2008 - 201[0-9]/[DATES]/g 7 | -------------------------------------------------------------------------------- /test/config/testapp.conf: -------------------------------------------------------------------------------- 1 | /tmp/opendiastest/ 2 | -------------------------------------------------------------------------------- /test/config/testappUnableToCreate.conf: -------------------------------------------------------------------------------- 1 | /root 2 | -------------------------------------------------------------------------------- /test/config/valgrindUnify.sed: -------------------------------------------------------------------------------- 1 | s/==[0-9]*==/==XXXXX== /g 2 | s/My PID = [0-9]*, parent PID = [0-9]*./My PID = XXXXX, parent PID = XXXXX./ 3 | s/Parent PID: [0-9]*./Parent PID: XXXXX./ 4 | s/\([0-9]\),\([0-9]\)/\1\2/g 5 | s/[0-9]*[0-9] bytes/XXX bytes/g 6 | s/[0-9]*[0-9] blocks/XXX blocks/g 7 | s/[0-9]*[0-9] allocs/XXXX allocs/g 8 | s/[0-9]*[0-9] frees/XXXX frees/g 9 | s/suppressed: [0-9]* from [0-9]*/suppressed: XXX from XXX/g 10 | s/Command: ..\/src\/opendias -c .*/Command: ..\/src\/opendias -c [CONFIG_FILE]/ 11 | s/Using Valgrind.*/Using Valgrind [version and build info]/ 12 | s/Copyright.*/Copyright [details]/ 13 | s/Warning: invalid file descriptor.*/Warning: invalid file descriptor [system specific]/ 14 | s/Open file descriptor \([0-9]*\): .*/Open file descriptor \1: [FILE PATH]/ 15 | s/\w\{8\}-\w\{4\}-\w\{4\}-\w\{4\}-\w\{12\}/[ZZZZZZZZ-UUID-ZZZZ-ZZZZ-ZZZZZZZZZZZZ]/g 16 | -------------------------------------------------------------------------------- /test/i/1_4_various_kills_are_ignored/homeDir/DEFAULTDB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/test/i/1_4_various_kills_are_ignored/homeDir/DEFAULTDB -------------------------------------------------------------------------------- /test/i/1_5_could_not_start_http_service/homeDir/DEFAULTDB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/test/i/1_5_could_not_start_http_service/homeDir/DEFAULTDB -------------------------------------------------------------------------------- /test/i/1_9_usage_app/homeDir/DEFAULTDB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/test/i/1_9_usage_app/homeDir/DEFAULTDB -------------------------------------------------------------------------------- /test/i/1_a_usage_config/homeDir/DEFAULTDB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/test/i/1_a_usage_config/homeDir/DEFAULTDB -------------------------------------------------------------------------------- /test/i/3_1_doclist/homeDir/DEFAULTDB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/test/i/3_1_doclist/homeDir/DEFAULTDB -------------------------------------------------------------------------------- /test/i/3_1_doclist/intest/1.sql: -------------------------------------------------------------------------------- 1 | BEGIN TRANSACTION; 2 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (1,1,'This is the OCR text.',8,3509,2519,300,2010,12,31,'2011-01-02T21:13:04.393946Z',2,'Test Ϋ Title',1,0,0); 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /test/i/3_1_doclist/intest/2.sql: -------------------------------------------------------------------------------- 1 | BEGIN TRANSACTION; 2 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (4,1,'This is 1 new OCR text.',8,3509,2519,300,2010,12,30,'2011-01-03T21:13:04.393946Z',4,'Test 1 Title',1,0,0); 3 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (3,1,'This is 2 more OCR text.',8,3509,2519,300,2011,01,01,'2011-01-04T21:13:04.393946Z',2,'Test 2 Title',1,1,0); 4 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (2,1,'This is 3 final OCR text.',8,3509,2519,300,2012,12,31,'2011-01-04T21:13:05.393946Z',3,'Test 3 Title',1,1,0); 5 | COMMIT; 6 | -------------------------------------------------------------------------------- /test/i/3_2_doclist_search/1.sql: -------------------------------------------------------------------------------- 1 | BEGIN TRANSACTION; 2 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (1,1,'This is the OCR text.',8,3509,2519,300,2010,12,31,'2011-01-02T21:13:04.393946Z',2,'Test Titletext',1,0,0); 3 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (4,1,'This is OCR text 4.',8,3509,2519,300,2010,12,30,'2011-01-03T21:13:04.393946Z',4,'Test 1 TitleText 2',1,0,0); 4 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (3,1,'This is OCR text 2.',8,3509,2519,300,2011,01,01,'2011-01-04T21:13:04.393946Z',2,'Test 2 Title text',1,1,0); 5 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (2,1,'This is final OCR text 3.',8,3509,2519,300,2012,12,31,'2011-01-04T21:13:05.393946Z',3,'Test 3 Title',1,1,0); 6 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (5,1,'fantastical',8,3509,2519,300,2039,01,01,'2014-01-04T21:13:05.393946Z',1,NULL,1,0,0); 7 | INSERT INTO tags (tagid, tagname) VALUES (31, 'tag one'); 8 | INSERT INTO tags (tagid, tagname) VALUES (32, 'tag two'); 9 | INSERT INTO tags (tagid, tagname) VALUES (33, 'tag three'); 10 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (1, 2, 31); 11 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (2, 2, 32); 12 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (3, 3, 32); 13 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (4, 4, 33); 14 | COMMIT; 15 | -------------------------------------------------------------------------------- /test/i/3_2_doclist_search/homeDir/DEFAULTDB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/test/i/3_2_doclist_search/homeDir/DEFAULTDB -------------------------------------------------------------------------------- /test/i/3_3_getScannerList/homeDir/DEFAULTDB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/test/i/3_3_getScannerList/homeDir/DEFAULTDB -------------------------------------------------------------------------------- /test/i/3_4_getDocDetails/1.sql: -------------------------------------------------------------------------------- 1 | BEGIN TRANSACTION; 2 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (1,1,'This is the OCR text.',8,3509,2519,300,2010,12,31,'2011-01-02T21:13:04.393946Z',2,'Test Titletext',1,0,1); 3 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (4,1,'This is OCR text 4.',8,3509,2519,300,2010,12,30,'2011-01-03T21:13:04.393946Z',4,NULL,1,0,1); 4 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (3,1,'This is OCR text 2.',8,3509,2519,300,2011,01,01,'2011-01-04T21:13:04.393946Z',2,'Test 2 Title text',1,1,1); 5 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (2,1,'This is final OCR text 3.',8,3509,2519,300,2012,12,31,'2011-01-04T21:13:05.393946Z',3,'Test 3 Title',1,1,1); 6 | INSERT INTO tags (tagid, tagname) VALUES (31, 'tag one'); 7 | INSERT INTO tags (tagid, tagname) VALUES (32, 'tag two'); 8 | INSERT INTO tags (tagid, tagname) VALUES (33, 'tag three'); 9 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (1, 2, 31); 10 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (2, 2, 32); 11 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (3, 3, 32); 12 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (4, 4, 33); 13 | INSERT INTO doc_links (doclinkid,docid,linkeddocid) VALUES (1, 2, 4); 14 | INSERT INTO doc_links (doclinkid,docid,linkeddocid) VALUES (2, 4, 2); 15 | INSERT INTO doc_links (doclinkid,docid,linkeddocid) VALUES (3, 1, 4); 16 | INSERT INTO doc_links (doclinkid,docid,linkeddocid) VALUES (4, 4, 1); 17 | COMMIT; 18 | -------------------------------------------------------------------------------- /test/i/3_4_getDocDetails/homeDir/DEFAULTDB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/test/i/3_4_getDocDetails/homeDir/DEFAULTDB -------------------------------------------------------------------------------- /test/i/3_5_updateDocDetails/1.sql: -------------------------------------------------------------------------------- 1 | BEGIN TRANSACTION; 2 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (1,1,'This is the OCR text.',8,3509,2519,300,2010,12,31,'2011-01-02T21:13:04.393946Z',2,'Test Titletext',1,0,1); 3 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (4,1,'This is OCR text 4.',8,3509,2519,300,2010,12,30,'2011-01-03T21:13:04.393946Z',4,'Test 1 TitleText 2',1,0,1); 4 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (3,1,'This is OCR text 2.',8,3509,2519,300,2011,01,01,'2011-01-04T21:13:04.393946Z',2,'Test 2 Title text',1,1,1); 5 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (2,1,'This is final OCR text 3.',8,3509,2519,300,2012,12,31,'2011-01-04T21:13:05.393946Z',3,'Test 3 Title',1,1,1); 6 | INSERT INTO tags (tagid, tagname) VALUES (31, 'tag one'); 7 | INSERT INTO tags (tagid, tagname) VALUES (32, 'tag two'); 8 | INSERT INTO tags (tagid, tagname) VALUES (33, 'tag three'); 9 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (1, 2, 31); 10 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (2, 2, 32); 11 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (3, 3, 32); 12 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (4, 4, 33); 13 | COMMIT; 14 | -------------------------------------------------------------------------------- /test/i/3_5_updateDocDetails/homeDir/DEFAULTDB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/test/i/3_5_updateDocDetails/homeDir/DEFAULTDB -------------------------------------------------------------------------------- /test/i/3_6_moveTag/1.sql: -------------------------------------------------------------------------------- 1 | BEGIN TRANSACTION; 2 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (1,1,'This is the OCR text.',8,3509,2519,300,2010,12,31,'2011-01-02T21:13:04.393946Z',2,'Test Titletext',1,0,1); 3 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (4,1,'This is OCR text 4.',8,3509,2519,300,2010,12,30,'2011-01-03T21:13:04.393946Z',4,'Test 1 TitleText 2',1,0,1); 4 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (3,1,'This is OCR text 2.',8,3509,2519,300,2011,01,01,'2011-01-04T21:13:04.393946Z',2,'Test 2 Title text',1,1,1); 5 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (2,1,'This is final OCR text 3.',8,3509,2519,300,2012,12,31,'2011-01-04T21:13:05.393946Z',3,'Test 3 Title',1,1,1); 6 | INSERT INTO tags (tagid, tagname) VALUES (31, 'tag one'); 7 | INSERT INTO tags (tagid, tagname) VALUES (32, 'tag two'); 8 | INSERT INTO tags (tagid, tagname) VALUES (33, 'tag three'); 9 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (1, 2, 31); 10 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (2, 2, 32); 11 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (3, 3, 32); 12 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (4, 4, 33); 13 | INSERT INTO doc_links (doclinkid,docid,linkeddocid) VALUES (1, 2, 4); 14 | INSERT INTO doc_links (doclinkid,docid,linkeddocid) VALUES (2, 4, 2); 15 | INSERT INTO doc_links (doclinkid,docid,linkeddocid) VALUES (3, 1, 4); 16 | INSERT INTO doc_links (doclinkid,docid,linkeddocid) VALUES (4, 4, 1); 17 | COMMIT; 18 | -------------------------------------------------------------------------------- /test/i/3_6_moveTag/homeDir/DEFAULTDB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/test/i/3_6_moveTag/homeDir/DEFAULTDB -------------------------------------------------------------------------------- /test/i/3_7_deleteDoc/1.sql: -------------------------------------------------------------------------------- 1 | BEGIN TRANSACTION; 2 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (1,1,'This is the OCR text.',8,3509,2519,300,2010,12,31,'2011-01-02T21:13:04.393946Z',2,'Test Titletext',1,0,0); 3 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (4,1,'This is OCR text 4.',8,3509,2519,300,2010,12,30,'2011-01-03T21:13:04.393946Z',4,'Test 1 TitleText 2',1,0,0); 4 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (3,1,'This is OCR text 2.',8,3509,2519,300,2011,01,01,'2011-01-04T21:13:04.393946Z',2,'Test 2 Title text',1,1,0); 5 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (2,1,'This is final OCR text 3.',8,3509,2519,300,2012,12,31,'2011-01-04T21:13:05.393946Z',3,'Test 3 Title',1,1,0); 6 | INSERT INTO tags (tagid, tagname) VALUES (31, 'tag one'); 7 | INSERT INTO tags (tagid, tagname) VALUES (32, 'tag two'); 8 | INSERT INTO tags (tagid, tagname) VALUES (33, 'tag three'); 9 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (1, 2, 31); 10 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (2, 2, 32); 11 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (3, 3, 32); 12 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (4, 4, 33); 13 | INSERT INTO doc_links (doclinkid,docid,linkeddocid) VALUES (1, 2, 4); 14 | INSERT INTO doc_links (doclinkid,docid,linkeddocid) VALUES (2, 4, 2); 15 | INSERT INTO doc_links (doclinkid,docid,linkeddocid) VALUES (3, 1, 4); 16 | INSERT INTO doc_links (doclinkid,docid,linkeddocid) VALUES (4, 4, 1); 17 | COMMIT; 18 | -------------------------------------------------------------------------------- /test/i/3_7_deleteDoc/homeDir/DEFAULTDB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/test/i/3_7_deleteDoc/homeDir/DEFAULTDB -------------------------------------------------------------------------------- /test/i/3_8_autoComplete/1.sql: -------------------------------------------------------------------------------- 1 | BEGIN TRANSACTION; 2 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (1,1,'This is the OCR text.',8,3509,2519,300,2010,12,31,'2011-01-02T21:13:04.393946Z',2,'Test Titletext',1,0,0); 3 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (4,1,'This is OCR text 4.',8,3509,2519,300,2010,12,30,'2011-01-03T21:13:04.393946Z',4,'Test 1 TitleText 2',1,0,0); 4 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (3,1,'This is OCR text 2.',8,3509,2519,300,2011,01,01,'2011-01-04T21:13:04.393946Z',2,'Test 2 Title text',1,1,0); 5 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (2,1,'This is final OCR text 3.',8,3509,2519,300,2012,12,31,'2011-01-04T21:13:05.393946Z',3,'Test 3 Title',1,1,0); 6 | INSERT INTO tags (tagid, tagname) VALUES (31, 'tag one'); 7 | INSERT INTO tags (tagid, tagname) VALUES (32, 'tag two'); 8 | INSERT INTO tags (tagid, tagname) VALUES (33, 'tag three'); 9 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (1, 2, 31); 10 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (2, 2, 32); 11 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (3, 3, 32); 12 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (4, 4, 33); 13 | INSERT INTO doc_links (doclinkid,docid,linkeddocid) VALUES (1, 2, 4); 14 | INSERT INTO doc_links (doclinkid,docid,linkeddocid) VALUES (2, 4, 2); 15 | INSERT INTO doc_links (doclinkid,docid,linkeddocid) VALUES (3, 1, 4); 16 | INSERT INTO doc_links (doclinkid,docid,linkeddocid) VALUES (4, 4, 1); 17 | COMMIT; 18 | -------------------------------------------------------------------------------- /test/i/3_8_autoComplete/homeDir/DEFAULTDB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/test/i/3_8_autoComplete/homeDir/DEFAULTDB -------------------------------------------------------------------------------- /test/i/3_9_access/1.sql: -------------------------------------------------------------------------------- 1 | BEGIN TRANSACTION; 2 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (1,1,'This is the OCR text.',8,3509,2519,300,2010,12,31,'2011-01-02T21:13:04.393946Z',2,'Test Titletext',1,0,1); 3 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (4,1,'This is OCR text 4.',8,3509,2519,300,2010,12,30,'2011-01-03T21:13:04.393946Z',4,'Test 1 TitleText 2',1,0,1); 4 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (3,1,'This is OCR text 2.',8,3509,2519,300,2011,01,01,'2011-01-04T21:13:04.393946Z',2,'Test 2 Title text',1,1,1); 5 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (2,1,'This is final OCR text 3.',8,3509,2519,300,2012,12,31,'2011-01-04T21:13:05.393946Z',3,'Test 3 Title',1,1,1); 6 | INSERT INTO tags (tagid, tagname) VALUES (31, 'tag one'); 7 | INSERT INTO tags (tagid, tagname) VALUES (32, 'tag two'); 8 | INSERT INTO tags (tagid, tagname) VALUES (33, 'tag three'); 9 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (1, 2, 31); 10 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (2, 2, 32); 11 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (3, 3, 32); 12 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (4, 4, 33); 13 | COMMIT; 14 | -------------------------------------------------------------------------------- /test/i/3_9_access/2.sql: -------------------------------------------------------------------------------- 1 | BEGIN TRANSACTION; 2 | update config set config_value=4 where config_option='log_verbosity'; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /test/i/3_9_access/homeDir/DEFAULTDB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/test/i/3_9_access/homeDir/DEFAULTDB -------------------------------------------------------------------------------- /test/i/3_a_scanning/1.sql: -------------------------------------------------------------------------------- 1 | BEGIN TRANSACTION; 2 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (1,1,'This is the OCR text.',8,3509,2519,300,2010,12,31,'2011-01-02T21:13:04.393946Z',2,'Test Titletext',1,0,0); 3 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (4,1,'This is OCR text 4.',8,3509,2519,300,2010,12,30,'2011-01-03T21:13:04.393946Z',4,'Test 1 TitleText 2',1,0,0); 4 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (3,1,'This is OCR text 2.',8,3509,2519,300,2011,01,01,'2011-01-04T21:13:04.393946Z',2,'Test 2 Title text',1,1,0); 5 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (2,1,'This is final OCR text 3.',8,3509,2519,300,2012,12,31,'2011-01-04T21:13:05.393946Z',3,'Test 3 Title',1,1,0); 6 | INSERT INTO tags (tagid, tagname) VALUES (31, 'tag one'); 7 | INSERT INTO tags (tagid, tagname) VALUES (32, 'tag two'); 8 | INSERT INTO tags (tagid, tagname) VALUES (33, 'tag three'); 9 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (1, 2, 31); 10 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (2, 2, 32); 11 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (3, 3, 32); 12 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (4, 4, 33); 13 | INSERT INTO doc_links (doclinkid,docid,linkeddocid) VALUES (1, 2, 4); 14 | INSERT INTO doc_links (doclinkid,docid,linkeddocid) VALUES (2, 4, 2); 15 | INSERT INTO doc_links (doclinkid,docid,linkeddocid) VALUES (3, 1, 4); 16 | INSERT INTO doc_links (doclinkid,docid,linkeddocid) VALUES (4, 4, 1); 17 | COMMIT; 18 | -------------------------------------------------------------------------------- /test/i/3_a_scanning/homeDir/DEFAULTDB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/test/i/3_a_scanning/homeDir/DEFAULTDB -------------------------------------------------------------------------------- /test/i/3_b_validation/homeDir/DEFAULTDB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/test/i/3_b_validation/homeDir/DEFAULTDB -------------------------------------------------------------------------------- /test/i/3_c_import/1.sql: -------------------------------------------------------------------------------- 1 | BEGIN TRANSACTION; 2 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (1,1,'This is the OCR text.',8,3509,2519,300,2010,12,31,'2011-01-02T21:13:04.393946Z',2,'Test Titletext',1,0,0); 3 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (4,1,'This is OCR text 4.',8,3509,2519,300,2010,12,30,'2011-01-03T21:13:04.393946Z',4,'Test 1 TitleText 2',1,0,0); 4 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (3,1,'This is OCR text 2.',8,3509,2519,300,2011,01,01,'2011-01-04T21:13:04.393946Z',2,'Test 2 Title text',1,1,0); 5 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept) VALUES (2,1,'This is final OCR text 3.',8,3509,2519,300,2012,12,31,'2011-01-04T21:13:05.393946Z',3,'Test 3 Title',1,1,0); 6 | INSERT INTO tags (tagid, tagname) VALUES (31, 'tag one'); 7 | INSERT INTO tags (tagid, tagname) VALUES (32, 'tag two'); 8 | INSERT INTO tags (tagid, tagname) VALUES (33, 'tag three'); 9 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (1, 2, 31); 10 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (2, 2, 32); 11 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (3, 3, 32); 12 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (4, 4, 33); 13 | INSERT INTO doc_links (doclinkid,docid,linkeddocid) VALUES (1, 2, 4); 14 | INSERT INTO doc_links (doclinkid,docid,linkeddocid) VALUES (2, 4, 2); 15 | INSERT INTO doc_links (doclinkid,docid,linkeddocid) VALUES (3, 1, 4); 16 | INSERT INTO doc_links (doclinkid,docid,linkeddocid) VALUES (4, 4, 1); 17 | COMMIT; 18 | -------------------------------------------------------------------------------- /test/i/3_c_import/homeDir/DEFAULTDB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/test/i/3_c_import/homeDir/DEFAULTDB -------------------------------------------------------------------------------- /test/i/3_c_import/test.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/test/i/3_c_import/test.jpg -------------------------------------------------------------------------------- /test/i/3_c_import/test.odt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/test/i/3_c_import/test.odt -------------------------------------------------------------------------------- /test/i/3_c_import/test.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/test/i/3_c_import/test.pdf -------------------------------------------------------------------------------- /test/i/3_d_language_selection/homeDir/DEFAULTDB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/test/i/3_d_language_selection/homeDir/DEFAULTDB -------------------------------------------------------------------------------- /test/i/3_e_forbidden_requests/homeDir/DEFAULTDB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/test/i/3_e_forbidden_requests/homeDir/DEFAULTDB -------------------------------------------------------------------------------- /test/i/3_f_update_user_n_user_permissions/homeDir/DEFAULTDB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/test/i/3_f_update_user_n_user_permissions/homeDir/DEFAULTDB -------------------------------------------------------------------------------- /test/i/3_g_checkForSimilar/1.sql: -------------------------------------------------------------------------------- 1 | BEGIN TRANSACTION; 2 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept, image_phash) VALUES (1,1,'This is the OCR text.',8,3509,2519,300,2010,12,31,'2011-01-02T21:13:04.393946Z',2,'Test Titletext',1,0,1,'6800011616451863737'); 3 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept, image_phash) VALUES (4,1,'This is OCR text 4.',8,3509,2519,300,2010,12,30,'2011-01-03T21:13:04.393946Z',4,NULL,1,0,1,'6520753255686124701'); 4 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept, image_phash) VALUES (3,1,'This is OCR text 2.',8,3509,2519,300,2011,01,01,'2011-01-04T21:13:04.393946Z',2,'Test 2 Title text',1,1,1,'0'); 5 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept, image_phash) VALUES (2,1,'This is final OCR text 3.',8,3509,2519,300,2012,12,31,'2011-01-04T21:13:05.393946Z',3,'Test 3 Title',1,1,1,'7451092301991418072',); 6 | INSERT INTO tags (tagid, tagname) VALUES (31, 'tag one'); 7 | INSERT INTO tags (tagid, tagname) VALUES (32, 'tag two'); 8 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (1, 1, 31); 9 | INSERT INTO doc_tags (doctagid, docid, tagid) VALUES (2, 1, 32); 10 | COMMIT; 11 | -------------------------------------------------------------------------------- /test/i/3_g_checkForSimilar/homeDir/DEFAULTDB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/test/i/3_g_checkForSimilar/homeDir/DEFAULTDB -------------------------------------------------------------------------------- /test/i/3_h_backpopulate/1.sql: -------------------------------------------------------------------------------- 1 | BEGIN TRANSACTION; 2 | UPDATE config SET config_value='yes' WHERE config_option='backpopulate_phash'; 3 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept, image_phash) VALUES (1,1,'This is the OCR text.',8,3509,2519,300,2010,12,31,'2011-01-02T21:13:04.393946Z',2,'Test Titletext',1,0,0,0); 4 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept, image_phash) VALUES (4,1,'This is OCR text 4.',8,3509,2519,300,2010,12,30,'2011-01-03T21:13:04.393946Z',4,'Test 1 TitleText 2',1,0,0,0); 5 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept, image_phash) VALUES (3,1,'This is OCR text 2.',8,3509,2519,300,2011,01,01,'2011-01-04T21:13:04.393946Z',2,'Test 2 Title text',1,1,0,0); 6 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept, image_phash) VALUES (2,1,'This is final OCR text 3.',8,3509,2519,300,2012,12,31,'2011-01-04T21:13:05.393946Z',3,'Test 3 Title',1,1,0,999); 7 | INSERT INTO docs (docid, doneocr, ocrtext, depth, lines, ppl, resolution, docdatey, docdatem, docdated, entrydate, filetype, title, pages, actionrequired, hardcopyKept, image_phash) VALUES (5,1,'fantastical',8,3509,2519,300,2039,01,01,'2014-01-04T21:13:05.393946Z',1,NULL,1,0,0,999); 8 | COMMIT; 9 | -------------------------------------------------------------------------------- /test/i/3_h_backpopulate/homeDir/DEFAULTDB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/test/i/3_h_backpopulate/homeDir/DEFAULTDB -------------------------------------------------------------------------------- /test/i/3_h_backpopulate/homeDir/scans/1_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/test/i/3_h_backpopulate/homeDir/scans/1_1.jpg -------------------------------------------------------------------------------- /test/i/3_h_backpopulate/homeDir/scans/2_thumb.jpg: -------------------------------------------------------------------------------- 1 | 1_1.jpg -------------------------------------------------------------------------------- /test/i/3_h_backpopulate/homeDir/scans/4_1.jpg: -------------------------------------------------------------------------------- 1 | 1_1.jpg -------------------------------------------------------------------------------- /test/i/3_h_backpopulate/homeDir/scans/5_thumb.jpg: -------------------------------------------------------------------------------- 1 | 1_1.jpg -------------------------------------------------------------------------------- /test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |

    Tests Run Results

    4 | 5 |

    Regression Suit, output and differences

    6 | Test Results
    7 | Test Coverage 8 | 9 |

    Other Log

    10 | Build Log
    11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/override_libs/README: -------------------------------------------------------------------------------- 1 | Some libraries we use are very memory intensive, which makes 2 | testing functionality that uses then (using valgrind), very 3 | slow (such as tesseract OCR). 4 | In reality were not interested in the function of these libs, 5 | just how our program works, so we can safely stub these out 6 | with dumb implementations. That's what is contained in this 7 | directory. do NOT use in production systems. 8 | -------------------------------------------------------------------------------- /test/override_libs/liblept/liblept.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | /* 6 | * Implement a skellington Leptonica Libs 7 | * For use in testing, so we can test the app, 8 | * but not us Leptonica in the process. 9 | */ 10 | 11 | char * getLeptonicaVersion( ) { 12 | return strdup("Overridden Leptonica Lib 0.1"); 13 | } 14 | 15 | void lept_free( void *ptr ) { 16 | free( ptr ); 17 | } 18 | 19 | PIX * pixRead ( const char *filename ) { 20 | if( 0 != access( filename, F_OK ) ) { 21 | return NULL; 22 | } 23 | else { 24 | return malloc( sizeof( PIX ) ); 25 | } 26 | } 27 | 28 | PIX * pixReadMem ( const l_uint8 *data, size_t size ) { 29 | return malloc( sizeof( PIX ) ); 30 | } 31 | 32 | l_int32 pixGetWidth ( PIX *pix ) { 33 | return 1500; 34 | } 35 | 36 | l_int32 pixGetHeight ( PIX *pix ) { 37 | return 1900; 38 | } 39 | 40 | l_int32 pixGetDepth ( PIX *pix ) { 41 | return 8; 42 | } 43 | 44 | PIX * pixScaleRGBToGrayFast ( PIX *pixs, l_int32 factor, l_int32 color ) { 45 | return malloc( sizeof( PIX ) ); 46 | } 47 | 48 | BOX * boxCreate( l_int32 tlx, l_int32 tly, l_int32 brx, l_int32 bry ) { 49 | return malloc( sizeof( BOX ) ); 50 | } 51 | 52 | PIX * pixClipRectangle( PIX *pix, BOX *box, BOX **t ) { 53 | return malloc( sizeof( PIX ) ); 54 | } 55 | 56 | PIX * pixScale( PIX *pixs, l_float32 scalex, l_float32 scaley ) { 57 | return malloc( sizeof( PIX ) ); 58 | } 59 | 60 | l_int32 pixWrite( const char *filename, PIX *pix, l_int32 format ) { 61 | return 1; 62 | } 63 | 64 | l_int32 pixGetDimensions ( PIX *pix, l_int32 *pw, l_int32 *ph, l_int32 *pd ) { 65 | *pw = pixGetWidth( pix ); 66 | *ph = pixGetHeight( pix ); 67 | *pd = pixGetDepth( pix ); 68 | return 1; 69 | } 70 | 71 | void pixDestroy( PIX **ppix ) { 72 | free( *ppix ); 73 | } 74 | 75 | void boxDestroy( BOX **pbox ) { 76 | free( *pbox ); 77 | } 78 | 79 | -------------------------------------------------------------------------------- /test/override_libs/libpHash/libpHash.cc: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | /* 5 | * Implement a skellington Tesseract Base API 6 | * For use in testing, so we can test the app, 7 | * but not us tesseract in the process. 8 | */ 9 | int ph_dct_imagehash( const char *filename, ulong64 &hash ) { 10 | hash = 50; 11 | return 0; 12 | } 13 | 14 | int ph_hamming_distance( ulong64 hash0, ulong64 hash1) { 15 | return (int)(hash0 - hash1); 16 | } 17 | 18 | -------------------------------------------------------------------------------- /test/override_libs/libpoppler/libpoppler.cc: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | /* 9 | * Implement a skellington Poppler CPP API 10 | * For use in testing, so we can test the app, 11 | * but not us poppler in the process. 12 | */ 13 | namespace poppler { 14 | 15 | byte_array ustring::to_utf8() const { 16 | const char *d = "placeholder text"; 17 | std::vector dd( d, d+17 ); 18 | return dd; 19 | } 20 | 21 | 22 | ustring page::text(const rectf &rect, text_layout_enum layout_mode) const { 23 | ustring us; 24 | return us; 25 | } 26 | 27 | 28 | image page_renderer::render_page(const page *p, 29 | double xres, double yres, 30 | int x, int y, int w, int h, 31 | rotation_enum rotate) const { 32 | image img; 33 | return img; 34 | } 35 | 36 | bool image::is_valid() const { 37 | return true; 38 | } 39 | 40 | bool image::save(const std::string &file_name, const std::string &out_format, int dpi) const { 41 | FILE *fp; 42 | 43 | if( (fp = fopen(file_name.c_str(), "a")) == NULL ) { 44 | return false; 45 | } 46 | 47 | char buf[BUFSIZ]; 48 | size_t size; 49 | 50 | FILE* source = fopen("/tmp/poppler_override_output", "rb"); 51 | while (size = fread(buf, 1, BUFSIZ, source)) { 52 | fwrite(buf, 1, size, fp); 53 | } 54 | 55 | fclose(source); 56 | // fprintf(fp,"test image data\n"); 57 | fclose(fp); 58 | 59 | return true; 60 | } 61 | 62 | } 63 | 64 | -------------------------------------------------------------------------------- /test/override_libs/libpoppler/poppler_override_output: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/test/override_libs/libpoppler/poppler_override_output -------------------------------------------------------------------------------- /test/override_libs/libtesseract/libtesseract.cc: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | 5 | /* 6 | * Implement a skellington Tesseract Base API 7 | * For use in testing, so we can test the app, 8 | * but not us tesseract in the process. 9 | */ 10 | namespace tesseract { 11 | 12 | TessBaseAPI::TessBaseAPI() { } 13 | 14 | TessBaseAPI::~TessBaseAPI() { } 15 | 16 | const char *TessBaseAPI::Version( ) { return "Overridden Tesseract Lib 0.1"; } 17 | 18 | int TessBaseAPI::Init( const char* datapath, const char* language, OcrEngineMode mode, 19 | char **configs, int configs_size, 20 | const GenericVector *vars_vec, 21 | const GenericVector *vars_values, 22 | bool set_only_non_debug_params ) { 23 | return 0; 24 | } 25 | 26 | const char *TessBaseAPI::GetInitLanguagesAsString() const { return "ZZZ"; } 27 | 28 | void TessBaseAPI::SetImage( const Pix* pix ) { } 29 | 30 | void TessBaseAPI::SetSourceResolution( int ppi ) { }; 31 | 32 | char *TessBaseAPI::GetUTF8Text( ) { char *txt = new char[20]; strcpy( txt, "Example OCR output." ); return txt; } 33 | 34 | void TessBaseAPI::Clear( ) { }; 35 | 36 | void TessBaseAPI::End( ) { }; 37 | 38 | void TessBaseAPI::Threshold(Pix** pix) { }; 39 | 40 | } 41 | -------------------------------------------------------------------------------- /test/r/1_1_create_database/testLog.out: -------------------------------------------------------------------------------- 1 | STARTING app... 2 | Now ready 3 | No need for a web client for this test. 4 | Correct DB version. 5 | Diff of generated-to-reference database: 6 | 99c99 7 | < INSERT INTO "user_access" VALUES('admin','6e6a83f742b28434aea09d7e8534647a','Admin User','[YYYY-MM-DD HH:MM:SS]','automatically',1); 8 | --- 9 | > INSERT INTO "user_access" VALUES('admin','6e6a83f742b28434aea09d7e8534647a','Admin User','[YYYY-MM-DD HH:MM:SS]','automatically',1); 10 | 11 | Stopping service 12 | Waiting for valgrind to finish. 13 | -------------------------------------------------------------------------------- /test/r/1_1_create_database/valgrind.out: -------------------------------------------------------------------------------- 1 | ==XXXXX== Memcheck, a memory error detector 2 | ==XXXXX== Copyright [details] 3 | ==XXXXX== Using Valgrind [version and build info] 4 | ==XXXXX== Command: /tmp/opendias_test/bin/opendias 5 | ==XXXXX== Parent PID: XXXXX. 6 | ==XXXXX== 7 | ==XXXXX== 8 | ==XXXXX== FILE DESCRIPTORS: 0 open at exit. 9 | ==XXXXX== 10 | ==XXXXX== HEAP SUMMARY: 11 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 12 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 13 | ==XXXXX== 14 | ==XXXXX== LEAK SUMMARY: 15 | ==XXXXX== definitely lost: XXX bytes in XXX blocks 16 | ==XXXXX== indirectly lost: XXX bytes in XXX blocks 17 | ==XXXXX== possibly lost: XXX bytes in XXX blocks 18 | ==XXXXX== still reachable: XXX bytes in XXX blocks 19 | ==XXXXX== suppressed: XXX bytes in XXX blocks 20 | ==XXXXX== 21 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 22 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 23 | ==XXXXX== 24 | ==XXXXX== FILE DESCRIPTORS: 0 open at exit. 25 | ==XXXXX== 26 | ==XXXXX== HEAP SUMMARY: 27 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 28 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 29 | ==XXXXX== 30 | ==XXXXX== LEAK SUMMARY: 31 | ==XXXXX== definitely lost: XXX bytes in XXX blocks 32 | ==XXXXX== indirectly lost: XXX bytes in XXX blocks 33 | ==XXXXX== possibly lost: XXX bytes in XXX blocks 34 | ==XXXXX== still reachable: XXX bytes in XXX blocks 35 | ==XXXXX== suppressed: XXX bytes in XXX blocks 36 | ==XXXXX== 37 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 38 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 39 | -------------------------------------------------------------------------------- /test/r/1_2_failed_to_create_database/appLog.out: -------------------------------------------------------------------------------- 1 | STDOUT 2 | -------------------------------------------------- 3 | LOG-OUTPUT 4 | -date-:-thread-:INF:-file-:-line- openDIAS version 'opendias [VERSION]' has been invoked. 5 | -date-:-thread-:INF:-file-:-line- Running in daemon mode. 6 | -date-:-thread-:INF:-file-:-line- Child process created [CONFIG_FILE] 7 | -date-:-thread-:DBG:-file-:-line- setup launched 8 | -date-:-thread-:INF:-file-:-line- Setting default log (/tmp/opendias_test/var/log/opendias) verbosity to 4. 9 | -date-:-thread-:INF:-file-:-line- Using config file: [CONFIG_FILE] 10 | -date-:-thread-:INF:-file-:-line- Which says the database is at: /root 11 | -date-:-thread-:DBG:-file-:-line- database file is /root/openDIAS.sqlite3 12 | -date-:-thread-:INF:-file-:-line- Creating new database /root/openDIAS.sqlite3 (BASE_DIR = /root) 13 | -date-:-thread-:ERR:-file-:-line- Can't open database: [ERROR] 14 | -date-:-thread-:DBG:-file-:-line- Closing database 15 | -date-:-thread-:WRN:-file-:-line- Could not create/connect to new database 16 | -date-:-thread-:WRN:-file-:-line- /root/openDIAS.sqlite3 17 | -date-:-thread-:INF:-file-:-line- openDias service is shutting down.... 18 | -date-:-thread-:INF:-file-:-line- openDias service has shutdown. 19 | -------------------------------------------------------------------------------- /test/r/1_2_failed_to_create_database/testLog.out: -------------------------------------------------------------------------------- 1 | Updated start command to stop the database from being created. 2 | STARTING app... 3 | Could not start the service. 4 | No need for a web client for this test. 5 | Stopping service 6 | Waiting for valgrind to finish. 7 | -------------------------------------------------------------------------------- /test/r/1_2_failed_to_create_database/valgrind.out: -------------------------------------------------------------------------------- 1 | ==XXXXX== Memcheck, a memory error detector 2 | ==XXXXX== Copyright [details] 3 | ==XXXXX== Using Valgrind [version and build info] 4 | ==XXXXX== Command: /tmp/opendias_test/bin/opendias -c /tmp/opendias_test/etc/opendias/testappUnableToCreate.conf 5 | ==XXXXX== Parent PID: XXXXX. 6 | ==XXXXX== 7 | ==XXXXX== 8 | ==XXXXX== FILE DESCRIPTORS: 0 open at exit. 9 | ==XXXXX== 10 | ==XXXXX== HEAP SUMMARY: 11 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 12 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 13 | ==XXXXX== 14 | ==XXXXX== 15 | ==XXXXX== FILE DESCRIPTORS: 0 open at exit. 16 | ==XXXXX== 17 | ==XXXXX== HEAP SUMMARY: 18 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 19 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 20 | ==XXXXX== 21 | ==XXXXX== LEAK SUMMARY: 22 | ==XXXXX== definitely lost: XXX bytes in XXX blocks 23 | ==XXXXX== indirectly lost: XXX bytes in XXX blocks 24 | ==XXXXX== possibly lost: XXX bytes in XXX blocks 25 | ==XXXXX== still reachable: XXX bytes in XXX blocks 26 | ==XXXXX== suppressed: XXX bytes in XXX blocks 27 | ==XXXXX== 28 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 29 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 30 | ==XXXXX== LEAK SUMMARY: 31 | ==XXXXX== definitely lost: XXX bytes in XXX blocks 32 | ==XXXXX== indirectly lost: XXX bytes in XXX blocks 33 | ==XXXXX== possibly lost: XXX bytes in XXX blocks 34 | ==XXXXX== still reachable: XXX bytes in XXX blocks 35 | ==XXXXX== suppressed: XXX bytes in XXX blocks 36 | ==XXXXX== 37 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 38 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 39 | -------------------------------------------------------------------------------- /test/r/1_3_missing_config_file/appLog.out: -------------------------------------------------------------------------------- 1 | STDOUT 2 | -------------------------------------------------- 3 | LOG-OUTPUT 4 | -date-:-thread-:INF:-file-:-line- openDIAS version 'opendias [VERSION]' has been invoked. 5 | -date-:-thread-:INF:-file-:-line- Running in daemon mode. 6 | -date-:-thread-:INF:-file-:-line- Child process created [CONFIG_FILE] 7 | -date-:-thread-:DBG:-file-:-line- setup launched 8 | -date-:-thread-:INF:-file-:-line- Setting default log (/tmp/opendias_test/var/log/opendias) verbosity to 4. 9 | -date-:-thread-:INF:-file-:-line- Using config file: [CONFIG_FILE] 10 | -date-:-thread-:ERR:-file-:-line- Could not open file: /tmp/opendias_test/etc/opendias/testappMISSING.conf 11 | -date-:-thread-:ERR:-file-:-line- Cannot find main config file: /tmp/opendias_test/etc/opendias/testappMISSING.conf 12 | -date-:-thread-:INF:-file-:-line- openDias service is shutting down.... 13 | -date-:-thread-:INF:-file-:-line- openDias service has shutdown. 14 | -------------------------------------------------------------------------------- /test/r/1_3_missing_config_file/testLog.out: -------------------------------------------------------------------------------- 1 | Updated start command to specify a missing config file. 2 | STARTING app... 3 | Could not start the service. 4 | No need for a web client for this test. 5 | Stopping service 6 | Waiting for valgrind to finish. 7 | -------------------------------------------------------------------------------- /test/r/1_3_missing_config_file/valgrind.out: -------------------------------------------------------------------------------- 1 | ==XXXXX== Memcheck, a memory error detector 2 | ==XXXXX== Copyright [details] 3 | ==XXXXX== Using Valgrind [version and build info] 4 | ==XXXXX== Command: /tmp/opendias_test/bin/opendias -c /tmp/opendias_test/etc/opendias/testappMISSING.conf 5 | ==XXXXX== Parent PID: XXXXX. 6 | ==XXXXX== 7 | ==XXXXX== 8 | ==XXXXX== FILE DESCRIPTORS: 0 open at exit. 9 | ==XXXXX== 10 | ==XXXXX== HEAP SUMMARY: 11 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 12 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 13 | ==XXXXX== 14 | ==XXXXX== 15 | ==XXXXX== FILE DESCRIPTORS: 0 open at exit. 16 | ==XXXXX== 17 | ==XXXXX== HEAP SUMMARY: 18 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 19 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 20 | ==XXXXX== 21 | ==XXXXX== LEAK SUMMARY: 22 | ==XXXXX== definitely lost: XXX bytes in XXX blocks 23 | ==XXXXX== indirectly lost: XXX bytes in XXX blocks 24 | ==XXXXX== possibly lost: XXX bytes in XXX blocks 25 | ==XXXXX== still reachable: XXX bytes in XXX blocks 26 | ==XXXXX== suppressed: XXX bytes in XXX blocks 27 | ==XXXXX== 28 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 29 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 30 | ==XXXXX== LEAK SUMMARY: 31 | ==XXXXX== definitely lost: XXX bytes in XXX blocks 32 | ==XXXXX== indirectly lost: XXX bytes in XXX blocks 33 | ==XXXXX== possibly lost: XXX bytes in XXX blocks 34 | ==XXXXX== still reachable: XXX bytes in XXX blocks 35 | ==XXXXX== suppressed: XXX bytes in XXX blocks 36 | ==XXXXX== 37 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 38 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 39 | -------------------------------------------------------------------------------- /test/r/1_4_various_kills_are_ignored/appLog.out: -------------------------------------------------------------------------------- 1 | STDOUT 2 | -------------------------------------------------- 3 | LOG-OUTPUT 4 | -date-:-thread-:INF:-file-:-line- openDIAS version 'opendias [VERSION]' has been invoked. 5 | -date-:-thread-:INF:-file-:-line- Running in daemon mode. 6 | -date-:-thread-:INF:-file-:-line- Child process created [CONFIG_FILE] 7 | -date-:-thread-:DBG:-file-:-line- setup launched 8 | -date-:-thread-:INF:-file-:-line- Setting default log (/tmp/opendias_test/var/log/opendias) verbosity to 4. 9 | -date-:-thread-:INF:-file-:-line- Using config file: [CONFIG_FILE] 10 | -date-:-thread-:INF:-file-:-line- Which says the database is at: /tmp/opendiastest 11 | -date-:-thread-:DBG:-file-:-line- database file is /tmp/opendiastest/openDIAS.sqlite3 12 | -date-:-thread-:DBG:-file-:-line- Dir structure is in-place, database should exist 13 | -date-:-thread-:DBG:-file-:-line- Checking for a populated database 14 | -date-:-thread-:DBG:-file-:-line- Run Query [RECORDSET] 15 | -date-:-thread-:DBG:-file-:-line- We have one. So will check to see what version it is. 16 | -date-:-thread-:DBG:-file-:-line- Free recordset [RECORDSET] 17 | -date-:-thread-:DBG:-file-:-line- Run Query [RECORDSET] 18 | -date-:-thread-:DBG:-file-:-line- Database reports that it is version: 7 19 | -date-:-thread-:DBG:-file-:-line- Free recordset [RECORDSET] 20 | -date-:-thread-:INF:-file-:-line- Connected to database 21 | -date-:-thread-:INF:-file-:-line- database opened 22 | -date-:-thread-:DBG:-file-:-line- Run Query [RECORDSET] 23 | -date-:-thread-:INF:-file-:-line- Config setting: log_verbosity = 3 24 | -date-:-thread-:INF:-file-:-line- Moving log verbosity from 4 to 3 25 | -date-:-thread-:INF Config setting: port = 8988 26 | -date-:-thread-:INF Config setting: backpopulate_phash = no 27 | -date-:-thread-:INF Created directory. 28 | -date-:-thread-:INF ... Starting up the openDias service. 29 | -date-:-thread-:INF ready to accept connectons 30 | -date-:-thread-:INF Received signal 'Hangup'. IGNORING. Try SIGUSR1 to stop the service. 31 | -date-:-thread-:INF Received SIGUSR1 signal. 32 | -date-:-thread-:INF openDias service is shutting down.... 33 | -date-:-thread-:INF openDias service has shutdown. 34 | -------------------------------------------------------------------------------- /test/r/1_4_various_kills_are_ignored/testLog.out: -------------------------------------------------------------------------------- 1 | Copying pre defined environment 2 | Copying default database 3 | STARTING app... 4 | Now ready 5 | No need for a web client for this test. 6 | Stopping service 7 | Waiting for valgrind to finish. 8 | -------------------------------------------------------------------------------- /test/r/1_4_various_kills_are_ignored/valgrind.out: -------------------------------------------------------------------------------- 1 | ==XXXXX== Memcheck, a memory error detector 2 | ==XXXXX== Copyright [details] 3 | ==XXXXX== Using Valgrind [version and build info] 4 | ==XXXXX== Command: /tmp/opendias_test/bin/opendias 5 | ==XXXXX== Parent PID: XXXXX. 6 | ==XXXXX== 7 | ==XXXXX== 8 | ==XXXXX== FILE DESCRIPTORS: 0 open at exit. 9 | ==XXXXX== 10 | ==XXXXX== HEAP SUMMARY: 11 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 12 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 13 | ==XXXXX== 14 | ==XXXXX== LEAK SUMMARY: 15 | ==XXXXX== definitely lost: XXX bytes in XXX blocks 16 | ==XXXXX== indirectly lost: XXX bytes in XXX blocks 17 | ==XXXXX== possibly lost: XXX bytes in XXX blocks 18 | ==XXXXX== still reachable: XXX bytes in XXX blocks 19 | ==XXXXX== suppressed: XXX bytes in XXX blocks 20 | ==XXXXX== 21 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 22 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 23 | ==XXXXX== 24 | ==XXXXX== FILE DESCRIPTORS: 0 open at exit. 25 | ==XXXXX== 26 | ==XXXXX== HEAP SUMMARY: 27 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 28 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 29 | ==XXXXX== 30 | ==XXXXX== LEAK SUMMARY: 31 | ==XXXXX== definitely lost: XXX bytes in XXX blocks 32 | ==XXXXX== indirectly lost: XXX bytes in XXX blocks 33 | ==XXXXX== possibly lost: XXX bytes in XXX blocks 34 | ==XXXXX== still reachable: XXX bytes in XXX blocks 35 | ==XXXXX== suppressed: XXX bytes in XXX blocks 36 | ==XXXXX== 37 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 38 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 39 | -------------------------------------------------------------------------------- /test/r/1_5_could_not_start_http_service/appLog.out: -------------------------------------------------------------------------------- 1 | STDOUT 2 | -------------------------------------------------- 3 | LOG-OUTPUT 4 | -date-:-thread-:INF:-file-:-line- openDIAS version 'opendias [VERSION]' has been invoked. 5 | -date-:-thread-:INF:-file-:-line- Running in daemon mode. 6 | -date-:-thread-:INF:-file-:-line- Child process created [CONFIG_FILE] 7 | -date-:-thread-:DBG:-file-:-line- setup launched 8 | -date-:-thread-:INF:-file-:-line- Setting default log (/tmp/opendias_test/var/log/opendias) verbosity to 4. 9 | -date-:-thread-:INF:-file-:-line- Using config file: [CONFIG_FILE] 10 | -date-:-thread-:INF:-file-:-line- Which says the database is at: /tmp/opendiastest 11 | -date-:-thread-:DBG:-file-:-line- database file is /tmp/opendiastest/openDIAS.sqlite3 12 | -date-:-thread-:DBG:-file-:-line- Dir structure is in-place, database should exist 13 | -date-:-thread-:DBG:-file-:-line- Checking for a populated database 14 | -date-:-thread-:DBG:-file-:-line- Run Query [RECORDSET] 15 | -date-:-thread-:DBG:-file-:-line- We have one. So will check to see what version it is. 16 | -date-:-thread-:DBG:-file-:-line- Free recordset [RECORDSET] 17 | -date-:-thread-:DBG:-file-:-line- Run Query [RECORDSET] 18 | -date-:-thread-:DBG:-file-:-line- Database reports that it is version: 7 19 | -date-:-thread-:DBG:-file-:-line- Free recordset [RECORDSET] 20 | -date-:-thread-:INF:-file-:-line- Connected to database 21 | -date-:-thread-:INF:-file-:-line- database opened 22 | -date-:-thread-:DBG:-file-:-line- Run Query [RECORDSET] 23 | -date-:-thread-:INF:-file-:-line- Config setting: log_verbosity = 3 24 | -date-:-thread-:INF:-file-:-line- Moving log verbosity from 4 to 3 25 | -date-:-thread-:INF Config setting: port = 8988 26 | -date-:-thread-:INF Config setting: backpopulate_phash = no 27 | -date-:-thread-:INF Created directory. 28 | -date-:-thread-:INF ... Starting up the openDias service. 29 | -date-:-thread-:INF Could not create an http service 30 | -date-:-thread-:INF openDias service is shutting down.... 31 | -date-:-thread-:INF openDias service has shutdown. 32 | -------------------------------------------------------------------------------- /test/r/1_5_could_not_start_http_service/testLog.out: -------------------------------------------------------------------------------- 1 | Copying pre defined environment 2 | Copying default database 3 | Reserved the opendias port, to stop the service from starting correctly. 4 | STARTING app... 5 | Now ready 6 | No need for a web client for this test. 7 | Stopping service 8 | Waiting for valgrind to finish. 9 | -------------------------------------------------------------------------------- /test/r/1_5_could_not_start_http_service/valgrind.out: -------------------------------------------------------------------------------- 1 | ==XXXXX== Memcheck, a memory error detector 2 | ==XXXXX== Copyright [details] 3 | ==XXXXX== Using Valgrind [version and build info] 4 | ==XXXXX== Command: /tmp/opendias_test/bin/opendias 5 | ==XXXXX== Parent PID: XXXXX. 6 | ==XXXXX== 7 | ==XXXXX== 8 | ==XXXXX== FILE DESCRIPTORS: 0 open at exit. 9 | ==XXXXX== 10 | ==XXXXX== HEAP SUMMARY: 11 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 12 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 13 | ==XXXXX== 14 | ==XXXXX== LEAK SUMMARY: 15 | ==XXXXX== definitely lost: XXX bytes in XXX blocks 16 | ==XXXXX== indirectly lost: XXX bytes in XXX blocks 17 | ==XXXXX== possibly lost: XXX bytes in XXX blocks 18 | ==XXXXX== still reachable: XXX bytes in XXX blocks 19 | ==XXXXX== suppressed: XXX bytes in XXX blocks 20 | ==XXXXX== 21 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 22 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 23 | ==XXXXX== 24 | ==XXXXX== FILE DESCRIPTORS: 0 open at exit. 25 | ==XXXXX== 26 | ==XXXXX== HEAP SUMMARY: 27 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 28 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 29 | ==XXXXX== 30 | ==XXXXX== LEAK SUMMARY: 31 | ==XXXXX== definitely lost: XXX bytes in XXX blocks 32 | ==XXXXX== indirectly lost: XXX bytes in XXX blocks 33 | ==XXXXX== possibly lost: XXX bytes in XXX blocks 34 | ==XXXXX== still reachable: XXX bytes in XXX blocks 35 | ==XXXXX== suppressed: XXX bytes in XXX blocks 36 | ==XXXXX== 37 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 38 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 39 | -------------------------------------------------------------------------------- /test/r/1_7_config_updates/testLog.out: -------------------------------------------------------------------------------- 1 | Updated start command to run the config updater. 2 | STARTING app... 3 | Now ready 4 | No need for a web client for this test. 5 | Stopping service 6 | Waiting for valgrind to finish. 7 | -------------------------------------------------------------------------------- /test/r/1_7_config_updates/valgrind.out: -------------------------------------------------------------------------------- 1 | ==XXXXX== Memcheck, a memory error detector 2 | ==XXXXX== Copyright [details] 3 | ==XXXXX== Using Valgrind [version and build info] 4 | ==XXXXX== Command: /tmp/opendias_test/bin/opendiasconfig -s log_verbosity -v 4 5 | ==XXXXX== Parent PID: XXXXX. 6 | ==XXXXX== 7 | ==XXXXX== 8 | ==XXXXX== FILE DESCRIPTORS: 4 open at exit. 9 | ==XXXXX== Open file descriptor 3: [FILE PATH] 10 | ==XXXXX== 11 | ==XXXXX== 12 | ==XXXXX== Open file descriptor 2: [FILE PATH] 13 | ==XXXXX== 14 | ==XXXXX== 15 | ==XXXXX== Open file descriptor 1: [FILE PATH] 16 | ==XXXXX== 17 | ==XXXXX== 18 | ==XXXXX== Open file descriptor 0: [FILE PATH] 19 | ==XXXXX== 20 | ==XXXXX== 21 | ==XXXXX== 22 | ==XXXXX== HEAP SUMMARY: 23 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 24 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 25 | ==XXXXX== 26 | ==XXXXX== All heap blocks were freed -- no leaks are possible 27 | ==XXXXX== 28 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 29 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 30 | -------------------------------------------------------------------------------- /test/r/1_9_usage_app/appLog.out: -------------------------------------------------------------------------------- 1 | STDOUT 2 | -------------------------------------------------- 3 | LOG-OUTPUT 4 | -------------------------------------------------------------------------------- /test/r/1_9_usage_app/testLog.out: -------------------------------------------------------------------------------- 1 | Copying pre defined environment 2 | Copying default database 3 | Updated start command to run the config updater. 4 | STARTING app... 5 | Now ready 6 | No need for a web client for this test. 7 | Stopping service 8 | Waiting for valgrind to finish. 9 | -------------------------------------------------------------------------------- /test/r/1_9_usage_app/valgrind.out: -------------------------------------------------------------------------------- 1 | ==XXXXX== Memcheck, a memory error detector 2 | ==XXXXX== Copyright [details] 3 | ==XXXXX== Using Valgrind [version and build info] 4 | ==XXXXX== Command: /tmp/opendias_test/bin/opendias -h 5 | ==XXXXX== Parent PID: XXXXX. 6 | ==XXXXX== 7 | ==XXXXX== 8 | ==XXXXX== FILE DESCRIPTORS: 1 open at exit. 9 | ==XXXXX== Open file descriptor 0: [FILE PATH] 10 | ==XXXXX== 11 | ==XXXXX== 12 | ==XXXXX== 13 | ==XXXXX== HEAP SUMMARY: 14 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 15 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 16 | ==XXXXX== 17 | ==XXXXX== LEAK SUMMARY: 18 | ==XXXXX== definitely lost: XXX bytes in XXX blocks 19 | ==XXXXX== indirectly lost: XXX bytes in XXX blocks 20 | ==XXXXX== possibly lost: XXX bytes in XXX blocks 21 | ==XXXXX== still reachable: XXX bytes in XXX blocks 22 | ==XXXXX== suppressed: XXX bytes in XXX blocks 23 | ==XXXXX== 24 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 25 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 26 | -------------------------------------------------------------------------------- /test/r/1_a_usage_config/appLog.out: -------------------------------------------------------------------------------- 1 | STDOUT 2 | [VERSION STRING] 3 | usage: opendiasconfig [options] 4 | 5 | Where: 6 | -c = specify config "file" 7 | -h = show this page 8 | -s = config option to update 9 | -v = value to update the config option to 10 | -------------------------------------------------- 11 | LOG-OUTPUT 12 | -------------------------------------------------------------------------------- /test/r/1_a_usage_config/testLog.out: -------------------------------------------------------------------------------- 1 | Copying pre defined environment 2 | Copying default database 3 | Updated start command to run the config updater. 4 | STARTING app... 5 | Now ready 6 | No need for a web client for this test. 7 | Stopping service 8 | Waiting for valgrind to finish. 9 | -------------------------------------------------------------------------------- /test/r/1_a_usage_config/valgrind.out: -------------------------------------------------------------------------------- 1 | ==XXXXX== Memcheck, a memory error detector 2 | ==XXXXX== Copyright [details] 3 | ==XXXXX== Using Valgrind [version and build info] 4 | ==XXXXX== Command: /tmp/opendias_test/bin/opendiasconfig -h 5 | ==XXXXX== Parent PID: XXXXX. 6 | ==XXXXX== 7 | ==XXXXX== 8 | ==XXXXX== FILE DESCRIPTORS: 4 open at exit. 9 | ==XXXXX== Open file descriptor 3: [FILE PATH] 10 | ==XXXXX== 11 | ==XXXXX== 12 | ==XXXXX== Open file descriptor 2: [FILE PATH] 13 | ==XXXXX== 14 | ==XXXXX== 15 | ==XXXXX== Open file descriptor 1: [FILE PATH] 16 | ==XXXXX== 17 | ==XXXXX== 18 | ==XXXXX== Open file descriptor 0: [FILE PATH] 19 | ==XXXXX== 20 | ==XXXXX== 21 | ==XXXXX== 22 | ==XXXXX== HEAP SUMMARY: 23 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 24 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 25 | ==XXXXX== 26 | ==XXXXX== All heap blocks were freed -- no leaks are possible 27 | ==XXXXX== 28 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 29 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 30 | -------------------------------------------------------------------------------- /test/r/3_1_doclist/valgrind.out: -------------------------------------------------------------------------------- 1 | ==XXXXX== Memcheck, a memory error detector 2 | ==XXXXX== Copyright [details] 3 | ==XXXXX== Using Valgrind [version and build info] 4 | ==XXXXX== Command: /tmp/opendias_test/bin/opendias 5 | ==XXXXX== Parent PID: XXXXX. 6 | ==XXXXX== 7 | ==XXXXX== 8 | ==XXXXX== FILE DESCRIPTORS: 0 open at exit. 9 | ==XXXXX== 10 | ==XXXXX== HEAP SUMMARY: 11 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 12 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 13 | ==XXXXX== 14 | ==XXXXX== LEAK SUMMARY: 15 | ==XXXXX== definitely lost: XXX bytes in XXX blocks 16 | ==XXXXX== indirectly lost: XXX bytes in XXX blocks 17 | ==XXXXX== possibly lost: XXX bytes in XXX blocks 18 | ==XXXXX== still reachable: XXX bytes in XXX blocks 19 | ==XXXXX== suppressed: XXX bytes in XXX blocks 20 | ==XXXXX== 21 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 22 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 23 | ==XXXXX== 24 | ==XXXXX== FILE DESCRIPTORS: 0 open at exit. 25 | ==XXXXX== 26 | ==XXXXX== HEAP SUMMARY: 27 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 28 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 29 | ==XXXXX== 30 | ==XXXXX== LEAK SUMMARY: 31 | ==XXXXX== definitely lost: XXX bytes in XXX blocks 32 | ==XXXXX== indirectly lost: XXX bytes in XXX blocks 33 | ==XXXXX== possibly lost: XXX bytes in XXX blocks 34 | ==XXXXX== still reachable: XXX bytes in XXX blocks 35 | ==XXXXX== suppressed: XXX bytes in XXX blocks 36 | ==XXXXX== 37 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 38 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 39 | -------------------------------------------------------------------------------- /test/r/3_2_doclist_search/valgrind.out: -------------------------------------------------------------------------------- 1 | ==XXXXX== Memcheck, a memory error detector 2 | ==XXXXX== Copyright [details] 3 | ==XXXXX== Using Valgrind [version and build info] 4 | ==XXXXX== Command: /tmp/opendias_test/bin/opendias 5 | ==XXXXX== Parent PID: XXXXX. 6 | ==XXXXX== 7 | ==XXXXX== 8 | ==XXXXX== FILE DESCRIPTORS: 0 open at exit. 9 | ==XXXXX== 10 | ==XXXXX== HEAP SUMMARY: 11 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 12 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 13 | ==XXXXX== 14 | ==XXXXX== LEAK SUMMARY: 15 | ==XXXXX== definitely lost: XXX bytes in XXX blocks 16 | ==XXXXX== indirectly lost: XXX bytes in XXX blocks 17 | ==XXXXX== possibly lost: XXX bytes in XXX blocks 18 | ==XXXXX== still reachable: XXX bytes in XXX blocks 19 | ==XXXXX== suppressed: XXX bytes in XXX blocks 20 | ==XXXXX== 21 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 22 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 23 | ==XXXXX== 24 | ==XXXXX== FILE DESCRIPTORS: 0 open at exit. 25 | ==XXXXX== 26 | ==XXXXX== HEAP SUMMARY: 27 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 28 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 29 | ==XXXXX== 30 | ==XXXXX== LEAK SUMMARY: 31 | ==XXXXX== definitely lost: XXX bytes in XXX blocks 32 | ==XXXXX== indirectly lost: XXX bytes in XXX blocks 33 | ==XXXXX== possibly lost: XXX bytes in XXX blocks 34 | ==XXXXX== still reachable: XXX bytes in XXX blocks 35 | ==XXXXX== suppressed: XXX bytes in XXX blocks 36 | ==XXXXX== 37 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 38 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 39 | -------------------------------------------------------------------------------- /test/r/3_3_getScannerList/testLog.out: -------------------------------------------------------------------------------- 1 | Copying pre defined environment 2 | Copying default database 3 | Updated start command to use overidden libs 4 | STARTING app... 5 | Now ready 6 | No need for a web client for this test. 7 | Sending request = action=checkLogin&password=password&username=test-user 8 | Scanner List 9 | Sending request = action=getScannerList 10 | $VAR1 = { 11 | 'ScannerList' => { 12 | 'Devices' => { 13 | 'Device' => { 14 | 'test:0' => { 15 | 'host' => 'opendias server', 16 | 'model' => 'Frontend-tester', 17 | 'type' => 'Virtual Device', 18 | 'vendor' => 'Opendias-overridden-sane-libs' 19 | }, 20 | 'test:1' => { 21 | 'host' => 'opendias server', 22 | 'model' => 'Timeout Frontend Tester', 23 | 'type' => 'Virtual Device', 24 | 'vendor' => 'Opendias-overridden-sane-libs' 25 | } 26 | } 27 | } 28 | } 29 | }; 30 | 31 | Start long running scan 32 | Sending request = action=doScan&deviceid=test%3A0&format=gray&ocr=-&pagelength=100&pages=1&resolution=50 33 | $VAR1 = { 34 | 'DoScan' => { 35 | 'scanuuid' => '[ZZZZZZZZ-UUID-ZZZZ-ZZZZ-ZZZZZZZZZZZZ]' 36 | } 37 | }; 38 | 39 | Scanner List 40 | Sending request = action=getScannerList 41 | $VAR1 = { 42 | 'ScannerList' => { 43 | 'Devices' => { 44 | 'Device' => { 45 | 'test:0' => { 46 | 'host' => 'opendias server', 47 | 'model' => 'Frontend-tester', 48 | 'type' => 'Virtual Device', 49 | 'vendor' => 'Opendias-overridden-sane-libs' 50 | }, 51 | 'test:1' => { 52 | 'host' => 'opendias server', 53 | 'model' => 'Timeout Frontend Tester', 54 | 'type' => 'Virtual Device', 55 | 'vendor' => 'Opendias-overridden-sane-libs' 56 | } 57 | } 58 | }, 59 | 'cached' => 'true' 60 | } 61 | }; 62 | 63 | Stopping service 64 | Waiting for valgrind to finish. 65 | -------------------------------------------------------------------------------- /test/r/3_4_getDocDetails/valgrind.out: -------------------------------------------------------------------------------- 1 | ==XXXXX== Memcheck, a memory error detector 2 | ==XXXXX== Copyright [details] 3 | ==XXXXX== Using Valgrind [version and build info] 4 | ==XXXXX== Command: /tmp/opendias_test/bin/opendias 5 | ==XXXXX== Parent PID: XXXXX. 6 | ==XXXXX== 7 | ==XXXXX== 8 | ==XXXXX== FILE DESCRIPTORS: 0 open at exit. 9 | ==XXXXX== 10 | ==XXXXX== HEAP SUMMARY: 11 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 12 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 13 | ==XXXXX== 14 | ==XXXXX== LEAK SUMMARY: 15 | ==XXXXX== definitely lost: XXX bytes in XXX blocks 16 | ==XXXXX== indirectly lost: XXX bytes in XXX blocks 17 | ==XXXXX== possibly lost: XXX bytes in XXX blocks 18 | ==XXXXX== still reachable: XXX bytes in XXX blocks 19 | ==XXXXX== suppressed: XXX bytes in XXX blocks 20 | ==XXXXX== 21 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 22 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 23 | ==XXXXX== 24 | ==XXXXX== FILE DESCRIPTORS: 0 open at exit. 25 | ==XXXXX== 26 | ==XXXXX== HEAP SUMMARY: 27 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 28 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 29 | ==XXXXX== 30 | ==XXXXX== LEAK SUMMARY: 31 | ==XXXXX== definitely lost: XXX bytes in XXX blocks 32 | ==XXXXX== indirectly lost: XXX bytes in XXX blocks 33 | ==XXXXX== possibly lost: XXX bytes in XXX blocks 34 | ==XXXXX== still reachable: XXX bytes in XXX blocks 35 | ==XXXXX== suppressed: XXX bytes in XXX blocks 36 | ==XXXXX== 37 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 38 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 39 | -------------------------------------------------------------------------------- /test/r/3_5_updateDocDetails/valgrind.out: -------------------------------------------------------------------------------- 1 | ==XXXXX== Memcheck, a memory error detector 2 | ==XXXXX== Copyright [details] 3 | ==XXXXX== Using Valgrind [version and build info] 4 | ==XXXXX== Command: /tmp/opendias_test/bin/opendias 5 | ==XXXXX== Parent PID: XXXXX. 6 | ==XXXXX== 7 | ==XXXXX== 8 | ==XXXXX== FILE DESCRIPTORS: 0 open at exit. 9 | ==XXXXX== 10 | ==XXXXX== HEAP SUMMARY: 11 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 12 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 13 | ==XXXXX== 14 | ==XXXXX== LEAK SUMMARY: 15 | ==XXXXX== definitely lost: XXX bytes in XXX blocks 16 | ==XXXXX== indirectly lost: XXX bytes in XXX blocks 17 | ==XXXXX== possibly lost: XXX bytes in XXX blocks 18 | ==XXXXX== still reachable: XXX bytes in XXX blocks 19 | ==XXXXX== suppressed: XXX bytes in XXX blocks 20 | ==XXXXX== 21 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 22 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 23 | ==XXXXX== 24 | ==XXXXX== FILE DESCRIPTORS: 0 open at exit. 25 | ==XXXXX== 26 | ==XXXXX== HEAP SUMMARY: 27 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 28 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 29 | ==XXXXX== 30 | ==XXXXX== LEAK SUMMARY: 31 | ==XXXXX== definitely lost: XXX bytes in XXX blocks 32 | ==XXXXX== indirectly lost: XXX bytes in XXX blocks 33 | ==XXXXX== possibly lost: XXX bytes in XXX blocks 34 | ==XXXXX== still reachable: XXX bytes in XXX blocks 35 | ==XXXXX== suppressed: XXX bytes in XXX blocks 36 | ==XXXXX== 37 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 38 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 39 | -------------------------------------------------------------------------------- /test/r/3_6_moveTag/valgrind.out: -------------------------------------------------------------------------------- 1 | ==XXXXX== Memcheck, a memory error detector 2 | ==XXXXX== Copyright [details] 3 | ==XXXXX== Using Valgrind [version and build info] 4 | ==XXXXX== Command: /tmp/opendias_test/bin/opendias 5 | ==XXXXX== Parent PID: XXXXX. 6 | ==XXXXX== 7 | ==XXXXX== 8 | ==XXXXX== FILE DESCRIPTORS: 0 open at exit. 9 | ==XXXXX== 10 | ==XXXXX== HEAP SUMMARY: 11 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 12 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 13 | ==XXXXX== 14 | ==XXXXX== LEAK SUMMARY: 15 | ==XXXXX== definitely lost: XXX bytes in XXX blocks 16 | ==XXXXX== indirectly lost: XXX bytes in XXX blocks 17 | ==XXXXX== possibly lost: XXX bytes in XXX blocks 18 | ==XXXXX== still reachable: XXX bytes in XXX blocks 19 | ==XXXXX== suppressed: XXX bytes in XXX blocks 20 | ==XXXXX== 21 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 22 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 23 | ==XXXXX== 24 | ==XXXXX== FILE DESCRIPTORS: 0 open at exit. 25 | ==XXXXX== 26 | ==XXXXX== HEAP SUMMARY: 27 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 28 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 29 | ==XXXXX== 30 | ==XXXXX== LEAK SUMMARY: 31 | ==XXXXX== definitely lost: XXX bytes in XXX blocks 32 | ==XXXXX== indirectly lost: XXX bytes in XXX blocks 33 | ==XXXXX== possibly lost: XXX bytes in XXX blocks 34 | ==XXXXX== still reachable: XXX bytes in XXX blocks 35 | ==XXXXX== suppressed: XXX bytes in XXX blocks 36 | ==XXXXX== 37 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 38 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 39 | -------------------------------------------------------------------------------- /test/r/3_7_deleteDoc/valgrind.out: -------------------------------------------------------------------------------- 1 | ==XXXXX== Memcheck, a memory error detector 2 | ==XXXXX== Copyright [details] 3 | ==XXXXX== Using Valgrind [version and build info] 4 | ==XXXXX== Command: /tmp/opendias_test/bin/opendias 5 | ==XXXXX== Parent PID: XXXXX. 6 | ==XXXXX== 7 | ==XXXXX== 8 | ==XXXXX== FILE DESCRIPTORS: 0 open at exit. 9 | ==XXXXX== 10 | ==XXXXX== HEAP SUMMARY: 11 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 12 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 13 | ==XXXXX== 14 | ==XXXXX== LEAK SUMMARY: 15 | ==XXXXX== definitely lost: XXX bytes in XXX blocks 16 | ==XXXXX== indirectly lost: XXX bytes in XXX blocks 17 | ==XXXXX== possibly lost: XXX bytes in XXX blocks 18 | ==XXXXX== still reachable: XXX bytes in XXX blocks 19 | ==XXXXX== suppressed: XXX bytes in XXX blocks 20 | ==XXXXX== 21 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 22 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 23 | ==XXXXX== 24 | ==XXXXX== FILE DESCRIPTORS: 0 open at exit. 25 | ==XXXXX== 26 | ==XXXXX== HEAP SUMMARY: 27 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 28 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 29 | ==XXXXX== 30 | ==XXXXX== LEAK SUMMARY: 31 | ==XXXXX== definitely lost: XXX bytes in XXX blocks 32 | ==XXXXX== indirectly lost: XXX bytes in XXX blocks 33 | ==XXXXX== possibly lost: XXX bytes in XXX blocks 34 | ==XXXXX== still reachable: XXX bytes in XXX blocks 35 | ==XXXXX== suppressed: XXX bytes in XXX blocks 36 | ==XXXXX== 37 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 38 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 39 | -------------------------------------------------------------------------------- /test/r/3_8_autoComplete/valgrind.out: -------------------------------------------------------------------------------- 1 | ==XXXXX== Memcheck, a memory error detector 2 | ==XXXXX== Copyright [details] 3 | ==XXXXX== Using Valgrind [version and build info] 4 | ==XXXXX== Command: /tmp/opendias_test/bin/opendias 5 | ==XXXXX== Parent PID: XXXXX. 6 | ==XXXXX== 7 | ==XXXXX== 8 | ==XXXXX== FILE DESCRIPTORS: 0 open at exit. 9 | ==XXXXX== 10 | ==XXXXX== HEAP SUMMARY: 11 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 12 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 13 | ==XXXXX== 14 | ==XXXXX== LEAK SUMMARY: 15 | ==XXXXX== definitely lost: XXX bytes in XXX blocks 16 | ==XXXXX== indirectly lost: XXX bytes in XXX blocks 17 | ==XXXXX== possibly lost: XXX bytes in XXX blocks 18 | ==XXXXX== still reachable: XXX bytes in XXX blocks 19 | ==XXXXX== suppressed: XXX bytes in XXX blocks 20 | ==XXXXX== 21 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 22 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 23 | ==XXXXX== 24 | ==XXXXX== FILE DESCRIPTORS: 0 open at exit. 25 | ==XXXXX== 26 | ==XXXXX== HEAP SUMMARY: 27 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 28 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 29 | ==XXXXX== 30 | ==XXXXX== LEAK SUMMARY: 31 | ==XXXXX== definitely lost: XXX bytes in XXX blocks 32 | ==XXXXX== indirectly lost: XXX bytes in XXX blocks 33 | ==XXXXX== possibly lost: XXX bytes in XXX blocks 34 | ==XXXXX== still reachable: XXX bytes in XXX blocks 35 | ==XXXXX== suppressed: XXX bytes in XXX blocks 36 | ==XXXXX== 37 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 38 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 39 | -------------------------------------------------------------------------------- /test/r/3_c_import/valgrind.out: -------------------------------------------------------------------------------- 1 | ==XXXXX== Memcheck, a memory error detector 2 | ==XXXXX== Copyright [details] 3 | ==XXXXX== Using Valgrind [version and build info] 4 | ==XXXXX== Command: /tmp/opendias_test/bin/opendias 5 | ==XXXXX== Parent PID: XXXXX. 6 | ==XXXXX== 7 | ==XXXXX== 8 | ==XXXXX== FILE DESCRIPTORS: 0 open at exit. 9 | ==XXXXX== 10 | ==XXXXX== HEAP SUMMARY: 11 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 12 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 13 | ==XXXXX== 14 | ==XXXXX== LEAK SUMMARY: 15 | ==XXXXX== definitely lost: XXX bytes in XXX blocks 16 | ==XXXXX== indirectly lost: XXX bytes in XXX blocks 17 | ==XXXXX== possibly lost: XXX bytes in XXX blocks 18 | ==XXXXX== still reachable: XXX bytes in XXX blocks 19 | ==XXXXX== suppressed: XXX bytes in XXX blocks 20 | ==XXXXX== 21 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 22 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 23 | ==XXXXX== 24 | ==XXXXX== FILE DESCRIPTORS: 0 open at exit. 25 | ==XXXXX== 26 | ==XXXXX== HEAP SUMMARY: 27 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 28 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 29 | ==XXXXX== 30 | ==XXXXX== LEAK SUMMARY: 31 | ==XXXXX== definitely lost: XXX bytes in XXX blocks 32 | ==XXXXX== indirectly lost: XXX bytes in XXX blocks 33 | ==XXXXX== possibly lost: XXX bytes in XXX blocks 34 | ==XXXXX== still reachable: XXX bytes in XXX blocks 35 | ==XXXXX== suppressed: XXX bytes in XXX blocks 36 | ==XXXXX== 37 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 38 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 39 | -------------------------------------------------------------------------------- /test/r/3_d_language_selection/valgrind.out: -------------------------------------------------------------------------------- 1 | ==XXXXX== Memcheck, a memory error detector 2 | ==XXXXX== Copyright [details] 3 | ==XXXXX== Using Valgrind [version and build info] 4 | ==XXXXX== Command: /tmp/opendias_test/bin/opendias 5 | ==XXXXX== Parent PID: XXXXX. 6 | ==XXXXX== 7 | ==XXXXX== 8 | ==XXXXX== FILE DESCRIPTORS: 0 open at exit. 9 | ==XXXXX== 10 | ==XXXXX== HEAP SUMMARY: 11 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 12 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 13 | ==XXXXX== 14 | ==XXXXX== LEAK SUMMARY: 15 | ==XXXXX== definitely lost: XXX bytes in XXX blocks 16 | ==XXXXX== indirectly lost: XXX bytes in XXX blocks 17 | ==XXXXX== possibly lost: XXX bytes in XXX blocks 18 | ==XXXXX== still reachable: XXX bytes in XXX blocks 19 | ==XXXXX== suppressed: XXX bytes in XXX blocks 20 | ==XXXXX== 21 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 22 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 23 | ==XXXXX== 24 | ==XXXXX== FILE DESCRIPTORS: 0 open at exit. 25 | ==XXXXX== 26 | ==XXXXX== HEAP SUMMARY: 27 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 28 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 29 | ==XXXXX== 30 | ==XXXXX== LEAK SUMMARY: 31 | ==XXXXX== definitely lost: XXX bytes in XXX blocks 32 | ==XXXXX== indirectly lost: XXX bytes in XXX blocks 33 | ==XXXXX== possibly lost: XXX bytes in XXX blocks 34 | ==XXXXX== still reachable: XXX bytes in XXX blocks 35 | ==XXXXX== suppressed: XXX bytes in XXX blocks 36 | ==XXXXX== 37 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 38 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 39 | -------------------------------------------------------------------------------- /test/r/3_e_forbidden_requests/valgrind.out: -------------------------------------------------------------------------------- 1 | ==XXXXX== Memcheck, a memory error detector 2 | ==XXXXX== Copyright [details] 3 | ==XXXXX== Using Valgrind [version and build info] 4 | ==XXXXX== Command: /tmp/opendias_test/bin/opendias 5 | ==XXXXX== Parent PID: XXXXX. 6 | ==XXXXX== 7 | ==XXXXX== 8 | ==XXXXX== FILE DESCRIPTORS: 0 open at exit. 9 | ==XXXXX== 10 | ==XXXXX== HEAP SUMMARY: 11 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 12 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 13 | ==XXXXX== 14 | ==XXXXX== LEAK SUMMARY: 15 | ==XXXXX== definitely lost: XXX bytes in XXX blocks 16 | ==XXXXX== indirectly lost: XXX bytes in XXX blocks 17 | ==XXXXX== possibly lost: XXX bytes in XXX blocks 18 | ==XXXXX== still reachable: XXX bytes in XXX blocks 19 | ==XXXXX== suppressed: XXX bytes in XXX blocks 20 | ==XXXXX== 21 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 22 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 23 | ==XXXXX== 24 | ==XXXXX== FILE DESCRIPTORS: 0 open at exit. 25 | ==XXXXX== 26 | ==XXXXX== HEAP SUMMARY: 27 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 28 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 29 | ==XXXXX== 30 | ==XXXXX== LEAK SUMMARY: 31 | ==XXXXX== definitely lost: XXX bytes in XXX blocks 32 | ==XXXXX== indirectly lost: XXX bytes in XXX blocks 33 | ==XXXXX== possibly lost: XXX bytes in XXX blocks 34 | ==XXXXX== still reachable: XXX bytes in XXX blocks 35 | ==XXXXX== suppressed: XXX bytes in XXX blocks 36 | ==XXXXX== 37 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 38 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 39 | -------------------------------------------------------------------------------- /test/r/3_f_update_user_n_user_permissions/valgrind.out: -------------------------------------------------------------------------------- 1 | ==XXXXX== Memcheck, a memory error detector 2 | ==XXXXX== Copyright [details] 3 | ==XXXXX== Using Valgrind [version and build info] 4 | ==XXXXX== Command: /tmp/opendias_test/bin/opendias 5 | ==XXXXX== Parent PID: XXXXX. 6 | ==XXXXX== 7 | ==XXXXX== 8 | ==XXXXX== FILE DESCRIPTORS: 0 open at exit. 9 | ==XXXXX== 10 | ==XXXXX== HEAP SUMMARY: 11 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 12 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 13 | ==XXXXX== 14 | ==XXXXX== LEAK SUMMARY: 15 | ==XXXXX== definitely lost: XXX bytes in XXX blocks 16 | ==XXXXX== indirectly lost: XXX bytes in XXX blocks 17 | ==XXXXX== possibly lost: XXX bytes in XXX blocks 18 | ==XXXXX== still reachable: XXX bytes in XXX blocks 19 | ==XXXXX== suppressed: XXX bytes in XXX blocks 20 | ==XXXXX== 21 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 22 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 23 | ==XXXXX== 24 | ==XXXXX== FILE DESCRIPTORS: 0 open at exit. 25 | ==XXXXX== 26 | ==XXXXX== HEAP SUMMARY: 27 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 28 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 29 | ==XXXXX== 30 | ==XXXXX== LEAK SUMMARY: 31 | ==XXXXX== definitely lost: XXX bytes in XXX blocks 32 | ==XXXXX== indirectly lost: XXX bytes in XXX blocks 33 | ==XXXXX== possibly lost: XXX bytes in XXX blocks 34 | ==XXXXX== still reachable: XXX bytes in XXX blocks 35 | ==XXXXX== suppressed: XXX bytes in XXX blocks 36 | ==XXXXX== 37 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 38 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 39 | -------------------------------------------------------------------------------- /test/r/3_g_checkForSimilar/testLog.out: -------------------------------------------------------------------------------- 1 | Copying pre defined environment 2 | Copying default database 3 | STARTING app... 4 | Now ready 5 | No need for a web client for this test. 6 | Sending request = action=checkLogin&password=password&username=test-user 7 | Doc Details, one tag 8 | Sending request = action=checkForSimilar&docid=3 9 | $VAR1 = { 10 | 'CheckForSimilar' => { 11 | 'Docs' => {} 12 | } 13 | }; 14 | 15 | Doc Details, two tags 16 | Sending request = action=checkForSimilar&docid=2 17 | $VAR1 = { 18 | 'error' => 'Your request could not be processed' 19 | }; 20 | 21 | Doc Details, two linked documents 22 | Sending request = action=checkForSimilar&docid=4 23 | $VAR1 = { 24 | 'CheckForSimilar' => { 25 | 'Docs' => { 26 | 'Doc' => { 27 | 'Tags' => { 28 | 'tag' => [ 29 | 'tag one', 30 | 'tag two' 31 | ] 32 | }, 33 | 'distance' => '8', 34 | 'docid' => '1', 35 | 'title' => 'Test Titletext' 36 | } 37 | } 38 | } 39 | }; 40 | 41 | Stopping service 42 | Waiting for valgrind to finish. 43 | -------------------------------------------------------------------------------- /test/r/3_g_checkForSimilar/valgrind.out: -------------------------------------------------------------------------------- 1 | ==XXXXX== Memcheck, a memory error detector 2 | ==XXXXX== Copyright [details] 3 | ==XXXXX== Using Valgrind [version and build info] 4 | ==XXXXX== Command: /tmp/opendias_test/bin/opendias 5 | ==XXXXX== Parent PID: XXXXX. 6 | ==XXXXX== 7 | ==XXXXX== 8 | ==XXXXX== FILE DESCRIPTORS: 0 open at exit. 9 | ==XXXXX== 10 | ==XXXXX== HEAP SUMMARY: 11 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 12 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 13 | ==XXXXX== 14 | ==XXXXX== LEAK SUMMARY: 15 | ==XXXXX== definitely lost: XXX bytes in XXX blocks 16 | ==XXXXX== indirectly lost: XXX bytes in XXX blocks 17 | ==XXXXX== possibly lost: XXX bytes in XXX blocks 18 | ==XXXXX== still reachable: XXX bytes in XXX blocks 19 | ==XXXXX== suppressed: XXX bytes in XXX blocks 20 | ==XXXXX== 21 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 22 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 23 | ==XXXXX== 24 | ==XXXXX== FILE DESCRIPTORS: 0 open at exit. 25 | ==XXXXX== 26 | ==XXXXX== HEAP SUMMARY: 27 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 28 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 29 | ==XXXXX== 30 | ==XXXXX== LEAK SUMMARY: 31 | ==XXXXX== definitely lost: XXX bytes in XXX blocks 32 | ==XXXXX== indirectly lost: XXX bytes in XXX blocks 33 | ==XXXXX== possibly lost: XXX bytes in XXX blocks 34 | ==XXXXX== still reachable: XXX bytes in XXX blocks 35 | ==XXXXX== suppressed: XXX bytes in XXX blocks 36 | ==XXXXX== 37 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 38 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 39 | -------------------------------------------------------------------------------- /test/r/3_h_backpopulate/testLog.out: -------------------------------------------------------------------------------- 1 | Copying pre defined environment 2 | Copying default database 3 | Updated start command to use overidden libs 4 | STARTING app... 5 | Now ready 6 | No need for a web client for this test. 7 | Stopping service 8 | Waiting for valgrind to finish. 9 | -------------------------------------------------------------------------------- /test/r/3_h_backpopulate/valgrind.out: -------------------------------------------------------------------------------- 1 | ==XXXXX== Memcheck, a memory error detector 2 | ==XXXXX== Copyright [details] 3 | ==XXXXX== Using Valgrind [version and build info] 4 | ==XXXXX== Command: /tmp/opendias_test/bin/opendias 5 | ==XXXXX== Parent PID: XXXXX. 6 | ==XXXXX== 7 | ==XXXXX== 8 | ==XXXXX== FILE DESCRIPTORS: 0 open at exit. 9 | ==XXXXX== 10 | ==XXXXX== HEAP SUMMARY: 11 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 12 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 13 | ==XXXXX== 14 | ==XXXXX== LEAK SUMMARY: 15 | ==XXXXX== definitely lost: XXX bytes in XXX blocks 16 | ==XXXXX== indirectly lost: XXX bytes in XXX blocks 17 | ==XXXXX== possibly lost: XXX bytes in XXX blocks 18 | ==XXXXX== still reachable: XXX bytes in XXX blocks 19 | ==XXXXX== suppressed: XXX bytes in XXX blocks 20 | ==XXXXX== 21 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 22 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 23 | ==XXXXX== 24 | ==XXXXX== FILE DESCRIPTORS: 0 open at exit. 25 | ==XXXXX== 26 | ==XXXXX== HEAP SUMMARY: 27 | ==XXXXX== in use at exit: XXX bytes in XXX blocks 28 | ==XXXXX== total heap usage: XXXX allocs, XXXX frees, XXX bytes allocated 29 | ==XXXXX== 30 | ==XXXXX== LEAK SUMMARY: 31 | ==XXXXX== definitely lost: XXX bytes in XXX blocks 32 | ==XXXXX== indirectly lost: XXX bytes in XXX blocks 33 | ==XXXXX== possibly lost: XXX bytes in XXX blocks 34 | ==XXXXX== still reachable: XXX bytes in XXX blocks 35 | ==XXXXX== suppressed: XXX bytes in XXX blocks 36 | ==XXXXX== 37 | ==XXXXX== For counts of detected and suppressed errors, rerun with: -v 38 | ==XXXXX== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: XXX from XXX) 39 | -------------------------------------------------------------------------------- /test/suppressions/cms.suppression: -------------------------------------------------------------------------------- 1 | { 2 | 3 | Memcheck:Leak 4 | fun:malloc 5 | ... 6 | obj:/usr/lib/i386-linux-gnu/liblcms2.so.2.0.2 7 | ... 8 | } 9 | -------------------------------------------------------------------------------- /test/suppressions/libcrypt.suppression: -------------------------------------------------------------------------------- 1 | { 2 | 3 | Memcheck:Leak 4 | ... 5 | fun:gcry_check_version 6 | ... 7 | } 8 | 9 | { 10 | 11 | Memcheck:Leak 12 | ... 13 | fun:gnutls_global_init 14 | ... 15 | } 16 | 17 | -------------------------------------------------------------------------------- /test/suppressions/os.suppression: -------------------------------------------------------------------------------- 1 | { 2 | 3 | Memcheck:Leak 4 | ... 5 | fun:gnutls_pkcs11_init 6 | fun:gnutls_global_init 7 | ... 8 | } 9 | { 10 | 11 | Memcheck:Leak 12 | ... 13 | fun:call_init.part.0 14 | ... 15 | } 16 | { 17 | 18 | Memcheck:Leak 19 | ... 20 | fun:magic_load 21 | ... 22 | } 23 | -------------------------------------------------------------------------------- /test/suppressions/sane.suppression: -------------------------------------------------------------------------------- 1 | { 2 | 3 | Memcheck:Addr4 4 | fun:sane_dll_get_devices 5 | fun:sane_get_devices 6 | ... 7 | } 8 | { 9 | 10 | Memcheck:Leak 11 | ... 12 | fun:sane_get_devices 13 | ... 14 | } 15 | { 16 | 17 | Memcheck:Leak 18 | fun:malloc 19 | fun:strndup 20 | obj:* 21 | } 22 | { 23 | 24 | Memcheck:Leak 25 | ... 26 | fun:sane_open 27 | ... 28 | } 29 | { 30 | 31 | Memcheck:Leak 32 | fun:malloc 33 | fun:sanei_config_get_paths 34 | ... 35 | } 36 | { 37 | 38 | Memcheck:Leak 39 | fun:calloc 40 | fun:_dlerror_run 41 | ... 42 | } 43 | { 44 | 45 | Memcheck:Leak 46 | fun:malloc 47 | fun:_dl_map_object_deps 48 | fun:dl_open_worker 49 | fun:_dl_catch_error 50 | fun:do_dlopen 51 | fun:clone 52 | } 53 | { 54 | 55 | Memcheck:Leak 56 | fun:malloc 57 | fun:strdup 58 | fun:__libc_start_main 59 | obj:* 60 | } 61 | { 62 | 63 | Memcheck:Leak 64 | fun:malloc 65 | fun:strdup 66 | fun:sanei_config_get_paths 67 | fun:sane_dll_init 68 | fun:sane_init 69 | fun:dispatch_sane_work 70 | fun:main 71 | fun:__libc_start_main 72 | obj:/tmp/opendias_test/bin/opendias 73 | } 74 | { 75 | 76 | Memcheck:Leak 77 | fun:malloc 78 | fun:strdup 79 | obj:* 80 | obj:* 81 | obj:/usr/lib/i386-linux-gnu/libsane.so.1.0.22 82 | obj:* 83 | } 84 | -------------------------------------------------------------------------------- /test/suppressions/zzip.suppression: -------------------------------------------------------------------------------- 1 | { 2 | 3 | Memcheck:Cond 4 | fun:inflateReset2 5 | fun:inflateInit2_ 6 | fun:zzip_file_open 7 | ... 8 | } 9 | -------------------------------------------------------------------------------- /test/t/1_1_create_database.pm: -------------------------------------------------------------------------------- 1 | package t::1_1_create_database; 2 | 3 | use lib qw( lib ); 4 | use DBI; 5 | use standardTests; 6 | use strict; 7 | 8 | sub testProfile { 9 | return { 10 | valgrind => 1, 11 | client => 0, 12 | startTimeout => 240, 13 | }; 14 | } 15 | 16 | sub test { 17 | 18 | my $dbh = DBI->connect( "dbi:SQLite:dbname=/tmp/opendiastest/openDIAS.sqlite3", 19 | "", "", { RaiseError => 1, AutoCommit => 1, sqlite_use_immediate_transaction => 1 } ); 20 | 21 | my $sth = $dbh->prepare("SELECT version FROM version"); 22 | $sth->execute(); 23 | 24 | while( my $hashRef = $sth->fetchrow_hashref() ) { 25 | if ( $hashRef->{version} eq "7" ) { 26 | o_log("Correct DB version."); 27 | } 28 | else { 29 | o_log("Incorrect DB version."); 30 | $dbh->disconnect(); 31 | return 1; 32 | } 33 | } 34 | 35 | # Apply some diffs we know the reference DB will have from the default build 36 | # An additional test user, and 37 | # Wont try to back populate the pHASH for images. 38 | $dbh->do("INSERT INTO user_access VALUES('test-user','63294d4f9a52894e2ef9298d1b8ac455','Test - User','2012-11-22 17:26:00','automatically',2)"); 39 | $dbh->do("UPDATE config SET config_value='no' WHERE config_option='backpopulate_phash'"); 40 | 41 | $dbh->disconnect(); 42 | 43 | # compare the generated database schema 44 | system("/usr/bin/sqlite3 /tmp/opendiastest/openDIAS.sqlite3 '.dump' > /tmp/generated.sql"); 45 | system("/usr/bin/sqlite3 config/defaultdatabase.sqlite3 '.dump' > /tmp/reference.sql"); 46 | o_log("Diff of generated-to-reference database: \n" . `diff /tmp/generated.sql /tmp/reference.sql` ); 47 | 48 | return 0; 49 | } 50 | 51 | return 1; 52 | 53 | -------------------------------------------------------------------------------- /test/t/1_2_failed_to_create_database.pm: -------------------------------------------------------------------------------- 1 | package t::1_2_failed_to_create_database; 2 | 3 | use lib qw( lib ); 4 | use DBI; 5 | use standardTests; 6 | use strict; 7 | 8 | sub testProfile { 9 | return { 10 | valgrind => 1, 11 | client => 0, 12 | updateStartCommand => 'updateStartCommand', 13 | }; 14 | } 15 | 16 | sub updateStartCommand { 17 | my $startCommand = shift; 18 | my $pwd=`pwd`; 19 | chomp $pwd; 20 | system("cp config/testappUnableToCreate.conf /tmp/opendias_test/etc/opendias/testappUnableToCreate.conf"); 21 | $$startCommand =~ s/bin\/opendias/bin\/opendias -c \/tmp\/opendias_test\/etc\/opendias\/testappUnableToCreate.conf/g; 22 | o_log("Updated start command to stop the database from being created."); 23 | } 24 | 25 | sub test { 26 | 27 | # Nothing to test here 28 | return 0; 29 | } 30 | 31 | return 1; 32 | 33 | -------------------------------------------------------------------------------- /test/t/1_3_missing_config_file.pm: -------------------------------------------------------------------------------- 1 | package t::1_3_missing_config_file; 2 | 3 | use lib qw( lib ); 4 | use DBI; 5 | use standardTests; 6 | use strict; 7 | 8 | sub testProfile { 9 | return { 10 | valgrind => 1, 11 | client => 0, 12 | updateStartCommand => 'updateStartCommand', 13 | }; 14 | } 15 | 16 | sub updateStartCommand { 17 | my $startCommand = shift; 18 | $$startCommand =~ s/bin\/opendias/bin\/opendias -c \/tmp\/opendias_test\/etc\/opendias\/testappMISSING.conf/g; 19 | o_log("Updated start command to specify a missing config file."); 20 | } 21 | 22 | sub test { 23 | 24 | # Nothing to test here 25 | return 0; 26 | } 27 | 28 | return 1; 29 | 30 | -------------------------------------------------------------------------------- /test/t/1_4_various_kills_are_ignored.pm: -------------------------------------------------------------------------------- 1 | package t::1_4_various_kills_are_ignored; 2 | 3 | use lib qw( lib ); 4 | use DBI; 5 | use standardTests; 6 | use strict; 7 | 8 | sub testProfile { 9 | return { 10 | valgrind => 1, 11 | client => 0, 12 | }; 13 | } 14 | 15 | sub test { 16 | 17 | sleep(3); 18 | 19 | # try kills this way and that 20 | system("kill -s HUP `cat /tmp/opendias_test/var/run/opendias.pid`"); 21 | sleep(3); 22 | 23 | system("kill -s USR1 `cat /tmp/opendias_test/var/run/opendias.pid`"); 24 | sleep(3); 25 | 26 | return 0; 27 | } 28 | 29 | return 1; 30 | 31 | -------------------------------------------------------------------------------- /test/t/1_5_could_not_start_http_service.pm: -------------------------------------------------------------------------------- 1 | package t::1_5_could_not_start_http_service; 2 | 3 | use lib qw( lib ); 4 | use DBI; 5 | use standardTests; 6 | use strict; 7 | use IO::Socket::INET; 8 | 9 | our $sock; 10 | 11 | sub testProfile { 12 | return { 13 | valgrind => 1, 14 | client => 0, 15 | updateStartCommand => 'updateStartCommand', 16 | }; 17 | } 18 | 19 | sub updateStartCommand { 20 | # Start a port on the opendias port 21 | $sock = IO::Socket::INET->new( Listen => 1, 22 | LocalAddr => 'localhost', 23 | LocalPort => '8988', 24 | Proto => 'tcp') 25 | || die "Could not create blocking socket: $!"; 26 | 27 | o_log("Reserved the opendias port, to stop the service from starting correctly.") if $sock; 28 | } 29 | 30 | sub test { 31 | 32 | system("while [ \"`pidof valgrind.bin`\" != \"\" ]; do sleep 1; done"); 33 | 34 | # close the overridding http port 35 | $sock->close(); 36 | 37 | return 0; 38 | } 39 | 40 | return 1; 41 | 42 | -------------------------------------------------------------------------------- /test/t/1_7_config_updates.pm: -------------------------------------------------------------------------------- 1 | package t::1_7_config_updates; 2 | 3 | use lib qw( lib ); 4 | use DBI; 5 | use standardTests; 6 | use strict; 7 | 8 | sub testProfile { 9 | return { 10 | valgrind => 1, 11 | client => 0, 12 | updateStartCommand => 'updateStartCommand', 13 | }; 14 | } 15 | 16 | sub updateStartCommand { 17 | my $startCommand = shift; 18 | $$startCommand =~ s/bin\/opendias/bin\/opendiasconfig -s log_verbosity -v 4/g; 19 | o_log("Updated start command to run the config updater."); 20 | return 'no port'; 21 | } 22 | 23 | sub test { 24 | 25 | # Nothing to test here 26 | return 0; 27 | } 28 | 29 | return 1; 30 | 31 | -------------------------------------------------------------------------------- /test/t/1_9_usage_app.pm: -------------------------------------------------------------------------------- 1 | package t::1_9_usage_app; 2 | 3 | use lib qw( lib ); 4 | use DBI; 5 | use standardTests; 6 | use strict; 7 | 8 | sub testProfile { 9 | return { 10 | valgrind => 1, 11 | client => 0, 12 | updateStartCommand => 'updateStartCommand', 13 | }; 14 | } 15 | 16 | sub updateStartCommand { 17 | my $startCommand = shift; 18 | $$startCommand =~ s/bin\/opendias/bin\/opendias -h/g; 19 | o_log("Updated start command to run the config updater."); 20 | return 'no port'; 21 | } 22 | 23 | sub test { 24 | 25 | # Nothing to test here 26 | return 0; 27 | } 28 | 29 | return 1; 30 | 31 | -------------------------------------------------------------------------------- /test/t/1_a_usage_config.pm: -------------------------------------------------------------------------------- 1 | package t::1_a_usage_config; 2 | 3 | use lib qw( lib ); 4 | use DBI; 5 | use standardTests; 6 | use strict; 7 | 8 | sub testProfile { 9 | return { 10 | valgrind => 1, 11 | client => 0, 12 | updateStartCommand => 'updateStartCommand', 13 | }; 14 | } 15 | 16 | sub updateStartCommand { 17 | my $startCommand = shift; 18 | $$startCommand =~ s/bin\/opendias/bin\/opendiasconfig -h/g; 19 | o_log("Updated start command to run the config updater."); 20 | return 'no port'; 21 | } 22 | 23 | sub test { 24 | 25 | # Nothing to test here 26 | return 0; 27 | } 28 | 29 | return 1; 30 | 31 | -------------------------------------------------------------------------------- /test/t/3_1_doclist.pm: -------------------------------------------------------------------------------- 1 | package t::3_1_doclist; 2 | 3 | use lib qw( lib ); 4 | use DBI; 5 | use standardTests; 6 | use Data::Dumper; 7 | use strict; 8 | 9 | sub testProfile { 10 | return { 11 | valgrind => 1, 12 | client => 0, 13 | }; 14 | } 15 | 16 | sub test { 17 | 18 | my $cookie_jar = HTTP::Cookies->new(); 19 | my %data = ( 20 | __cookiejar => $cookie_jar, 21 | action => 'docFilter', 22 | subaction => 'fullList', 23 | isActionRequired => 'false', 24 | page => '1', 25 | range => '3', 26 | sortfield => '3', # date 27 | sortorder => '1', 28 | ); 29 | 30 | login( "test-user", "password", $cookie_jar ); 31 | 32 | # Entry DB 33 | o_log( "No Rows = " . Dumper( directRequest( \%data ) ) ); 34 | 35 | # Add a simgle document 36 | inTestSQL('1'); 37 | o_log( "One Row = " . Dumper( directRequest( \%data ) ) ); 38 | 39 | # Add three more document 40 | inTestSQL('2'); 41 | o_log( "Date Order = " . Dumper( directRequest( \%data ) ) ); 42 | 43 | # Change sort order 44 | $data{sortorder} = 0; 45 | o_log( "Date Order reverse = " . Dumper( directRequest( \%data ) ) ); 46 | 47 | # Change display page 48 | $data{page} = 2; 49 | o_log( "Second Page = " . Dumper( directRequest( \%data ) ) ); 50 | 51 | # Sort by type 52 | $data{sortfield} = 2; 53 | $data{page} = 1; 54 | $data{range} = 5; 55 | $data{sortorder} = 1; 56 | o_log( "Sort by type, all records = " . Dumper( directRequest( \%data ) ) ); 57 | 58 | # Change sort field 59 | $data{sortfield} = 1; 60 | o_log( "Sort by title, all records = " . Dumper( directRequest( \%data ) ) ); 61 | 62 | # Sort by docid 63 | $data{sortfield} = 0; 64 | o_log( "Sort by docid, all records = " . Dumper( directRequest( \%data ) ) ); 65 | 66 | # Reverse Order 67 | $data{sortorder} = 0; 68 | o_log( "Sort by reverse-docid, all records = " . Dumper( directRequest( \%data ) ) ); 69 | 70 | return 0; 71 | } 72 | 73 | return 1; 74 | 75 | -------------------------------------------------------------------------------- /test/t/3_3_getScannerList.pm: -------------------------------------------------------------------------------- 1 | package t::3_3_getScannerList; 2 | 3 | use lib qw( lib ); 4 | use DBI; 5 | use standardTests; 6 | use Data::Dumper; 7 | use HTTP::Cookies; 8 | use strict; 9 | 10 | sub testProfile { 11 | return { 12 | valgrind => 1, 13 | client => 0, 14 | updateStartCommand => 'updateStartCommand', 15 | }; 16 | } 17 | 18 | sub updateStartCommand { 19 | my $startCommand = shift; 20 | chomp( my $pwd = `pwd` ); 21 | my $prefix = "LD_LIBRARY_PATH=$pwd/override_libs/libsane:$pwd/override_libs/libtesseract:$pwd/override_libs/liblept:$pwd/override_libs/libpoppler:$pwd/override_libs/libpHash "; 22 | $$startCommand =~ s/^/$prefix/g; 23 | o_log("Updated start command to use overidden libs"); 24 | } 25 | 26 | sub test { 27 | 28 | my $cookie_jar = HTTP::Cookies->new(); 29 | my %data = ( 30 | __cookiejar => $cookie_jar, 31 | action => 'getScannerList', 32 | ); 33 | 34 | login( "test-user", "password", $cookie_jar ); 35 | 36 | my %scan = ( 37 | __cookiejar => $cookie_jar, 38 | action => 'doScan', 39 | deviceid => 'test:0', 40 | format => 'gray', 41 | pages => 1, 42 | resolution => '50', 43 | ocr => '-', 44 | pagelength => '100', 45 | ); 46 | 47 | # Build a scanner list cache 48 | o_log( "Scanner List" ); 49 | o_log( Dumper( directRequest( \%data ) ) ); 50 | 51 | # Get a scanning process going 52 | o_log( "Start long running scan" ); 53 | system( "touch /tmp/pause.sane.override" ); 54 | my $result = directRequest( \%scan ); 55 | o_log( Dumper( $result ) ); 56 | my $scan_uuid = $result->{DoScan}->{scanuuid}; 57 | 58 | # Wait to ensure the scanning processes is in the middle of a scan 59 | while( ! -f "/tmp/sane.override.is.paused" ) { 60 | sleep(1); 61 | } 62 | 63 | # Request device list - expect a cached response 64 | o_log( "Scanner List" ); 65 | o_log( Dumper( directRequest( \%data ) ) ); 66 | 67 | unlink( "/tmp/pause.sane.override" ); 68 | return 0; 69 | } 70 | 71 | return 1; 72 | 73 | -------------------------------------------------------------------------------- /test/t/3_4_getDocDetails.pm: -------------------------------------------------------------------------------- 1 | package t::3_4_getDocDetails; 2 | 3 | use lib qw( lib ); 4 | use DBI; 5 | use standardTests; 6 | use Data::Dumper; 7 | use strict; 8 | 9 | sub testProfile { 10 | return { 11 | valgrind => 1, 12 | client => 0, 13 | }; 14 | } 15 | 16 | sub test { 17 | 18 | my $cookie_jar = HTTP::Cookies->new(); 19 | my %data = ( 20 | __cookiejar => $cookie_jar, 21 | action => 'getDocDetail', 22 | docid => 3, 23 | ); 24 | 25 | login( "test-user", "password", $cookie_jar ); 26 | 27 | # Call getDocDetails 28 | o_log( "Doc Details, one tag" ); 29 | o_log( Dumper( directRequest( \%data ) ) ); 30 | 31 | # Call getDocDetails 32 | o_log( "Doc Details, two tags" ); 33 | $data{docid} = 2; 34 | o_log( Dumper( directRequest( \%data ) ) ); 35 | 36 | # Call getDocDetails 37 | o_log( "Doc Details, two linked documents" ); 38 | $data{docid} = 4; 39 | o_log( Dumper( directRequest( \%data ) ) ); 40 | 41 | return 0; 42 | } 43 | 44 | return 1; 45 | 46 | -------------------------------------------------------------------------------- /test/t/3_7_deleteDoc.pm: -------------------------------------------------------------------------------- 1 | package t::3_7_deleteDoc; 2 | 3 | use lib qw( lib ); 4 | use DBI; 5 | use standardTests; 6 | use Data::Dumper; 7 | use strict; 8 | 9 | sub testProfile { 10 | return { 11 | valgrind => 1, 12 | client => 0, 13 | }; 14 | } 15 | 16 | sub test { 17 | 18 | my $cookie_jar = HTTP::Cookies->new(); 19 | my %updateData = ( 20 | __cookiejar => $cookie_jar, 21 | action => 'deleteDoc', 22 | docid => 9999, 23 | ); 24 | 25 | login( "test-user", "password", $cookie_jar ); 26 | 27 | dumpState(); 28 | 29 | # BAD doc details 30 | o_log( "Fail to Remove a doc linkage" ); 31 | o_log( Dumper( directRequest( \%updateData ) ) ); 32 | 33 | dumpState(); 34 | 35 | # Update doc details 36 | o_log( "Remove a doc linkage" ); 37 | $updateData{docid} = 2; 38 | o_log( Dumper( directRequest( \%updateData ) ) ); 39 | 40 | dumpState(); 41 | 42 | return 0; 43 | } 44 | 45 | sub dumpState { 46 | dumpQueryResult( "SELECT docid, title FROM docs ORDER BY docid" ); 47 | dumpQueryResult( "SELECT doclinkid, docid, linkeddocid FROM doc_links ORDER BY doclinkid" ); 48 | dumpQueryResult( "SELECT doctagid, docid, tagid FROM doc_tags ORDER BY doctagid" ); 49 | dumpQueryResult( "SELECT tagid, tagname FROM tags ORDER BY tagid" ); 50 | } 51 | 52 | return 1; 53 | 54 | -------------------------------------------------------------------------------- /test/t/3_8_autoComplete.pm: -------------------------------------------------------------------------------- 1 | package t::3_8_autoComplete; 2 | 3 | use lib qw( lib ); 4 | use DBI; 5 | use standardTests; 6 | use Data::Dumper; 7 | use HTTP::Cookies; 8 | use strict; 9 | 10 | sub testProfile { 11 | return { 12 | valgrind => 1, 13 | client => 0, 14 | }; 15 | } 16 | 17 | sub test { 18 | 19 | my $cookie_jar = HTTP::Cookies->new(); 20 | my %data = ( 21 | __cookiejar => $cookie_jar, 22 | action => 'tagsAutoComplete', 23 | ); 24 | 25 | login( "test-user", "password", $cookie_jar ); 26 | 27 | my $entry = 'tag one'; 28 | foreach my $docid (2,4) { 29 | o_log( "On document : $docid" ); 30 | $data{docid} = $docid; 31 | for( my $x = 1 ; $x < length( $entry ) ; $x++) { 32 | my $partEntry = substr( $entry, 0, $x ); 33 | $data{startsWith} = $partEntry; 34 | o_log( "Suggestions for an entry of: $partEntry" ); 35 | o_log( Dumper( directRequest( \%data ) ) ); 36 | } 37 | } 38 | 39 | $data{action} = 'titleAutoComplete'; 40 | delete $data{docid}; 41 | my $entry = 'Test 2 Title text'; 42 | foreach my $docid (2,4) { 43 | o_log( "Show document options that are not already linked to docid: $docid" ); 44 | $data{notLinkedTo} = $docid; 45 | for( my $x = 1 ; $x < length( $entry ) ; $x++) { 46 | my $partEntry = substr( $entry, 0, $x ); 47 | $data{startsWith} = $partEntry; 48 | o_log( "Suggestions for an entry of: $partEntry" ); 49 | o_log( Dumper( directRequest( \%data ) ) ); 50 | } 51 | } 52 | 53 | return 0; 54 | } 55 | 56 | return 1; 57 | 58 | -------------------------------------------------------------------------------- /test/t/3_d_language_selection.pm: -------------------------------------------------------------------------------- 1 | package t::3_d_language_selection; 2 | 3 | use lib qw( lib ); 4 | use DBI; 5 | use standardTests; 6 | use Data::Dumper; 7 | use strict; 8 | 9 | sub testProfile { 10 | return { 11 | valgrind => 1, 12 | client => 0, 13 | }; 14 | } 15 | 16 | sub test { 17 | 18 | my $cookie_jar = HTTP::Cookies->new(); 19 | my %data = ( 20 | __cookiejar => $cookie_jar, 21 | __method => 'GET', 22 | __encoding => 'text/html', 23 | __uri => '/opendias/', 24 | ); 25 | 26 | login( "test-user", "password", $cookie_jar ); 27 | 28 | # No language setting - should default to English 29 | o_log( "No language indication = " . Dumper( directRequest( \%data ) ) ); 30 | 31 | # 'en' as first available language - should use English 32 | $data{ '__header_Accept-Language' } = 'qq,en;q=0.9,de;q=0.8,##;q=0.1'; 33 | o_log( "header says en = " . Dumper( directRequest( \%data ) ) ); 34 | 35 | # 'de' as first available language - should load then use German 36 | $data{ '__header_Accept-Language' } = 'qq,de;q=0.9,en;q=0.8,##;q=0.1'; 37 | o_log( "header says de = " . Dumper( directRequest( \%data ) ) ); 38 | 39 | # As above, but with unknown as cookie language - should skip cooke and use German 40 | $data{ '__header_cookie' } = 'requested_lang=qq'; 41 | o_log( "bad cookie, header says de = " . Dumper( directRequest( \%data ) ) ); 42 | 43 | # As above, but with '##' as cookie language - load and use 'test language' 44 | $data{ '__header_cookie' } = 'requested_lang=hh'; 45 | o_log( "bad cookie, header says ## = " . Dumper( directRequest( \%data ) ) ); 46 | 47 | # # As above, but making a request where '##' is not available - should default to English for missing text 48 | # o_log( "bad cookie, header says de = " . Dumper( directRequest( \%data ) ) ); 49 | 50 | return 0; 51 | } 52 | 53 | return 1; 54 | 55 | -------------------------------------------------------------------------------- /test/t/3_g_checkForSimilar.pm: -------------------------------------------------------------------------------- 1 | package t::3_g_checkForSimilar; 2 | 3 | use lib qw( lib ); 4 | use DBI; 5 | use standardTests; 6 | use Data::Dumper; 7 | use strict; 8 | 9 | sub testProfile { 10 | return { 11 | valgrind => 1, 12 | client => 0, 13 | }; 14 | } 15 | 16 | sub test { 17 | 18 | my $cookie_jar = HTTP::Cookies->new(); 19 | my %data = ( 20 | __cookiejar => $cookie_jar, 21 | action => 'checkForSimilar', 22 | docid => 3, 23 | ); 24 | 25 | login( "test-user", "password", $cookie_jar ); 26 | 27 | # Call getDocDetails 28 | o_log( "Doc Details, one tag" ); 29 | o_log( Dumper( directRequest( \%data ) ) ); 30 | 31 | # Call getDocDetails 32 | o_log( "Doc Details, two tags" ); 33 | $data{docid} = 2; 34 | o_log( Dumper( directRequest( \%data ) ) ); 35 | 36 | # Call getDocDetails 37 | o_log( "Doc Details, two linked documents" ); 38 | $data{docid} = 4; 39 | o_log( Dumper( directRequest( \%data ) ) ); 40 | 41 | return 0; 42 | } 43 | 44 | return 1; 45 | 46 | -------------------------------------------------------------------------------- /test/t/3_h_backpopulate.pm: -------------------------------------------------------------------------------- 1 | package t::3_h_backpopulate; 2 | 3 | use lib qw( lib ); 4 | use DBI; 5 | use standardTests; 6 | use Data::Dumper; 7 | use strict; 8 | 9 | sub testProfile { 10 | return { 11 | valgrind => 1, 12 | client => 0, 13 | updateStartCommand => 'updateStartCommand', 14 | }; 15 | } 16 | 17 | sub updateStartCommand { 18 | my $startCommand = shift; 19 | chomp( my $pwd = `pwd` ); 20 | my $prefix = "LD_LIBRARY_PATH=$pwd/override_libs/liblept:$pwd/override_libs/libpHash "; 21 | $$startCommand =~ s/^/$prefix/g; 22 | o_log("Updated start command to use overidden libs"); 23 | } 24 | 25 | sub test { 26 | 27 | my $dbh = DBI->connect( "dbi:SQLite:dbname=/tmp/opendiastest/openDIAS.sqlite3", 28 | "", "", { RaiseError => 1, AutoCommit => 1, sqlite_use_immediate_transaction => 1 } ); 29 | 30 | my $sth = $dbh->prepare("SELECT config_value FROM config WHERE config_option = 'backpopulate_phash';"); 31 | 32 | my $attempt = 0; 33 | while ( 1 ) { 34 | 35 | sleep ( 1 ); 36 | $attempt++; 37 | 38 | $sth->execute(); 39 | my $hashRef = $sth->fetchrow_hashref(); 40 | my $ret = $hashRef->{config_value}; 41 | $sth->finish; 42 | 43 | last if( $ret eq "complete" ); 44 | 45 | if( $attempt > 120 ) { 46 | o_log( "Waiting for the back population to complete, but never happened! Forcing q shutdown."); 47 | last; 48 | } 49 | 50 | } 51 | $dbh->disconnect(); 52 | 53 | return 0; 54 | } 55 | 56 | return 1; 57 | 58 | -------------------------------------------------------------------------------- /test/testplan: -------------------------------------------------------------------------------- 1 | Startup/Showdown 2 | ---------------- 3 | * 1_1_create_database 4 | * 1_2_failed_to_create_database 5 | * 1_3_missing_config_file 6 | * 1_4_various_kills_are_ignored 7 | * 1_5_could_not_start_http_service 8 | * 1_7_config_updates 9 | 1_8_ 10 | * 1_9_usage_app 11 | * 1_a_usage_config 12 | 13 | API 14 | ---------------- 15 | * 3_1_doclist 16 | * 3_2_doclist_search 17 | * 3_3_getScannerList 18 | * 3_4_getDocDetails 19 | * 3_5_updateDocDetails 20 | * 3_6_moveTag 21 | * 3_7_deleteDoc 22 | * 3_8_autoComplete 23 | * 3_9_access 24 | * 3_a_scanning 25 | * 3_b_validation 26 | * 3_c_import 27 | * 3_d_language_selection 28 | * 3_e_forbidden_requests 29 | * 3_f_update_user_n_user_permissions 30 | * 3_g_checkForSimilar 31 | * 3_h_backpopulate 32 | 33 | Frontend 34 | ---------------- 35 | 8_1_basic_pages 36 | 8_2_doc_detail 37 | 8_3_doc_detail_missing 38 | 8_4_scan 39 | 8_11-MainWindow-display 40 | 8_12-MainWindow-dbDisplay 41 | 8_13-MainWindow-fieldSorting 42 | 8_14-MainWindow-tagFiltering 43 | 8_15-MainWindow-menusCredits 44 | 8_16-MainWindow-docSelectOptions 45 | 8_17-MainWindow-changeDocRoot 46 | 8_21-DocDetails-display 47 | 8_22-DocDetails-populatesFields 48 | 8_23-DocDetails-savesToDB 49 | 8_24-DocDetails-pagination 50 | 8_25-DocDetails-zoomPan 51 | 8_26-DocDetails-delete 52 | 8_27-DocDetails-noEmptyImage 53 | 8_28-DocDetails-loadSeveral 54 | 8_31-AcquireNoScanner-display 55 | 8_41-AcquireScanner-display 56 | 8_42-AcquireScanner-optionsPopulated 57 | 8_43-AcquireScanner-scanProcess 58 | 8_51-AcquireODF-display 59 | 8_52-AcquireODF-importProcess 60 | 8_61-AcquireOCR-ocr 61 | 62 | -------------------------------------------------------------------------------- /webcontent/LOCALISATION_README: -------------------------------------------------------------------------------- 1 | This document applies to you, if: 2 | 3 | * You are thinking of localising opendias into a new language 4 | or adding new phases to current language packs. 5 | 6 | First, thank you, it really is much appreciated. 7 | 8 | Second, you should first read Section 5 (and specifically 9 | Section 5.1 on how each localisation file is used, and what 10 | not to localise) of the main README file. 11 | 12 | Over and above that, there are a few scripts and pointers to 13 | help you. 14 | 15 | * If adding a new 'phase' to a language resouce file, either: 16 | * Add the correct localised text as per the language of 17 | the file. 18 | * or, Add the English version prefixed with 'LOCALISE_ME' 19 | This will let us know where effort needs to be spent on 20 | getting that phase transalated. 21 | 22 | * The script 'scripts/generate_new_language_pack.pl' will 23 | create a new local version of each language resource file. 24 | Add these to git, but not any generated file, 25 | eg *.html. 26 | 27 | * The script 'scripts/build-local-versions.pl' (that is called 28 | by ./configure) creates the .html files used by the 29 | application, from .tmpl and language resource files. 30 | However, it also: 31 | * Prints a warning when a phase contains 'LOCALISE_ME' 32 | * Stops processing, if a phrase is missing from any of 33 | the language resource files. 34 | 35 | -------------------------------------------------------------------------------- /webcontent/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | SUBDIRS = style includes images 3 | 4 | web_DATA = \ 5 | $(srcdir)/accessControls.html.* \ 6 | $(srcdir)/docList.html.* \ 7 | $(srcdir)/docDetail.html.* \ 8 | $(srcdir)/body.html.* \ 9 | $(srcdir)/acquire.html.* 10 | 11 | webdir = \ 12 | $(pkgdatadir)/webcontent 13 | 14 | EXTRA_DIST = \ 15 | $(web_DATA) 16 | 17 | ## File created by the gnome-build tools 18 | -------------------------------------------------------------------------------- /webcontent/images/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | SUBDIRS = easySlider datepicker jquery-ui 3 | 4 | web_DATA = \ 5 | cabinet.jpg \ 6 | openDIAS_64x64.ico \ 7 | openDIAS_sml.png \ 8 | opendias.jpg \ 9 | texture.png \ 10 | arrow.png \ 11 | close.png \ 12 | actionrequired.png 13 | 14 | webdir = \ 15 | $(pkgdatadir)/webcontent/images 16 | 17 | EXTRA_DIST = \ 18 | $(web_DATA) 19 | 20 | ## File created by the gnome-build tools 21 | 22 | -------------------------------------------------------------------------------- /webcontent/images/actionrequired.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/webcontent/images/actionrequired.png -------------------------------------------------------------------------------- /webcontent/images/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/webcontent/images/arrow.png -------------------------------------------------------------------------------- /webcontent/images/cabinet.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/webcontent/images/cabinet.jpg -------------------------------------------------------------------------------- /webcontent/images/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/webcontent/images/close.png -------------------------------------------------------------------------------- /webcontent/images/datepicker/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | web_DATA = \ 3 | datepicker_b.png \ 4 | datepicker_bl.png \ 5 | datepicker_br.png \ 6 | datepicker_l.png \ 7 | datepicker_r.png \ 8 | datepicker_t.png \ 9 | datepicker_tl.png \ 10 | datepicker_tr.png 11 | 12 | webdir = \ 13 | $(pkgdatadir)/webcontent/images/datepicker 14 | 15 | EXTRA_DIST = \ 16 | $(web_DATA) 17 | 18 | ## File created by the gnome-build tools 19 | 20 | -------------------------------------------------------------------------------- /webcontent/images/datepicker/datepicker_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/webcontent/images/datepicker/datepicker_b.png -------------------------------------------------------------------------------- /webcontent/images/datepicker/datepicker_bl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/webcontent/images/datepicker/datepicker_bl.png -------------------------------------------------------------------------------- /webcontent/images/datepicker/datepicker_br.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/webcontent/images/datepicker/datepicker_br.png -------------------------------------------------------------------------------- /webcontent/images/datepicker/datepicker_l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/webcontent/images/datepicker/datepicker_l.png -------------------------------------------------------------------------------- /webcontent/images/datepicker/datepicker_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/webcontent/images/datepicker/datepicker_r.png -------------------------------------------------------------------------------- /webcontent/images/datepicker/datepicker_t.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/webcontent/images/datepicker/datepicker_t.png -------------------------------------------------------------------------------- /webcontent/images/datepicker/datepicker_tl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/webcontent/images/datepicker/datepicker_tl.png -------------------------------------------------------------------------------- /webcontent/images/datepicker/datepicker_tr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/webcontent/images/datepicker/datepicker_tr.png -------------------------------------------------------------------------------- /webcontent/images/datepicker/field.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/webcontent/images/datepicker/field.png -------------------------------------------------------------------------------- /webcontent/images/easySlider/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | web_DATA = \ 3 | btn_next.png \ 4 | btn_prev.png 5 | 6 | webdir = \ 7 | $(pkgdatadir)/webcontent/images/easySlider 8 | 9 | EXTRA_DIST = \ 10 | $(web_DATA) 11 | 12 | ## File created by the gnome-build tools 13 | 14 | -------------------------------------------------------------------------------- /webcontent/images/easySlider/btn_next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/webcontent/images/easySlider/btn_next.png -------------------------------------------------------------------------------- /webcontent/images/easySlider/btn_prev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/webcontent/images/easySlider/btn_prev.png -------------------------------------------------------------------------------- /webcontent/images/jquery-ui/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | web_DATA = \ 3 | pbar-ani.png \ 4 | ui-bg_diagonals-thick_90_eeeeee_40x40.png \ 5 | ui-bg_flat_15_cd0a0a_40x100.png \ 6 | ui-bg_glass_50_3baae3_1x400.png \ 7 | ui-bg_glass_80_d7ebf9_1x400.png \ 8 | ui-bg_glass_100_e4f1fb_1x400.png \ 9 | ui-bg_highlight-hard_70_000000_1x100.png \ 10 | ui-bg_highlight-hard_100_f2f5f7_1x100.png \ 11 | ui-bg_highlight-soft_25_ffef8f_1x100.png \ 12 | ui-bg_highlight-soft_100_deedf7_1x100.png \ 13 | ui-icons_2e83ff_256x240.png \ 14 | ui-icons_3d80b3_256x240.png \ 15 | ui-icons_72a7cf_256x240.png \ 16 | ui-icons_2694e8_256x240.png \ 17 | ui-icons_ffffff_256x240.png 18 | 19 | webdir = \ 20 | $(pkgdatadir)/webcontent/images/jquery-ui 21 | 22 | EXTRA_DIST = \ 23 | $(web_DATA) 24 | 25 | ## File created by the gnome-build tools 26 | 27 | -------------------------------------------------------------------------------- /webcontent/images/jquery-ui/pbar-ani.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/webcontent/images/jquery-ui/pbar-ani.png -------------------------------------------------------------------------------- /webcontent/images/jquery-ui/ui-bg_diagonals-thick_90_eeeeee_40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/webcontent/images/jquery-ui/ui-bg_diagonals-thick_90_eeeeee_40x40.png -------------------------------------------------------------------------------- /webcontent/images/jquery-ui/ui-bg_flat_15_cd0a0a_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/webcontent/images/jquery-ui/ui-bg_flat_15_cd0a0a_40x100.png -------------------------------------------------------------------------------- /webcontent/images/jquery-ui/ui-bg_glass_100_e4f1fb_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/webcontent/images/jquery-ui/ui-bg_glass_100_e4f1fb_1x400.png -------------------------------------------------------------------------------- /webcontent/images/jquery-ui/ui-bg_glass_50_3baae3_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/webcontent/images/jquery-ui/ui-bg_glass_50_3baae3_1x400.png -------------------------------------------------------------------------------- /webcontent/images/jquery-ui/ui-bg_glass_80_d7ebf9_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/webcontent/images/jquery-ui/ui-bg_glass_80_d7ebf9_1x400.png -------------------------------------------------------------------------------- /webcontent/images/jquery-ui/ui-bg_highlight-hard_100_f2f5f7_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/webcontent/images/jquery-ui/ui-bg_highlight-hard_100_f2f5f7_1x100.png -------------------------------------------------------------------------------- /webcontent/images/jquery-ui/ui-bg_highlight-hard_70_000000_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/webcontent/images/jquery-ui/ui-bg_highlight-hard_70_000000_1x100.png -------------------------------------------------------------------------------- /webcontent/images/jquery-ui/ui-bg_highlight-soft_100_deedf7_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/webcontent/images/jquery-ui/ui-bg_highlight-soft_100_deedf7_1x100.png -------------------------------------------------------------------------------- /webcontent/images/jquery-ui/ui-bg_highlight-soft_25_ffef8f_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/webcontent/images/jquery-ui/ui-bg_highlight-soft_25_ffef8f_1x100.png -------------------------------------------------------------------------------- /webcontent/images/jquery-ui/ui-icons_2694e8_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/webcontent/images/jquery-ui/ui-icons_2694e8_256x240.png -------------------------------------------------------------------------------- /webcontent/images/jquery-ui/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/webcontent/images/jquery-ui/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /webcontent/images/jquery-ui/ui-icons_3d80b3_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/webcontent/images/jquery-ui/ui-icons_3d80b3_256x240.png -------------------------------------------------------------------------------- /webcontent/images/jquery-ui/ui-icons_72a7cf_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/webcontent/images/jquery-ui/ui-icons_72a7cf_256x240.png -------------------------------------------------------------------------------- /webcontent/images/jquery-ui/ui-icons_ffffff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/webcontent/images/jquery-ui/ui-icons_ffffff_256x240.png -------------------------------------------------------------------------------- /webcontent/images/openDIAS_64x64.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/webcontent/images/openDIAS_64x64.ico -------------------------------------------------------------------------------- /webcontent/images/openDIAS_sml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/webcontent/images/openDIAS_sml.png -------------------------------------------------------------------------------- /webcontent/images/opendias.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/webcontent/images/opendias.jpg -------------------------------------------------------------------------------- /webcontent/images/texture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/webcontent/images/texture.png -------------------------------------------------------------------------------- /webcontent/includes/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = local 2 | 3 | web_DATA = \ 4 | $(srcdir)/header.txt.* \ 5 | $(srcdir)/footer.txt.* \ 6 | jquery.canvas-loader.js \ 7 | jquery.easySlider.js \ 8 | jquery.gzoom.js \ 9 | jquery.tagsinput.js \ 10 | jquery.js \ 11 | jquery.mousewheel.js \ 12 | jquery-ui.min.js \ 13 | sprintf-0.7-beta1.js \ 14 | openDias.acquire.js \ 15 | openDias.docList.js \ 16 | openDias.filter.js \ 17 | openDias.loadDetails.js \ 18 | openDias.saveDetails.js \ 19 | openDias.accessControls.js \ 20 | openDias.accessMethods.js \ 21 | openDias.userdetails.js 22 | 23 | webdir = \ 24 | $(pkgdatadir)/webcontent/includes 25 | 26 | EXTRA_DIST = \ 27 | $(web_DATA) 28 | 29 | ## File created by the gnome-build tools 30 | 31 | -------------------------------------------------------------------------------- /webcontent/includes/footer.txt: -------------------------------------------------------------------------------- 1 | ---UPDATE_WARNING--- 2 | 3 | 4 | 5 | 6 |
    7 | 8 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /webcontent/includes/jquery.mousewheel.js: -------------------------------------------------------------------------------- 1 | /*! Copyright (c) 2009 Brandon Aaron (http://brandonaaron.net) 2 | * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 3 | * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. 4 | * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. 5 | * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. 6 | * 7 | * Version: 3.0.2 8 | * 9 | * Requires: 1.2.2+ 10 | */ 11 | 12 | (function($) { 13 | 14 | var types = ['DOMMouseScroll', 'mousewheel']; 15 | 16 | $.event.special.mousewheel = { 17 | setup: function() { 18 | if ( this.addEventListener ) 19 | for ( var i=types.length; i; ) 20 | this.addEventListener( types[--i], handler, false ); 21 | else 22 | this.onmousewheel = handler; 23 | }, 24 | 25 | teardown: function() { 26 | if ( this.removeEventListener ) 27 | for ( var i=types.length; i; ) 28 | this.removeEventListener( types[--i], handler, false ); 29 | else 30 | this.onmousewheel = null; 31 | } 32 | }; 33 | 34 | $.fn.extend({ 35 | mousewheel: function(fn) { 36 | return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel"); 37 | }, 38 | 39 | unmousewheel: function(fn) { 40 | return this.unbind("mousewheel", fn); 41 | } 42 | }); 43 | 44 | 45 | function handler(event) { 46 | var args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true; 47 | 48 | event = $.event.fix(event || window.event); 49 | event.type = "mousewheel"; 50 | 51 | if ( event.wheelDelta ) delta = event.wheelDelta/120; 52 | if ( event.detail ) delta = -event.detail/3; 53 | 54 | // Add events and delta to the front of the arguments 55 | args.unshift(event, delta); 56 | 57 | return $.event.handle.apply(this, args); 58 | } 59 | 60 | })(jQuery); 61 | -------------------------------------------------------------------------------- /webcontent/includes/local/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | web_DATA = \ 3 | $(srcdir)/generic.resource.* \ 4 | $(srcdir)/openDias.acquire.js.resource.* \ 5 | $(srcdir)/openDias.loadDetails.js.resource.* \ 6 | $(srcdir)/openDias.saveDetails.js.resource.* \ 7 | $(srcdir)/openDias.docList.js.resource.* \ 8 | $(srcdir)/openDias.filter.js.resource.* \ 9 | $(srcdir)/openDias.accessControls.js.resource.* 10 | 11 | webdir = \ 12 | $(pkgdatadir)/webcontent/includes/local 13 | 14 | EXTRA_DIST = \ 15 | $(web_DATA) 16 | 17 | -------------------------------------------------------------------------------- /webcontent/includes/local/generic.resource.de: -------------------------------------------------------------------------------- 1 | LOCAL_timeout_talking_to_server = 'Timeout während des Gesprächs mit dem Server'; 2 | LOCAL_error_talking_to_server = 'Fehler beim Gespräch mit dem Server'; 3 | LOCAL_date_format = 'yy/mm/dd'; 4 | LOCAL_odf_doc = 'ODF Dokument'; 5 | LOCAL_scanned_doc = 'Gescannt Dokument'; 6 | LOCAL_pdf_doc = 'PDF Dokument'; 7 | LOCAL_jpeg_img = 'JPEG Bilder'; 8 | LOCAL_unknown = 'unbekannt'; 9 | LOCAL_role_admin = 'Admin (können alle Vorgänge zu tun)'; 10 | LOCAL_role_user = 'Benutzer (alles zu tun, außer Zugriffskontrollen)'; 11 | LOCAL_role_view = 'Ansehen (kann Dokument nur anzeigen)'; 12 | LOCAL_role_add = 'Hinzufügen (Dokumente kann nur hinzufügen)'; 13 | LOCAL_howto_login_title = 'Login Hilfe'; 14 | LOCAL_howto_login = 'Geben Sie Ihren Benutzernamen und Ihr Passwort ein und drücken Sie \'login\' den Zugriff auf alle Funktionen.'; 15 | LOCAL_login_firsttime = 'Wenn Sie nur openDias installiert haben, lesen Sie bitte Authentisierung details für den Einstieg in.'; 16 | LOCAL_user_admin_title = 'Admin-Funktionen'; 17 | LOCAL_user_admin = 'Klicken Sie auf Ihren Namen, Ihre Daten ändern.'; 18 | -------------------------------------------------------------------------------- /webcontent/includes/local/generic.resource.en: -------------------------------------------------------------------------------- 1 | LOCAL_timeout_talking_to_server = 'Timeout while talking to the server'; 2 | LOCAL_error_talking_to_server = 'Error while talking to the server'; 3 | LOCAL_date_format = 'yy/mm/dd'; 4 | LOCAL_odf_doc = 'ODF Document'; 5 | LOCAL_scanned_doc = 'Scanned Document'; 6 | LOCAL_pdf_doc = 'PDF Document'; 7 | LOCAL_jpeg_img = 'JPEG Images'; 8 | LOCAL_unknown = 'unknown'; 9 | LOCAL_role_admin = 'Admin (can do all operations)'; 10 | LOCAL_role_user = 'User (everything, except update access)'; 11 | LOCAL_role_view = 'View (can view document only)'; 12 | LOCAL_role_add = 'Add (can add documents only)'; 13 | LOCAL_howto_login_title = 'Login Help'; 14 | LOCAL_howto_login = 'Enter your username and password and hit \'login\' to access all features.'; 15 | LOCAL_login_firsttime = 'If you"ve just installed openDias, please read Authentication Setup for details in getting started.'; 16 | LOCAL_user_admin_title = 'Admin features'; 17 | LOCAL_user_admin = 'Click your name to change your details.'; 18 | -------------------------------------------------------------------------------- /webcontent/includes/local/generic.resource.nl: -------------------------------------------------------------------------------- 1 | LOCAL_timeout_talking_to_server = 'Timeout tijdens de communicatie met de server'; 2 | LOCAL_error_talking_to_server = 'Fout tijdens de communicatie met de server'; 3 | LOCAL_date_format = 'yy/mm/dd'; 4 | LOCAL_odf_doc = 'ODF Document'; 5 | LOCAL_scanned_doc = 'Gescand Document'; 6 | LOCAL_pdf_doc = 'PDF Document'; 7 | LOCAL_jpeg_img = 'JPEG Afbeeldingen'; 8 | LOCAL_unknown = 'onbekend'; 9 | LOCAL_role_admin = 'Admin (mag alles)'; 10 | LOCAL_role_user = 'User (mag alles, behalve rechten toekennen)'; 11 | LOCAL_role_view = 'View (mag alleen documenten bekijken)'; 12 | LOCAL_role_add = 'Add (mag alleen documenten toevoegen)'; 13 | LOCAL_howto_login_title = 'Login Hulp'; 14 | LOCAL_howto_login = 'Voer je gebruikersnaam en wachtwoord in en druk op \'Login\' om alle mogelijkheden te gebruiken.'; 15 | LOCAL_login_firsttime = 'Als je openDIAS net hebt geïnstalleerd lees dan eerst Authentication Setup voor de eerste noodzakelijke stappen.'; 16 | LOCAL_user_admin_title = 'Admin opties'; 17 | LOCAL_user_admin = 'Klik op je gebruikersnaam om je gegevens aan te passen.'; 18 | -------------------------------------------------------------------------------- /webcontent/includes/local/openDias.accessControls.js.resource.de: -------------------------------------------------------------------------------- 1 | LOCAL_new_password_do_not_match = 'New Passwörter stimmen nicht überein'; 2 | LOCAL_details_updated = 'Details aktualisiert'; 3 | LOCAL_user_created = 'Benutzer erstellt'; 4 | -------------------------------------------------------------------------------- /webcontent/includes/local/openDias.accessControls.js.resource.en: -------------------------------------------------------------------------------- 1 | LOCAL_new_password_do_not_match = 'New passwords do not match.'; 2 | LOCAL_details_updated = 'Details Updated'; 3 | LOCAL_user_created = 'User Created'; 4 | -------------------------------------------------------------------------------- /webcontent/includes/local/openDias.accessControls.js.resource.nl: -------------------------------------------------------------------------------- 1 | LOCAL_new_password_do_not_match = 'Nieuwe wachtwoorden komen niet overeen.'; 2 | LOCAL_details_updated = 'Gegevens Bijgewerkt'; 3 | LOCAL_user_created = 'Gebruiker Aangemaakt'; 4 | -------------------------------------------------------------------------------- /webcontent/includes/local/openDias.acquire.js.resource.de: -------------------------------------------------------------------------------- 1 | LOCAL_error_getting_scan_progress = 'Fehler beim Abrufen der Scan-Fortschritt'; 2 | LOCAL_setting_up = 'Einrichten'; 3 | LOCAL_internal_error = 'interner Fehler'; 4 | LOCAL_waiting_on_the_database = 'Warten auf die Datenbank'; 5 | LOCAL_error_while_scanning = 'Fehler beim Scannen'; 6 | LOCAL_setting_up_the_scanner = 'Einrichten des Scanners'; 7 | LOCAL_scanning_in_progress = 'Scannen im Gange'; 8 | LOCAL_please_insert_page = 'Bitte geben Sie Seite'; 9 | LOCAL_timeout_waiting_for_next_page = 'Timeout beim Warten auf die nächste Seite'; 10 | LOCAL_converting_image_format = 'Konvertieren Bildformat'; 11 | LOCAL_error_converting_image_format = 'Fehler beim Konvertieren gescannten Bild-Format'; 12 | LOCAL_performing_ocr_on_image = 'OCR auf das Bild'; 13 | LOCAL_error_while_performing_ocr = 'Fehler beim Ausführen OCR'; 14 | LOCAL_try_again_in_a_minute = 'Versuchen Sie es in ein oder zwei Minuten'; 15 | LOCAL_sane_is_busy = 'Die SANE-Backend ist besetzt serviert eine Anfrage. Leider SANE kann nicht mehr als eine Anfrage zu einem Zeitpunkt. Versuchen Sie uns bald wieder.'; 16 | LOCAL_scan_complete = 'Scan-Vorgang abgeschlossen'; 17 | LOCAL_error_starting_next_page = 'Fehlersignalisierung der Scanner für die nächste Seite zu starten.'; 18 | LOCAL_failed_to_get_list_of_scanners = 'Kann eine Liste der verfügbaren Scanner zu holen.'; 19 | LOCAL_unable_to_start_scanning = 'Kann um den Scanvorgang zu starten'; 20 | LOCAL_on_host = 'auf dem Host'; 21 | LOCAL_x_pages = '%s seiten'; 22 | LOCAL_calculating_image_comparison_vector = 'Berechnung bildvergleich vektor'; 23 | LOCAL_ocr_default = 'deu'; 24 | -------------------------------------------------------------------------------- /webcontent/includes/local/openDias.acquire.js.resource.en: -------------------------------------------------------------------------------- 1 | LOCAL_error_getting_scan_progress = 'Error getting scan progress'; 2 | LOCAL_setting_up = 'Setting up'; 3 | LOCAL_internal_error = 'Internal Error'; 4 | LOCAL_waiting_on_the_database = 'Waiting on the database'; 5 | LOCAL_error_while_scanning = 'Error while scanning'; 6 | LOCAL_setting_up_the_scanner = 'Setting up the scanner'; 7 | LOCAL_scanning_in_progress = 'Scanning in progress'; 8 | LOCAL_please_insert_page = 'Please insert page'; 9 | LOCAL_timeout_waiting_for_next_page = 'Timeout while waiting for the next page'; 10 | LOCAL_converting_image_format = 'Converting image format'; 11 | LOCAL_error_converting_image_format = 'Error while converting scanned image format'; 12 | LOCAL_performing_ocr_on_image = 'Performing OCR on image'; 13 | LOCAL_error_while_performing_ocr = 'Error while performing OCR'; 14 | LOCAL_try_again_in_a_minute = 'Try again in a minute or two'; 15 | LOCAL_sane_is_busy = 'The SANE backend is busy serving a request. Unfortunately SANE cannot handle more than one request at a time. Try again soon'; 16 | LOCAL_scan_complete = 'Scan operation complete'; 17 | LOCAL_error_starting_next_page = 'Error signalling the scanner to restart for the next page'; 18 | LOCAL_failed_to_get_list_of_scanners = 'Unable to fetch a list of available scanners'; 19 | LOCAL_unable_to_start_scanning = 'Unable to start the scanning process'; 20 | LOCAL_on_host = 'on host'; 21 | LOCAL_x_pages = '%s pages'; 22 | LOCAL_calculating_image_comparison_vector = 'Calculating image comparison vector'; 23 | LOCAL_ocr_default = 'eng'; 24 | -------------------------------------------------------------------------------- /webcontent/includes/local/openDias.acquire.js.resource.nl: -------------------------------------------------------------------------------- 1 | LOCAL_error_getting_scan_progress = 'Fout in verkrijgen scanvoortgang'; 2 | LOCAL_setting_up = 'Initialiseren'; 3 | LOCAL_internal_error = 'Interne Fout'; 4 | LOCAL_waiting_on_the_database = 'Wachten op de database'; 5 | LOCAL_error_while_scanning = 'Fout tijdens het scannen'; 6 | LOCAL_setting_up_the_scanner = 'Initialiseren van de scanner'; 7 | LOCAL_scanning_in_progress = 'Scan wordt uitgevoerd'; 8 | LOCAL_please_insert_page = 'Pagina invoeren AUB'; 9 | LOCAL_timeout_waiting_for_next_page = 'Timeout tijdens het wachten op de volgende pagina'; 10 | LOCAL_converting_image_format = 'Converteren afbeeldingsformaat'; 11 | LOCAL_error_converting_image_format = 'Fout tijdens het converteren van het gescande afbeeldingsformaat'; 12 | LOCAL_performing_ocr_on_image = 'OCR wordt uitgevoerd op afbeelding'; 13 | LOCAL_error_while_performing_ocr = 'Fout tijdens het uitvoeren van de OCR'; 14 | LOCAL_try_again_in_a_minute = 'Probeer het over een minuut of twee nogeens'; 15 | LOCAL_sane_is_busy = 'De SANE backend voert al een opdracht uit. Jammer genoeg kan SANE tegelijkertijd maar een opdracht aan. Probeer het zo meteen nogeens'; 16 | LOCAL_scan_complete = 'Scan-opdracht uitgevoerd'; 17 | LOCAL_error_starting_next_page = 'Fout tijdens communicatie met de scanner om de volgende pagina te scannen'; 18 | LOCAL_failed_to_get_list_of_scanners = 'Kan de lijst met beschikbare scanners niet ophalen'; 19 | LOCAL_unable_to_start_scanning = 'Kan de scan-opdracht niet starten'; 20 | LOCAL_on_host = 'op host'; 21 | LOCAL_x_pages = '%s bladzijden'; 22 | LOCAL_calculating_image_comparison_vector = 'Berekenen afbeelding vergelijkbaarheidsfactor'; 23 | LOCAL_ocr_default = 'nld'; 24 | -------------------------------------------------------------------------------- /webcontent/includes/local/openDias.docList.js.resource.de: -------------------------------------------------------------------------------- 1 | // This file IS empty atm. 2 | -------------------------------------------------------------------------------- /webcontent/includes/local/openDias.docList.js.resource.en: -------------------------------------------------------------------------------- 1 | // This file IS empty atm. 2 | -------------------------------------------------------------------------------- /webcontent/includes/local/openDias.docList.js.resource.nl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearscene/opendias/929e556b1e7d0432ec6bf7ce1040eb9a6060a1fb/webcontent/includes/local/openDias.docList.js.resource.nl -------------------------------------------------------------------------------- /webcontent/includes/local/openDias.filter.js.resource.de: -------------------------------------------------------------------------------- 1 | LOCAL_unable_to_get_filtered_list = 'Kann nicht eine gefilterte Liste zu bekommen'; 2 | LOCAL_will_return_estimated_x_docs = 'Wird schätzungsweise %s docs zurück'; 3 | -------------------------------------------------------------------------------- /webcontent/includes/local/openDias.filter.js.resource.en: -------------------------------------------------------------------------------- 1 | LOCAL_unable_to_get_filtered_list = 'Unable to get a filtered list'; 2 | LOCAL_will_return_estimated_x_docs = 'Will return an estimated %s docs'; 3 | -------------------------------------------------------------------------------- /webcontent/includes/local/openDias.filter.js.resource.nl: -------------------------------------------------------------------------------- 1 | LOCAL_unable_to_get_filtered_list = 'Kan geen selectie maken'; 2 | LOCAL_will_return_estimated_x_docs = 'Geeft een geschat aantal van %s documenten'; 3 | -------------------------------------------------------------------------------- /webcontent/includes/local/openDias.loadDetails.js.resource.de: -------------------------------------------------------------------------------- 1 | LOCAL_unable_to_get_doc_details = 'Kann Dokument zu erhalten'; 2 | LOCAL_open_odf_doc = 'Öffnen ODF Dokument'; 3 | LOCAL_open_page_fullsize = 'Öffnen Sie die Seite %s fillsize'; 4 | LOCAL_open_pdf_doc = 'Öffnen PDF Dokument'; 5 | LOCAL_pdf_thumb_not_available_attempt_to_generate_now = '

    PDF Thumbnail ist nicht verfügbar

    Versuchen Sie jetzt generieren.

    '; 6 | LOCAL_generate_thumbnail = 'regenerieren Thumbnail'; 7 | LOCAL_error_generating_thumbnail = 'Kann Thumbnail generieren'; 8 | LOCAL_removing_tag = 'Entfernen tag'; 9 | LOCAL_add_tag_default_text = 'Add a tag'; 10 | LOCAL_print = 'Drucken'; 11 | LOCAL_error_checking_for_similar = 'Kann ähnliche Dokumente zu finden'; 12 | LOCAL_apply_title_tags = 'Übernehmen Sie diese tags / Titel'; 13 | LOCAL_confidence_in_doc_match = 'Das Vertrauen in dieses Dokument ein ähnliches Spiel, um Ihr neues Dokument: %s'; 14 | LOCAL_very_high = 'Sehr Hoch'; 15 | LOCAL_high = 'Höchsttemperatur'; 16 | LOCAL_good = 'Gut'; 17 | -------------------------------------------------------------------------------- /webcontent/includes/local/openDias.loadDetails.js.resource.en: -------------------------------------------------------------------------------- 1 | LOCAL_unable_to_get_doc_details = 'Unable to get document'; 2 | LOCAL_open_odf_doc = 'Open ODF Document'; 3 | LOCAL_open_page_fullsize = 'Open page %s fillsize'; 4 | LOCAL_open_pdf_doc = 'Open PDF Document'; 5 | LOCAL_pdf_thumb_not_available_attempt_to_generate_now = '

    PDF Thumbnail is not available

    Attempt to generate now.

    '; 6 | LOCAL_generate_thumbnail = 'Regenerate Thumbnail'; 7 | LOCAL_error_generating_thumbnail = 'Unable to generate thumbnail'; 8 | LOCAL_removing_tag = 'Removing tag'; 9 | LOCAL_add_tag_default_text = 'Add a tag'; 10 | LOCAL_print = 'Print'; 11 | LOCAL_error_checking_for_similar = 'Unable to find similar documents'; 12 | LOCAL_apply_title_tags = 'Apply these tags / title'; 13 | LOCAL_confidence_in_doc_match = 'Confidence in this document being a similar match to your new document is: %s'; 14 | LOCAL_very_high = 'Very High'; 15 | LOCAL_high = 'High'; 16 | LOCAL_good = 'Good'; 17 | -------------------------------------------------------------------------------- /webcontent/includes/local/openDias.loadDetails.js.resource.nl: -------------------------------------------------------------------------------- 1 | LOCAL_unable_to_get_doc_details = 'Kan het document niet ophalen'; 2 | LOCAL_open_odf_doc = 'Open ODF Document'; 3 | LOCAL_open_page_fullsize = 'Open bladzijde %s in volledig scherm'; 4 | LOCAL_open_pdf_doc = 'Open PDF Document'; 5 | LOCAL_pdf_thumb_not_available_attempt_to_generate_now = '

    PDF Miniatuur is niet beschikbaar

    Probeer het nu te maken.

    '; 6 | LOCAL_generate_thumbnail = 'Miniatuur opnieuw maken'; 7 | LOCAL_error_generating_thumbnail = 'Kan miniatuur niet maken'; 8 | LOCAL_removing_tag = 'Categorie Verwijderen'; 9 | LOCAL_add_tag_default_text = 'Categorie Toevoegen'; 10 | LOCAL_print = 'Afdrukken'; 11 | LOCAL_error_checking_for_similar = 'Kan geen vergelijkbare documenten vinden'; 12 | LOCAL_apply_title_tags = 'Pas deze titel en categorieën toe'; 13 | LOCAL_confidence_in_doc_match = 'Waarschijnlijkheid waarin dit document vergelijkbaar is met het nieuwe document is: %s'; 14 | LOCAL_very_high = 'Zeer Hoog'; 15 | LOCAL_high = 'Hoog'; 16 | LOCAL_good = 'Goed'; 17 | -------------------------------------------------------------------------------- /webcontent/includes/local/openDias.saveDetails.js.resource.de: -------------------------------------------------------------------------------- 1 | LOCAL_error_while_updating = 'Fehler beim Aktualisieren der Informationen'; 2 | LOCAL_error_while_deleting_doc = 'Ein Fehler ist aufgetreten Löschen Sie das Dokument.'; 3 | LOCAL_sure_to_delete_doc = 'Löschen Sie dieses Dokument. Sind Sie sicher?'; 4 | LOCAL_default_title = 'Neu (untitled) Dokument.'; 5 | LOCAL_default_title_warning = 'Document Title ist immer noch der Standard.'; 6 | LOCAL_default_date = ' - Kein Datum -'; 7 | LOCAL_default_date_warning = 'Dokument Datum ist immer noch der Standard.'; 8 | LOCAL_no_tags_assigned = 'Dokument wurde nicht zugewiesenen Tags'; 9 | LOCAL_doc_incomplete_warning = 'Document Details sind unvollständig'; 10 | -------------------------------------------------------------------------------- /webcontent/includes/local/openDias.saveDetails.js.resource.en: -------------------------------------------------------------------------------- 1 | LOCAL_error_while_updating = 'An error occurred while updating the information'; 2 | LOCAL_error_while_deleting_doc = 'An error occurred deleting the document.'; 3 | LOCAL_sure_to_delete_doc = 'Delete this document. Are you sure?'; 4 | LOCAL_default_title = 'New (untitled) document.'; 5 | LOCAL_default_title_warning = 'Document Title is still the default'; 6 | LOCAL_default_date = ' - No date -'; 7 | LOCAL_default_date_warning = 'Document Date is still the default'; 8 | LOCAL_no_tags_assigned = 'Document has not assigned tags'; 9 | LOCAL_doc_incomplete_warning = 'Document details are incomplete'; 10 | -------------------------------------------------------------------------------- /webcontent/includes/local/openDias.saveDetails.js.resource.nl: -------------------------------------------------------------------------------- 1 | LOCAL_error_while_updating = 'Er is een fout opgetreden tijdens het bijwerken van de informatie'; 2 | LOCAL_error_while_deleting_doc = 'Er is een fout opgetreden tijdens het verwijderen van het document.'; 3 | LOCAL_sure_to_delete_doc = 'Dit document verwijderen. Weet u het zeker?'; 4 | LOCAL_default_title = 'Nieuw (naamloos) document.'; 5 | LOCAL_default_title_warning = 'Documentnaam is nog niet aangepast'; 6 | LOCAL_default_date = '- - Geen datum -'; 7 | LOCAL_default_date_warning = 'Documentdatum is nog niet aangepast'; 8 | LOCAL_no_tags_assigned = 'Document is niet gecategoriseerd'; 9 | LOCAL_doc_incomplete_warning = 'Documentgegevens zijn incompleet'; 10 | -------------------------------------------------------------------------------- /webcontent/includes/openDias.filter.js: -------------------------------------------------------------------------------- 1 | var filteredDocs; 2 | var master; 3 | 4 | $(document).ready(function () { 5 | 6 | $('#filterTab').click(function () { 7 | $('#filterOptions').slideToggle('slow'); 8 | }); 9 | 10 | $('#startDate').datepicker({ 11 | dateFormat: LOCAL_date_format 12 | }); 13 | $('#endDate').datepicker({ 14 | dateFormat: LOCAL_date_format 15 | }); 16 | 17 | $('#doFilter').click(function () { 18 | reloadResults(); 19 | }); 20 | 21 | $('#textSearch').keypress(function () { 22 | getRecordCount() 23 | }); 24 | $('#textSearch').change(function () { 25 | getRecordCount() 26 | }); 27 | $('#isActionRequired').change(function () { 28 | getRecordCount() 29 | }); 30 | $('#startDate').change(function () { 31 | getRecordCount() 32 | }); 33 | $('#endDate').change(function () { 34 | getRecordCount() 35 | }); 36 | 37 | }); 38 | 39 | function getRecordCount() { 40 | $.ajax({ 41 | url: "/opendias/dynamic", 42 | dataType: "xml", 43 | timeout: AJAX_TIMEOUT, 44 | data: { 45 | action: "docFilter", 46 | subaction: "count", 47 | textSearch: $('#textSearch').val(), 48 | isActionRequired: $('#isActionRequired').is(':checked'), 49 | startDate: $('#startDate').val(), 50 | endDate: $('#endDate').val(), 51 | tags: $('#tags').val() 52 | }, 53 | cache: false, 54 | type: "POST", 55 | success: function (data) { 56 | if ($(data).find('error').text()) { 57 | alert(LOCAL_unable_to_get_filtered_list + ": " + $(data).find('error').text()); 58 | } else { 59 | $('#filterProgress').text(sprintf(LOCAL_will_return_estimated_x_docs, $(data).find('DocFilter').find('count').text())); 60 | } 61 | }, 62 | error: function (x, t, m) { 63 | if (t == "timeout") { 64 | alert("[f001] " + LOCAL_timeout_talking_to_server); 65 | } else { 66 | alert("[f001] " + LOCAL_error_talking_to_server + ": " + t + "\n" + m); 67 | } 68 | }, 69 | }); 70 | } 71 | -------------------------------------------------------------------------------- /webcontent/includes/openDias.userdetails.js: -------------------------------------------------------------------------------- 1 | AJAX_TIMEOUT = 10000; 2 | $(document).ready(function () { 3 | 4 | // Set the language dropdown to the current value 5 | var currentLang = getCookie("requested_lang"); 6 | if (currentLang != null) { 7 | $('#language').val(currentLang); 8 | } 9 | 10 | // Handle an update to the language setting 11 | $('#language').change(function () { 12 | var setting = $('#language').val(); 13 | if (setting == '--') { 14 | deleteCookie("requested_lang"); 15 | } else { 16 | setCookie("requested_lang", setting); 17 | } 18 | window.location.reload(true); 19 | }); 20 | 21 | }); 22 | 23 | function setCookie(name, value, days) { 24 | if (days) { 25 | var date = new Date(); 26 | date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); 27 | var expires = "; expires=" + date.toGMTString(); 28 | } else var expires = ""; 29 | document.cookie = name + "=" + value + expires + "; path=/"; 30 | } 31 | 32 | function getCookie(name) { 33 | var nameEQ = name + "="; 34 | var ca = document.cookie.split(';'); 35 | for (var i = 0; i < ca.length; i++) { 36 | var c = ca[i]; 37 | while (c.charAt(0) == ' ') c = c.substring(1, c.length); 38 | if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length); 39 | } 40 | return null; 41 | } 42 | 43 | function deleteCookie(name) { 44 | setCookie(name, "", -1); 45 | } 46 | -------------------------------------------------------------------------------- /webcontent/style/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | web_DATA = \ 3 | common.css \ 4 | print.css \ 5 | datepicker.css \ 6 | jquery.easyslider.css \ 7 | jquery.tagsinput.css \ 8 | jquery.gzoom.css \ 9 | jquery-ui.css 10 | 11 | webdir = \ 12 | $(pkgdatadir)/webcontent/style 13 | 14 | EXTRA_DIST = \ 15 | $(web_DATA) 16 | 17 | ## File created by the gnome-build tools 18 | 19 | -------------------------------------------------------------------------------- /webcontent/style/jquery.easyslider.css: -------------------------------------------------------------------------------- 1 | #slider{} 2 | #slider ul, #slider li{ 3 | margin:0; 4 | padding:0; 5 | list-style:none; 6 | } 7 | #slider li{ 8 | width:300px; 9 | overflow:hidden; 10 | } 11 | #prevBtn, #nextBtn{ 12 | display:block; 13 | width:30px; 14 | height:77px; 15 | position:absolute; 16 | left:-28px; 17 | top:71px; 18 | } 19 | #nextBtn{ 20 | left:322px; 21 | } 22 | #prevBtn a, #nextBtn a{ 23 | display:block; 24 | width:30px; 25 | height:77px; 26 | background:url(/opendias/images/easySlider/btn_prev.png) no-repeat 0 0; 27 | } 28 | #nextBtn a{ 29 | background:url(/opendias/images/easySlider/btn_next.png) no-repeat 0 0; 30 | } 31 | -------------------------------------------------------------------------------- /webcontent/style/jquery.gzoom.css: -------------------------------------------------------------------------------- 1 | /* miniZoomPan styles */ 2 | .gzoomwrap { 3 | float:left; 4 | margin:0 10px 0 0; 5 | } 6 | .minizoompan { 7 | background: #fff; 8 | position: relative; /* always set to relative or offset() won't work */ 9 | border: 1px solid lightgray; 10 | padding: 0; 11 | margin: 0; 12 | } 13 | 14 | .minizoompan span.loader { /* the loader label*/ 15 | position:absolute; 16 | left:0; 17 | top:0; 18 | z-index: 1; 19 | display: none; 20 | color: #000; 21 | background: #fff; 22 | font: normal 9px Arial, Verdana; 23 | padding: 3px; 24 | } 25 | .minizoompan .zoomIcon { /* the zoom icon */ 26 | position:absolute; 27 | cursor:pointer; 28 | left:0; 29 | top:0; 30 | z-index: 1; 31 | display: none; 32 | } 33 | 34 | .gzoombutton { 35 | float:left; 36 | cursor:pointer; 37 | } 38 | .gzoomSlider { 39 | float:left; 40 | margin:3px 5px 0 5px; 41 | } 42 | 43 | #gzoomoverlay { 44 | position: absolute; 45 | top: 0; 46 | left: 0; 47 | z-index: 90; 48 | width: 100%; 49 | height: 500px; 50 | } 51 | #gzoomlbox { 52 | position: absolute; 53 | top: 0; 54 | left: 0; 55 | width: 100%; 56 | z-index: 100; 57 | text-align: center; 58 | line-height: 0; 59 | } 60 | #gzoomlbox a img { 61 | border: none; 62 | } 63 | #imagebox { 64 | position: relative; 65 | background-color: #fff; 66 | width: 250px; 67 | height: 250px; 68 | margin: 0 auto; 69 | } 70 | #gzoom-cont-img { padding: 10px; } 71 | 72 | #lboximgdatacontainer { 73 | font: 10px Verdana, Helvetica, sans-serif; 74 | background-color: #fff; 75 | margin: 0 auto; 76 | line-height: 1.4em; 77 | overflow: auto; 78 | width: 100%; 79 | padding: 0 10px 0; 80 | padding: 0 10px 10px 10px; 81 | color:#666; 82 | } 83 | #gzoomloading { 84 | position: absolute; 85 | top: 40%; 86 | left: 0%; 87 | height: 25%; 88 | width: 100%; 89 | text-align: center; 90 | line-height: 0; 91 | } 92 | 93 | #lboximgdatacontainer #gzoomlbox-image-details { 94 | width: 70%; 95 | float: left; 96 | text-align: left; 97 | } 98 | #gzoom-image-caption { font-weight: bold; } 99 | 100 | -------------------------------------------------------------------------------- /webcontent/style/jquery.tagsinput.css: -------------------------------------------------------------------------------- 1 | div.tagsinput { border:0px solid #CCC; padding:5px; width:300px; } 2 | div.tagsinput span.tag { border: 1px solid #a5d24a; -moz-border-radius:2px; -webkit-border-radius:2px; display: block; float: left; padding: 5px; text-decoration:none; background: #cde69c; color: #638421; margin-right: 5px; margin-bottom:5px;font-family: helvetica; font-size:13px;} 3 | div.tagsinput span.tag { border: 1px solid #4aa5d2; -moz-border-radius:2px; -webkit-border-radius:2px; display: block; float: left; padding: 5px; text-decoration:none; background: #9ccde6; color: #216384; margin-right: 5px; margin-bottom:5px;font-family: helvetica; font-size:13px;} 4 | div.tagsinput span.tag a { font-weight: bold; color: #82ad2b; text-decoration:none; font-size: 11px; } 5 | div.tagsinput input { width:80px; margin:0px; font-family: helvetica; font-size: 13px; border:1px solid transparent; padding:5px; background: transparent; color: #000; outline:0px; margin-right:5px; margin-bottom:5px; } 6 | div.tagsinput div { display:block; float: left; } 7 | .tags_clear { clear: both; width: 100%; height: 0px; } 8 | -------------------------------------------------------------------------------- /webcontent/style/print.css: -------------------------------------------------------------------------------- 1 | body { 2 | width: auto; 3 | border: 0px; 4 | margin: 0px; 5 | padding: 0px; 6 | } 7 | #header, #menu, #rightPane, #footerpadding, #footer, h2, #saveAlert, button, .gzoomSlider, .gzoombutton, .loader, #prevBtn, #nextBtn { 8 | display: none; 9 | } 10 | #leftPane { 11 | width: auto !important; 12 | padding: 0px; 13 | margin: 0px; 14 | border: 0px; 15 | } 16 | #picBorder { 17 | border: 0px; 18 | margin: 0px; 19 | padding: 0px; 20 | } 21 | #slider[style] { 22 | width: auto !important; 23 | height: auto !important; 24 | border: 0px; 25 | margin: 0px; 26 | padding: 0px; 27 | } 28 | #slider ul[style] { 29 | width: auto !important; 30 | height: auto !important; 31 | border: 0px; 32 | margin: 0px; 33 | padding: 0px; 34 | } 35 | #slider ul li[style] { 36 | width: auto !important; 37 | height: auto !important; 38 | border: 0px; 39 | margin: 0px; 40 | padding: 0px; 41 | } 42 | .scanImageContainer[style] { 43 | overflow: visible; 44 | border: 0px; 45 | margin: 0px; 46 | padding: 0px; 47 | width: auto !important; 48 | height: auto !important; 49 | } 50 | img[style] { 51 | page-break-after: always; 52 | border: 0px; 53 | margin: 0px; 54 | padding: 0px; 55 | width: auto!important; 56 | height: auto !important; 57 | max-height: 100% !important; 58 | max-width: 100% !important; 59 | } 60 | --------------------------------------------------------------------------------