[Firebase] 5. 사용자별 앱별 기기 제한 기반 등록 및 초과 시 차단 로직 구현
목표앱 실행 시 로그인 후:Firestore users/{uid}에서 deviceLimits[appId]를 읽어 해당 앱의 최대 허용 기기 수 확인users/{uid}/devices_{appId}에 등록된 기기 수 확인제한 이내면 현재 기기를 등록 후 사용 허용제한 초과 시 로그인 차단 및 안내 출력 # main_device_register.pyfrom firebase_config import authfrom firestore_client import dbimport getpassimport datetimeimport socketimport randomimport stringdef generate_device_id(): hostname = socket.gethostname() rand_suff..
[Firebase] 4. Python 앱에 Firebase SDK 연동 및 로그인 기능 구현
firebase_config.py main_auth_test.pyfrom firebase_config import authimport getpassdef sign_up(): email = input("가입할 이메일: ") password = getpass.getpass("가입할 비밀번호 (콘솔에 안 보임): ") try: user = auth.create_user_with_email_and_password(email, password) print("✅ 회원가입 성공:", user['email']) except Exception as e: print("❌ 회원가입 실패:", e)def sign_in(): email = input("로그인 이..
PyInstaller 빌드 후 settings.json 경로 이슈 해결 기록
🎯 PyInstaller 빌드 후 settings.json 경로 이슈 해결 기록문제PyInstaller 빌드 후 실행 시 settings.json이 exe 경로가 아닌 _internal 경로에 생성됨_internal은 읽기 전용이라 설정 저장/불러오기 작동 안함원인resource_path()에서 sys._MEIPASS를 사용하여 리소스와 유저 데이터 경로를 구분 없이 처리했기 때문해결리소스(icon, version.txt 등) → resource_path()에서 _MEIPASS 경로 사용유저 데이터(settings.json) → settings_path() 함수 추가, sys.executable 기준 exe 경로 사용 def resource_path(relative_path): """ PyI..
[엑셀] 여러 이미지 세로 간격을 동일하게 조정하는 스크립트
Alt + F11삽입-모듈스크립트 입력실행 Sub 이미지_세로정렬_간격5() Dim ws As Worksheet Dim shp As Shape Dim pictureShapes() As Shape Dim count As Integer Dim i As Integer, j As Integer Dim temp As Shape Dim topPos As Single Dim spacing As Single Set ws = ActiveSheet spacing = 5 count = 0 ' 이미지 개수 세고 배열에 저장 For Each shp In ws.Shapes If shp.Type = msoPicture Then c..