watcher
¶
EventHandler(function, watched_files)
¶
Bases: FileSystemEventHandler
Trigger a callback when a watched file is modified.
Parameters:
-
function(Callable[[], None]) –Callback to invoke on modification.
-
watched_files(set[str]) –Absolute path strings of files to monitor.
Source code in src/rendercv/cli/render_command/watcher.py
run_function_if_files_change(file_paths, function)
¶
Watch files and re-run function when any is modified.
Why
Watch mode lets users edit CV YAML and see results instantly. All config files (main input, design, locale, settings) must be monitored so edits to any trigger a re-render.
Parameters:
-
file_paths(list[Path]) –File paths to watch.
-
function(Callable[[], None]) –Zero-argument callback to invoke on file change.