commit 0c7ea419dbac3ac6b838face9dd95f6cf1743ef8 Author: Nikita Orlov Date: Wed Feb 12 18:42:00 2020 +0300 initial commit diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..5c98b42 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,2 @@ +# Default ignored files +/workspace.xml \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..65531ca --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..fa7047e --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/tesseract-box.iml b/.idea/tesseract-box.iml new file mode 100644 index 0000000..d0876a7 --- /dev/null +++ b/.idea/tesseract-box.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 0000000..94632d8 --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,40 @@ +# encoding: utf-8 +# -*- mode: ruby -*- +# vi: set ft=ruby : + +Vagrant.configure("2") do |config| + config.vm.box = "generic/debian10" + config.vm.box_check_update = false + + config.vm.provider :virtualbox do |vb| + vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] + # Display the VirtualBox GUI when booting the machine + # vb.gui = true + + # Customize the amount of memory on the VM: + vb.memory = "4096" + + # Use 1 CPUs + vb.cpus = 4 + end + + config.vm.network "forwarded_port", guest: 8000, host: 8001, auto_correct: true + config.vm.network "forwarded_port", guest: 80, host: 81, auto_correct: true + config.vm.network "forwarded_port", guest: 5000, host: 5001, auto_correct: true + + config.vm.synced_folder ".", "/vagrant" + + config.vm.provision "shell", privileged: true, path: "./provision.sh" + + # Error: + # [default] GuestAdditions seems to be installed (5.1.38) correctly, but not running. + # @see solution from: https://github.com/dotless-de/vagrant-vbguest/issues/333#issuecomment-487105544 + if Vagrant.has_plugin?("vagrant-vbguest") + config.vbguest.auto_update = false + end + + # Enable X11 forwarding for graphical apps. + # Make sure you have xquartz installed if using OSX host! + config.ssh.forward_agent = true + config.ssh.forward_x11 = true +end diff --git a/fonts/GOST 2.304-81 type A (plotter).FON b/fonts/GOST 2.304-81 type A (plotter).FON new file mode 100644 index 0000000..9028c8d Binary files /dev/null and b/fonts/GOST 2.304-81 type A (plotter).FON differ diff --git a/fonts/GOST 2.304-81 type A.ttf b/fonts/GOST 2.304-81 type A.ttf new file mode 100644 index 0000000..0dd8401 Binary files /dev/null and b/fonts/GOST 2.304-81 type A.ttf differ diff --git a/fonts/GOST 2.304-81 type B (plotter).FON b/fonts/GOST 2.304-81 type B (plotter).FON new file mode 100644 index 0000000..70266c8 Binary files /dev/null and b/fonts/GOST 2.304-81 type B (plotter).FON differ diff --git a/fonts/GOST 2.304-81 type B.ttf b/fonts/GOST 2.304-81 type B.ttf new file mode 100644 index 0000000..884b2fe Binary files /dev/null and b/fonts/GOST 2.304-81 type B.ttf differ diff --git a/fonts/GOST Type A ru ital.ttf b/fonts/GOST Type A ru ital.ttf new file mode 100644 index 0000000..ad2caca Binary files /dev/null and b/fonts/GOST Type A ru ital.ttf differ diff --git a/fonts/GOST Type A ru.ttf b/fonts/GOST Type A ru.ttf new file mode 100644 index 0000000..aaa7819 Binary files /dev/null and b/fonts/GOST Type A ru.ttf differ diff --git a/fonts/GOST Type AU.ttf b/fonts/GOST Type AU.ttf new file mode 100644 index 0000000..caa369a Binary files /dev/null and b/fonts/GOST Type AU.ttf differ diff --git a/fonts/GOST Type B ru ital.ttf b/fonts/GOST Type B ru ital.ttf new file mode 100644 index 0000000..5c2703f Binary files /dev/null and b/fonts/GOST Type B ru ital.ttf differ diff --git a/fonts/GOST Type BU.ttf b/fonts/GOST Type BU.ttf new file mode 100644 index 0000000..f13a9e0 Binary files /dev/null and b/fonts/GOST Type BU.ttf differ diff --git a/fonts/GOST type A.TTF b/fonts/GOST type A.TTF new file mode 100644 index 0000000..dfab245 Binary files /dev/null and b/fonts/GOST type A.TTF differ diff --git a/fonts/GOST type B ru.ttf b/fonts/GOST type B ru.ttf new file mode 100644 index 0000000..b269323 Binary files /dev/null and b/fonts/GOST type B ru.ttf differ diff --git a/fonts/GOST type B.ttf b/fonts/GOST type B.ttf new file mode 100644 index 0000000..f833b13 Binary files /dev/null and b/fonts/GOST type B.ttf differ diff --git a/provision.sh b/provision.sh new file mode 100644 index 0000000..4dab673 --- /dev/null +++ b/provision.sh @@ -0,0 +1,34 @@ +echo "%vagrant ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/vagrant +export DEBIAN_FRONTEND=noninteractive +export PATH=$PATH:/home/vagrant/local/bin + +# зависимости +apt-get update +apt-get install -y htop nano libsm6 libxext6 libxrender-dev \ + libicu-dev libpango1.0-dev libcairo2-dev g++ autoconf automake \ + libtool pkg-config libpng-dev libjpeg62-turbo-dev libtiff5-dev \ + zlib1g-dev libicu-dev libleptonica-dev + +# Устанавливаем чертежные шрифты в систему +export FONTS_DIR=/usr/local/share/fonts +echo "export FONTS_DIR=$FONTS_DIR" >> /home/vagrant/.bashrc +cp /vagrant/fonts/* $FONTS_DIR +chmod -R 644 $FONTS_DIR +fc-cache -v + +# скачиваем и собираем tesseract 4.1.1 +cd / +wget https://github.com/tesseract-ocr/tesseract/archive/4.1.1.tar.gz +tar -zxvf 4.1.1.tar.gz +cd /tesseract-4.1.1 || exit 1 +mkdir -p $HOME/local/include $HOME/local/lib/pkgconfig +export PKG_CONFIG_PATH=$HOME/local/lib/pkgconfig +./autogen.sh +LIBLEPT_HEADERSDIR=$HOME/local/include ./configure \ + --prefix=$HOME/local/ --with-extra-libraries=$HOME/local/lib +make +make install + + + +