Browse Source

Add packaging files to project and some code cleanup

experimental
Bogdan Cordier 7 years ago
parent
commit
e43aef67fd
5 changed files with 64 additions and 4 deletions
  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 View File

@@ -0,0 +1,11 @@
1
+include kcnrtl/gui/*.ui
2
+include kcnrtl/resources/*.svg
3
+include kcnrtl/resources/*.qrc
4
+include icons/hicolor/128x128/apps/*
5
+include icons/hicolor/64x64/apps/*
6
+include icons/hicolor/32x32/apps/*
7
+include icons/hicolor/16x16/apps/*
8
+include icons/pixmaps/*
9
+include COPYING
10
+include CHANGES
11
+include kcnrtl.sh

+ 23
- 0
README View File

@@ -0,0 +1,23 @@
1
+======
2
+KCnrtl
3
+======
4
+
5
+:Author: Bogdan Cordier bcord@hadaly.fr
6
+:Date: 2012-10-05
7
+:Copyright: GPLv3
8
+:Version: 0.1
9
+
10
+
11
+DESCRIPTION
12
+===========
13
+
14
+KCnrtl is a simple KDE graphical client to access the CNRTL linguistic resources.
15
+It offers the possibility to check the definitions, synomyms, antonyms of a given
16
+french word.
17
+
18
+With the "Clipboard mode" you can easily check for a synonym/antonym
19
+and replace it in your text. To do so, juste check the "Clipboard mode" checkbox,
20
+copy in the clipboard any word, KCnrtl will do an automatic request to the CNRTL
21
+website and you can easily copy any synomym or antonym by just clicking on them.
22
+Now you just have to paste it back in you text ! 
23
+ 

+ 1
- 1
kcnrtl/gui/Ui_kcnrtl.py View File

@@ -1,6 +1,6 @@
1 1
 # -*- coding: utf-8 -*-
2 2
 
3
-# Form implementation generated from reading ui file '/home/bogdan/Documents/Programmation/projets/kcnrtl/kcnrtl.ui'
3
+# Form implementation generated from reading ui file '/gui/kcnrtl.ui'
4 4
 #
5 5
 # Created: Thu May 10 00:52:48 2012
6 6
 #      by: PyQt4 UI code generator 4.9.1

+ 2
- 3
kcnrtl/kcnrtl.py View File

@@ -122,7 +122,7 @@ class Main(QMainWindow):
122 122
         self.ui.webView.setHtml(tag.decode('utf8'))
123 123
         return tagy
124 124
 
125
-    # Recupere les differentes formes
125
+    # Check if there is more than one definition
126 126
     def lexiForm(self):
127 127
         a = re.compile("return sendRequest\(5,'/definition/.*")
128 128
         multdef = soup.find_all('a', {'onclick': a})
@@ -130,10 +130,9 @@ class Main(QMainWindow):
130 130
         i = 0
131 131
         while i < len(multdef):
132 132
             multdef_a = multdef[i]
133
-            # Suppression des chiffres présents dans la chaîne
133
+            # Delete digits in definition title
134 134
             multdef_clean = ''.join(c for c in
135 135
                                     multdef_a.text if not c.isdigit())
136
-            # Ajout de chaque chaîne à la liste tagform
137 136
             tagform.append(multdef_clean)
138 137
             i += 1
139 138
         return tagform

+ 27
- 0
setup.py View File

@@ -0,0 +1,27 @@
1
+#!/usr/bin/env python
2
+
3
+import os
4
+from distutils.core import setup
5
+
6
+def read(fname):
7
+    return open(os.path.join(os.path.dirname(__file__), fname)).read()
8
+
9
+setup(name='KCnrtl',
10
+      version='0.1',
11
+      description='KDE graphical client for the CNRTL linguistic resources',
12
+      license = "GPLv3", 
13
+      author="Bogdan Cordier",
14
+      author_email="bcord@hadaly.fr",
15
+      url="http://code.lm7.fr/p/kcnrtl/",
16
+      download_url="http://code.lm7.fr/p/kcnrtl/downloads/", 
17
+      packages=['kcnrtl', 'kcnrtl.gui',  'kcnrtl.resources'],
18
+      requires=['httplib2', 'bs4'], 
19
+      long_description=read('README'),
20
+      classifiers=[
21
+        "Development Status :: 4 - Beta",
22
+        "Environment :: X11 Applications :: Qt"
23
+        "Topic :: Utilities",
24
+        "Natural Language :: French", 
25
+        "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
26
+    ],
27
+     )

Loading…
Cancel
Save