publish_structure()
Publish the project's folder tree to Framework Cloud, with notes on its paths.
::
fw.publish_structure(notes={"R/": "Reusable functions", "README.md": "Start here"},
highlight="README.md")
Usage
publish_structure(
path: str | Path | Sequence[str | Path] | None = None,
*,
depth: int | None = None,
exclude: str | Sequence[str] | None = None,
notes: Mapping[str, str] | None = None,
open: str | Sequence[str] | None = None,
highlight: str | Sequence[str] | None = None,
ignored: str = 'rules',
slug: str | None = None,
title: str | None = None,
description: str | None = None,
visibility: str | None = None,
password: str | None = None,
collection: str | int | None = None,
share_unlisted: bool = False,
to: str | None = None,
include_private: bool = False,
display: Mapping[str, bool] | None = None,
) -> str | list[str]
Arguments
| Name | Type | Default | Description |
|---|---|---|---|
| path | str | Path | Sequence[str | Path] | None | None |
A folder, or a list of folders, relative to the project root. Several folders publish as one tree named for the project. Default: the project root. |
| depth | int | None | None |
Levels to list. Folders below it publish as stubs with a file count. |
| exclude | str | Sequence[str] | None | None |
Globs, as |
| notes | Mapping[str, str] | None | None |
Notes by path, up to 500 characters each, such as |
| open | str | Sequence[str] | None | None |
Folders that start open in an embed. Default: the top level. |
| highlight | str | Sequence[str] | None | None |
Paths drawn as highlighted. |
| ignored | str | 'rules' |
|
| slug | str | None | None |
Artifact slug. Default: |
| title | str | None | None |
Artifact title. Default: |
| description | str | None | None |
Artifact description. |
| visibility | str | None | None |
"public", "unlisted", or "private". Default: a new artifact is unlisted and an existing one keeps its setting. |
| password | str | None | None |
Password required to view the tree. |
| collection | str | int | None | None |
Project collection ID or slug. |
| share_unlisted | bool | False |
Allow collection readers to see an unlisted tree. |
| to | str | None | None |
A configured destination name, or "cloud". |
| include_private | bool | False |
Publish without asking about private folders. |
| display | Mapping[str, bool] | None | None |
What embeds of the tree show, on Framework Cloud: |
Value
The artifact's URL. On Framework Cloud it is a Published string with
embed_link, the link to share and embed, and artifact_url, the artifact's
page for its owner.
Details
Framework prints the tree as it publishes, then uploads it. Ignored names never
publish: an ignored folder is a stub with its rule and a file count, and ignored files
are one row per folder and rule, with a count. A private folder (private,
..._private, or a settings folder marked private) is a stub with a file count.
.git/ is left out. structure() shows the tree with the ignored names, and
uploads nothing.