소스 검색

Add packaging files to project and some code cleanup

experimental
Bogdan Cordier 7 년 전
부모
커밋
e43aef67fd
5개의 변경된 파일64개의 추가작업 그리고 4개의 파일을 삭제
  1. +11
    -0
      MANIFEST.in
  2. +23
    -0
      README
  3. +1
    -1
      kcnrtl/gui/Ui_kcnrtl.py
  4. +2
    -3
      kcnrtl/kcnrtl.py
  5. +27
    -0
      setup.py

+ 11
- 0
MANIFEST.in 파일 보기

@@ -0,0 +1,11 @@
include kcnrtl/gui/*.ui
include kcnrtl/resources/*.svg
include kcnrtl/resources/*.qrc
include icons/hicolor/128x128/apps/*
include icons/hicolor/64x64/apps/*
include icons/hicolor/32x32/apps/*
include icons/hicolor/16x16/apps/*
include icons/pixmaps/*
include COPYING
include CHANGES
include kcnrtl.sh

+ 23
- 0
README 파일 보기

@@ -0,0 +1,23 @@
======
KCnrtl
======

:Author: Bogdan Cordier bcord@hadaly.fr
:Date: 2012-10-05
:Copyright: GPLv3
:Version: 0.1


DESCRIPTION
===========

KCnrtl is a simple KDE graphical client to access the CNRTL linguistic resources.
It offers the possibility to check the definitions, synomyms, antonyms of a given
french word.

With the "Clipboard mode" you can easily check for a synonym/antonym
and replace it in your text. To do so, juste check the "Clipboard mode" checkbox,
copy in the clipboard any word, KCnrtl will do an automatic request to the CNRTL
website and you can easily copy any synomym or antonym by just clicking on them.
Now you just have to paste it back in you text !

+ 1
- 1
kcnrtl/gui/Ui_kcnrtl.py 파일 보기

@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file '/home/bogdan/Documents/Programmation/projets/kcnrtl/kcnrtl.ui'
# Form implementation generated from reading ui file '/gui/kcnrtl.ui'
#
# Created: Thu May 10 00:52:48 2012
# by: PyQt4 UI code generator 4.9.1

+ 2
- 3
kcnrtl/kcnrtl.py 파일 보기

@@ -122,7 +122,7 @@ class Main(QMainWindow):
self.ui.webView.setHtml(tag.decode('utf8'))
return tagy

# Recupere les differentes formes
# Check if there is more than one definition
def lexiForm(self):
a = re.compile("return sendRequest\(5,'/definition/.*")
multdef = soup.find_all('a', {'onclick': a})
@@ -130,10 +130,9 @@ class Main(QMainWindow):
i = 0
while i < len(multdef):
multdef_a = multdef[i]
# Suppression des chiffres présents dans la chaîne
# Delete digits in definition title
multdef_clean = ''.join(c for c in
multdef_a.text if not c.isdigit())
# Ajout de chaque chaîne à la liste tagform
tagform.append(multdef_clean)
i += 1
return tagform

+ 27
- 0
setup.py 파일 보기

@@ -0,0 +1,27 @@
#!/usr/bin/env python

import os
from distutils.core import setup

def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()

setup(name='KCnrtl',
version='0.1',
description='KDE graphical client for the CNRTL linguistic resources',
license = "GPLv3",
author="Bogdan Cordier",
author_email="bcord@hadaly.fr",
url="http://code.lm7.fr/p/kcnrtl/",
download_url="http://code.lm7.fr/p/kcnrtl/downloads/",
packages=['kcnrtl', 'kcnrtl.gui', 'kcnrtl.resources'],
requires=['httplib2', 'bs4'],
long_description=read('README'),
classifiers=[
"Development Status :: 4 - Beta",
"Environment :: X11 Applications :: Qt"
"Topic :: Utilities",
"Natural Language :: French",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
],
)

Loading…
취소
저장