Skip to main content

Include the contents of external URLs and other Trac objects in a wiki page.

Project description

Notes

This macro lets you include various things.

Currently supported sources:

  • HTTP - http: and https:

  • FTP - ftp:

  • Wiki pages - wiki:

  • Repository files - source:

  • Ticket comments - ticket:N:comment:M (3.0dev, syntax may be changed before release)

The default source is wiki if only a source path is given.

An optional second argument sets the output MIME type, though in most cases the default will be correct.

Permissions

The three remote sources (http, https, and ftp) require INCLUDE_URL to be rendered.

Anyone can add a call to these, however they will not be shown. This is not a replacement for render_unsafe_content, see below.

Configuration

If [wiki] render_unsafe_content is off (the default), any produced HTML will be sanitized.

To enable the plugin:

[components]
includemacro.* = enabled

Example

Include another wiki page:

[[Include(PageName)]]

Include a section of a page (the section heading must have an explicit id):

[[Include(PageName#section)]]

Include the HEAD revision of a reStructuredText file from the repository:

[[Include(source:trunk/docs/README, text/x-rst)]]

Include a specific revision of a file from the repository:

[[Include(source:trunk/docs/README@5, text/x-rst)]]

Include only a subpart of file from the repository (use named arguments : start, end, lineno):

[[Include(source:trunk/docs/README@5, text/x-rst, start=5, end=15)]]
[[Include(source:trunk/docs/README@5, text/x-rst, start=5, end=15, lineno=yes)]]

It’s possible to use regular expressions in start and/or end parameters

[[Include(source:trunk/docs/README, start=”[a-z]+”, end=15, lineno=yes)]] [[Include(source:trunk/docs/README, start=”[a-z]+”, end=”[.+]”, lineno=yes)]]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

TracIncludeMacro-3.2.0.tar.gz (7.4 kB view details)

Uploaded Source

Built Distributions

TracIncludeMacro-3.2.0-py2.7.egg (6.6 kB view details)

Uploaded Source

TracIncludeMacro-3.2.0-py2-none-any.whl (7.9 kB view details)

Uploaded Python 2

File details

Details for the file TracIncludeMacro-3.2.0.tar.gz.

File metadata

  • Download URL: TracIncludeMacro-3.2.0.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/2.7.18

File hashes

Hashes for TracIncludeMacro-3.2.0.tar.gz
Algorithm Hash digest
SHA256 be7173dba5e5a1ae49ddd4222efb17f0177a489b286624627e5d6090fc9fa6ac
MD5 491b8268c1d21b2ee137f464227c24c7
BLAKE2b-256 7ff280b10d46a63083dc14715d510ac095e35773d8505c74886a277540bf6a71

See more details on using hashes here.

File details

Details for the file TracIncludeMacro-3.2.0-py2.7.egg.

File metadata

  • Download URL: TracIncludeMacro-3.2.0-py2.7.egg
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/2.7.18

File hashes

Hashes for TracIncludeMacro-3.2.0-py2.7.egg
Algorithm Hash digest
SHA256 9d1f0e04836484b02d7ac3f30d00d078f47e6b9e9a2b179e4d9d897e211c1be5
MD5 df3019f5b825e7ac70bcbc1e33f98c52
BLAKE2b-256 9dc72a4e4d321430d349ece010ac1a2e68c52370f8057402650741c43f42d73d

See more details on using hashes here.

File details

Details for the file TracIncludeMacro-3.2.0-py2-none-any.whl.

File metadata

  • Download URL: TracIncludeMacro-3.2.0-py2-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/2.7.18

File hashes

Hashes for TracIncludeMacro-3.2.0-py2-none-any.whl
Algorithm Hash digest
SHA256 337c29ccfd581e8148469dd0f195f642841bb6693a74e8e926374dd88091e23a
MD5 34cd1dbaef0e77e6a1371cc4a079dc21
BLAKE2b-256 c5ae43eaef4dd602f47a613cf83bc6540004c8df017be53353ddd3dfe078e4c6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page