|
| 1 | +# Copyright (C) 2021 Rastislav Kish |
| 2 | +# |
| 3 | +# This program is free software: you can redistribute it and/or modify |
| 4 | +# it under the terms of the GNU General Public License as published by |
| 5 | +# the Free Software Foundation, version 3. |
| 6 | +# |
| 7 | +# This program is distributed in the hope that it will be useful, |
| 8 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | +# GNU General Public License for more details. |
| 11 | +# |
| 12 | +# You should have received a copy of the GNU General Public License |
| 13 | +# along with this program. If not, see <https://www.gnu.org/licenses/>. |
| 14 | + |
| 15 | +#!/usr/bin/sh |
| 16 | + |
| 17 | +cd |
| 18 | +mkdir .uma |
| 19 | + |
| 20 | +# First, make sure everything is upto-date |
| 21 | + |
| 22 | +sudo apt update |
| 23 | +sudo apt upgrade -y |
| 24 | + |
| 25 | +# Activate Orca and numlock on the login screen |
| 26 | + |
| 27 | +echo Activating Orca and numlock on the login screen |
| 28 | + |
| 29 | +echo \ |
| 30 | +'[org.ArcticaProject.arctica-greeter] |
| 31 | +activate-numlock=true |
| 32 | +screen-reader=true |
| 33 | +' | sudo tee /usr/share/glib-2.0/schemas/99_arctica_greeter.gschema.override |
| 34 | +sudo glib-compile-schemas /usr/share/glib-2.0/schemas |
| 35 | + |
| 36 | +# Remove the snap firefox and install an apt-one |
| 37 | + |
| 38 | +echo Replacing Firefox with an apt version |
| 39 | + |
| 40 | +sudo snap remove firefox |
| 41 | +sudo add-apt-repository ppa:mozillateam/ppa -y |
| 42 | +echo \ |
| 43 | +'Package: * |
| 44 | +Pin: release o=LP-PPA-mozillateam |
| 45 | +Pin-Priority: 1001 |
| 46 | +' | sudo tee /etc/apt/preferences.d/mozilla-firefox |
| 47 | +sudo apt update |
| 48 | +sudo apt install firefox -y |
| 49 | + |
| 50 | +# Install the latest Orca |
| 51 | + |
| 52 | +echo Installing the latest orca |
| 53 | + |
| 54 | +## Add site-packages as a symling to dist-packages |
| 55 | + |
| 56 | +cd /usr/local/lib/python3.10 |
| 57 | +sudo ln -s dist-packages site-packages |
| 58 | +cd |
| 59 | + |
| 60 | +## Uncomment source repositories |
| 61 | + |
| 62 | +sudo sed -i '/deb-src/s/^# //' /etc/apt/sources.list |
| 63 | +sudo apt update |
| 64 | + |
| 65 | +## Install git and clone the repository |
| 66 | + |
| 67 | +sudo apt install git -y |
| 68 | +cd ~/.uma |
| 69 | +git clone https://gitlab.gnome.org/GNOME/orca.git |
| 70 | +cd orca |
| 71 | + |
| 72 | +## Install dependencies, build and upgrade Orca |
| 73 | + |
| 74 | +sudo apt-get build-dep gnome-orca -y |
| 75 | +PYTHON=/usr/bin/python3 ./autogen.sh |
| 76 | +make |
| 77 | +sudo make install |
| 78 | + |
| 79 | +# Set the ACCESSIBILITY-ENABLED environment variable |
| 80 | + |
| 81 | +echo Setting the ACCESSIBILITY_ENABLED flag |
| 82 | + |
| 83 | +sudo sed -i '$ a ACCESSIBILITY_ENABLED=1' /etc/environment |
| 84 | + |
| 85 | +# Install OCRDesktop |
| 86 | + |
| 87 | +echo Installing OCRDesktop |
| 88 | + |
| 89 | +sudo apt install python3-pip -y |
| 90 | +sudo apt install tesseract-ocr libwnck-3-0 -y |
| 91 | +pip3 install --upgrade pillow |
| 92 | +pip3 install pdf2image pytesseract scipy webcolors |
| 93 | + |
| 94 | +cd ~/.uma |
| 95 | +git clone https://github.com/chrys87/ocrdesktop |
| 96 | +cd ocrdesktop |
| 97 | +sudo cp ocrdesktop /usr/local/bin |
| 98 | + |
| 99 | +# Clean the downloaded files |
| 100 | + |
| 101 | +echo Cleaning... |
| 102 | + |
| 103 | +cd |
| 104 | +rm -r -f .uma |
| 105 | + |
0 commit comments