Skip to content
Snippets Groups Projects
Select Git revision
  • ed29fce333dbcaeb7bd090bba295b3fd70433d85
  • mui5-tetras-main-stable default protected
  • mui5-tetras-main-old-stable
  • preprod protected
  • 75-dernieres-ameliorations-avant-workshop-du-7-02
  • wip-fix-xywh
  • wip-positionement-annot
  • wip-surface-transformer
  • uploads-file
  • 69-la-video-demare-quand-on-fait-glisser-le-slider-et-le-clic-creer-un-decalage-entre-le-player
  • 61-recettage-des-outils-d-annotation
  • gestion_multiple_ouverture_pannel_annotation
  • autorisation_un_pannel_annotation
  • autorisation_un_pannel_edition_annotation
  • récupération_temps_video
  • save-shapes-and-position
  • fix-error-create-annotation-pannel
  • time-saving-on-annotation
  • tetras-main protected
  • fix-poc-mirador
  • tetras-antho-test
21 results

utils.js

Blame
  • console.py 1.59 KiB
    #!/usr/bin/python3
    # -*- coding: utf-8 -*
    # Copyright (C) 2017 Tetras Libre <contact@Tetras-Libre.fr>
    # Author: Beniamine, David <David.Beniamine@Tetras-Libre.fr>
    #
    # This program is free software: you can redistribute it and/or modify
    # it under the terms of the GNU Affero General Public License as
    # published by the Free Software Foundation, either version 3 of the
    # License, or (at your option) any later version.
    #
    # This program is distributed in the hope that it will be useful,
    # but WITHOUT ANY WARRANTY; without even the implied warranty of
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    # GNU Affero General Public License for more details.
    #
    # You should have received a copy of the GNU Affero General Public License
    # along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    from zxcvbn import zxcvbn
    from dateutil.parser import parse
    import getpass
    from test_pass import test_pass
    
    # Read password
    passwd = getpass.getpass("Merci d'entrer un mot de passe qui ne sera pas affiché\n")
    
    word = "a"
    user_inputs = []
    while word != "":
        word = input("Veuillez entrer un mot d'aide ou une date au format jj/mm/yyyy pour le système ou tappez [entrer]"
                     "pour arrêter\n")
        if word != "":
            try:
                date = parse(word)
                words = [date.day]
                words.append(date.month)
                words.append(date.year)
            except:
                words = [word]
            finally:
                for word in words:
                    user_inputs.append(word)
    
    # TODO call wrapper
        lines = test_pass(passwd, user_inputs)
    for line in lines:
        print(line)