diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index baf21e5..0000000 Binary files a/.DS_Store and /dev/null differ diff --git a/.gitignore b/.gitignore index d8db453..1507a28 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,9 @@ venv .vscode +.DS_Store __pycache__ *.pyc data/sqlite.db algo.py -cert/*.pem -cert/*.p12 \ No newline at end of file +*.pem +*.p12 \ No newline at end of file diff --git a/demo.py b/demo.py index a4500c0..55cf0d6 100644 --- a/demo.py +++ b/demo.py @@ -1,13 +1,9 @@ #-*- coding: utf-8 -*- # NOTE : à exécuter dans un shell Python plutôt que comme un script ! - from manager import Manager -import json -import utils -import datetime -test_manager = Manager() # avec proxy -test_manager = Manager(how_to_auth='cert') +test_manager = Manager() # avec proxy +test_manager = Manager(how_to_auth='cert') # avec cert requestedFlightFields = ['flightState', 'cfmuFlightType'] # démo queryFlightsByAirspace diff --git a/demo2.py b/demo2.py deleted file mode 100644 index 19badbb..0000000 --- a/demo2.py +++ /dev/null @@ -1,35 +0,0 @@ -#-*- coding: utf-8 -*- -# NOTE : à exécuter dans un shell Python plutôt que comme un script ! - -from manager import Manager -import json -import utils -import datetime - -test_manager = Manager(how_to_auth='cert') -requestedFlightFields = ['flightState', 'cfmuFlightType'] - -# démo queryFlightsByAirspace -flight_list = test_manager.queryFlightsByAirspace( - airspace="LFFFTH", - startTime="2019-10-18 06:00", - endTime="2019-10-18 07:30", - requestedFlightFields=requestedFlightFields) -print(flight_list.data) - -# démo queryFlightsByAerodrome -flight_list = test_manager.queryFlightsByAerodrome( - aerodrome="LFPG", - aerodromeRole="DEPARTURE", - startTime="2019-10-16 17:00", - endTime="2019-10-16 18:30", - requestedFlightFields=requestedFlightFields) -print(flight_list.data) - -# démo queryFlightsByTrafficVolume -flight_list = test_manager.queryFlightsByTrafficVolume( - trafficVolume='LFFTN', - startTime="2019-10-16 17:00", - endTime="2019-10-16 18:30", - requestedFlightFields=requestedFlightFields) -print(flight_list.data) \ No newline at end of file diff --git a/git_untrack.sh b/git_untrack.sh new file mode 100644 index 0000000..00a2bf8 --- /dev/null +++ b/git_untrack.sh @@ -0,0 +1,4 @@ +#!/bin/sh +git rm -r --cached . +git add . +git commit -m ".gitignore fix" \ No newline at end of file diff --git a/install.sh b/install.sh index f626550..3b4ea08 100644 --- a/install.sh +++ b/install.sh @@ -8,11 +8,4 @@ fi PATH_TO_ZEEP_COLLECTION=$(find . -name collection.py) yes | cp -rf ./upgrade/collection_new.py $PATH_TO_ZEEP_COLLECTION echo "Le fichier collection.py a bien été remplacé !" - -if [ ! -d data ]; then - echo "On créé le répertoire data" - mkdir ./data - echo "Répertoire data créé avec succès !" -fi - exit 0 \ No newline at end of file diff --git a/set_cert_key.sh b/set_cert_key.sh index 5f68082..c6d420f 100644 --- a/set_cert_key.sh +++ b/set_cert_key.sh @@ -1,6 +1,5 @@ #!/bin/sh NBR_RESULTS=$(find ./cert -name '*.p12' | wc -l) -# NBR_RESULTS=$(find ./venv -name collection.py | wc -l) if [ $NBR_RESULTS = '0' ]; then printf "Aucun fichier trouvé avec l'extension .p12 dans cert/" exit 1 @@ -9,16 +8,9 @@ elif [ $NBR_RESULTS -gt '1' ]; then exit 1 else FILE_NAME=$(find ./cert -name '*.p12') - #FILE_NAME="${FULL_FILE_NAME%.*}" printf "Un fichier .p12 a bien été trouvé dans /cert.\nQuel est votre mot de passe ?\n" read PASSWORD printf "On créé maintenant les fichier crt.pem et key.pem.\n" - #echo "openssl pkcs12 -in ${FILE_NAME} -passin=pass:${PASSWORD} -out ./cert/crt.pem -clcerts -nokeys" openssl pkcs12 -in ${FILE_NAME} -passin=pass:${PASSWORD} -out ./cert/crt.pem -clcerts -nokeys # pour le certificat openssl pkcs12 -in ${FILE_NAME} -passin=pass:${PASSWORD} -out ./cert/key.pem -nocerts -nodes # pour la clé -fi - -# filename=$(basename -- "$fullfile") -# extension="${filename##*.}" -# filename="${filename%.*}" -# b2bcert4dpa2019 \ No newline at end of file +fi \ No newline at end of file