Add markdown support on pypi

This commit is contained in:
Gobinath 2018-03-30 14:23:56 -04:00
parent f3f83e88b6
commit 65d76b2e89
4 changed files with 42 additions and 20 deletions

View File

@ -5,13 +5,13 @@
[![Translation status](https://hosted.weblate.org/widgets/safe-eyes/-/translations/svg-badge.svg)](https://hosted.weblate.org/engage/safe-eyes/?utm_source=widget)
[![Badge](https://badges.debian.net/badges/debian/unstable/safeeyes/version.svg)](https://packages.debian.org/unstable/safeeyes)
Protect your eyes from eye strain using this simple and beautiful, yet extensible break reminder. A Free and Open Source Linux alternative to EyeLeo.
Visit to the official site: http://slgobinath.github.io/SafeEyes/ for more details.
## Safe Eyes command-line arguements
```
```text
usage: safeeyes [-h] [-a | -d | -e | -q | -s | -t] [--debug] [--version]
Safe Eyes protects your eyes from eye strain (asthenopia) by reminding you to
@ -31,44 +31,53 @@ optional arguments:
```
## Installation guide
Safe Eyes is available in Ubuntu PPA, Arch AUR, Gentoo and Python PyPI. You can choose any installation source and install on any Linux system with Python 3.
### Ubuntu, Linux Mint and other Ubuntu Derivatives
```
```bash
sudo add-apt-repository ppa:slgobinath/safeeyes
sudo apt update
sudo apt install safeeyes
```
### Arch
```
```bash
yaourt -S safeeyes
```
### Gentoo
```
```bash
sudo emerge -av x11-misc/safeeyes
```
### Debian
```
```bash
sudo apt-get install gir1.2-appindicator3-0.1 gir1.2-notify-0.7 python3-psutil python3-xlib xprintidle
sudo pip3 install safeeyes
sudo update-icon-caches /usr/share/icons/hicolor
```
People using unstable/testing Debian can install Safe Eyes froms the official repository using the following command:
```
```bash
sudo apt-get install safeeyes
```
### Fedora
```
```bash
sudo dnf install libappindicator-gtk3 python3-psutil
sudo pip3 install safeeyes
sudo gtk-update-icon-cache /usr/share/icons/hicolor
```
### Other Linux & Run from source
Ensure to meet the following dependencies:
- gir1.2-appindicator3-0.1
@ -78,20 +87,25 @@ Ensure to meet the following dependencies:
- xprintidle (optional)
**To install Safe Eyes:**
```
```bash
sudo pip3 install safeeyes
```
After installation, restart your system to update the icons,
**To run from source:**
```
```bash
git clone https://github.com/slgobinath/SafeEyes.git
cd SafeEyes
python3 -m safeeyes
```
Safe Eyes installers install the required icons to `/usr/share/icons/hicolor`. When you run Safe Eyes from source without, some icons may not appear.
## Features
- Remind you to take breaks with exercises to reduce RSI
- Disable keyboard during breaks
- Notification before and after breaks
@ -103,6 +117,7 @@ Safe Eyes installers install the required icons to `/usr/share/icons/hicolor`. W
- Customizable using plug-ins
## Third-party Plugins
Thirdparty plugins are available at another GitHub repository: [safeeyes-plugins](https://github.com/slgobinath/safeeyes-plugins). More details about how to write your own plugin and how to install third-party plugin are available there.
## License

8
build.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
rm -rf build/ dist/ safeeyes.egg-info/ .eggs/
python3 setup.py sdist bdist_wheel
twine upload --repository pypitest dist/safeeyes*.tar.gz
clear >$(tty)
twine upload --repository pypitest dist/safeeyes*.whl

View File

@ -1,2 +0,0 @@
[metadata]
description-file = README.md

View File

@ -13,7 +13,7 @@ requires = [
_ROOT = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(_ROOT, 'README.md')) as f:
long_description = '\n' + f.read()
long_description = f.read()
def __compile_po_files():
@ -28,9 +28,10 @@ def __compile_po_files():
for f in next(os.walk(po_dir))[2]
if os.path.splitext(f)[1] == '.po']
for po_file in po_files:
filename, ext = os.path.splitext(po_file)
filename, _ = os.path.splitext(po_file)
mo_file = filename + '.mo'
msgfmt_cmd = 'msgfmt {} -o {}'.format(po_dir + po_file, po_dir + mo_file)
msgfmt_cmd = 'msgfmt {} -o {}'.format(
po_dir + po_file, po_dir + mo_file)
subprocess.call(msgfmt_cmd, shell=True)
@ -38,7 +39,7 @@ def _data_files(path):
"""
Collect the data files.
"""
for root, dirs, files in os.walk(path):
for root, _, files in os.walk(path):
if not files:
continue
yield (os.path.join('/usr', root), [os.path.join(root, f) for f in files])
@ -49,7 +50,7 @@ def __package_files(directory):
Collect the package files.
"""
paths = []
for (path, dirs, filenames) in os.walk(directory):
for (path, _, filenames) in os.walk(directory):
for filename in filenames:
paths.append(os.path.join('..', path, filename))
return paths
@ -73,6 +74,7 @@ setuptools.setup(
version="2.0.5",
description="Protect your eyes from eye strain using this continuous breaks reminder.",
long_description=long_description,
long_description_content_type="text/markdown",
author="Gobinath Loganathan",
author_email="slgobinath@gmail.com",
url="https://github.com/slgobinath/SafeEyes",
@ -81,6 +83,7 @@ setuptools.setup(
package_data={'safeeyes': __package_data()},
data_files=__data_files,
install_requires=requires,
setup_requires=['setuptools>=38.6.0'],
entry_points={'console_scripts': ['safeeyes = safeeyes.__main__:main']},
keywords='linux utility health eye-strain safe-eyes',
classifiers=[
@ -89,7 +92,5 @@ setuptools.setup(
"Development Status :: 5 - Production/Stable",
"Environment :: X11 Applications :: GTK",
"Intended Audience :: End Users/Desktop",
"Topic :: Utilities"] + [
('Programming Language :: Python :: %s' % x) for x in
'3 3.4 3.5 3.6'.split()]
"Topic :: Utilities"] + [('Programming Language :: Python :: %s' % x) for x in '3 3.4 3.5 3.6'.split()]
)