Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
erqewee authored Apr 8, 2022
1 parent a653833 commit 5661ff3
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 14 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]
Copyright [2022] [Eren]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
53 changes: 53 additions & 0 deletions TR/methods/CreateNewUser.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
def NewUser(Application, randomName, Error, file, log):
i = input("İsmin Cinsiyetini Seçiniz (Male [Erkek] | Female [Kız]): ")

data = [];
data.clear()


if((i == "Male") or (i == "male") or (i == "erkek")):
boy = randomName(gender = "Male");
data.append(boy)

Application(
"""
Kullanıcı Adı: %(name)s
Kullanıcı adı '%(filename)s' dosyasına kaydedildi!
""" % { "name": data, "filename": file })

log.write(
"""
|---------------------|
| > Ad: '%(name)s'
|---------------------|
| Cinsiyet: Erkek
|---------------------|
""" % { "name": boy })
log.close();


elif((i == "Female") or (i == "female") or (i == "kız") or (i == "kadın")):
girl = randomName(gender = "Female");
data.append(girl)

Application(
"""
Kullanıcı Adı: %(name)s
Kullanıcı adı '%(filename)s' dosyasına kaydedildi!
""" % { "name": data, "filename": file })

log.write(
"""
|---------------------|
| > Ad: '%(name)s'
|---------------------|
| Cinsiyet: 'Kız / Kadın'
|---------------------|
""" % { "name": girl })
log.close();


else:
Application(Error("Böyle cinsiyet bulunamadı!"))
36 changes: 23 additions & 13 deletions TR/passgen-tr.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# IMPORT MODULES
from random import *;
from string import *;
from datetime import datetime

from datetime import datetime;
from names import get_full_name;
# IMPORT MODULES

# IMPORT METHODS
Expand All @@ -13,6 +13,7 @@
from methods.Error import *; # send private custom Error message
from methods.Application import *; # Application messages
from methods.Exit import *; # Stop program
from methods.CreateNewUser import *; # Create random name
# IMPORT METHODS


Expand All @@ -28,6 +29,10 @@
fileName2 = "allCreatedPassword-logs.txt"
file2 = open(fileName2, "a", encoding = "UTF-8")

# Random username file
userLog = "allCreatedUsers-log.txt"
userFile = open(userLog, "a", encoding = "UTF-8")

# Get user, User Name
userName = input("Adınızı giriniz: ")

Expand Down Expand Up @@ -80,17 +85,19 @@
val = int(input("""
+ Yapılacak işlemi giriniz.
|-------------------------|
| 1 - Oluşturulana Ekle |
|-------------------------|
| 2 - Yeni Şifre Oluştur |
|-------------------------|
| 3 - Şifreleri Oku |
|-------------------------|
| 0 - Şifre Geçmişini Sil |
|-------------------------|
| 9 - Uygulamayı Durdur |
|-------------------------|
|----------------------------|
| 1 - Oluşturulana Ekle |
|----------------------------|
| 2 - Yeni Şifre Oluştur |
|----------------------------|
| 3 - Şifreleri Oku |
|----------------------------|
| 4 - Kullanıcı Adı Oluştur |
|----------------------------|
| 0 - Şifre Geçmişini Sil |
|----------------------------|
| 9 - Uygulamayı Durdur |
|----------------------------|
> İşlem: """))

Expand Down Expand Up @@ -120,6 +127,9 @@

if(val == 3):
ReadAll(Application, fileName2, fileName);

elif(val == 4):
NewUser(Application, get_full_name, Error, userLog, userFile)

elif(val == 0):
ClearCache(Application, fileName, fileName2);
Expand Down

0 comments on commit 5661ff3

Please sign in to comment.