2026-01-07 20:22:49 +01:00
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
# Cargo.toml
|
|
|
|
|
#
|
|
|
|
|
# Project metadata and dependencies for the Noctua document viewer.
|
|
|
|
|
|
|
|
|
|
[package]
|
|
|
|
|
name = "noctua"
|
|
|
|
|
version = "0.1.0"
|
|
|
|
|
edition = "2024"
|
|
|
|
|
description = "A wise document and image viewer for the COSMIC™ desktop"
|
|
|
|
|
repository = "https://codeberg.org/wfx/noctua"
|
|
|
|
|
authors = ["Wolfgang Morawetz <wfx@mailbox.org>"]
|
|
|
|
|
license = "GPL-3.0-or-later"
|
|
|
|
|
keywords = ["document", "image", "viewer", "pdf", "cosmic"]
|
|
|
|
|
categories = ["gui", "multimedia::graphics", "multimedia::images"]
|
|
|
|
|
|
2026-01-22 20:40:36 +01:00
|
|
|
[features]
|
|
|
|
|
default = ["image", "vector", "portable"]
|
|
|
|
|
image = ["dep:image", "dep:kamadak-exif"]
|
|
|
|
|
vector = ["dep:resvg"]
|
|
|
|
|
portable = ["dep:poppler", "dep:cairo-rs"]
|
|
|
|
|
full = ["image", "vector", "portable"]
|
|
|
|
|
|
2026-01-07 20:22:49 +01:00
|
|
|
[dependencies]
|
|
|
|
|
# Error handling
|
|
|
|
|
anyhow = "1"
|
|
|
|
|
|
2026-01-22 20:40:36 +01:00
|
|
|
# Feature-gated dependencies
|
|
|
|
|
kamadak-exif = { version = "0.5.5", optional = true }
|
|
|
|
|
image = { version = "0.25.9", optional = true }
|
|
|
|
|
poppler = { version = "0.4", features = ["render"], optional = true }
|
|
|
|
|
cairo-rs = { version = "0.18", features = ["png"], optional = true }
|
|
|
|
|
resvg = { version = "0.45", optional = true }
|
Implement comprehensive metadata extraction for raster images with
EXIF support and display in the right panel.
New features:
- Extract basic metadata (filename, format, resolution, file size, color type)
- Parse EXIF data (camera, date, exposure, aperture, ISO, focal length, GPS)
- Display metadata in collapsible right panel (toggle with 'i' key)
- Auto-refresh metadata on document navigation
Changes by file:
Cargo.toml, Cargo.lock:
- Add kamadak-exif dependency for EXIF parsing
i18n/en/noctua.ftl:
- Add translation strings for all metadata labels
src/app/document/meta.rs:
- New module for metadata types (BasicMeta, ExifMeta, DocumentMeta)
- Extraction logic with EXIF parsing via kamadak-exif
- Helper methods for formatted display (resolution, file size, camera, GPS)
src/app/document/mod.rs:
- Re-export meta module
src/app/document/{raster,vector,portable}.rs:
- Add extract_metadata() method stubs (full impl for raster)
src/app/document/file.rs:
- Reset metadata on document change
src/app/message.rs:
- Add ToggleRightPanel and RefreshMetadata messages
src/app/model.rs:
- Add metadata: Option<DocumentMeta> field
- Add show_right_panel: bool field
src/app/update.rs:
- Handle panel toggle and metadata refresh
- Auto-refresh metadata on navigation when panel visible
src/app/view/panels.rs:
- Implement right_panel() with metadata display
- Conditional sections for basic info and EXIF data
src/app/view/canvas.rs:
- Integrate right panel into layout"
2026-01-10 11:46:07 +01:00
|
|
|
|
2026-01-07 20:22:49 +01:00
|
|
|
# Async / concurrency
|
|
|
|
|
futures-util = "0.3.31"
|
|
|
|
|
tokio = { version = "1.48.0", features = ["full"] }
|
|
|
|
|
|
|
|
|
|
# Logging
|
|
|
|
|
log = "0.4.20"
|
|
|
|
|
simple_logger = "4.2.0"
|
|
|
|
|
|
|
|
|
|
# i18n / localization
|
|
|
|
|
i18n-embed = { version = "0.16", features = [
|
|
|
|
|
"fluent-system",
|
|
|
|
|
"desktop-requester",
|
|
|
|
|
] }
|
|
|
|
|
i18n-embed-fl = "0.10"
|
|
|
|
|
|
|
|
|
|
# Misc utilities
|
|
|
|
|
open = "5.3.2"
|
|
|
|
|
rust-embed = "8.8.0"
|
2026-01-14 20:54:42 +01:00
|
|
|
dirs = "5.0"
|
2026-01-18 20:35:12 +01:00
|
|
|
sha2 = "0.10"
|
2026-01-07 20:22:49 +01:00
|
|
|
clap = { version = "4.5.54", features = ["derive"] }
|
|
|
|
|
env_logger = "0.11.8"
|
2026-01-15 20:37:14 +01:00
|
|
|
wallpaper = "3.2"
|
2026-01-07 20:22:49 +01:00
|
|
|
|
|
|
|
|
[dependencies.libcosmic]
|
|
|
|
|
git = "https://github.com/pop-os/libcosmic.git"
|
|
|
|
|
# See https://github.com/pop-os/libcosmic/blob/master/Cargo.toml for available features.
|
|
|
|
|
features = [
|
|
|
|
|
# Accessibility support
|
|
|
|
|
"a11y",
|
|
|
|
|
# About widget for the app
|
|
|
|
|
"about",
|
|
|
|
|
# Uses cosmic-settings-daemon to watch for config file changes
|
|
|
|
|
"dbus-config",
|
|
|
|
|
# Support creating additional application windows.
|
|
|
|
|
"multi-window",
|
|
|
|
|
# On app startup, focuses an existing instance if the app is already open
|
|
|
|
|
"single-instance",
|
|
|
|
|
# Uses tokio as the executor for the runtime
|
|
|
|
|
"tokio",
|
|
|
|
|
# Windowing support for X11, Windows, Mac, & Redox
|
|
|
|
|
"winit",
|
|
|
|
|
# Add Wayland support to winit
|
|
|
|
|
"wayland",
|
|
|
|
|
# GPU-accelerated rendering
|
|
|
|
|
"wgpu",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
# Uncomment to test a locally-cloned libcosmic
|
|
|
|
|
# [patch.'https://github.com/pop-os/libcosmic']
|
|
|
|
|
# libcosmic = { path = "../libcosmic" }
|
|
|
|
|
# cosmic-config = { path = "../libcosmic/cosmic-config" }
|
|
|
|
|
# cosmic-theme = { path = "../libcosmic/cosmic-theme" }
|