Skip to content

capturegraph.procedures.nodes.filesystem.metadata #

Directory metadata procedures manage auxiliary information associated with directories. These procedures handle thumbnails, location data, notifications, and cleanup operations that provide context and management capabilities for targets and sessions.

Metadata files are special files that the companion app uses to enhance the user experience: - Thumbnail files enable preview images in directory listings - Location files enable location-aware features and validation - Notification files enable scheduled data collection reminders - Cleanup markers enable automated storage management

These metadata files are typically managed through the toolkit functions rather than directly, ensuring consistent behavior across procedures.

GetThumbnailFile #

Bases: Procedure[PFile]

Gets the thumbnail file associated with a directory.

Retrieves a reference to the special thumbnail metadata file for this directory. The companion app uses thumbnail files to display preview images in directory listings, making it easy for users to identify sessions and targets at a glance.

Typically used through the thumbnail_manager toolkit rather than directly.

Attributes:

Name Type Description
directory Procedure[PDirectory]

The directory (target root or session root) to get the thumbnail file for

Source code in capturegraph-lib/capturegraph/procedures/nodes/filesystem/metadata.py
@make_procedure
class GetThumbnailFile(Procedure[PFile]):
    """
    Gets the thumbnail file associated with a directory.

    Retrieves a reference to the special thumbnail metadata file for this directory.
    The companion app uses thumbnail files to display preview images in directory
    listings, making it easy for users to identify sessions and targets at a glance.

    Typically used through the thumbnail_manager toolkit rather than directly.

    Attributes:
        directory (Procedure[PDirectory]): The directory (target root or session root) to get the thumbnail file for
    """

    directory: Procedure[PDirectory]

GetLocationFile #

Bases: Procedure[PFile]

Gets the location metadata file associated with a directory.

Retrieves a reference to the special location metadata file for this directory. The companion app uses location files to enable location-aware features like distance validation and location-based reminders. Typically stores the target location where data should be captured.

Typically used through the location_manager toolkit rather than directly.

Attributes:

Name Type Description
directory Procedure[PDirectory]

The directory (usually target root) to get the location file for

Source code in capturegraph-lib/capturegraph/procedures/nodes/filesystem/metadata.py
@make_procedure
class GetLocationFile(Procedure[PFile]):
    """
    Gets the location metadata file associated with a directory.

    Retrieves a reference to the special location metadata file for this directory.
    The companion app uses location files to enable location-aware features like
    distance validation and location-based reminders. Typically stores the target
    location where data should be captured.

    Typically used through the location_manager toolkit rather than directly.

    Attributes:
        directory (Procedure[PDirectory]): The directory (usually target root) to get the location file for
    """

    directory: Procedure[PDirectory]

GetNotificationFile #

Bases: Procedure[PFile]

Gets the notification metadata file associated with a directory.

Retrieves a reference to the special notification metadata file for this directory. The companion app uses notification files to schedule data collection reminders and alerts. Contains the next scheduled notification time for this target.

Typically used through the notification_manager toolkit rather than directly.

Attributes:

Name Type Description
directory Procedure[PDirectory]

The directory (usually target root) to get the notification file for

Source code in capturegraph-lib/capturegraph/procedures/nodes/filesystem/metadata.py
@make_procedure
class GetNotificationFile(Procedure[PFile]):
    """
    Gets the notification metadata file associated with a directory.

    Retrieves a reference to the special notification metadata file for this directory.
    The companion app uses notification files to schedule data collection reminders
    and alerts. Contains the next scheduled notification time for this target.

    Typically used through the notification_manager toolkit rather than directly.

    Attributes:
        directory: The directory (usually target root) to get the notification file for
    """

    directory: Procedure[PDirectory]

MarkForClearAfterBackup #

Bases: Procedure[PVoid]

Marks a directory for deletion after it has been backed up.

Sets a special marker that tells the companion app this directory should be removed from local device storage once it has been successfully backed up to remote storage or cloud services. This helps manage device storage space automatically while preserving data safety.

Commonly used for session directories containing large files (like image sequences) that don't need to remain on the device after backup.

Attributes:

Name Type Description
directory Procedure[PDirectory]

The directory (typically a session) to mark for cleanup after backup

Source code in capturegraph-lib/capturegraph/procedures/nodes/filesystem/metadata.py
@make_procedure
class MarkForClearAfterBackup(Procedure[PVoid]):
    """
    Marks a directory for deletion after it has been backed up.

    Sets a special marker that tells the companion app this directory should be
    removed from local device storage once it has been successfully backed up
    to remote storage or cloud services. This helps manage device storage space
    automatically while preserving data safety.

    Commonly used for session directories containing large files (like image sequences)
    that don't need to remain on the device after backup.

    Attributes:
        directory (Procedure[PDirectory]): The directory (typically a session) to mark for cleanup after backup
    """

    directory: Procedure[PDirectory]