• This repository has been archived on 17/Jul/2023
  • Stars
    star
    130
  • Rank 277,575 (Top 6 %)
  • Language
    R
  • License
    GNU General Publi...
  • Created almost 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Post R Markdown documents to Confluence

⚠️ conflr is retired! ⚠️

conflr is an R package to post R Markdown documents to Confluence, a content collaboration tool by Atlassian.

While the package still can be found useful, we decided to archive the project at the beginning of July 2023.

The main reason is that conflr will be superseded by Quarto. Quarto v1.3 gained the functionality to publish documents into Confluence (the official announcement. This looks promising. At the moment, there might be some missing features compared to conflr, but it should be just a matter of time before Quarto supersedes conflr in all aspects, considering it’s one of Posit’s flagship projects.

Another reason is that conflr has a technical debt; the primary target of conflr was the on-premise version of Confluence. The on-premise version will be sunset in Feb 2024, so conflr should also switch to the cloud version. However, since the on-premise version and the cloud version have different syntax and plugins, it’s not easy to migrate. Considering we don’t have much development bandwidth for this project, we conclude it’s not really feasible to support the cloud version.

Thank you for all your support on conflr. While it’s a bit sad to announce the retirement, we are very happy to see this great evolution in the documentation ecosystem!


Installation

Install conflr from CRAN with:

install.packages("conflr")

Alternatively, if you need the development version, install it with:

# install.packages("devtools")
devtools::install_github("line/conflr")

Preparation

conflr uses these environmental variables to access your Confluence.

  • CONFLUENCE_URL: The base URL of your Confluence. e.g. https://confluence.example.com (On Atlassian Cloud, https://<your-domain>.atlassian.net/wiki).
  • CONFLUENCE_USERNAME: Your username (On Atlassian Cloud, your email address).
  • CONFLUENCE_PASSWORD: Your password (On Atlassian Cloud, your API token. For more details about API token, please read the official document).

There 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.

Another 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.

CONFLUENCE_URL=https://confluence.example.com

Usages

conflr provides the following ways to post R Markdown documents to Confluence.

  1. Use an RStudio Addin
  2. Run confl_create_post_from_Rmd() on console
  3. Specify conflr::confluence_document on the YAML front-matter

RStudio Addin

1. Move focus to the .Rmd file and click “Post to Confluence” Addin

(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”!)

Then, you will be asked your username and password.

2. Check the preview and click “Publish”

  • type: The type of the page (page means a normal wiki page, whereas blogpost mean a blog post, not a page).
  • Space Key: The key of the space you want to post.
  • Parent page ID: (optional): The ID of the parent page to the page.
  • Use original image sizes: If checked, do not resize the images.
  • Fold code blocks: If checked, code blocks are folded by default.
  • TOC: If checked, add a Table of Contents.
  • TOC depth: The lowest heading level to include in the Table of Contents.

3. Check the result

confl_create_post_from_Rmd()

If you don’t use RStudio, you can use confl_create_post_from_Rmd(). The basic usage is

confl_create_post_from_Rmd("~/path/to/your.Rmd")

Batch use

If you want to use this function without interaction, specify interactive = FALSE. This skips any confirmations or previews.

confl_create_post_from_Rmd("~/path/to/your.Rmd", interactive = FALSE)

Note that, if you want to run this periodically, you also need to set update = TRUE to allow conflr to overwrite the existing page.

confl_create_post_from_Rmd("~/path/to/your.Rmd", interactive = FALSE, update = TRUE)

conflr::confluence_document

conflr’s functionality is also available as a custom R Markdown format; You can specify conflr::confluence_document to output in the front matter of your R Markdown document.

For example, if you set the following front matter, pressing Knit button on RStudio (or running rmarkdown::render()) will publish the R Markdown document to Confluence.

---
title: "title1"
output:
  conflr::confluence_document:
    space_key: "space1"
    update: true
---

...

For the detail about available options, please refer to ?confluence_document.

Options

conflr recognizes these options:

  • 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).
  • conflr_addin_clear_password_after_success: If TRUE, unset CONFLUENCE_PASSWORD after the page is successfully uploaded via addin.

Know limitations

LaTeX support

conflr supports Math expressions to some extent. But, it requires LaTeX Math addon installed. Otherwise, you will see “unknown macro” errors on the page.

htmlwidgets (e.g. leaflet, plotly)

conflr doesn’t support htmlwidgets-based packages like leaflet and plotly. Instead, you can embed the screenshot by setting screenshot.force = TRUE in the chunk option (c.f. https://bookdown.org/yihui/bookdown/html-widgets.html).

Advanced Usages

conflr is also a (non-complete) binding to Confluence’s REST API. These low-level functions might be useful when you need to access to your Confluence programmatically.

library(conflr)

# list pages
res <- confl_list_pages(spaceKey = "foo")
purrr::map_chr(res$results, "id")

# get page info
page <- confl_get_page(res$results[[2]]$id)
page$title

# create a page
new_page <- confl_post_page(
  spaceKey = "foo",
  title = "Test",
  body = glue::glue(
    '<ac:structured-macro ac:name="code">
     <ac:plain-text-body><![CDATA[this is my code]]></ac:plain-text-body>
     </ac:structured-macro>
    '))
new_page$`_links`

How to contribute

See CONTRIBUTING.md

License

Copyright (C) 2019 LINE Corporation

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, version 3.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

See LICENSE.md for more detail.

More Repositories

1

armeria

Your go-to microservice framework for any situation, from the creator of Netty et al. You can build any type of microservice leveraging your favorite technologies, including gRPC, Thrift, Kotlin, Retrofit, Reactive Streams, Spring Boot and Dropwizard.
Java
4,765
star
2

line-bot-sdk-python

LINE Messaging API SDK for Python
Python
1,888
star
3

promgen

Promgen is a configuration file generator for Prometheus
JavaScript
1,047
star
4

line-bot-sdk-nodejs

LINE Messaging API SDK for Node.js
TypeScript
949
star
5

line-bot-sdk-go

LINE Messaging API SDK for Go
Go
885
star
6

line-sdk-ios-swift

Provides a modern way of implementing LINE APIs.
Swift
845
star
7

line-bot-sdk-php

LINE Messaging API SDK for PHP
PHP
704
star
8

kotlin-jdsl

Kotlin library that makes it easy to build and execute queries without generated metamodel
Kotlin
702
star
9

line-bot-sdk-java

LINE Messaging API SDK for Java
Java
605
star
10

centraldogma

Highly-available version-controlled service configuration repository based on Git, ZooKeeper and HTTP/2
Java
594
star
11

line-fido2-server

FIDO2(WebAuthn) server officially certified by FIDO Alliance and Relying Party examples.
Java
508
star
12

line-bot-sdk-ruby

LINE Messaging API SDK for Ruby
Ruby
479
star
13

stellite

Stellite project is a client library and server application that offers an easy way to develop, build, and implement client/server running primarily over the QUIC protocol developed by Google as part of the Chromium project.
C++
474
star
14

garr

Collection of high performance, thread-safe, lock-free go data structures
Go
370
star
15

line-liff-v2-starter

This is a small web application that demonstrates the basic functionality of the LINE Front-end Framework (LIFF).
JavaScript
334
star
16

decaton

High throughput asynchronous task processing on Apache Kafka
Java
325
star
17

ts-remove-unused

Remove unused code from your TypeScript project
TypeScript
264
star
18

headver

SemVer compatible version specification that has {head}.{yearweek}.{build} system.
252
star
19

abc-user-feedback

ABC User Feedback is a standalone web application that manages Voice of Customer (VoC) data. It allows you to gather and sort feedback from your customers.
TypeScript
230
star
20

apng-drawable

A lightweight and fast Animated Portable Network Graphics (APNG) image decoder for Android
Kotlin
223
star
21

flutter_line_sdk

A Flutter plugin that lets developers access LINE's native SDKs in Flutter apps with Dart.
Dart
213
star
22

rules_apple_line

LINE's Apple rules for Bazel
Starlark
207
star
23

lich

A library collection that enhances the development of Android apps.
Kotlin
191
star
24

line-login-starter

LINE Login starter application
Java
138
star
25

line-liff-starter

This is a small web application that demonstrates the basic functionality of the LINE Front-end Framework (LIFF).
JavaScript
138
star
26

armeria-examples

Armeria examples
Java
137
star
27

line-openapi

OpenAPI spec of the LINE's Public APIs
JavaScript
136
star
28

line-sdk-android

LINE SDK for Android lets you integrate LINE into your Android app to create a more engaging experience for your users.
Java
133
star
29

clay

Clay is an Android library project that provides image trimming which is originally an UI component of LINE Creators Studio
Kotlin
121
star
30

line-sdk-unity

Provides a modern way of implementing LINE APIs in Unity games, for iOS and Android.
C#
118
star
31

line-simple-beacon

JavaScript
109
star
32

LibriTTS-P

LibriTTS-P: A Corpus with Speaking Style and Speaker Identity Prompts for Text-to-Speech and Style Captioning
104
star
33

jnotebook_reader

🃏 An awesome viewer to browse and render Jupyter Notebooks from local, Amazon S3, Google Cloud Storage or MinIO
JavaScript
103
star
34

feature-flag-android

A Gradle plugin to achieve feature flag based development for Android applications.
Kotlin
100
star
35

webpack.kr

Korean translation of webpack document
MDX
91
star
36

line-things-starter

The sample codes for LINE Things Developer Trial
C++
90
star
37

liff-playground

An example app to show the usage of LIFF's API functions
TypeScript
90
star
38

grow-loader

A webpack loader to split class methods by decorators
JavaScript
88
star
39

abc-kmm-location

Location Service Manager for Kotlin Multiplatform Mobile iOS and Android
Kotlin
85
star
40

gradle-scripts

Sensible multi-project defaults for Gradle
81
star
41

vue-pivot-table-plus

An enhanced pivot table component for Vue.js
Vue
77
star
42

abc-virtual-background-maker

A standalone React application designed for creating and downloading virtual background images enriched with customizable text elements.
TypeScript
76
star
43

line-platform-feedback

LINE Platform feedback
76
star
44

gradle-multi-project-support

A collection of Gradle plugins to maintain the multi-project or multi-application in the mono-repo.
Kotlin
75
star
45

line-bot-sdk-perl

LINE Messaging API SDK for Perl
Perl
72
star
46

create-liff-app

Start developing LIFF application with a simple CLI command.
TypeScript
63
star
47

ostracon

Ostracon, a consensus algorithm, is forked from Tendermint Core. We have added VRF to Tendermint BFT. It adds randomness to PoS Validator elections and improves security.
Go
60
star
48

conditional

A super lightweight library that helps you to compose multiple conditional expressions and make them asynchronous easily.
Java
59
star
49

open-universe

Open implementation of UNIVERSE and UNIVERSE++ diffusion-based speech enhancement models.
Python
58
star
50

abc-kmm-notifications

Remote Notification Manager for Kotlin Multiplatform Mobile iOS and Android
Kotlin
57
star
51

lbm-sdk

A framework for building blockchains based LINE Blockchain Mainnet that is forked from cosmos-sdk
Go
53
star
52

liff-inspector

The universal DevTools for LIFF (WebView) browser
TypeScript
51
star
53

centraldogma-go

Go client library for Central Dogma
Go
50
star
54

line-sdk-starter-ios

A starter app demonstrating usage of the LINE iOS SDK.
Objective-C
50
star
55

centraldogma-rs

Official Rust client for Central Dogma
Rust
46
star
56

lighthouse

A user-friendly library for reproducible video moment retrieval and highlight detection.
Python
46
star
57

zipkin-lens

An alternative UI for Zipkin (Distributed Tracing), this repo is no longer used as it's already merged into upstream, please go to https://github.com/openzipkin/zipkin/tree/master/zipkin-lens
JavaScript
45
star
58

LINE-DistilBERT-Japanese

DistilBERT model pre-trained on 131 GB of Japanese web text. The teacher model is BERT-base that built in-house at LINE.
44
star
59

Flagship4j

Feature toggle system API-Client SDK follow OpenFeature specification.
Java
43
star
60

line-api-use-case-messaging-api

LINE Messaging API demo application provided by LINE API Use Case
Python
37
star
61

line-sdk-starter-android-v2

A starter application that demonstrates how to use LINE SDK V2 for Android.
Java
35
star
62

liff-mock

LIFF Mock is a LIFF Plugin that make testing your LIFF app easy.
TypeScript
35
star
63

clova-cek-sdk-nodejs

SDK of the Clova CEK for Node.js
TypeScript
34
star
64

line-sdk-starter-android

A starter app demonstrating usage of the LINE Android SDK.
Java
33
star
65

kubectl-kustomize

Docker image with kubectl and kustomize
Dockerfile
33
star
66

aes-gcm-siv

AES-GCM-SIV (RFC 8452) implementation for C, Android and Java, with hardware acceleration support.
C
33
star
67

recruiting-resources-jp

Go
33
star
68

lfb

LINE Financial Blockchain forked from gaia(https://github.com/cosmos/gaia)
Go
32
star
69

demo-rich-menu-bot

Demo bot for using rich menus with the Messaging API
PHP
31
star
70

figma-translator-vue-plugin-sample

The sample of Figma translation plugin with Vue
Vue
31
star
71

line-things-dev-board

LINE Things development board - Sample codes and schematics
HTML
29
star
72

abc-kmm-shared-storage

A local storage management library for Kotlin Multiplatform Mobile iOS and Android
Kotlin
27
star
73

line-sdk-starter-ios-v2

A starter application that demonstrates how to use LINE SDK for iOS.
Objective-C
27
star
74

gradle-multi-project-support-sample

This is a sample of build-recipe-plugin in gradle-multi-project-support
Kotlin
27
star
75

line-api-use-case-reservation-hairsalon

Hair salon reservation demo application provided by LINE API Use Case
Python
27
star
76

line-blockchain-developers-sdk-js

Javascript library for line blockchain developers
TypeScript
25
star
77

Human-Interaction-Generation

Official implementation of ICCV 2023 Oral Paper "Role-Aware Interaction Generation from Textual Description"
Python
25
star
78

networking-sr

OpenStack Neutron plugin/drivers for Segment Routing IPv6
Python
24
star
79

blockchain-sample-link-cinema

A sample service of LINE Blockchain, demonstrating how to utilize LINE Blockchain Developers and LINE BITMAX Wallet.
Go
21
star
80

abc-kmm-analytics-tools

Analytics Tools for Kotlin Multiplatform Mobile iOS and Android
Kotlin
20
star
81

clova-cek-sdk-swift

SDK of the Clova CEK for Swift
Swift
20
star
82

clova-cek-sdk-python

SDK of the Clova CEK for Python
Python
19
star
83

Meta-AI-Video-Similarity-Challenge-3rd-Place-Solution

The 3rd Place Solution of the Meta AI Video Similarity Challenge : Descriptor Track and Matching Track.
Python
18
star
84

line-bot-sample-ms

C#
17
star
85

centraldogma-python

Python client library for Central Dogma
Python
17
star
86

line-api-use-case-reservation-Restaurant

Restaurant reservation demo application provided by LINE API Use Case
Python
16
star
87

BC-node-server-sample

BusinessConnect sample server with NodeJS
JavaScript
16
star
88

japanese-large-lm-instruction-sft

16
star
89

cosmwasm

Fast and reusable WebAssembly smart contract runtime(and library) for lbm-sdk.
Rust
15
star
90

gorocksdb

A `rocksdb` wrapper for golang applications. This is forked from https://github.com/tecbot/gorocksdb.
Go
15
star
91

line-api-use-case-table-order

Table order demo application provided by LINE API Use Case
Python
15
star
92

iavl

Merkleized IAVL+ Tree implementation in Go forked from cosmos/iavl(https://github.com/cosmos/iavl)
Go
14
star
93

blockchain-sample-mage-duel

A sample service implementing a card game using the blockchain, which can serve as a guide on tokenizing game money and items.
C#
14
star
94

clova-cek-sdk-java

SDK of the Clova CEK for Java
Java
13
star
95

wasmvm

Go bindings to the CosmWasm smart contract framework. In particular, it allows you to easily compile, initialize, and execute these contracts from Go.
Go
13
star
96

tm-db

Common database interface for various database backends for Ostracon and LBM SDK. This is forked from Tendermint tm-db(https://github.com/tendermint/tm-db)
Go
13
star
97

clova-cek-sdk-elixir

SDK of the Clova CEK for Elixir
Elixir
13
star
98

line-api-use-case-liff

LINE LIFF demo application provided by LINE API Use Case
CSS
12
star
99

line-bot-pyconkr2019

LINE Chatbot for PyCon KR 2019
Python
12
star
100

line-blockchain-developers-sdk-kt

Kotlin library for line blockchain developers
Kotlin
11
star