Skip to content
Open Garphield

Projects and fingerprints

garphield_project() creates the same .gph document used by the browser and Python package.

project <- garphield_project(
edges = data.frame(source = c("a", "b"), target = c("b", "c"))
)
write_gph(project, "network.gph")
loaded <- read_gph("network.gph")
project_to_list(loaded)
project_fingerprint(project)
project_fingerprint(project, semantic = TRUE)

The project fingerprint covers the complete document, including positions and view configuration. The semantic fingerprint covers the graph data. Use both to distinguish a changed graph from a changed visual workspace.

Open the same .gph file in Garphield or load it with the Python package.

share_string <- garphield_share_string(project)
url <- garphield_share_url(project)
custom <- garphield_share_url(project, "https://example.com/garphield")

These functions perform no network I/O. They compact repeated node IDs in link endpoints and carry the complete canonical project in #p=z2.…, using zlib and unpadded base64url. Opening a project with saved positions preserves them; otherwise the live workbench runs Garphield’s normal selected layout. The browser still reads existing z1. carriers. Inline links are limited to 262,144 characters, so larger projects must be shared as .gph files.