0. config.json - 사용 전 요구설정

2023. 11. 28. 17:08개인 프로젝트/📚 톡방 통계 프로그램

1. config.json

소스 파일을 보시면 config.json 파일이 있습니다. 내용은 아래와 같습니다.

{
  "group_name": "톡방 이름 넣으세요~",
  "input_file": ".\\src\\result.json",
  "input_file_kakao": ".\\src\\result.txt",
  "output_file": ".\\src\\data.json",
  "font_path": "C:\\Users\\컴퓨터 이름 적으세요~\\AppData\\Local\\Microsoft\\Windows\\Fonts\\쓰고 싶은 폰트 넣으세요~.ttf",
  "result_folder": "result/"
}

  여섯 가지 요소가 있습니다. 이 중 group_name과 font_path만 바꿔주면 됩니다.

 

2. group_name

  여기에 설정될 이름은 출력 이미지에 사용될 제목입니다. 

 

3. font_path

  폰트 위치를 지정해야되는 번거로움은 있으나, 이 설정을 하지 않으면 한글은 죄다 깨져서 나옵니다.

  추천하는 폰트는 평창평화체입니다. 다운로드 링크는 바로 아래에 있습니다.

평창행정

 

평창군입니다. 평창행정

 

www.pc.go.kr

 


4. 설정예시

{
  "group_name": "단톡방",
  "input_file": ".\\src\\result.json",
  "input_file_kakao": ".\\src\\result.txt",
  "output_file": ".\\src\\data.json",
  "font_path": "C:\\Users\\sin00\\AppData\\Local\\Microsoft\\Windows\\Fonts\\PyeongChang-Regular.ttf",
  "result_folder": "result/"
}

  제 설정입니다. 이렇게 설정했을 경우 결과화면은 아래와 같습니다.