7. Лучшее от обоих миров
Markdown
• Документация рядом с кодом
• Быстрота правки
• История изменений в git
Confluence
• Удобный поиск
• Встраивание документов друг в
друга
8. Претенденты
jedi4ever/markdown2confluence ✅ преобразует md в формат Confluence
❌ не синхронизирует с Confluence
lanyonm/markdown-to-confluence-uploader ❌ нужно заранее создавать страницу
❌ нужно знать id страницы
✅ синхронизирует с Confluence
laurencer/confluence-sync ❤️
11. Markdown to confluence sync tools
github: jedi4ever/markdown2confluence
github: lanyonm/markdown-to-confluence-uploader
github: laurencer/confluence-sync - ❤️
Some videos from Yandex Hyperbaton events (RUS)
https://events.yandex.ru/lib/talks/4969/
https://events.yandex.ru/lib/talks/4970/
12. #!/usr/bin/env bash
CONFLUENCE_URL="https://confluence.url.com"
DOCS_PATH=${PWD}
# import your credentials here
# USERNAME=foo
# PASSWORD=bar
source ./confluence_credentials.file
# Demo space
space_name=”spacename"
page_name=”pagename"
DOCKER_IMAGE="laurencer/confluence-sync"
TAG="latest"
# Fire it up!
docker run
-e CONFLUENCE_URL=${CONFLUENCE_URL}
-e CONFLUENCE_USER=${USERNAME}
-e CONFLUENCE_PASSWORD=${PASSWORD}
-v ${PWD}/demo:/data
${DOCKER_IMAGE}:${TAG}
confluence-sync-tool
--space-id "${space_name}"
--page-name "${page_name}"
/data
## Using the Tool
confluence-sync-tool - syncs HTML/Markdown content to Confluence
Usage: confluence-sync-tool --space-id <SPACE ID> --page-name <PAGE TITLE>
[--page-id <PAGE ID>] <SYNC DIRECTORY>
Synchronises all of the pages in the sync-directory to the given space and
places them all under the specified page.
Available options:
-h,--help Show this help text
--space-id <SPACE ID> The id of the Confluence Space to synchronise with
(typically in the URL `/display/<space id>/<page
name>`).
--page-name <PAGE TITLE> The name of the page that all content should be
synced under.
--page-id <PAGE ID> Optional page id of the sync page (the id is usually
found when editing the page in the URL
`/pages/editpage.action?pageId=<page id>`)
--min-delay-between-requests <DELAY IN MILLIS>
Minimum time to wait between each API request in
milliseconds. (default: 2000 ms)
--max-delay-between-requests <DELAY IN MILLIS>
Maximum time to wait between each API request in
milliseconds. (default: 60000 ms)
--request-backoff <MULTIPLIER>
Multiplier for the API request time to calculate the
delay before starting next
action. (default: (3 % 2) x)
--max-number-of-requests <MAX # of REQUESTS>
Maximum number of API requests that are allowed to be
made. (default: 10000 reqs)
<SYNC DIRECTORY> Directory containing the website/content to sync to
Confluence
Expects the following environment variables to be set:
CONFLUENCE_URL="confluence server address" (e.g.
`http://192.168.99.100:8090/`)
CONFLUENCE_USER="confluence username" (e.g. `admin`)
CONFLUENCE_PASSWORD="confluence password" (e.g. `password123`)