Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xStudio Notes PDF Exporter

notes_pdf_exporter is an xStudio Python plugin that exports all notes/bookmarks on the current on-screen media version as one PDF report.

Every bookmark gets one A4 PDF page containing:

  • the bookmark frame number;
  • the media/version name;
  • a rendered screen grab of that frame;
  • the rendered paint/drawing annotation, when present; and
  • the note text.

The plugin renders images through xStudio's snapshot_viewport, so the image and drawing annotation match the xStudio annotation renderer. The PDF writer is implemented with the Python standard library; no pip packages are required.

Location

Source-tree plugin:

src/plugin/python_plugins/notes_pdf_exporter/

It is registered in src/plugin/python_plugins/CMakeLists.txt:

add_python_plugin(notes_pdf_exporter)

For the current local install, the same directory has also been copied to:

xstudio_install/share/xstudio/plugin-python/notes_pdf_exporter/

Use

Restart xStudio after changing the installed plugin, then use:

File > Export > Notes PDF ...

The default save path is:

~/<media-base-name>.pdf

For image sequences, trailing frame placeholders such as xStudio's {:04d} format, ####, %04d, and $F4 are omitted. For example, TNL_4158_comp_UPP_v013.{:04d}.exr defaults to ~/TNL_4158_comp_UPP_v013.pdf.

The Browse... button opens a native save-file dialog with a filename field and a Save action. The destination can also be typed directly in Save As. If .pdf is omitted, it is added automatically.

Enable Also export notes as CSV (Excel) to create a companion CSV next to the PDF. It is off by default and has these columns: Version Name, Notes, and Date Created. Every CSV field is double-quoted. Dates use YYYY/MM/DD HH:MM:SS AM/PM; when more than one note is exported, each note is prefixed with its frame number (for example, f1223: Adjust the edge).

Implementation notes

  • Scope is intentionally the current on-screen media/version, not the whole playlist or session.
  • All bookmarks on that media are exported, including annotation-only bookmarks whose note text is empty.
  • Temporary JPEG frames are written under the system temporary directory and deleted after the PDF is created.
  • The PDF embeds those JPEGs directly and uses Helvetica for text. Note text outside Latin-1 is replaced with ? rather than making the export fail.
  • The QML dialog must not delete its dynamic xStudio attribute after closing. ModuleBase caches attribute proxies, so deletion causes an invalid UUID on the next invocation. The plugin instead sets attr_enabled to false on close and xStudio re-enables the same attribute the next time the menu item is selected.

Verification performed

python3 -m py_compile notes_pdf_exporter.py
pdfinfo /tmp/xstudio_notes_pdf_test.pdf

The PDF writer was verified to produce a valid one-page A4 PDF. Full rendering is exercised from the xStudio GUI because it requires an active media and its snapshot viewport.

Preparing a standalone GitHub repository

Copy this directory into the new repository root. A consuming xStudio source tree needs the one-line CMake registration shown above; alternatively, copy the directory directly into xStudio's installed share/xstudio/plugin-python/ directory and restart xStudio.

When updating locally during development, keep the source and installed copies in sync, or rebuild/install xStudio so CMake copies the source-tree plugin into the install tree.

About

Export notes in PDF format from xStudio

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages