-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
696 additions
and
48 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright (C) 2016-2020 Mufeed Ali | ||
# SPDX-License-Identifier: MIT | ||
# SPDX-License-Identifier: GPL-3.0-only or GPL-3.0-or-later | ||
# Author: Mufeed Ali <[email protected]> | ||
|
||
"""Top-level package for reo. Empty because everything is in sub-modules.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright (C) 2016-2020 Mufeed Ali | ||
# SPDX-License-Identifier: MIT | ||
# SPDX-License-Identifier: GPL-3.0-only or GPL-3.0-or-later | ||
# Author: Mufeed Ali <[email protected]> | ||
|
||
""" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#!/usr/bin/python | ||
# -*- coding: utf-8 -*- | ||
# Copyright (C) 2016-2020 Mufeed Ali | ||
# SPDX-License-Identifier: MIT | ||
# SPDX-License-Identifier: GPL-3.0-only or GPL-3.0-or-later | ||
# Author: Mufeed Ali <[email protected]> | ||
|
||
""" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright (C) 2016-2020 Mufeed Ali | ||
# SPDX-License-Identifier: MIT | ||
# SPDX-License-Identifier: GPL-3.0-only or GPL-3.0-or-later | ||
# Author: Mufeed Ali <[email protected]> | ||
|
||
import os | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright (C) 2016-2020 Mufeed Ali | ||
# SPDX-License-Identifier: MIT | ||
# SPDX-License-Identifier: GPL-3.0-only or GPL-3.0-or-later | ||
# Author: Mufeed Ali <[email protected]> | ||
|
||
import os | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright (C) 2016-2020 Mufeed Ali | ||
# SPDX-License-Identifier: MIT | ||
# SPDX-License-Identifier: GPL-3.0-only or GPL-3.0-or-later | ||
# Author: Mufeed Ali <[email protected]> | ||
|
||
import os | ||
|
@@ -66,7 +66,7 @@ def on_about(self, _action, _param): | |
'eSpeak-ng to provide a complete user interface.' | ||
) | ||
about_dialog.set_authors(['Mufeed Ali', ]) | ||
about_dialog.set_license_type(Gtk.License.MIT_X11) | ||
about_dialog.set_license_type(Gtk.License.GPL_3_0) | ||
about_dialog.set_website("https://www.github.com/fushinari/reo") | ||
about_dialog.set_copyright('Copyright © 2016-2020 Mufeed Ali') | ||
about_dialog.connect('response', lambda dialog, response: dialog.destroy()) | ||
|
@@ -161,8 +161,7 @@ def _on_search_clicked(self, _button=None, pass_check=False, pause=True, text=No | |
|
||
GLib.idle_add(self._term_view.set_markup, | ||
f'<span size="large" weight="bold">{out["term"].strip()}</span>') | ||
GLib.idle_add(self._pronunciation_view.set_markup, | ||
f'<i>{out["pronunciation"].strip()}</i>') | ||
GLib.idle_add(self._pronunciation_view.set_markup, f'<i>{out["pronunciation"].strip()}</i>') | ||
|
||
out_text = base.clean_pango(f'{out["definition"]}') | ||
if out['close']: | ||
|
@@ -260,7 +259,7 @@ def __reactor(self, text): | |
|
||
def __search(self, search_text): | ||
"""Clean input text, give errors and pass data to reactor.""" | ||
text = search_text.strip().strip('<>".-?`![](){}/\\:;,*').rstrip('\'') | ||
text = search_text.strip().strip('<>"-?`![](){}/\\:;,*').rstrip('\'').lstrip('.') | ||
cleaner = ['(', ')', '<', '>', '[', ']'] | ||
for item in cleaner: | ||
text = text.replace(item, '') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#!/usr/bin/python | ||
# -*- coding: utf-8 -*- | ||
# Copyright (C) 2016-2020 Mufeed Ali | ||
# SPDX-License-Identifier: MIT | ||
# SPDX-License-Identifier: GPL-3.0-only or GPL-3.0-or-later | ||
# Author: Mufeed Ali <[email protected]> | ||
|
||
""" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright (C) 2016-2020 Mufeed Ali | ||
# SPDX-License-Identifier: MIT | ||
# SPDX-License-Identifier: GPL-3.0-only or GPL-3.0-or-later | ||
# Author: Mufeed Ali <[email protected]> | ||
|
||
import random | ||
|
@@ -55,7 +55,7 @@ def _on_about(self): | |
f'About Reo-Qt {utils.VERSION}', | ||
f'<p><b>About Reo-Qt {utils.VERSION}</b></p>' | ||
'<p>Reo is a dictionary application using dictd, espeak, etc.</p>' | ||
'<p>This program is MIT-licensed.</p>' | ||
'<p>Licensed under GNU General Public License, version 3 or later.</p>' | ||
'<p>Copyright (C) 2016-2020 Mufeed Ali (fushinari)</p>' | ||
'<p><a href="https://www.github.com/fushinari/reo">GitHub</a></p>' | ||
) | ||
|
@@ -172,12 +172,12 @@ def __reactor(self, clean_term): | |
sys.exit() | ||
return None | ||
if clean_term and not clean_term == '' and not clean_term.isspace(): | ||
return base.generate_definition(clean_term, wordcol, sencol, True, 'html') | ||
return base.generate_definition(clean_term, wordcol, sencol, True) | ||
return None | ||
|
||
def __search(self, search_text): | ||
"""Clean input text, give errors and pass data to reactor.""" | ||
text = search_text.strip().strip('<>".-?`![](){}/\\:;,*').rstrip('\'') | ||
text = search_text.strip().strip('<>"-?`![](){}/\\:;,*').rstrip('\'').lstrip('.') | ||
cleaner = ['(', ')', '<', '>', '[', ']'] | ||
for item in cleaner: | ||
text = text.replace(item, '') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#!/usr/bin/python | ||
# -*- coding: utf-8 -*- | ||
# Copyright (C) 2016-2020 Mufeed Ali | ||
# SPDX-License-Identifier: MIT | ||
# SPDX-License-Identifier: GPL-3.0-only or GPL-3.0-or-later | ||
# Author: Mufeed Ali <[email protected]> | ||
|
||
import argparse | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright (C) 2016-2020 Mufeed Ali | ||
# SPDX-License-Identifier: MIT | ||
# SPDX-License-Identifier: GPL-3.0-only or GPL-3.0-or-later | ||
# Author: Mufeed Ali <[email protected]> | ||
|
||
# Form implementation generated from reading ui file 'mainwin.ui' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright (C) 2016-2020 Mufeed Ali | ||
# SPDX-License-Identifier: MIT | ||
# SPDX-License-Identifier: GPL-3.0-only or GPL-3.0-or-later | ||
# Author: Mufeed Ali <[email protected]> | ||
|
||
import configparser | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright (C) 2016-2020 Mufeed Ali | ||
# SPDX-License-Identifier: MIT | ||
# SPDX-License-Identifier: GPL-3.0-only or GPL-3.0-or-later | ||
# Author: Mufeed Ali <[email protected]> | ||
|
||
"""utils contains a few global variables and essential functions.""" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,9 +25,9 @@ | |
author_email='[email protected]', | ||
python_requires='>=3.6', | ||
classifiers=[ | ||
'Development Status :: 2 - Pre-Alpha', | ||
'Intended Audience :: Developers', | ||
'License :: OSI Approved :: MIT License', | ||
'Development Status :: 3 - Alpha', | ||
'Intended Audience :: End Users/Desktop', | ||
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', | ||
'Natural Language :: English', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.6', | ||
|
@@ -42,7 +42,7 @@ | |
], | ||
}, | ||
install_requires=requirements, | ||
license="MIT license", | ||
license="GPL-3", | ||
long_description=readme + '\n\n' + history, | ||
include_package_data=True, | ||
keywords='reo', | ||
|