옵시디언에 글 쓰면서 암 생각없이 박아놓은 스샷이나 이미지들 마크다운 파일 읽어서 패턴 감지해서 문자열 뽑은 걸로 특정 폴더에 알아서 파일 이동해주는거
개발 본업 끝나고 밤 늦게 코드 또 손수 짤려니까 너무 귀찮아 가지고 한 달 정도 미뤘는데 (+ 파이썬 코드 짜기 싫은 것도 있음)
걍 모르겠다 싶어서 개발새발인 영어로 하나하나씩 스텝 밟아가면서 코드 뽑아 달라니까 얘가 뽑아내는 코드가 뭔가 사족은 많긴 한데 일단 움직이는거 뽑아주긴 함.
사실 생성된 코드 한 군데 코드 찐빠난 거 있어서 발견해서 고쳐달라고 하긴 했음. (7-8번)
프롬프트는 이거
1. I'll create simple python script program with you step by step. At first, we should have a main function and get a first command argument to be searched as a path.
2. next, We'll traverse all files which is `.md` specifier (markdown file) of all subdirectories of `search_path` if `search_path` is exist on filesystem.
3. Next, we'll open `md_file` of `found_files` from `find_markdown_files` and get a string list which each string starts with `![[` and ends with `]]`.
4. With extracted `pattern`, we should check this contains `|` (pipe) character so that extract the string before the character or just use entire string as a file name that I want to do some process with it.
5. Following the process has some complicated. With `filename`, we can find actual path of given `filename` by searching files from root directory we provides as a `search_path` recursively. If found actual path of `filename`, find first directory path called `Asset` from last directory which has `md_file` file to root directory.
6. If we found the directory called `Asset`, you should move actual file of `filename` into that directory. If `filename` is already included in `Asset` directory, pass it. That's all.
여기서 한 번 코드 복붙해서 한번 테스트해보고, 잘 안되서 떼엥 몰라 고쳐달라고 해 함
7. I tried your codes but did not work. Could you fix it?
다시 생성한거 가지고 한번 더 테스트했는데 안되서 걍 눈으로 코드 따라가면서 디버그해서 지적날림.
8. You don't have to get `base_name` from `filename`, but just match `filename` with given `target_name_lower`. I fixed there and it works.
한 1~2시간 걸릴거 20~30분 정도로 끝나는 듯?
아니 영어로 써야 말을 알아처먹음? 흠좀무
한국어보단야 화자가 압도적으로 많은 영어가 더 알아먹을 것 같아서 영어로 씀
한국어도 잘 알아먹음
순수 성능 1황에 지금 컨텍스트도 제일 길걸? 근데 여기서 2배 더 길게 패치한다고함 특히 코멘트나 주석처리 디테일하게 챙겨주는게 존나 감동적임 좆병신 코드 던져주고 별말없이 최적화 하라고 하면 알아서 최적화 하다 좆병신 로직 발견하면 지워버리고 지가 짠 코드 덮어씌우는게 아니라 수정해놓고 기존코드 유지하면서 코멘트로 기존엔 xx로직으로 xx했는데 이게 좀 이상함 확인 필요 일단 지금은 이렇게 수정함 하고 코멘트 다는데 여태껏 써본 ai서비스중에 이런 디테일 챙기는건 젬미니밖에 없었다..
이거 궁금한게 있는데 제미니 토큰 얼마나 남아있는지 알 수 있는 방법 없음? 한달에 100만 토큰이라고는 하는데
Why do you ask in english?