{"id":13400968,"url":"https://github.com/line/conflr","last_synced_at":"2025-10-21T19:37:56.668Z","repository":{"id":34154189,"uuid":"166735434","full_name":"line/conflr","owner":"line","description":"Post R Markdown documents to Confluence","archived":true,"fork":false,"pushed_at":"2023-04-01T02:40:22.000Z","size":1985,"stargazers_count":130,"open_issues_count":36,"forks_count":28,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-01-10T17:51:24.636Z","etag":null,"topics":["confluence","rmarkdown"],"latest_commit_sha":null,"homepage":"https://line.github.io/conflr/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/line.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-01-21T02:24:18.000Z","updated_at":"2024-06-03T11:51:31.000Z","dependencies_parsed_at":"2023-02-15T10:55:47.168Z","dependency_job_id":"f2ee323b-dbd2-49f7-b5b4-7e49761ad6b1","html_url":"https://github.com/line/conflr","commit_stats":{"total_commits":155,"total_committers":7,"mean_commits":"22.142857142857142","dds":0.07741935483870965,"last_synced_commit":"74c3c36f0a786138d4d90f49df45ab165901761c"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/line%2Fconflr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/line%2Fconflr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/line%2Fconflr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/line%2Fconflr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/line","download_url":"https://codeload.github.com/line/conflr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243538018,"owners_count":20307099,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["confluence","rmarkdown"],"created_at":"2024-07-30T19:00:57.457Z","updated_at":"2025-10-21T19:37:51.243Z","avatar_url":"https://github.com/line.png","language":"R","funding_links":[],"categories":["R","Rmarkdown Publish"],"sub_categories":["Confluence Wiki"],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r setup, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# :warning: conflr is retired! :warning:\n\nconflr is an R package to post [R Markdown](https://rmarkdown.rstudio.com/) documents to [Confluence](https://www.atlassian.com/software/confluence), a content collaboration tool by Atlassian.\n\nWhile the package still can be found useful, we decided to **archive the project at\nthe beginning of July 2023**.\n\nThe main reason is that conflr will be superseded by Quarto.\nQuarto v1.3 gained the functionality to publish documents into Confluence\n([the official announcement](https://quarto.org/docs/blog/posts/2023-03-20-confluence/).\nThis looks promising. At the moment, there might be some missing features \ncompared to conflr, but it should be just a matter of time before Quarto\nsupersedes conflr in all aspects, considering it's one of Posit's flagship\nprojects.\n\nAnother reason is that conflr has a technical debt; the primary target of conflr\nwas the on-premise version of Confluence. The on-premise version [will be sunset\nin Feb 2024](https://www.atlassian.com/migration/assess/journey-to-cloud), so\nconflr should also switch to the cloud version. However, since the on-premise \nversion and the cloud version have different syntax and plugins, it's not easy\nto migrate. Considering we don't have much development bandwidth for this project,\nwe conclude it's not really feasible to support the cloud version.\n\nThank you for all your support on conflr. While it's a bit sad to announce\nthe retirement, we are very happy to see this great evolution in the documentation\necosystem!\n\n---\n\n## Installation\n\nInstall conflr from CRAN with:\n\n``` r\ninstall.packages(\"conflr\")\n```\n\nAlternatively, if you need the development version, install it with:\n\n``` r\n# install.packages(\"devtools\")\ndevtools::install_github(\"line/conflr\")\n```\n\n## Preparation\n\nconflr uses these environmental variables to access your Confluence.\n\n* `CONFLUENCE_URL`: The base URL of your Confluence. e.g. `https://confluence.example.com` (On Atlassian Cloud, `https://\u003cyour-domain\u003e.atlassian.net/wiki`).\n* `CONFLUENCE_USERNAME`: Your username (On Atlassian Cloud, your email address).\n* `CONFLUENCE_PASSWORD`: Your password (On Atlassian Cloud, your API token. For more details about API token, please read [the official document](https://confluence.atlassian.com/cloud/api-tokens-938839638.html)).\n\nThere are several ways to set these environmental variables. The quickest way is to enter in the popups that are displayed when you run the addin (see Usages section below). The inputs are cached in the environmental variables listed above by default.\n\nAnother way is to set the variables in the `.Renviron` file (you can open the file with `usethis::edit_r_environ()`). For example, you can set the base URL in the file as the following.\n\n```\nCONFLUENCE_URL=https://confluence.example.com\n```\n\n## Usages\n\nconflr provides the following ways to post R Markdown documents to Confluence.\n\n1. Use an RStudio Addin\n2. Run `confl_create_post_from_Rmd()` on console\n3. Specify `conflr::confluence_document` on the YAML front-matter\n\n### RStudio Addin\n\n#### 1. Move focus to the .Rmd file and click \"Post to Confluence\" Addin\n\n(**Caution for those who are not familiar with R Markdown**: R Markdown's powerfulness allows you to execute arbitrary code; be sure about what the code does before clicking \"Post to Confluence\"!)\n\n![](man/figures/screenshot1.png)\n\n![](man/figures/screenshot2.png)\n\nThen, you will be asked your username and password.\n\n![](man/figures/popup1.png)\n\n#### 2. Check the preview and click \"Publish\"\n\n* **type**: The type of the page (*page* means a normal wiki page, whereas *blogpost* mean a blog post, not a page).\n* **Space Key**: The key of the space you want to post.\n* **Parent page ID**: (optional): The ID of the parent page to the page.\n* **Use original image sizes**: If checked, do not resize the images.\n* **Fold code blocks**: If checked, code blocks are folded by default. \n* **TOC**: If checked, add a Table of Contents.\n* **TOC depth**: The lowest heading level to include in the Table of Contents.\n\n![](man/figures/screenshot3.png)\n\n#### 3. Check the result\n\n![](man/figures/screenshot4.png)\n\n### `confl_create_post_from_Rmd()`\n\nIf you don't use RStudio, you can use `confl_create_post_from_Rmd()`.\nThe basic usage is\n\n``` r\nconfl_create_post_from_Rmd(\"~/path/to/your.Rmd\")\n```\n\n#### Batch use\n\nIf you want to use this function without interaction, specify `interactive = FALSE`.\nThis skips any confirmations or previews.\n\n``` r\nconfl_create_post_from_Rmd(\"~/path/to/your.Rmd\", interactive = FALSE)\n```\n\nNote that, if you want to run this periodically, you also need to set `update = TRUE` to allow\nconflr to overwrite the existing page.\n\n``` r\nconfl_create_post_from_Rmd(\"~/path/to/your.Rmd\", interactive = FALSE, update = TRUE)\n```\n\n### `conflr::confluence_document`\n\nconflr's functionality is also available as a custom R Markdown format;\nYou can specify `conflr::confluence_document` to `output` in the front matter of your R Markdown document.\n\nFor example, if you set the following front matter, pressing `Knit` button on RStudio\n(or running `rmarkdown::render()`) will publish the R Markdown document to Confluence.\n\n``` md\n---\ntitle: \"title1\"\noutput:\n  conflr::confluence_document:\n    space_key: \"space1\"\n    update: true\n---\n\n...\n```\n\nFor the detail about available options, please refer to [`?confluence_document`](https://line.github.io/conflr/reference/confluence_document.html).\n\n## Options\n\nconflr recognizes these options:\n\n* `conflr_supported_syntax_highlighting`: A character vector of languages that your Confluence supports the syntax highlighting in addition to the default languages (by default, `sql`, `cpp`, `python`, `html`, `css`, `bash`, and `yaml` are supported).\n* `conflr_addin_clear_password_after_success`: If `TRUE`, unset `CONFLUENCE_PASSWORD` after the page is successfully uploaded via addin.\n\n## Know limitations\n\n### LaTeX support\n\nconflr supports [Math expressions](https://bookdown.org/yihui/rmarkdown/markdown-syntax.html#math-expressions) to some extent. But, it requires [LaTeX Math addon](https://marketplace.atlassian.com/apps/1210882/latex-math) installed. Otherwise, you will see \"unknown macro\" errors on the page.\n\n### htmlwidgets (e.g. leaflet, plotly)\n\nconflr doesn't support htmlwidgets-based packages like leaflet and plotly.\nInstead, you can embed the screenshot by setting `screenshot.force = TRUE` in the chunk option (c.f. https://bookdown.org/yihui/bookdown/html-widgets.html).\n\n## Advanced Usages\n\nconflr is also a (non-complete) binding to [Confluence's REST API](https://developer.atlassian.com/server/confluence/confluence-server-rest-api/). These low-level functions might be useful when you need to access to your Confluence programmatically.\n\n```{r load_library, eval=FALSE}\nlibrary(conflr)\n\n# list pages\nres \u003c- confl_list_pages(spaceKey = \"foo\")\npurrr::map_chr(res$results, \"id\")\n\n# get page info\npage \u003c- confl_get_page(res$results[[2]]$id)\npage$title\n\n# create a page\nnew_page \u003c- confl_post_page(\n  spaceKey = \"foo\",\n  title = \"Test\",\n  body = glue::glue(\n    '\u003cac:structured-macro ac:name=\"code\"\u003e\n     \u003cac:plain-text-body\u003e\u003c![CDATA[this is my code]]\u003e\u003c/ac:plain-text-body\u003e\n     \u003c/ac:structured-macro\u003e\n    '))\nnew_page$`_links`\n```\n\n## How to contribute\nSee [CONTRIBUTING.md](CONTRIBUTING.md)\n\n## License\n```\nCopyright (C) 2019 LINE Corporation\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, version 3.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program.  If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n```\nSee [LICENSE.md](LICENSE.md) for more detail.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fline%2Fconflr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fline%2Fconflr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fline%2Fconflr/lists"}