Initial setup.py

- Refactored project structure.
- Fixed import.
- Add launch script.
- Fixed *.mo loading dir.
- Updated documentation
fix_readme
octogene 8 years ago
parent 5fd99b895f
commit dcd06a2d17

@ -1,9 +1,9 @@
.PHONY: po mo
po:
xgettext -LPython -o data/locales/po/hadaly.pot --from-code=UTF-8 hadaly/*.kv hadaly/*.py
msgmerge --update --no-fuzzy-matching --backup=off data/locales/po/fr.po data/locales/po/hadaly.pot
xgettext -LPython -o hadaly/data/locales/po/hadaly.pot --from-code=UTF-8 hadaly/*.kv hadaly/*.py
msgmerge --update --no-fuzzy-matching --backup=off hadaly/data/locales/po/fr.po hadaly/data/locales/po/hadaly.pot
mo:
mkdir -p data/locales/fr/LC_MESSAGES
msgfmt data/locales/po/fr.po -o data/locales/fr/LC_MESSAGES/hadaly.mo
mkdir -p hadaly/data/locales/fr/LC_MESSAGES
msgfmt hadaly/data/locales/po/fr.po -o hadaly/data/locales/fr/LC_MESSAGES/hadaly.mo

@ -25,16 +25,14 @@ Requirements
::
pip install kivy-garden
garden install magnet
garden install filechooserthumbview
For now, no setup or binary are available, you have to clone the repository:
::
git clone https://github.com/octogene/hadaly.git
cd hadaly
python setup.py install
Windows
~~~~~~~

@ -6,11 +6,16 @@ GNU/Linux
::
python hadaly.py [file.opah]
hadaly [file.opah]
Windows
~~~~~~~
For now, to directly open a presentation file (\*.opah) you'll have to drag'n drop the file on the hadaly.exe executable or the shortcut.
::
hadaly.exe [file.opah]
Or open *.opah files like any other by double clicking on it.

@ -1,7 +0,0 @@
#!/usr/bin/env python
#-*- coding: utf-8 -*-
from hadaly.__main__ import main
if __name__ == '__main__':
main()

@ -1,19 +1,19 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__version__ = '0.1a'
from __future__ import absolute_import
import os, sys
def main(args=None):
from app import HadalyApp
from .app import HadalyApp
import locale
import gettext
current_locale, encoding = locale.getdefaultlocale()
language = gettext.translation('hadaly', 'data/locales/',
[current_locale], fallback=True)
abspath = os.path.abspath(os.path.dirname(sys.argv[0]))
langpath = abspath + '/data/locales/'
language = gettext.translation('hadaly', langpath,
[current_locale])
language.install()
HadalyApp().run()

@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import division, unicode_literals
from __future__ import division, unicode_literals, absolute_import
import shutil
from kivy import require
@ -9,7 +9,7 @@ require('1.9.0')
import os, json
from sys import argv
import __main__
from .meta import version as app_version
import urllib
import re
@ -32,16 +32,16 @@ from kivy.uix.popup import Popup
from kivy.uix.label import Label
from kivy.factory import Factory
from kivy.uix.progressbar import ProgressBar
from editor import Slide, SlideInfoDialog, DraggableSlide
from viewer import SlideBox
from .editor import Slide, SlideInfoDialog, DraggableSlide
from .viewer import SlideBox
from kivy.logger import Logger
from kivy.network.urlrequest import UrlRequest
from hadaly.search import ItemButton
from .search import ItemButton
from kivy.uix.filechooser import FileChooserIconView, FileChooserListView
class HadalyApp(App):
presentation = DictProperty({'app': ('hadaly', __main__.__version__), 'title': 'New Title', 'slides': []})
presentation = DictProperty({'app': ('hadaly', app_version), 'title': 'New Title', 'slides': []})
slides_list = ListProperty()

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Before

Width:  |  Height:  |  Size: 668 KiB

After

Width:  |  Height:  |  Size: 668 KiB

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import division, unicode_literals
from __future__ import division, unicode_literals, absolute_import
import os
from functools import partial

@ -1,4 +1,4 @@
#:kivy 1.9.0
#:include hadaly/editor.kv
#:include hadaly/viewer.kv
#:include hadaly/search.kv
#:include editor.kv
#:include viewer.kv
#:include search.kv

@ -0,0 +1,7 @@
"""This module contains metadata about the project."""
title = 'hadaly'
version = '0.1a'
description = 'Presentation software for art historians'
author = 'Bogdan Cordie'
author_email = 'ooctogene@gmail.com'
license = 'GPLv3'

@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import division, unicode_literals
from __future__ import division, unicode_literals, absolute_import
try:
from urlparse import urlparse, parse_qs

@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import division, unicode_literals
from __future__ import division, unicode_literals, absolute_import
from kivy.uix.screenmanager import Screen
from kivy.uix.scatter import Matrix

@ -0,0 +1,5 @@
#!/usr/bin/env python
import runpy
if __name__ == '__main__':
runpy.run_module('hadaly', run_name=__name__, alter_sys=True)

@ -0,0 +1,37 @@
#!/usr/bin/env python
import os
from setuptools import setup, find_packages
from hadaly import meta
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='hadaly',
version=meta.version,
description=meta.description,
packages=find_packages(),
url='https://octogene.github.io/hadaly/',
license=meta.license,
author=meta.author,
author_email=meta.author_email,
requires=['lxml', 'Pillow', 'kivy'],
long_description=read('README.md'),
package_data={'hadaly': ['data/*.png',
'data/fonts/*.ttf',
'data/locales/fr/LC_MESSAGES/*.mo']},
include_package_data=True,
classifiers=[
"Development Status :: 3 - Alpha",
"Environment :: X11 Applications",
"Programming Language :: Python :: 2.7",
"Operating System :: OS Independent",
"Natural Language :: English",
"Natural Language :: French",
"Topic :: Education",
"Intended Audience :: Education",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
],
scripts = ['scripts/hadaly'],
zip_safe = False,
)
Loading…
Cancel
Save