IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Python Discussion :

afficher depuis un site web


Sujet :

Python

  1. #1
    Futur Membre du Club
    Femme Profil pro
    Analyse système
    Inscrit en
    Septembre 2014
    Messages
    11
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Autre

    Informations professionnelles :
    Activité : Analyse système
    Secteur : Arts - Culture

    Informations forums :
    Inscription : Septembre 2014
    Messages : 11
    Points : 5
    Points
    5
    Par défaut afficher depuis un site web
    Bonjour

    Je suis débutant dans la programmation
    j’aimerai bien de construire une petite application avec python, le but de cette application et d’afficher l’équation complète d’un indice (dans la boite 2)après que l’utilisateur introduisez le nom de cette indice (dans la boite 1).

    Nom : box.png
Affichages : 289
Taille : 11,1 Ko

    Il y a un site qui contient tous ces indices avec leurs équations sous forme d’un tableau.je veux que cette application prendre les information a partir de ce site.

    Cordialement

  2. #2
    Membre actif
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Octobre 2013
    Messages
    156
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : Santé

    Informations forums :
    Inscription : Octobre 2013
    Messages : 156
    Points : 218
    Points
    218
    Par défaut
    Bonjour,

    ça dépend du site, si il fournis une api REST ou pas, tu peux mettre le lien ?

  3. #3
    Futur Membre du Club
    Femme Profil pro
    Analyse système
    Inscrit en
    Septembre 2014
    Messages
    11
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Autre

    Informations professionnelles :
    Activité : Analyse système
    Secteur : Arts - Culture

    Informations forums :
    Inscription : Septembre 2014
    Messages : 11
    Points : 5
    Points
    5
    Par défaut
    Citation Envoyé par IPreferCSharp Voir le message
    Bonjour,

    ça dépend du site, si il fournis une api REST ou pas, tu peux mettre le lien ?
    voila :http://www.indexdatabase.de/db/i.php

  4. #4
    Expert éminent
    Avatar de tyrtamos
    Homme Profil pro
    Retraité
    Inscrit en
    Décembre 2007
    Messages
    4 462
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Var (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Retraité

    Informations forums :
    Inscription : Décembre 2007
    Messages : 4 462
    Points : 9 249
    Points
    9 249
    Billets dans le blog
    6
    Par défaut
    Bonjour,

    Pour extraire les données d'une page web en html, j'aime bien le module externe "beautifulsoup" (https://pypi.python.org/pypi/beautifulsoup4). Il est assez facile d'emploi, et supporte même assez bien les scripts html mal fichus.

    Pour savoir ce qu'il est possible de récupérer de cette façon, il suffit d'examiner le code source de la page web (ex sous Firefox: clic droit => "Code source de la page". Et là, on verra ce qui ne sera pas facile: les formules sont écrites en "MathML" pour être affichées correctement. Voir ici: https://www.w3.org/TR/MathML/.

    Si on veut revenir aux formules pour faire des calculs, il faudra non seulement faire l'extraction de la formule en MathML grâce à ses tags spécifiques, mais aussi faire la conversion MathML => expression Python.
    Un expert est une personne qui a fait toutes les erreurs qui peuvent être faites, dans un domaine étroit... (Niels Bohr)
    Mes recettes python: http://www.jpvweb.com

  5. #5
    Futur Membre du Club
    Femme Profil pro
    Analyse système
    Inscrit en
    Septembre 2014
    Messages
    11
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Autre

    Informations professionnelles :
    Activité : Analyse système
    Secteur : Arts - Culture

    Informations forums :
    Inscription : Septembre 2014
    Messages : 11
    Points : 5
    Points
    5
    Par défaut
    Bonjour,
    Merci tyrtamos pour votre réponse,
    Je ne suis pas intéressé par le calcul , je veux juste afficher les équations correctement dans la 2eme boite.
    Cordialement

  6. #6
    Expert éminent

    Homme Profil pro
    Inscrit en
    Octobre 2008
    Messages
    4 300
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations forums :
    Inscription : Octobre 2008
    Messages : 4 300
    Points : 6 780
    Points
    6 780
    Par défaut
    Salut,

    Est-ce que tu possèdes déjà la liste des indices comme ceci:

    ATSAVI = 209
    AFRI1600 = 393
    AFRI2100 = 395
    Alteration = 1
    Alunite/Kaolinite/Pyrophylite = 2

    Il s'agit des indices réel de ces éléments et non pas le numéro de ligne où ils sont situés.
    Si tu possèdes bien ces indices, alors ça pourrait être plus simple.

    Tu as fait ton interface avec quel framework ?

  7. #7
    Futur Membre du Club
    Femme Profil pro
    Analyse système
    Inscrit en
    Septembre 2014
    Messages
    11
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Autre

    Informations professionnelles :
    Activité : Analyse système
    Secteur : Arts - Culture

    Informations forums :
    Inscription : Septembre 2014
    Messages : 11
    Points : 5
    Points
    5
    Par défaut
    Citation Envoyé par VinsS Voir le message
    Salut,

    Est-ce que tu possèdes déjà la liste des indices comme ceci:

    ATSAVI = 209
    AFRI1600 = 393
    AFRI2100 = 395
    Alteration = 1
    Alunite/Kaolinite/Pyrophylite = 2

    Il s'agit des indices réel de ces éléments et non pas le numéro de ligne où ils sont situés.
    Si tu possèdes bien ces indices, alors ça pourrait être plus simple.

    Tu as fait ton interface avec quel framework ?
    Bonjour,
    J'ai utilisé Qt designer pour l'interface
    Pour le moment je possède ce code :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    import urllib2
    from bs4 import BeautifulSoup
     
    url = "http://www.indexdatabase.de/db/i.php"
     
    page = urllib2.urlopen(url).read()
    soup = BeautifulSoup(page)
     
    for tr in soup.find_all('tr')[2:]:
        tds = tr.find_all('td')
        print "N: %s, Name: %s, Abbrev. : %s" % \
              (tds[0].text, tds[1].text, tds[2].text)



    resultat:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
    467
    468
    469
    470
    471
    472
    473
    474
    475
    476
    477
    478
    479
    480
    481
    482
    483
    484
    485
    486
    487
    488
    489
    490
    491
    492
    493
    494
    495
    496
    497
    498
    499
    500
    501
    502
    503
    504
    505
    506
    507
    508
    509
    510
    511
    512
    513
    514
    515
    516
    517
    518
    519
    520
    521
    522
    523
    524
    525
    526
    527
    528
    529
    530
    531
    532
    533
    534
    535
    536
    537
    538
    539
    540
    541
    542
    543
    544
    545
    546
    547
    548
    549
    550
    551
    552
    553
    554
    555
    556
    557
    558
    559
    560
    561
    562
    563
    564
    565
    566
    567
    568
    569
    570
    571
    572
    573
    574
    575
    576
    577
    578
    579
    580
    581
    582
    583
    584
    585
    586
    587
    588
    589
    590
    591
    592
    593
    594
    595
    596
    597
    598
    599
    600
    601
    602
    603
    604
    605
    606
    607
    608
    609
    610
    611
    612
    613
    614
    615
    616
    617
    618
    619
    620
    621
    622
    623
    624
    625
    626
    627
    628
    629
    630
    631
    632
    633
    634
    635
    636
    637
    638
    639
    640
    641
    642
    643
    644
    645
    646
    647
    648
    649
    650
    651
    652
    653
    654
    655
    656
    657
    658
    659
    660
    661
    662
    663
    664
    665
    666
    667
    668
    669
    670
    671
    672
    673
    674
    675
    676
    677
    678
    679
    680
    681
    682
    683
    684
    685
    686
    687
    688
    689
    690
    691
    692
    693
    694
    695
    696
    697
    698
    699
    700
    701
    702
    703
    704
    705
    706
    707
    708
    709
    710
    711
    712
    713
    714
    715
    716
    717
    718
    719
    720
    721
    722
    723
    724
    725
    726
    727
    728
    729
    730
    731
    732
    733
    734
    735
    736
    737
    738
    739
    740
    741
    742
    743
    744
    745
    746
    747
    748
    749
    750
    751
    752
    753
    754
    755
    756
    757
    758
    759
    760
    761
    762
    763
    764
    765
    766
    767
    768
    769
    770
    771
    772
    773
    774
    775
    776
    777
    778
    779
    780
    781
    782
    783
    784
    785
    786
    787
    788
    789
    790
    791
    792
    793
    794
    795
    796
    797
    798
    799
    800
    801
    802
    803
    804
    805
    806
    807
    808
    809
    810
    811
    812
    813
    814
    815
    816
    817
    818
    819
    820
    821
    822
    823
    824
    825
    826
    827
    828
    829
    830
    831
    832
    833
    834
    835
    836
    837
    838
    839
    840
    841
    842
    843
    844
    845
    846
    847
    848
    849
    850
    851
    852
    853
    854
    855
    856
    857
    858
    859
    860
    861
    862
    863
    864
    865
    866
    867
    868
    869
    870
    871
    872
    873
    874
    875
    876
    877
    878
    879
    880
    881
    882
    883
    884
    885
    886
    887
    888
    889
    890
    891
    892
    893
    894
    895
    896
    897
    898
    899
    900
    901
    902
    903
    904
    905
    906
    907
    908
    909
    910
    911
    912
    913
    914
    915
    916
    917
    918
    919
    920
    921
    922
    923
    924
    925
    926
    927
    928
    929
    930
    931
    932
    933
    934
    935
    936
    937
    938
    939
    940
    941
    942
    943
    944
    945
    946
    947
    948
    949
    950
    951
    952
    953
    954
    955
    956
    957
    958
    959
    960
    961
    962
    963
    964
    965
    966
    967
    968
    969
    970
    971
    972
    973
    974
    975
    976
    977
    978
    979
    980
    981
    982
    983
    984
    985
    986
    987
    988
    989
    990
    991
    992
    993
    994
    995
    996
    997
    998
    999
    1000
    1001
    1002
    1003
    1004
    1005
    1006
    1007
    1008
    1009
    1010
    1011
    1012
    1013
    1014
    1015
    1016
    1017
    1018
    1019
    1020
    1021
    1022
    1023
    1024
    1025
    1026
    1027
    1028
    1029
    1030
    1031
    1032
    1033
    1034
    1035
    1036
    1037
    1038
    1039
    1040
    1041
    1042
    1043
    1044
    1045
    1046
    1047
    1048
    1049
    1050
    1051
    1052
    1053
    1054
    1055
    1056
    1057
    1058
    1059
    1060
    1061
    1062
    1063
    1064
    1065
    1066
    1067
    1068
    1069
    1070
    1071
    1072
    1073
    1074
    1075
    1076
    1077
    1078
    1079
    1080
    1081
    1082
    1083
    1084
    1085
    1086
    1087
    1088
    1089
    1090
    1091
    1092
    1093
    1094
    1095
    1096
    1097
    1098
    1099
    1100
    1101
    1102
    1103
    1104
    1105
    1106
    1107
    1108
    1109
    1110
    1111
    1112
    1113
    1114
    1115
    1116
    1117
    1118
    1119
    1120
    1121
    1122
    1123
    1124
    1125
    1126
    1127
    1128
    1129
    1130
    1131
    1132
    1133
    1134
    1135
    1136
    1137
    1138
    1139
    1140
    1141
    1142
    1143
    1144
    1145
    1146
    1147
    1148
    1149
    1150
    1151
    1152
    1153
    1154
    1155
    1156
    1157
    1158
    1159
    1160
    1161
    1162
    1163
    1164
    1165
    1166
    1167
    1168
    1169
    1170
    1171
    1172
    1173
    1174
    1175
    1176
    1177
    1178
    1179
    1180
    1181
    1182
    1183
    1184
    1185
    1186
    1187
    1188
    1189
    1190
    1191
    1192
    1193
    1194
    1195
    1196
    N: 2
          , Name: Aerosol free vegetation index 1600
    , Abbrev. : AFRI1600
     
    N: 3
          , Name: Aerosol free vegetation index 2100
    , Abbrev. : AFRI2100
     
    N: 4
          , Name: Alteration
    , Abbrev. : 
     
    N: 5
          , Name: Alunite/Kaolinite/Pyrophylite
    , Abbrev. : 
     
    N: 6
          , Name: Amphibole
    , Abbrev. : 
     
    N: 7
          , Name: Amphibole / MgOH
    , Abbrev. : 
     
    N: 8
          , Name: Anthocyanin reflectance index
    , Abbrev. : ARI
     
    N: 9
          , Name: Ashburn Vegetation Index
    , Abbrev. : AVI
     
    N: 10
          , Name: Atmospherically Resistant Vegetation Index
    , Abbrev. : ARVI
     
    N: 11
          , Name: Atmospherically Resistant Vegetation Index 2
    , Abbrev. : ARVI2
     
    N: 12
          , Name: Average reflectance 750 to 850
    , Abbrev. : AR750/850
     
    N: 13
          , Name: Basic Degree Index  - SIO2
    , Abbrev. : 
     
    N: 14
          , Name: Blue-wide dynamic range vegetation index
    , Abbrev. : BWDRVI
     
    N: 15
          , Name: Browning Reflectance Index
    , Abbrev. : BRI
     
    N: 16
          , Name: Canopy Chlorophyll Content Index
    , Abbrev. : CCCI
     
    N: 17
          , Name: Carbonate
    , Abbrev. : 
     
    N: 18
          , Name: Carbonate/Chlorite/Epidote
    , Abbrev. : 
     
    N: 19
          , Name: CASI NDVI
    , Abbrev. : CASI NDVI
     
    N: 20
          , Name: CASI TM4/3
    , Abbrev. : CASI TM4/3
     
    N: 21
          , Name: Cellulose Absorption Index
    , Abbrev. : CAI
     
    N: 22
          , Name: Cellulose absorption index 2
    , Abbrev. : CAI
     
    N: 23
          , Name: Chlorophyll Absorption Ratio Index
    , Abbrev. : CARI
     
    N: 24
          , Name: Chlorophyll Absorption Ratio Index 2
    , Abbrev. : CARI2
     
    N: 25
          , Name: Chlorophyll Green
    , Abbrev. : Chlgreen
     
    N: 26
          , Name: Chlorophyll Index Green
    , Abbrev. : CIgreen
     
    N: 27
          , Name: Chlorophyll Index RedEdge 710
    , Abbrev. : CIrededge710
     
    N: 28
          , Name: Chlorophyll IndexRedEdge
    , Abbrev. : CIrededge
     
    N: 29
          , Name: Chlorophyll Red-Edge
    , Abbrev. : Chlred-edge
     
    N: 30
          , Name: Chlorophyll vegetation index
    , Abbrev. : CVI
     
    N: 31
          , Name: Clay
    , Abbrev. : 
     
    N: 32
          , Name: Coloration Index
    , Abbrev. : CI
     
    N: 33
          , Name: Corrected Transformed Vegetation Index
    , Abbrev. : CTVI
     
    N: 34
          , Name: CRI550
    , Abbrev. : CRI550
     
    N: 35
          , Name: CRI700
    , Abbrev. : CRI700
     
    N: 36
          , Name: Crop water stress index
    , Abbrev. : CWSI
     
    N: 37
          , Name: Curvative Index
    , Abbrev. : CI
     
    N: 38
          , Name: Datt1
    , Abbrev. : Datt1
     
    N: 39
          , Name: Datt4
    , Abbrev. : Datt4
     
    N: 40
          , Name: Datt6
    , Abbrev. : Datt6
     
    N: 41
          , Name: Difference 1725/970 Difference LAI
    , Abbrev. : DLAI
     
    N: 42
          , Name: Difference 678/500
    , Abbrev. : D678/500
     
    N: 43
          , Name: Difference 800/550
    , Abbrev. : D800/550
     
    N: 44
          , Name: Difference 800/680
    , Abbrev. : D800/680
     
    N: 45
          , Name: Difference 833/658
    , Abbrev. : D833/658
     
    N: 46
          , Name: Difference NIR/Green Green Difference Vegetation Index
    , Abbrev. : GDVI
     
    N: 47
          , Name: Differenced Vegetation Index MSS
    , Abbrev. : DVIMSS
     
    N: 48
          , Name: Disease water stress index
    , Abbrev. : DSWI
     
    N: 49
          , Name: Disease-Water Stress Index 5
    , Abbrev. : DSWI-5
     
    N: 50
          , Name: DmSR
    , Abbrev. : DmSR
     
    N: 51
          , Name: Dolomite
    , Abbrev. : 
     
    N: 52
          , Name: Double Difference Index
    , Abbrev. : DD
     
    N: 53
          , Name: Double Peak Index
    , Abbrev. : DPI
     
    N: 54
          , Name: Enhanced Vegetation Index
    , Abbrev. : EVI
     
    N: 55
          , Name: Enhanced Vegetation Index 2
    , Abbrev. : EVI2
     
    N: 56
          , Name: Enhanced Vegetation Index 2 -2
    , Abbrev. : EVI2
     
    N: 57
          , Name: EPI
    , Abbrev. : EPI
     
    N: 58
          , Name: Epidote/Chlorite/Amphibole
    , Abbrev. : 
     
    N: 59
          , Name: Ferric iron, Fe2+
    , Abbrev. : Fe2+
     
    N: 60
          , Name: Ferric iron, Fe3+
    , Abbrev. : Fe3+
     
    N: 61
          , Name: Ferric Oxides
    , Abbrev. : 
     
    N: 62
          , Name: Ferrous iron
    , Abbrev. : 
     
    N: 63
          , Name: Ferrous Silicates
    , Abbrev. : 
     
    N: 64
          , Name: Gitelson2
    , Abbrev. : 
     
    N: 65
          , Name: Global Environment Monitoring Index
    , Abbrev. : GEMI
     
    N: 66
          , Name: Global Vegetation Moisture Index
    , Abbrev. : GVMI
     
    N: 67
          , Name: Gossan
    , Abbrev. : 
     
    N: 68
          , Name: Green atmospherically resistant vegetation index
    , Abbrev. : GARI
     
    N: 69
          , Name: Green leaf index
    , Abbrev. : GLI
     
    N: 70
          , Name: Green Normalized Difference Vegetation Index
    , Abbrev. : GNDVI
     
    N: 71
          , Name: Green Optimized Soil Adjusted Vegetation Index
    , Abbrev. : GOSAVI
     
    N: 72
          , Name: Green Soil Adjusted Vegetation Index
    , Abbrev. : GSAVI
     
    N: 73
          , Name: Green-Blue NDVI
    , Abbrev. : GBNDVI
     
    N: 74
          , Name: Green-Red NDVI
    , Abbrev. : GRNDVI
     
    N: 75
          , Name: Greenness Above Bare Soil
    , Abbrev. : GRABS
     
    N: 76
          , Name: Host Rock
    , Abbrev. : 
     
    N: 77
          , Name: Hue
    , Abbrev. : H
     
    N: 78
          , Name: Hyperspectral perpendicular VI
    , Abbrev. : PVIhyp
     
    N: 79
          , Name: Ideal vegetation index
    , Abbrev. : IVI
     
    N: 80
          , Name: Infrared percentage vegetation index
    , Abbrev. : IPVI
     
    N: 81
          , Name: Intensity
    , Abbrev. : I 
     
    N: 82
          , Name: Inverse reflectance 550
    , Abbrev. : IR550
     
    N: 83
          , Name: Inverse reflectance 700
    , Abbrev. : IR700
     
    N: 84
          , Name: Kaolinitic
    , Abbrev. : 
     
    N: 85
          , Name: Laterite
    , Abbrev. : 
     
    N: 86
          , Name: Leaf Chlorophyll Index
    , Abbrev. : LCI
     
    N: 87
          , Name: Leaf Water Content Index
    , Abbrev. : LWCI
     
    N: 88
          , Name: Log Ratio
    , Abbrev. : LogR
     
    N: 89
          , Name: Maccioni
    , Abbrev. : 
     
    N: 90
          , Name: MCARI/MTVI2
    , Abbrev. : MCARI/MTVI2
     
    N: 91
          , Name: MCARI/OSAVI
    , Abbrev. : MCARI/OSAVI
     
    N: 92
          , Name: MCARI/OSAVI750
    , Abbrev. : MCARI/OSAVI750
     
    N: 93
          , Name: MCARI2/OSAVI2
    , Abbrev. : MCARI2/OSAVI2
     
    N: 94
          , Name: mCRIG
    , Abbrev. : mCRIG
     
    N: 95
          , Name: mCRIRE
    , Abbrev. : mCRIRE
     
    N: 96
          , Name: MERIS Terrestrial chlorophyll index
    , Abbrev. : MTCI
     
    N: 97
          , Name: Mid-infrared vegetation index
    , Abbrev. : MVI
     
    N: 98
          , Name: Misra Green Vegetation Index
    , Abbrev. : MGVI
     
    N: 99
          , Name: Misra Non Such Index
    , Abbrev. : MNSI
     
    N: 100
          , Name: Misra Soil Brightness Index
    , Abbrev. : MSBI
     
    N: 101
          , Name: Misra Yellow Vegetation Index
    , Abbrev. : MYVI
     
    N: 102
          , Name: mND680
    , Abbrev. : mND680
     
    N: 103
          , Name: Modified anthocyanin reflectance index
    , Abbrev. : mARI
     
    N: 104
          , Name: Modified Chlorophyll Absorption in Reflectance Index
    , Abbrev. : MCARI
     
    N: 105
          , Name: Modified Chlorophyll Absorption in Reflectance Index 1
    , Abbrev. : MCARI1
     
    N: 106
          , Name: Modified Chlorophyll Absorption in Reflectance Index 1510
    , Abbrev. : MCARI1510
     
    N: 107
          , Name: Modified Chlorophyll Absorption in Reflectance Index 2
    , Abbrev. : MCARI2
     
    N: 108
          , Name: Modified Chlorophyll Absorption Ratio Index 705,750
    , Abbrev. : MCARI705
     
    N: 109
          , Name: Modified Chlorophyll Absorption Ratio Index 710
    , Abbrev. : MCARI710
     
    N: 110
          , Name: Modified NDVI
    , Abbrev. : mNDVI
     
    N: 111
          , Name: Modified Normalised Difference 734/747/715/726 Vogelmann indices 2
    , Abbrev. : Vog2
     
    N: 112
          , Name: Modified Normalised Difference 750/705
    , Abbrev. : MND750/705
     
    N: 113
          , Name: Modified Normalized Difference 734/747/715/720
    , Abbrev. : MD734/747/715/72
     
    N: 114
          , Name: Modified Normalized Difference 850/1788/1928
    , Abbrev. : ND850/1788/1928
     
    N: 115
          , Name: Modified Normalized Difference 850/2218/1928
    , Abbrev. : ND850/2218/1928
     
    N: 116
          , Name: Modified Normalized Difference Vegetation Index RVI
    , Abbrev. : MRVI
     
    N: 117
          , Name: Modified Simple Ratio
    , Abbrev. : mSR
     
    N: 118
          , Name: Modified Simple Ratio 670,800
    , Abbrev. : MSR670
     
    N: 119
          , Name: Modified Simple Ratio 705,750
    , Abbrev. : MSR705
     
    N: 120
          , Name: Modified Simple Ratio 705/445
    , Abbrev. : MSR705/445
     
    N: 121
          , Name: Modified Simple Ratio NIR/RED
    , Abbrev. : MSRNir/Red
     
    N: 122
          , Name: Modified Soil Adjusted Vegetation Index
    , Abbrev. : MSAVI
     
    N: 123
          , Name: Modified Soil Adjusted Vegetation Index hyper
    , Abbrev. : MSAVIhyper
     
    N: 124
          , Name: Modified Triangular Vegetation Index 1
    , Abbrev. : MTVI1
     
    N: 125
          , Name: Modified Triangular Vegetation Index 2
    , Abbrev. : MTVI2
     
    N: 126
          , Name: Modifies NLI
    , Abbrev. : MNLI
     
    N: 127
          , Name: mSR2
    , Abbrev. : mSR2
     
    N: 128
          , Name: Muscovite
    , Abbrev. : 
     
    N: 129
          , Name: new Double Difference Index
    , Abbrev. : DDn
     
    N: 130
          , Name: Nonlinear vegetation index
    , Abbrev. : NLI
     
    N: 131
          , Name: Norm G
    , Abbrev. : Norm G
     
    N: 132
          , Name: Norm NIR
    , Abbrev. : Norm NIR
     
    N: 133
          , Name: Norm R
    , Abbrev. : Norm R
     
    N: 134
          , Name: Normalized Difference 1070/1200 NDWI-Hyperion
    , Abbrev. : NDWI-Hyp
     
    N: 135
          , Name: Normalized Difference 1080/1180
    , Abbrev. : ND1080/1180
     
    N: 136
          , Name: Normalized Difference 1080/1260
    , Abbrev. : ND1080/1260
     
    N: 137
          , Name: Normalized Difference 1080/1450
    , Abbrev. : ND1080/1450
     
    N: 138
          , Name: Normalized Difference 1080/1675
    , Abbrev. : ND1080/1675
     
    N: 139
          , Name: Normalized Difference 1080/2170
    , Abbrev. : ND1080/2170
     
    N: 140
          , Name: Normalized Difference 1094/1205 Leaf water VI 2
    , Abbrev. : LWVI-2
     
    N: 141
          , Name: Normalized Difference 1094/983 Leaf water VI 1
    , Abbrev. : LWVI-1
     
    N: 142
          , Name: Normalized Difference 1180/1450
    , Abbrev. : ND1180/1450
     
    N: 143
          , Name: Normalized Difference 1180/1675
    , Abbrev. : ND1180/1675
     
    N: 144
          , Name: Normalized Difference 1180/2170
    , Abbrev. : ND1180/2170
     
    N: 145
          , Name: Normalized Difference 1260/1450
    , Abbrev. : ND1260/1450
     
    N: 146
          , Name: Normalized Difference 1260/1675
    , Abbrev. : ND1260/1675
     
    N: 147
          , Name: Normalized Difference 1260/2170
    , Abbrev. : ND1260/2170
     
    N: 148
          , Name: Normalized Difference 1510/660 NRI1510
    , Abbrev. : ND1510/660
     
    N: 149
          , Name: Normalized Difference 2160/1540 Normalized Difference leaf canopy biomass
    , Abbrev. : NDBleaf
     
    N: 150
          , Name: Normalized Difference 2260/1490 Normalized Difference leaf mass per area
    , Abbrev. : NDlma
     
    N: 151
          , Name: Normalized Difference 415/435 Normalized Phaeophytinization Index , Normalized difference pigment index NDPI
    , Abbrev. : NPQI
     
    N: 152
          , Name: Normalized Difference 528/587 Photochemical Reflectance Index 528/587
    , Abbrev. : PRI528/587
     
    N: 153
          , Name: Normalized Difference 531/570 Photochemical Reflectance Index 531/570
    , Abbrev. : PRI531/570
     
    N: 154
          , Name: Normalized Difference 550/450 Plant pigment ratio
    , Abbrev. : PPR
     
    N: 155
          , Name: Normalized Difference 550/530 Physiological reflectance index
    , Abbrev. : PRI550/530
     
    N: 156
          , Name: Normalized Difference 550/531
    , Abbrev. : ND550/531
     
    N: 157
          , Name: Normalized Difference 550/650 Photosynthetic vigour ratio
    , Abbrev. : PVR
     
    N: 158
          , Name: Normalized Difference 570/531 Photochemical Reflectance Index 570/531
    , Abbrev. : PRI570/531
     
    N: 159
          , Name: Normalized Difference 570/539
    , Abbrev. : ND570/539
     
    N: 160
          , Name: Normalized Difference 680/430 Normalized Pigment Chlorophyll Index
    , Abbrev. : NPCI
     
    N: 161
          , Name: Normalized Difference 682/553
    , Abbrev. : ND682/553
     
    N: 162
          , Name: Normalized Difference 750/550 Green NDVI
    , Abbrev. : NDVIg
     
    N: 163
          , Name: Normalized Difference 750/650
    , Abbrev. : NDVI750/650
     
    N: 164
          , Name: Normalized Difference 750/660
    , Abbrev. : ND750/660
     
    N: 165
          , Name: Normalized Difference 750/680
    , Abbrev. : ND750/680
     
    N: 166
          , Name: Normalized Difference 750/705 Chl NDI
    , Abbrev. : NDVI705
     
    N: 167
          , Name: Normalized Difference 750/710 Red Edge NDVI
    , Abbrev. : reNDVI
     
    N: 168
          , Name: Normalized Difference 774/677
    , Abbrev. : ND774/677
     
    N: 169
          , Name: Normalized Difference 780/550 Green NDVI hyper
    , Abbrev. : GNDVIhyper
     
    N: 170
          , Name: Normalized Difference 782/666
    , Abbrev. : ND782/666
     
    N: 171
          , Name: Normalized Difference 790/670
    , Abbrev. : ND790/670
     
    N: 172
          , Name: Normalized Difference 790/720 Normalized difference red edge index
    , Abbrev. : NDRE
     
    N: 173
          , Name: Normalized Difference 800/1180
    , Abbrev. : ND800/1180
     
    N: 174
          , Name: Normalized Difference 800/1260
    , Abbrev. : ND800/1260
     
    N: 175
          , Name: Normalized Difference 800/1450
    , Abbrev. : ND800/1450
     
    N: 176
          , Name: Normalized Difference 800/1675
    , Abbrev. : ND800/1675
     
    N: 177
          , Name: Normalized Difference 800/2170
    , Abbrev. : ND800/2170
     
    N: 178
          , Name: Normalized Difference 800/470 Pigment specific normalised di€fference C2
    , Abbrev. : PSNDc2
     
    N: 179
          , Name: Normalized Difference 800/500 Pigment specific normalised di€fference C1
    , Abbrev. : PSNDc1
     
    N: 180
          , Name: Normalized Difference 800/550 Green NDVI hyper 2
    , Abbrev. : GNDVIhyper2
     
    N: 181
          , Name: Normalized Difference 800/635 Pigment specific normalised di€fference B2
    , Abbrev. : PSNDb2
     
    N: 182
          , Name: Normalized Difference 800/650 Pigment specific normalised di€fference B1
    , Abbrev. : PSNDb1
     
    N: 183
          , Name: Normalized Difference 800/675 Pigment specific normalised di€fference A1
    , Abbrev. : PSNDa1
     
    N: 184
          , Name: Normalized Difference 800/680  Pigment specific normalised di€fference A2, Lichtenthaler indices 1, NDVIhyper
    , Abbrev. : ND800/680
     
    N: 185
          , Name: Normalized Difference 819/1600 NDII
    , Abbrev. : NDII
     
    N: 186
          , Name: Normalized Difference 819/1649 NDII 2
    , Abbrev. : NDII2
     
    N: 187
          , Name: Normalized Difference 820/1600 Normalized Difference Moisture Index
    , Abbrev. : NDMI
     
    N: 188
          , Name: Normalized Difference 827/668
    , Abbrev. : ND827/668
     
    N: 189
          , Name: Normalized Difference 833/1649 Infrared Index
    , Abbrev. : ND833/1649
     
    N: 190
          , Name: Normalized Difference 833/658
    , Abbrev. : ND833/658
     
    N: 191
          , Name: Normalized Difference 850/1650 Normalized Difference Infrared Index
    , Abbrev. : NDII
     
    N: 192
          , Name: Normalized Difference 857/1241 Normalized Difference Water Index
    , Abbrev. : NDWI2
     
    N: 193
          , Name: Normalized Difference 860/1240 Normalized Difference Water Index
    , Abbrev. : NDWI
     
    N: 194
          , Name: Normalized Difference 860/1640
    , Abbrev. : SIWSI
     
    N: 195
          , Name: Normalized Difference 895/675
    , Abbrev. : ND895/675
     
    N: 196
          , Name: Normalized Difference 900/680
    , Abbrev. : ND900/680
     
    N: 197
          , Name: Normalized Difference 925/710 Normalized Difference Chlorophyll
    , Abbrev. : NDchl
     
    N: 198
          , Name: Normalized Difference 960/1180
    , Abbrev. : ND960/1180
     
    N: 199
          , Name: Normalized Difference 960/1260
    , Abbrev. : ND960/1260
     
    N: 200
          , Name: Normalized Difference 960/1450
    , Abbrev. : ND960/1450
     
    N: 201
          , Name: Normalized Difference 960/1675
    , Abbrev. : ND960/1675
     
    N: 202
          , Name: Normalized Difference 960/2170
    , Abbrev. : ND960/2170
     
    N: 203
          , Name: Normalized Difference Green/Red Normalized green red difference index, Visible Atmospherically Resistant Indices Green (VIgreen)
    , Abbrev. : NGRDI
     
    N: 204
          , Name: Normalized Difference Lignin Index
    , Abbrev. : NDLI
     
    N: 205
          , Name: Normalized Difference MIR/NIR Normalized Difference Vegetation Index (in case of strong atmospheric disturbances)
    , Abbrev. : NDVI
     
    N: 206
          , Name: Normalized Difference NIR/Blue Blue-normalized difference vegetation index
    , Abbrev. : BNDVI
     
    N: 207
          , Name: Normalized Difference NIR/Green Green NDVI
    , Abbrev. : GNDVI
     
    N: 208
          , Name: Normalized Difference NIR/MIR Modified Normalized Difference Vegetation Index
    , Abbrev. : MNDVI
     
    N: 209
          , Name: Normalized Difference NIR/Red Normalized Difference Vegetation Index, Calibrated NDVI - CDVI
    , Abbrev. : NDVI
     
    N: 210
          , Name: Normalized Difference NIR/Rededge Normalized Difference Red-Edge
    , Abbrev. : NDRE
     
    N: 211
          , Name: Normalized Difference NIR/SWIR Normalized Burn Ratio
    , Abbrev. : NBR
     
    N: 212
          , Name: Normalized Difference Nitrogen Index
    , Abbrev. : NDNI
     
    N: 213
          , Name: Normalized Difference Red/Green Redness Index
    , Abbrev. : RI
     
    N: 214
          , Name: Normalized Difference Rededge/Red
    , Abbrev. : NDVI rededge
     
    N: 215
          , Name: Normalized Difference Salinity Index
    , Abbrev. : NDSI
     
    N: 216
          , Name: Normalized Difference Vegetation Index 690-710
    , Abbrev. : NDVI690-710
     
    N: 217
          , Name: Normalized Difference Vegetation Index C
    , Abbrev. : NDVIc
     
    N: 218
          , Name: Optimized Soil Adjusted Vegetation Index
    , Abbrev. : OSAVI
     
    N: 219
          , Name: Optimized Soil Adjusted Vegetation Index 1510
    , Abbrev. : OSAVI1510
     
    N: 220
          , Name: Optimized Soil Adjusted Vegetation Index 2
    , Abbrev. : OSAVI2
     
    N: 221
          , Name: Optimized vegetation normalized index
    , Abbrev. : OVNI
     
    N: 222
          , Name: Pan NDVI
    , Abbrev. : PNDVI
     
    N: 223
          , Name: Perpendicular Vegetation Index
    , Abbrev. : PVI
     
    N: 224
          , Name: Phengitic
    , Abbrev. : 
     
    N: 225
          , Name: Plant Senescence Reflectance Index
    , Abbrev. : PSRI
     
    N: 226
          , Name: Quartz Rich Rocks
    , Abbrev. : 
     
    N: 227
          , Name: Ratio 675/700/650
    , Abbrev. : R675/700/650
     
    N: 228
          , Name: Ratio Analysis of Reflectance Spectra A1
    , Abbrev. : RARSa1
     
    N: 229
          , Name: Ratio Analysis of Reflectance Spectra A2
    , Abbrev. : RARSa2
     
    N: 230
          , Name: Ratio Analysis of Reflectance Spectra A3
    , Abbrev. : RARSa3
     
    N: 231
          , Name: Ratio Analysis of Reflectance Spectra A4
    , Abbrev. : RARSa4
     
    N: 232
          , Name: Ratio Analysis of Reflectance Spectra B1
    , Abbrev. : RARSb1
     
    N: 233
          , Name: Ratio Analysis of Reflectance Spectra B2
    , Abbrev. : RARSb2
     
    N: 234
          , Name: Ratio Analysis of Reflectance Spectra B3
    , Abbrev. : RARSb3
     
    N: 235
          , Name: Ratio Analysis of Reflectance Spectra B4
    , Abbrev. : RARSb4
     
    N: 236
          , Name: Ratio Analysis of Reflectance Spectra C1
    , Abbrev. : RARSc1
     
    N: 237
          , Name: Ratio Analysis of Reflectance Spectra C2
    , Abbrev. : RARSc2
     
    N: 238
          , Name: Ratio Analysis of Reflectance Spectra C3
    , Abbrev. : RARSc3
     
    N: 239
          , Name: Ratio Analysis of Reflectance Spectra C4
    , Abbrev. : RARSc4
     
    N: 240
          , Name: Ratio of WI and Normalised Difference 750/660
    , Abbrev. : WI/ND750
     
    N: 241
          , Name: RDVI
    , Abbrev. : RDVI
     
    N: 242
          , Name: RDVI2
    , Abbrev. : RDVI2
     
    N: 243
          , Name: Red edge 1
    , Abbrev. : Rededge1
     
    N: 244
          , Name: Red edge 2
    , Abbrev. : Rededge2
     
    N: 245
          , Name: Red-Blue NDVI
    , Abbrev. : RBNDVI
     
    N: 246
          , Name: Red-Edge Inflection Point 1
    , Abbrev. : REIP1
     
    N: 247
          , Name: Red-Edge Inflection Point 2
    , Abbrev. : REIP2
     
    N: 248
          , Name: Red-Edge Inflection Point 3
    , Abbrev. : REIP3
     
    N: 249
          , Name: Red-Edge Position Linear Interpolation
    , Abbrev. : REP
     
    N: 250
          , Name: Red-Edge Stress Vegetation Index
    , Abbrev. : RVSI
     
    N: 251
          , Name: Reduced Simple Ratio
    , Abbrev. : RSR
     
    N: 252
          , Name: Reflectance at the inflexion point
    , Abbrev. : Rre
     
    N: 253
          , Name: Relative Drought Index
    , Abbrev. : RDI
     
    N: 254
          , Name: Relative Greenness Index
    , Abbrev. : RGI
     
    N: 255
          , Name: Relative Water Content Index
    , Abbrev. : RWC
     
    N: 256
          , Name: Renormalized Difference Vegetation Index
    , Abbrev. : RDVI
     
    N: 257
          , Name: Residual Moisture Index
    , Abbrev. : RMI
     
    N: 258
          , Name: RVSI
    , Abbrev. : RVSI
     
    N: 259
          , Name: Saturation
    , Abbrev. : S
     
    N: 260
          , Name: SAVImir
    , Abbrev. : SAVImir
     
    N: 261
          , Name: Sericite/Muscovite/Illite/Smecite
    , Abbrev. : 
     
    N: 262
          , Name: Shape Index
    , Abbrev. : IF
     
    N: 263
          , Name: Silica 1
    , Abbrev. : 
     
    N: 264
          , Name: Silica 2
    , Abbrev. : 
     
    N: 265
          , Name: Silica 3
    , Abbrev. : 
     
    N: 266
          , Name: Silica 4
    , Abbrev. : 
     
    N: 267
          , Name: Siliceous Rocks
    , Abbrev. : 
     
    N: 268
          , Name: Simple Ratio 1058/1148
    , Abbrev. : RVIhyp
     
    N: 269
          , Name: Simple Ratio 1080/1180
    , Abbrev. : SR1080/1180
     
    N: 270
          , Name: Simple Ratio 1080/1260
    , Abbrev. : SR1080/1260
     
    N: 271
          , Name: Simple Ratio 1080/1450
    , Abbrev. : SR1080/1450
     
    N: 272
          , Name: Simple Ratio 1080/1675
    , Abbrev. : SR1080/1675
     
    N: 273
          , Name: Simple Ratio 1080/2170
    , Abbrev. : SR1080/2170
     
    N: 274
          , Name: Simple Ratio 1180/1080
    , Abbrev. : SR1180/1080
     
    N: 275
          , Name: Simple Ratio 1180/1450
    , Abbrev. : SR1180/1450
     
    N: 276
          , Name: Simple Ratio 1180/1675
    , Abbrev. : SR1180/1675
     
    N: 277
          , Name: Simple Ratio 1180/2170
    , Abbrev. : SR1180/2170
     
    N: 278
          , Name: Simple Ratio 1193/1126 Water content
    , Abbrev. : WC
     
    N: 279
          , Name: Simple Ratio 1250/1050 LAI determining index
    , Abbrev. : LAIDI
     
    N: 280
          , Name: Simple Ratio 1260/1080
    , Abbrev. : SR1260/1080
     
    N: 281
          , Name: Simple Ratio 1260/1450
    , Abbrev. : SR1260/1450
     
    N: 282
          , Name: Simple Ratio 1260/1675
    , Abbrev. : SR1260/1675
     
    N: 283
          , Name: Simple Ratio 1260/2170
    , Abbrev. : SR1260/2170
     
    N: 284
          , Name: Simple Ratio 1450/1080
    , Abbrev. : SR1450/1080
     
    N: 285
          , Name: Simple Ratio 1450/1180
    , Abbrev. : SR1450/1180
     
    N: 286
          , Name: Simple Ratio 1450/1260
    , Abbrev. : SR1450/1260
     
    N: 287
          , Name: Simple Ratio 1450/960
    , Abbrev. : SR1450/960
     
    N: 288
          , Name: Simple Ratio 1599/819 Moisture Stress Index 2
    , Abbrev. : MSI2
     
    N: 289
          , Name: Simple Ratio 1600/820 Moisture Stress Index
    , Abbrev. : MSI
     
    N: 290
          , Name: Simple Ratio 1650/2218
    , Abbrev. : TM5/TM7
     
    N: 291
          , Name: Simple Ratio 1660/550 Disease-Water Stress Index 2
    , Abbrev. : DSWI-2
     
    N: 292
          , Name: Simple Ratio 1660/680 Disease-Water Stress Index 3
    , Abbrev. : DSWI-3
     
    N: 293
          , Name: Simple Ratio 1675/1080
    , Abbrev. : SR1675/1080
     
    N: 294
          , Name: Simple Ratio 1675/1180
    , Abbrev. : SR1675/1180
     
    N: 295
          , Name: Simple Ratio 1675/1260
    , Abbrev. : SR1675/1260
     
    N: 296
          , Name: Simple Ratio 1675/960
    , Abbrev. : SR1675/960
     
    N: 297
          , Name: Simple Ratio 2170/1080
    , Abbrev. : SR2170/1080
     
    N: 298
          , Name: Simple Ratio 2170/1180
    , Abbrev. : SR2170/1180
     
    N: 299
          , Name: Simple Ratio 2170/1260
    , Abbrev. : SR2170/1260
     
    N: 300
          , Name: Simple Ratio 2170/960
    , Abbrev. : SR2170/960
    ............

  8. #8
    Expert éminent

    Homme Profil pro
    Inscrit en
    Octobre 2008
    Messages
    4 300
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations forums :
    Inscription : Octobre 2008
    Messages : 4 300
    Points : 6 780
    Points
    6 780
    Par défaut
    Pour l'interface je pense que Qt va faciliter les choses, par contre tu ne réponds pas exactement à ma première question.

    Je la pose autrement.

    Quand l'utilisateur de ton appli entre un numéro d'indice, il rentre quoi, il se réfère à quoi ?

    Si il rentre 17, est-ce l'élément qui a l'indice 17 ou bien celui qui est à la ligne 17 dans le tableau du site ? Ce sont deux choses différentes.

    La deuxième option n'est d'ailleurs pas la bonne puisque l'on peut changer l'ordre d'affichage des éléments dans le tableau.

  9. #9
    Futur Membre du Club
    Femme Profil pro
    Analyse système
    Inscrit en
    Septembre 2014
    Messages
    11
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Autre

    Informations professionnelles :
    Activité : Analyse système
    Secteur : Arts - Culture

    Informations forums :
    Inscription : Septembre 2014
    Messages : 11
    Points : 5
    Points
    5
    Par défaut
    Merci,

    j’aimerai bien

    1-l'utilisateur écrire le nom de l'index ou l’abréviation (par exemple: AFRI1600)

    2- plusieurs choix apparaissent à l'utilisateur dans la première boite(presque la même forme comme indiqué dans ce lien.
    http://doc.qt.io/qt-4.8/qt-network-g...t-example.html)

    3-l'utilisateur fait son choix
    4-L'équation sera affiché dans la deuxième boite

  10. #10
    Expert éminent

    Homme Profil pro
    Inscrit en
    Octobre 2008
    Messages
    4 300
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations forums :
    Inscription : Octobre 2008
    Messages : 4 300
    Points : 6 780
    Points
    6 780
    Par défaut
    En fait, partant des indices des éléments, tu peux accéder à une page simplifiée d'où il est aisé d'isoler la portion du code qui t'intéresse.

    Ensuite tu crées une nouvelle page sur ton disque et tu la refile au QWebView telle quelle en laissant le QWebView se démerder tout seul avec l'affichage correct de la formule

    Un example minimaliste qui fonctionne:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
     
    # -*- coding: utf-8 -*-
     
    import sys
    import urllib.request
     
    from html.parser import HTMLParser
     
    from PyQt5.QtCore import QUrl
    from PyQt5.QtWidgets import QApplication, QWidget, QVBoxLayout, QSpinBox
    from PyQt5.QtWebKitWidgets import QWebView
     
    class Main:
        def __init__(self):
            self.ui = MainUi(self)
            self.ui.show()
            self.ui.indice_spb.valueChanged.connect(self.on_indice_changed)
     
        def on_indice_changed(self, indice):
            content = self.get_page_content(indice)
            parser = ElementParser()
            parser.feed(content)
            extract = content.split('\n')[parser.start[0]-1:parser.end[0]]
            self.make_page(extract)
            self.ui.webview.setUrl(QUrl.fromLocalFile('/chemin/element.html'))
     
        def get_page_content(self, idx):
            url = "http://www.indexdatabase.de/db/i-single.php?id=%s" % idx
            page = urllib.request.urlopen(url).read()
            return str(page.decode('utf-8', 'replace'))
     
        def make_page(self, element):
            element = "\n".join(element).replace('<td>', '')
            html = page % element
            with open('/chemin/element.html', 'w') as outf:
                outf.write(html)
     
     
    class ElementParser(HTMLParser):
        def __init__(self):
            super().__init__()
            self.selection = None
            self.inmath = False
            self.start = 0
            self.end = 0
     
        def handle_starttag(self, tag, attrs):
            if tag == "math" and not self.end:
                self.inmath = True
                self.start = self.getpos()
     
        def handle_endtag(self, tag):
            if tag == "math":
                if not self.end:
                    self.end = self.getpos()
     
    class MainUi(QWidget):
        def __init__(self, core):
            super().__init__()
            self.core = core
            layout = QVBoxLayout(self)
            self.indice_spb = QSpinBox(self)
            self.webview = QWebView(self)
            layout.addWidget(self.indice_spb)
            layout.addWidget(self.webview)
     
    page = """<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
                   "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd" >
    <html  xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
      <head>
       <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
       <meta http-equiv="content-script-type" content="text/javascript" />
       <script type="text/javascript"
        src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
       </script> 
      </head>
     
      <body>
          <div id="content">
    %s
          </div>
      </body>
    </html>"""
     
    if __name__ == '__main__':
        app = QApplication([])
        main = Main()
        main.on_indice_changed(2)
        sys.exit(app.exec_())
    Faut mettre au propre bien sur et il n'y a pas de gestion d'erreur, mais la base est là.

    Pour les url, QWebView exige le chemin complet.

  11. #11
    Futur Membre du Club
    Femme Profil pro
    Analyse système
    Inscrit en
    Septembre 2014
    Messages
    11
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Autre

    Informations professionnelles :
    Activité : Analyse système
    Secteur : Arts - Culture

    Informations forums :
    Inscription : Septembre 2014
    Messages : 11
    Points : 5
    Points
    5
    Par défaut
    Bonjour,
    Merci pour votre contribution,
    est que on peut chercher avec mot-clé (Name ou Abbrev.) au lieu d'utiliser l'ID ?
    Cordialement

  12. #12
    Expert éminent

    Homme Profil pro
    Inscrit en
    Octobre 2008
    Messages
    4 300
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations forums :
    Inscription : Octobre 2008
    Messages : 4 300
    Points : 6 780
    Points
    6 780
    Par défaut
    Oui, si tu possèdes une liste de correspondance nom -> indice.

  13. #13
    Expert éminent

    Homme Profil pro
    Inscrit en
    Octobre 2008
    Messages
    4 300
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations forums :
    Inscription : Octobre 2008
    Messages : 4 300
    Points : 6 780
    Points
    6 780
    Par défaut
    Après tout, puisque tu sais le lire avec BeautifulSoup, il suffit de modifier légèrement ton code pour avoir ta liste de correspondances.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
     
    import urllib2
    from bs4 import BeautifulSoup
     
    url = "http://www.indexdatabase.de/db/i.php"
     
    page = urllib2.urlopen(url).read()
    soup = BeautifulSoup(page, 'html.parser')
     
    elements = []
    for tr in soup.find_all('tr')[2:]:
        tds = tr.find_all('td')
        link = tds[1].a
        elements.append((tds[1].a.get('href').split('=')[1], 
                            tds[1].text.strip(), tds[2].text.strip()))
     
    # On teste les dix premiers
    for e in elements[:10]:
        print "%4s  %s  %s" %(e[0], e[1], e[2])
    Ce qui donne:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
     
     393  Aerosol free vegetation index 1600  AFRI1600
     395  Aerosol free vegetation index 2100  AFRI2100
       1  Alteration  
       2  Alunite/Kaolinite/Pyrophylite  
       3  Amphibole  
     230  Amphibole / MgOH  
     214  Anthocyanin reflectance index  ARI
     574  Ashburn Vegetation Index  AVI
       4  Atmospherically Resistant Vegetation Index  ARVI
     396  Atmospherically Resistant Vegetation Index 2  ARVI2
    Il ne te reste plus qu'à sauver cette liste dans un fichier (pickle, csv, ...)

    Avec Qt, dans une QLineEdit tu pourras même faire de l'autocomplétion.

  14. #14
    Futur Membre du Club
    Femme Profil pro
    Analyse système
    Inscrit en
    Septembre 2014
    Messages
    11
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Autre

    Informations professionnelles :
    Activité : Analyse système
    Secteur : Arts - Culture

    Informations forums :
    Inscription : Septembre 2014
    Messages : 11
    Points : 5
    Points
    5
    Par défaut
    Salut,
    Voici un code pour l'autocomplétion:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    from PyQt4.QtGui import *
    from PyQt4.QtCore import *
    import sys
     
     
    def main():
        app = QApplication(sys.argv)
        edit = QLineEdit()
        strList = QString("AFRI1600;AFRI2100;MgOH;ARI;AVI;ARVI;ARVI2").split(";")
        completer = QCompleter(strList, edit)
     
        edit.setWindowTitle("PyQT QLineEdit Auto Complete")
        edit.setCompleter(completer)
        edit.show()
     
        sys.exit(app.exec_())
     
     
    if __name__ == '__main__':
        main()
    Comme vous le savez chaque index a un nom et abréviation, est-il possible de modifier le code de telle façon que l’utilisateur écrire en minuscules ou majuscule, écrire trois caractères successifs d’un l’index (n’importe quelle position), le code montre les suggestions dans la QlineEdit.

    Cordialement

  15. #15
    Expert éminent

    Homme Profil pro
    Inscrit en
    Octobre 2008
    Messages
    4 300
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations forums :
    Inscription : Octobre 2008
    Messages : 4 300
    Points : 6 780
    Points
    6 780
    Par défaut
    Ça me paraît compliqué pour peu de chose.

    Il te faut récupérer le signal textChanged de la QLineEdit, vérifier que tous les caractères sont en majuscule, si oui appliquer le completer abréviations, si non appliquer le completer noms et réinjecter le signal à la QLineEdit.

    Et cela implique que l'utilisateur sache que les abréviations doivent s'écrire en majuscule sinon ni le completer n'agira pas et ça ne permettra pas d'identifier l'élément.

    À ta place j'utiliserai une QLineEdit différente pour les noms et les abréviations, avec l'avantage que les abréviation pourront aussi être entrées en minuscule avec QCompleter.setCaseSensitivity(QtCore.Qt.CaseInsensitive).

Discussions similaires

  1. Envoyer SMS depuis mon site web
    Par bil123 dans le forum Bibliothèques et frameworks
    Réponses: 13
    Dernier message: 30/07/2014, 16h22
  2. Réponses: 8
    Dernier message: 01/03/2013, 15h06
  3. [VB.NET]Onvrir un fichier depuis un site web
    Par PM_calou dans le forum Windows Forms
    Réponses: 1
    Dernier message: 25/10/2006, 18h13
  4. [AJAX/XML/JAVA] Afficher un flux de données depuis un site web
    Par chodaboy34 dans le forum Général JavaScript
    Réponses: 1
    Dernier message: 10/10/2006, 16h38
  5. Envoyer des textos depuis un site web ?
    Par Ylias dans le forum Général Conception Web
    Réponses: 18
    Dernier message: 27/02/2006, 13h45

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo