Any way to rerun cell whenever a file changes? #1368
-
I use Pluto in conjunction with other scripts and files. It would be a game-changer for my workflow if there was a way to trigger the re-evaluation of a cell by watching some file for changes. Is this possible today? If not, what would it involve to make it a reality? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Unfortunately, the APIs are not there yet to do this from inside Pluto. Thinks like triggering a bond update will help. In the meantime if you want a (hacky) solution, I made PlutoBindClient.jl to trigger a bond update from an external script. There is an example where it sends Github event to a notebook here. |
Beta Was this translation helpful? Give feedback.
-
I just stumbled onto that discussion and now you can use PlutoLinks.jl using PlutoLinks
#==#
file_content = @use_file("path_to_file.txt")
#==#
do_something_with(file_content) |
Beta Was this translation helpful? Give feedback.
I just stumbled onto that discussion and now you can use PlutoLinks.jl
@use_file(filename)
macro which does just that and returns the updated file content.