QPrompt-Teleprompter icon indicating copy to clipboard operation
QPrompt-Teleprompter copied to clipboard

Reload externally modified files

Open Cuperino opened this issue 2 years ago • 3 comments

Original suggestion from Michael Turnnell:

as for markdown can QPrompt load md files and update them on the fly such as if I make a change in sublime text to the file could QPrompt reload the change?

Takeaway:

    • [x] (Automate) Have QPrompt automatically reload externally modified files. Do this even for files that are in formats read only to QPrompt.
    • [ ] (Safety) If the file has been modified inside of QPrompt, ask before reloading contents.
    • [ ] (Convenience) Have option to force always reload a file for the current session.
    • [ ] (Convenience) Process changes as an edit and not a file load to enable undoing.
    • [ ] (Revert principle) Have the option to disable auto-reloading without closing the file.

Cuperino avatar Jan 25 '22 06:01 Cuperino

    • [x] (Automate) Have QPrompt automatically reload externally modified files. Do this even for files that are in formats read only to QPrompt.
    • [ ] (Safety) If the file has been modified inside of QPrompt, ask before reloading contents.
    • [ ] (Convenience) Have option to force always reload a file for the current session.
    • [ ] (Convenience) Process changes as an edit and not a file load to enable undoing.
    • [ ] (Revert principle) Have the option to disable auto-reloading without closing the file.

Implemented auto reload behavior. For now it is on by default and can't be disabled.

Cuperino avatar Apr 06 '22 19:04 Cuperino

Is there an example workflow to achieve this?

videosmith avatar Aug 09 '22 17:08 videosmith

The way that it's currently implemented, you simply open a file in QPrompt and open the same file in another program that can edit this file; such as a text editor for text and HTML, or a markdown editor for .md files. Then you simply save your changes in the editor program and see them update automatically on QPrompt.

When reloading, your prompting position should be kept. You may see a small stutter if a file is updated while QPrompt is prompting. Any changes done to the file locally will be lost. Undo and redo history will also be lost.

If the file is located on a folder that can be accessed from other computers, QPrompt would reload it, incorporating changes pushed from someplace else. There are several ways in which shared folders can be configured, I personally have not tested QPrompt with any of them.

This feature is meant to be used as one of the bases for adding support for NDI.

Cuperino avatar Aug 09 '22 22:08 Cuperino