[Project #1] inventory management_bot - 2 week(by. kr, eng, jp)

jang·2026년 3월 23일

[Project #1]

목록 보기
2/6
post-thumbnail

[🇰🇷Korean Version]

📍오늘의 목표

  • 단순 응답을 넘어, 외부 데이터를 읽어오는 기능 추가하기
  • /check 명령어를 통해 실시간 재고 현황 출력하기

📍주요 학습 내용(핵심 키워드)

1) pandas 라이브러리(a.k.a 데이터 분석의 기본 도구)

  • 파이썬에서 표 형태의 ㄷ이터를 다루기 쉽게 해주는 라이브러리
  • 리스트보다 훨씬 쉽게 데이터 다루기가 가능하고 엑셀 작업을 파이썬으로 자동화하는 느낌
  • series: 한 줄짜리 데이터로 엑셀의 한 열과 같다
  • DataFrame: 표 전체 데이터로 행과 열이 있는 구조, 제일 많이 스이는 형태이다.

2) CommandHandler

  • 사용자가 어떤 명령어를 입력하면 그 명령어를 보고 어떤 함수를 실행할지 연결해주는 역할

3) 파일 경로와 확장자

  • 프로그램이 파일을 찾을 때 확장자가 얼마나 중요한지 체감

4) 터미널 명령어

  • ls: 현재 폴더 파일 목록 확인
  • mv: 파일 이름 및 확장자 변경
  • sudo: 관리자 권한으로 명령 실행(비밀번호 입력 시 글자가 보이지 않는 보안 특성을 학습)

📍 오늘 만난 에러와 해결법(Troubleshooting)

에러 메시지 / 상황원인해결 방법
NameError: CommandHandler...import에 등록 안 함맨 윗줄 from telegram.ext import ...에 추가
AttributeError: ... no attribute 'read'오타 발생read() 대신 read_csv()로 수정
File Not Found / .rtf 문제맥 텍스트 편집기 설정 오류터미널 mv 명령어로 확장자를 .csv로 강제 변경
Permission denied파일 수정 권한 부족sudo 명령어를 사용해 관리자 권한으로 실행

📍결과

📍 다음 주 예고

단순히 읽기만 하는 봇에서, 텔레그램으로 재고 수량을 직접 수정하는 ‘데이터 쓰기’ 기능 구현하기


[ 🇺🇸English Version]

📍Today's Goals

  • Extend beyond simple echo responses to implement external data fetching.
  • Display real-time inventory status using the /check command.

📍Key Concepts

  • Pandas Library: The go-to tool for data analysis. It allows for seamless handling of tabular data, similar to automating Excel tasks with Python.
  • Series & DataFrame: A Series represents a single column, while a DataFrame is the entire table structure (rows and columns).
  • CommandHandler: A bridge that connects user commands (starting with /) to specific functions.
  • File Paths & Extensions: A lesson on how critical file extensions are for a program to locate a specific file.
  • Terminal Commands: ls (list files), mv (rename/move), and sudo (admin privileges with hidden password entry).

📍Troubleshooting

Error / SituationCauseSolution
NameError: CommandHandler...Not registered in importAdd to from telegram.ext import ...
AttributeError: ... no attribute 'read'TypoChange read() to read_csv()
File Not Found / .rtf issueTextEdit formatting errorUse mv command to force change extension to .csv
Permission deniedLack of file modification permissionsUse sudo to run the command as an admin

📍 Result

📍 Next Week's Preview

  • Upgrade to a "data-writing" bot that can modify inventory quantities directly through Telegram!

[ 🇯🇵Japanese Version] (日本語版)

📍 今日の目標

  • 単純な応答(Echo)機能から一歩進み、外部データの読み込み機能を実装する。
  • /check コマンドで、リアルタイムの在庫状況を表示させる。

📍主な学習内容

  • Pandasライブラリ: データ分析の必須ツール。Excelのような表形式データをPythonで効率的に扱うためのライブラリ。
  • Series & DataFrame: Series は1列のデータを、DataFrame は行と列を持つ表全体のデータを指し、最も汎用的な形式である。
  • CommandHandler: 特定のコマンドと実行関数を紐付ける役割。
  • ファイルパスと拡張子: プログラムがファイルを認識する際、拡張子の正確さがどれほど重要かを実感。
  • ターミナルコマンド: ls (一覧表示), mv (名前変更), sudo (管理者権限での実行、非表示パスワードの特性)。

📍トラブルシューティング

エラーメッセージ / 状況原因解決方法
NameError: CommandHandler...import に登録漏れfrom telegram.ext import ... に追加
AttributeError: ... no attribute 'read'スペルミス (Typo)read() を read_csv() に修正
File Not Found / .rtf 問題テキストエディタの設定ミスターミナルの mv コマンドで拡張子を .csv に強制変更
Permission deniedファイル修正権限の不足sudo コマンドを使用して管理者権限で実行

📍 結果

📍 来週の予定

  • 読み取り専用のボットから、テレグラムで在庫数を直接修正できる「データ書き込み」機能を実装する予定!
profile
비전공자가 AI 엔지니어가 되는 과정

0개의 댓글