pycco-docs / pycco

Literate-style documentation generator.
https://pycco-docs.github.io/pycco/
Other
842 stars 144 forks source link

Fix issue where documentation isn't regenerated when watching files #87

Closed jeanbaptistelab closed 6 years ago

jeanbaptistelab commented 8 years ago

I noticed that whenever a file was saved using the Geany editor, the documentation would not be regenerated when using the -w option. After a bit of fiddling around, I found out that Geany saves files to a temporary one first and then rename that temporary file to the original one.

This process does not generate a watchdog "on_modified" event that matches a watched source file (at least under Linux/inotify, I don't know if this is also true on other platforms), instead it generates an "on_moved" one whose target is a watched source file, so I extended the RegenerateHandler class to implement an on_moved handler checking for the event.dest_path.

That has solved it for me, feel free to merge this under the same license terms as Pycco itself.

Thanks for a nifty tool!

JB

subsetpark commented 6 years ago

Closing as out-of-date. Thanks for your submission @jeanbaptistelab, and apologies that it wasn't addressed sooner!