_

 
 
import gspread from oauth2client.service_account import ServiceAccountCredentials import json import argparse
22:00 ~ 22:45 Mobile App 내 위치 에러 잡기
23:00 ~ 00:45 광고 리스트 조회, 광고 생성, 광고 수정, 광고 삭제
01:00 ~ 01:45 장소 생성에 필요한 네이버 API 연결, 장소 생성 1부
02:00 ~ 02:45 장소 생성 2부
for sheet_title in sheet_titles: worksheet = spreadsheet.worksheet(sheet_title) records = worksheet.get_all_records()
# 현재 시트의 데이터를 저장할 딕셔너리 sheet_data = {} for record in records: if language in record: sheet_data[record["key"]] = record[language] # 최종 데이터 딕셔너리에 추가 final_data[sheet_title] = sheet_data

JSON으로 변환 및 저장

output_path = f'./locales/{language}.json' with open(output_path, 'w', encoding='utf-8') as json_file: json.dump(final_data, json_file, ensure_ascii=False, indent=4)
print(f"Data exported successfully to {output_path}")
 
import gspread from oauth2client.service_account import ServiceAccountCredentials import json import argparse # 커맨드 라인 인자 처리를 위한 ArgumentParser 객체 생성 parser = argparse.ArgumentParser(description='Extract and save language data from a Google Spreadsheet.') parser.add_argument('language', type=str, help='Language code to extract (e.g., en, th, vn, cn)') args = parser.parse_args() # Google Sheets API 설정 scope = ['https://spreadsheets.google.com/feeds', 'https://www.googleapis.com/auth/drive'] creds = ServiceAccountCredentials.from_json_keyfile_name('./translate-sheet-credentials.json', scope) client = gspread.authorize(creds) # 스프레드시트 열기 spreadsheet = client.open("번역") # 모든 시트의 이름 가져오기 sheet_titles = [sheet.title for sheet in spreadsheet.worksheets()] # 커맨드 라인에서 지정한 언어 language = args.language # 최종 데이터를 저장할 딕셔너리 final_data = {} # 각 시트별로 데이터 추출 for sheet_title in sheet_titles: worksheet = spreadsheet.worksheet(sheet_title) records = worksheet.get_all_records() # 현재 시트의 데이터를 저장할 딕셔너리 sheet_data = {} for record in records: if language in record: sheet_data[record["key"]] = record[language] # 최종 데이터 딕셔너리에 추가 final_data[sheet_title] = sheet_data # JSON으로 변환 및 저장 output_path = f'./locales/{language}.json' with open(output_path, 'w', encoding='utf-8') as json_file: json.dump(final_data, json_file, ensure_ascii=False, indent=4) print(f"Data exported successfully to {output_path}")
 
 
shell
 
 
curl 'https://api.soju-do.net/admin/coupon/giftcon-group/4' \ -H 'accept: application/json, text/plain, /' \ -H 'accept-language: ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7' \ -H 'authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIwMThlNzVhYS0wOWI4LTcyNDEtODUyZC02Nzg5NGU2NzU0MzYiLCJhdXRoIjoiUk9MRV9BRE1JTixST0xFX1VTRVIiLCJ0eXAiOiJBQ0NFU1MiLCJpYXQiOjE3MTI3MTY0MjksImV4cCI6MTcxMjcyNzIyOX0.4NHGWlz2KCNU-iEiRqdL4oBbfxuWWocfD0KASPIo2roq0ewC29MVJ3QiXq922bzty0OKDg2b2zW5ELvZ7j2tMg' \ -H 'content-type: application/json' \ -H 'origin: http://localhost:5173' \ -H 'referer: http://localhost:5173/' \ -H 'sec-ch-ua: "Google Chrome";v="123", "Not:A-Brand";v="8", "Chromium";v="123"' \ -H 'sec-ch-ua-mobile: ?0' \ -H 'sec-ch-ua-platform: "macOS"' \ -H 'sec-fetch-dest: empty' \ -H 'sec-fetch-mode: cors' \ -H 'sec-fetch-site: cross-site' \ -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36' \ --data-raw '{"accountId":"018e75aa-09b8-7241-852d-67894e675436","couponImageId":1416}'
 
 
 
 
 
curl 'https://leagueflow-dev-back.nunu.gg/app/team/logos?teamSnapShotIds=10123' \ -H 'Accept: application/json, text/plain, /' \ -H 'Accept-Language: ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJ1aWQiOiJmYWNlNWMyYS01NjZmLTRlYmYtOTMwMC05MzM5MGUxNWU3NWYiLCJ0ZWFtIjoxMDAyMDU1NzM0OTY4MDQ1ODYsImFsaWFzIjoiSGFud2hhIExpZmUgRXNwb3J0cyIsImlhdCI6MTcxMzUxNDA0OCwiZXhwIjoxNzEzNTc0MDQ4fQ.YoONXREMQJpihCUdsl0MIS-o1-Y_0kCkDfFsqnRwSw8' \ -H 'Connection: keep-alive' \ -H 'Content-Type: application/json' \ -H 'Origin: http://localhost:3000' \ -H 'Referer: http://localhost:3000/' \ -H 'Sec-Fetch-Dest: empty' \ -H 'Sec-Fetch-Mode: cors' \ -H 'Sec-Fetch-Site: cross-site' \ -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36' \ -H 'page: http://localhost:3000/admin/season-management/lck/24' \ -H 'sec-ch-ua: "Chromium";v="124", "Google Chrome";v="124", "Not-A.Brand";v="99"' \ -H 'sec-ch-ua-mobile: ?0' \ -H 'sec-ch-ua-platform: "macOS"' \ --data-raw '[{}]'