Skip to content

Commit

Permalink
0.8.7 pre-release
Browse files Browse the repository at this point in the history
git-svn-id: http://yagf.googlecode.com/svn/trunk@166 bb55e26e-657b-11de-982f-55b50260c994
  • Loading branch information
andrei.borovsky@gmail.com committed Aug 28, 2011
1 parent 81b1b20 commit e2ea776
Show file tree
Hide file tree
Showing 9 changed files with 81 additions and 19 deletions.
10 changes: 5 additions & 5 deletions CMakeLists.txt
Expand Up @@ -2,11 +2,11 @@ project(yagf C CXX)
cmake_minimum_required(VERSION 2.6.0) cmake_minimum_required(VERSION 2.6.0)
set (CMAKE_IN_SOURCE_BUILD TRUE) set (CMAKE_IN_SOURCE_BUILD TRUE)
set(SOURCES src/main.cpp src/mainform.cpp src/qgraphicsinput.cpp src/utils.cpp src/FileChannel.cpp src/spellchecker.cpp src/FileToolBar.cpp src/BlockAnalysis.cpp src/PageAnalysis.cpp set(SOURCES src/main.cpp src/mainform.cpp src/qgraphicsinput.cpp src/utils.cpp src/FileChannel.cpp src/spellchecker.cpp src/FileToolBar.cpp src/BlockAnalysis.cpp src/PageAnalysis.cpp
src/SkewAnalysis.cpp src/CCAnalysis.cpp src/qxtgraphicsproxywidget.cpp src/popplerdialog.cpp src/pdfextractor.cpp src/pdf2ppt.cpp) src/SkewAnalysis.cpp src/CCAnalysis.cpp src/qxtgraphicsproxywidget.cpp src/popplerdialog.cpp src/pdfextractor.cpp src/pdf2ppt.cpp src/ghostscr.cpp src/configdialog.cpp)
set(INT_SOURCES src/preload.c) set(INT_SOURCES src/preload.c)
set(UIS src/mainform.ui src/popplerdialog.ui) set(UIS src/mainform.ui src/popplerdialog.ui src/configdialog.ui)
set(MOC_HEADERS src/mainform.h src/FileChannel.h src/qgraphicsinput.h src/FileToolBar.h src/qxtgraphicsproxywidget.h src/qxtgraphicsview.h set(MOC_HEADERS src/mainform.h src/FileChannel.h src/qgraphicsinput.h src/FileToolBar.h src/qxtgraphicsproxywidget.h src/qxtgraphicsview.h
src/popplerdialog.h src/pdfextractor.h src/pdf2ppt.h) src/popplerdialog.h src/pdfextractor.h src/pdf2ppt.h src/configdialog.h)
set (yagf_RCCS src/yagf.qrc) set (yagf_RCCS src/yagf.qrc)
set(QM_FILES yagf_ru.qm yagf_lt.qm yagf_de.qm yagf_pl.qm yagf_uk.qm) set(QM_FILES yagf_ru.qm yagf_lt.qm yagf_de.qm yagf_pl.qm yagf_uk.qm)
set (LIB_PATH_SUFFIX ) set (LIB_PATH_SUFFIX )
Expand Down Expand Up @@ -56,10 +56,10 @@ set(CPACK_BINARY_TGZ OFF)
set(CPACK_BINARY_TZ OFF) set(CPACK_BINARY_TZ OFF)
set(CPACK_BINARY_TBZ2 OFF) set(CPACK_BINARY_TBZ2 OFF)
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Graphical front-end for cuneiform OCR tool") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Graphical front-end for cuneiform OCR tool")
set(CPACK_PACKAGE_VERSION 0.8.6) set(CPACK_PACKAGE_VERSION 0.8.7)
set(CPACK_PACKAGE_VERSION_MAJOR "0") set(CPACK_PACKAGE_VERSION_MAJOR "0")
set(CPACK_PACKAGE_VERSION_MINOR "8") set(CPACK_PACKAGE_VERSION_MINOR "8")
set(CPACK_PACKAGE_VERSION_PATCH "6") set(CPACK_PACKAGE_VERSION_PATCH "7")
set(CPACK_STRIP_FILES bin/yagf bin/libyagfpreload) set(CPACK_STRIP_FILES bin/yagf bin/libyagfpreload)
set(CPACK_SOURCE_TBZ2 "OFF") set(CPACK_SOURCE_TBZ2 "OFF")
set(CPACK_SOURCE_TGZ "ON") set(CPACK_SOURCE_TGZ "ON")
Expand Down
4 changes: 4 additions & 0 deletions ChangeLog
@@ -1,3 +1,7 @@
* Sun Aug 28 2011 Andrei Borovsky <anb@symmetrica.net> - 0.8.7
- Tesseract support added
- PDF import added
- Dictionary selection bug fixed
* Sun Feb 20 2011 Andrei Borovsky <anb@symmetrica.net> - 0.8.6 * Sun Feb 20 2011 Andrei Borovsky <anb@symmetrica.net> - 0.8.6
- Some bugs fixed - Some bugs fixed
- The default recognition language is now set according to the user's locale - The default recognition language is now set according to the user's locale
Expand Down
9 changes: 5 additions & 4 deletions DESCRIPTION
@@ -1,12 +1,13 @@
YAGF is a graphical front-end for cuneiform OCR tool. YAGF is a graphical front-end for cuneiform and tesseract OCR tools.
With YAGF you can open already scanned image files or obtain new images via XSane (scanning results are automatically passed to YAGF). With YAGF you can open already scanned image files or obtain new images via XSane (scanning results are automatically passed to YAGF).
Once you have a scanned image you can prepare it for recognition, select particular image areas for recognition, set the recognition language and so no. Once you have a scanned image you can prepare it for recognition, select particular image areas for recognition, set the recognition language and so no.
Recognized text is displayed in a editor window where it can be corrected, saved to disk or copied to clipboard. Recognized text is displayed in a editor window where it can be corrected, saved to disk or copied to clipboard.
YAGF also provides some facilities for a multi-page recognition (see the online help for more details). YAGF also provides some facilities for a multi-page recognition (see the online help for more details).


Building YAGF requires: Building YAGF requires:
qt4 development tools version > 4.32 qt4 development tools version > 4.5
libaspell development package libaspell development package
Running YAGF requires: Running YAGF requires:
Qt 4.2 or later, aspell Qt 4.5 or later, aspell
Of course it is desirable to have xsane installed. Of course it is desirable to have xsane installed.
PDFimport is done using either pdftoppm or gs utilities. Make sure at least one of these is installed if you are going to recognize text from PDFs.
7 changes: 5 additions & 2 deletions src/configdialog.cpp
Expand Up @@ -32,7 +32,10 @@ int ConfigDialog::selectedEngine()


void ConfigDialog::setTessDataPath(const QString &value) void ConfigDialog::setTessDataPath(const QString &value)
{ {
if (value.isEmpty()) { ui->lineEdit->setText(value);
}


} QString ConfigDialog::tessdataPath()
{
return ui->lineEdit->text();
} }
12 changes: 9 additions & 3 deletions src/configdialog.ui
Expand Up @@ -6,12 +6,16 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>400</width> <width>344</width>
<height>237</height> <height>237</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Dialog</string> <string>OCR Settings</string>
</property>
<property name="windowIcon">
<iconset resource="yagf.qrc">
<normaloff>:/yagf.png</normaloff>:/yagf.png</iconset>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_4"> <layout class="QHBoxLayout" name="horizontalLayout_4">
<item> <item>
Expand Down Expand Up @@ -96,7 +100,9 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<resources/> <resources>
<include location="yagf.qrc"/>
</resources>
<connections> <connections>
<connection> <connection>
<sender>buttonBox</sender> <sender>buttonBox</sender>
Expand Down
19 changes: 17 additions & 2 deletions src/mainform.cpp
Expand Up @@ -66,8 +66,9 @@
#include "pdfextractor.h" #include "pdfextractor.h"
#include "pdf2ppt.h" #include "pdf2ppt.h"
#include "ghostscr.h" #include "ghostscr.h"
#include "configdialog.h"


const QString version = "0.8.6"; const QString version = "0.8.7";
const QString outputBase = "output"; const QString outputBase = "output";
const QString outputExt = ".txt"; const QString outputExt = ".txt";


Expand Down Expand Up @@ -295,6 +296,20 @@ void MainForm::findTessDataPath()
return; return;
} }


void MainForm::showConfigDlg()
{
ConfigDialog dialog(this);
if (selectedEngine == UseCuneiform)
dialog.setSelectedEngine(0);
else
dialog.setSelectedEngine(1);
dialog.setTessDataPath(tessdataPath);
if (dialog.exec()) {
selectedEngine = dialog.selectedEngine() == 0 ? UseCuneiform : UseTesseract;
tessdataPath = dialog.tessdataPath();
}
}

void MainForm::importPDF() void MainForm::importPDF()
{ {
if (!pdfx) { if (!pdfx) {
Expand Down Expand Up @@ -986,7 +1001,7 @@ void MainForm::showAboutDlg()
{ {
QPixmap icon; QPixmap icon;
icon.load(":/yagf.png"); icon.load(":/yagf.png");
QMessageBox aboutBox(QMessageBox::NoIcon, trUtf8("About YAGF"), trUtf8("<p align=\"center\"><b>YAGF - Yet Another Graphical Front-end for cuneiform</b></p><p align=\"center\">Version %1</p> <p align=\"center\">Ⓒ 2009-2011 Andrei Borovsky</p> This is a free software distributed under GPL v3. Visit <a href=\"http://symmetrica.net/cuneiform-linux/yagf-en.html\">http://symmetrica.net/cuneiform-linux/yagf-en.html</a> for more details.").arg(version), QMessageBox::Ok); QMessageBox aboutBox(QMessageBox::NoIcon, trUtf8("About YAGF"), trUtf8("<p align=\"center\"><b>YAGF - Yet Another Graphical Front-end for cuneiform and tesseract OCR engines</b></p><p align=\"center\">Version %1</p> <p align=\"center\">Ⓒ 2009-2011 Andrei Borovsky</p> This is a free software distributed under GPL v3. Visit <a href=\"http://symmetrica.net/cuneiform-linux/yagf-en.html\">http://symmetrica.net/cuneiform-linux/yagf-en.html</a> for more details.").arg(version), QMessageBox::Ok);
aboutBox.setIconPixmap(icon); aboutBox.setIconPixmap(icon);
QList<QLabel *> labels = aboutBox.findChildren<QLabel *>(); QList<QLabel *> labels = aboutBox.findChildren<QLabel *>();
for (int i = 0; i < labels.count(); i++) { for (int i = 0; i < labels.count(); i++) {
Expand Down
1 change: 1 addition & 0 deletions src/mainform.h
Expand Up @@ -91,6 +91,7 @@ private slots:
void unalignButtonClicked(); void unalignButtonClicked();
void hideToolBar(); void hideToolBar();
void importPDF(); void importPDF();
void showConfigDlg();
void addPDFPage(QString pageName); void addPDFPage(QString pageName);
void finishedPDF(); void finishedPDF();
protected: protected:
Expand Down
32 changes: 32 additions & 0 deletions src/mainform.ui
Expand Up @@ -105,7 +105,14 @@
<addaction name="actionOnlineHelp"/> <addaction name="actionOnlineHelp"/>
<addaction name="actionAbout"/> <addaction name="actionAbout"/>
</widget> </widget>
<widget class="QMenu" name="menu_Settings">
<property name="title">
<string>&amp;Settings</string>
</property>
<addaction name="actionOCR_Settings"/>
</widget>
<addaction name="menuFile"/> <addaction name="menuFile"/>
<addaction name="menu_Settings"/>
<addaction name="menu_Help"/> <addaction name="menu_Help"/>
</widget> </widget>
<widget class="QToolBar" name="toolBar"> <widget class="QToolBar" name="toolBar">
Expand Down Expand Up @@ -489,6 +496,14 @@
<string>Import pages from PDF documents</string> <string>Import pages from PDF documents</string>
</property> </property>
</action> </action>
<action name="actionOCR_Settings">
<property name="text">
<string>OCR Settings</string>
</property>
<property name="toolTip">
<string>Set up the OCR parameters</string>
</property>
</action>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget> <customwidget>
Expand Down Expand Up @@ -613,6 +628,22 @@
</hint> </hint>
</hints> </hints>
</connection> </connection>
<connection>
<sender>actionOCR_Settings</sender>
<signal>triggered()</signal>
<receiver>MainWindow</receiver>
<slot>showConfigDlg()</slot>
<hints>
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel">
<x>959</x>
<y>568</y>
</hint>
</hints>
</connection>
</connections> </connections>
<slots> <slots>
<slot>rotateCWButtonClicked()</slot> <slot>rotateCWButtonClicked()</slot>
Expand All @@ -622,5 +653,6 @@
<slot>decreaseButtonClicked()</slot> <slot>decreaseButtonClicked()</slot>
<slot>hideToolBar()</slot> <slot>hideToolBar()</slot>
<slot>importPDF()</slot> <slot>importPDF()</slot>
<slot>showConfigDlg()</slot>
</slots> </slots>
</ui> </ui>
6 changes: 3 additions & 3 deletions yagf.spec
Expand Up @@ -9,19 +9,19 @@
# norootforbuild # norootforbuild


Name: yagf Name: yagf
Version: 0.8.6 Version: 0.8.7
Release: 1 Release: 1
URL: http://symmetrica.net/cuneiform-linux/yagf-ru.html URL: http://symmetrica.net/cuneiform-linux/yagf-ru.html
License: GPLv3+ License: GPLv3+
Source0: %{name}-%{version}.tar.gz Source0: %{name}-%{version}.tar.gz
Group: Productivity/Graphics/Other Group: Productivity/Graphics/Other
Summary: Graphical frontend for Cuneiform OCR tool Summary: Graphical frontend for Cuneiform and Tesseract OCR tools
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: libqt4-devel cmake update-desktop-files fdupes BuildRequires: libqt4-devel cmake update-desktop-files fdupes
Requires: libqt4 >= 4.5 Requires: libqt4 >= 4.5


%description %description
YAGF is a graphical front-end for Cuneiform OCR tool. YAGF is a graphical front-end for Cuneiform and Tesseract OCR tools.
With YAGF you can open already scanned image files or obtain new images via With YAGF you can open already scanned image files or obtain new images via
XSane (scanning results are automatically passed to YAGF). XSane (scanning results are automatically passed to YAGF).
Once you have a scanned image you can prepare it for recognition, select Once you have a scanned image you can prepare it for recognition, select
Expand Down

0 comments on commit e2ea776

Please sign in to comment.