Package medite :: Package Utile :: Module constantesDonnees
[hide private]
[frames] | no frames]

Source Code for Module medite.Utile.constantesDonnees

  1  # -*- coding: iso-8859-1 -*- 
  2  # Copyright 20003 - 2008: Julien Bourdaillet (julien.bourdaillet@lip6.fr), Jean-Gabriel Ganascia (jean-gabriel.ganascia@lip6.fr) 
  3  # This file is part of MEDITE. 
  4  # 
  5  #    MEDITE is free software; you can redistribute it and/or modify 
  6  #    it under the terms of the GNU General Public License as published by 
  7  #    the Free Software Foundation; either version 2 of the License, or 
  8  #    (at your option) any later version. 
  9  # 
 10  #    MEDITE is distributed in the hope that it will be useful, 
 11  #    but WITHOUT ANY WARRANTY; without even the implied warranty of 
 12  #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
 13  #    GNU General Public License for more details. 
 14  # 
 15  #    You should have received a copy of the GNU General Public License 
 16  #    along with Foobar; if not, write to the Free Software 
 17  #    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA 
 18  #---------------------------------------------------------------------------- 
 19  # Nom:          constantesDonnees.py 
 20  # Objet:        Fichier qui regroupe les differentes constantes utiles dans 
 21  #               l'implementation 
 22  #---------------------------------------------------------------------------- 
 23   
 24  import os,constantes 
 25   
 26  ####################### 
 27  #  Repertoire  des DG 
 28  ####################### 
 29  DG_REP = os.path.join(constantes.REPMEDITE, 'GLOBAL') 
 30  DG_AUTEUR_FILE = "auteur.dg" 
 31  DG_AUTEUR_CLE = "cle_auteur" 
 32  DG_FILE_INFO = "Informations.xml" 
 33  ####################### 
 34  #  Repertoire  des paramètres 
 35  ####################### 
 36  REPPRIVE = os.path.join(constantes.REPMEDITE, 'PRIVE') 
 37   
 38  ####################################### 
 39  #  Fichier de sauvegarde des donnees  # 
 40  ####################################### 
 41  FICDONNEES = 'NosDonnees' 
 42  NOSDONNEES = os.path.join(REPPRIVE, FICDONNEES) 
 43   
 44  ################################################## 
 45  #  Fichier de sauvegarde des donnees de travail  # 
 46  ################################################## 
 47  FICTRAVAIL = 'PlanTravail' 
 48  PLANTRAVAIL = os.path.join(REPPRIVE, FICTRAVAIL) 
 49  FIC_COULEURS = os.path.join(REPPRIVE, 'Couleurs') 
 50  FIC_PARAMETRES = os.path.join(REPPRIVE,'Parametres') 
 51   
 52  ########################## 
 53  #  COULEURS PAR DEFAULT  # 
 54  ########################## 
 55   
 56  DEFAUT_INSERTION = [35, 35, 142] 
 57  DEFAUT_SUPPRESSION =  [35, 35, 142] 
 58  DEFAUT_REMPLACEMENT = [35, 142, 35] 
 59  DEFAUT_ECRITURE_BLANC = [255, 255, 255] 
 60  # utilisé tout le temps sous sa forme binaire de 3 bits 111,011,001 ... 
 61  # 1er bit soulignement / 2e gras / 3e italique 
 62  #                             1   1   1 
 63  DEFAUT_SOULIGNE_DEPLACEMENT = 8 + 4 + 2  
 64   
 65  ###################################### 
 66  #  PARAMETRE DE LISSAGE PAR DEFAULT  # 
 67  ###################################### 
 68   
 69  DEFAUT__LONG_MIN_PIVOT = 5 
 70  DEFAUT_RATION__MIN_REMP=  50 
 71  DEFAUT_RATIO_SEUIL_LISSAGE = 50 
 72  DEFAULT_CAR_OU_MOT = 0 
 73   
 74  #################### 
 75  #   Fichier XML    # 
 76  #################### 
 77   
 78  FICHIER_INFO = 'Informations.xml' 
 79  ## Balises ## 
 80  B_ROOT = 'root' 
 81  B_AUTEUR = 'auteur' 
 82  B_NOM = 'nom' 
 83  B_PRENOM = 'prenom' 
 84  B_NAISSANCE = 'naissance' 
 85  B_DECES = 'deces' 
 86  B_OEUVRE = 'oeuvre' 
 87  B_TITRE = 'titre' 
 88  B_EDITION = 'edition' 
 89  B_PUBLICATION = 'publication' 
 90  B_INFORMATIONS = u'informations' 
 91  B_VERS_SOURCE = u'vsource' 
 92  B_ETAT_SOURCE = 'fsource' 
 93  B_VERS_CIBLE = u'vcible' 
 94  B_ETAT_CIBLE = u'fcible' 
 95  B_PARAM_1 = u'lg_pivot' 
 96  B_PARAM_2 = u'ratio' 
 97  B_PARAM_3 = u'seuil' 
 98  B_PARAM_4 = u'car_mot' 
 99  B_PARAM_5 = u'caseSensitive' 
100  B_PARAM_6 = u'sepSensitive' 
101  B_PARAM_7 = u'diacriSensitive' 
102  B_TRANSFORMATIONS = u'transformations' 
103  B_LGSOURCE = u'lgsource' 
104  B_INSERTIONS = u'insertions' 
105  B_SUPPRESSIONS = u'suppressions' 
106  B_DEPLACEMENTS = u'deplacements' 
107  B_REMPLACEMENTS = u'remplacements' 
108  B_BLOCSCOMMUNS = u'blocscommuns' 
109  B_BLOCSDEPLACES = u'blocsdeplaces' 
110  B_LG = u'lg' 
111  B_INS = u'ins' 
112  B_SUP = u'sup' 
113  B_DEP = u'dep' 
114  B_REMP = u'remp' 
115  B_BC = u'bc' 
116  B_MOT = u'mot' 
117  B_DEB = u'd' 
118  B_FIN = u'f' 
119  B_DEP = u'bd' 
120  B1_D = u'b1d' 
121  B1_F = u'b1f' 
122  B2_D = u'b2d' 
123  B2_F = u'b2f' 
124  #B_REMP = 'remp' 
125  B_MOT_AVANT = 'motavant' 
126  B_MOT_APRES = 'motapres' 
127  B_TEXT_SOURCE = 'textsource' 
128  B_TEXT_CIBLE = 'textcible' 
129  B_TEXT = 'tcommun' 
130  B_TEXT_INSER = 'tinsertion' 
131  B_TEXT_SUPP = 'tsuppression' 
132  B_TEXT_DEPL = 'tdeplacement' 
133  B_TEXT_REMP = 'tremplacement' 
134  B_COMMENTAIRE = 'commentaire' 
135   
136  B_ARBRE = 'arbre' 
137  B_VERSION = 'version' 
138  B_ETAT = 'etat' 
139  B_ID = "id" 
140