Python daemon to watch a folder and update a database

后端 未结 3 1266
予麋鹿
予麋鹿 2021-02-06 15:08

This is specifically geared towards managing MP3 files, but it should easily work for any directory structure with a lot of files.

I want to find or write a daemon (pref

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-06 15:37

    Another answer already suggested pyinotify for Linux, let me add watch_directory for Windows (a good discussion of the possibilities in Windows is here, the module's an example) and fsevents on the Mac (unfortunately I don't think there's a single cross-platform module offering a uniform interface to these various system-specific ways to get directory-change notification events).

    Once you manage to get such events, updating an appropriate SQL database is simple!-)

提交回复
热议问题