Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding new Readme functionality with readme.html #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lios/macros.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ def get_list_of_mixed_case_combinations(list_items):

home_page_link = "http://sourceforge.net/projects/lios/"

readme_page_link="readme.html"

video_tutorials_link = "https://www.youtube.com/playlist?list=PLn29o8rxtRe1zS1r2-yGm1DNMOZCgdU0i"

major_character_encodings_list = [ 'us_ascii', 'utf-8', 'iso_8859_1','latin1',
Expand Down
31 changes: 17 additions & 14 deletions lios/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1068,21 +1068,24 @@ def stop_all_process(self,widget):
self.available_ocr_engine_list[self.preferences.ocr_engine].cancel()
self.notify_information(_("Terminated"),0)

# def open_readme(self,*data):
# if(self.textview.get_modified()):
# dlg = dialog.Dialog(_("Warning!"),
# (_("No"),dialog.Dialog.BUTTON_ID_1,_("Yes"),dialog.Dialog.BUTTON_ID_2))
# label = widget.Label(_("Current text not saved! do you want to load readme without saving?"))
# label.show()
# dlg.add_widget(label)
# response = dlg.run()
# if response == dialog.Dialog.BUTTON_ID_2:
# with open(macros.readme_file) as file:
# self.textview.set_text(file.read())
# dlg.destroy()
# else:
# with open(macros.readme_file) as file:
# self.textview.set_text(file.read())
def open_readme(self,*data):
if(self.textview.get_modified()):
dlg = dialog.Dialog(_("Warning!"),
(_("No"),dialog.Dialog.BUTTON_ID_1,_("Yes"),dialog.Dialog.BUTTON_ID_2))
label = widget.Label(_("Current text not saved! do you want to load readme without saving?"))
label.show()
dlg.add_widget(label)
response = dlg.run()
if response == dialog.Dialog.BUTTON_ID_2:
with open(macros.readme_file) as file:
self.textview.set_text(file.read())
dlg.destroy()
else:
with open(macros.readme_file) as file:
self.textview.set_text(file.read())
webbrowser.open(macros.readme_page_link)



@on_thread
Expand Down
118 changes: 118 additions & 0 deletions lios/readme.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Linux-Intelligent-OCR-Solution (Lios)</title>
<style>
body {
font-family: Arial, sans-serif;
line-height: 1.6;
color: #333;
max-width: 800px;
margin: 0 auto;
padding: 20px;
background-color: #f4f4f4;
}
h1, h2 {
color: #2c3e50;
}
h1 {
text-align: center;
border-bottom: 2px solid #2c3e50;
padding-bottom: 10px;
}
h2 {
margin-top: 30px;
}
ul {
padding-left: 20px;
}
.feature-list {
background-color: #ecf0f1;
padding: 20px;
border-radius: 5px;
}
.disclaimer {
font-size: 0.9em;
background-color: #e74c3c;
color: white;
padding: 10px;
border-radius: 5px;
margin-top: 30px;
}
</style>
</head>
<body>
<h1>Linux-Intelligent-OCR-Solution (Lios)</h1>


<h2>What is Lios?</h2>
<p>Lios is a free and open source software for converting print into text using either a scanner or a camera. It can also produce text out of scanned images from other sources such as PDF, Image, Folder containing Images or screenshot. The program is given total accessibility for visually impaired. Lios is written in Python 3 and released under the GPL-3 license.</p>


<h2>Features of Lios</h2>
<div class="feature-list">
<ul>
<li>Import images from Scanner, PDFs, Folder, or Webcam</li>
<li>Take and Recognize Screenshot</li>
<li>Recognize Selected Areas (Rectangle selection)</li>
<li>Support two OCR Engines (Cuneiform, Tesseract)</li>
<li>24 Language support (30 more languages can be installed in Tesseract)</li>
<li>Full Auto Rotation for any Language</li>
<li>Side by side view of image and output</li>
<li>Advanced Scanner Brightness optimizer</li>
<li>Text Reader for low vision with Highlighting</li>
<li>Audio converter (espeak)</li>
<li>Spell-checker (aspell)</li>
<li>Export as PDF (text/images)</li>
<li>Dictionary Support for English (Artha)</li>
<li>Options for save, load and reset settings</li>
</ul>
</div>


<h2>Opening and Closing</h2>
<p>To open Lios, launch Application menu > Graphics > Lios. Or search in the dashboard and start Lios from there. To close, select Quit from File menu or press Ctrl+Q.</p>


<h2>Importing Images</h2>
<p>Lios supports importing images from various sources, including:</p>
<ul>
<li>Single or multiple image files</li>
<li>PDF files</li>
<li>Folders containing images</li>
<li>Scanner</li>
<li>Screenshot</li>
<li>Webcam</li>
</ul>


<h2>OCR and Text Manipulation</h2>
<p>Lios offers various OCR options and text manipulation tools, including:</p>
<ul>
<li>OCR with and without rotation</li>
<li>Rectangle selection for OCR</li>
<li>Text editing tools (cut, copy, paste, delete)</li>
<li>Find and Replace</li>
<li>Spell checker</li>
<li>Text reader with TTS</li>
</ul>


<h2>Utilities</h2>
<p>Lios includes several useful utilities:</p>
<ul>
<li>Brightness Optimizer for scanner</li>
<li>Audio converter</li>
<li>Artha dictionary integration</li>
</ul>


<div class="disclaimer">
<h2>Disclaimer</h2>
<p>Lios is free software released under the GPL-3 license. It is distributed without any warranty. For full license details, please refer to the GNU General Public License version 3.</p>
</div>
</body>
</html>