Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Appfire Confluence CLI: Can I paste the clipboard into a page?

Johan Bezem
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 28, 2023

I am looking at a whole git repository full of markdown documents that need to be exported into respective Confluence pages. I understand that pasting markdown clipboard content (by hand) into a page (cloud installation, hosted with Atlassian) shall work.

I also have (CMD.EXE, PowerShell) commands to put the content of a file into the clipboard.

Can I create a Confluence CLI instruction (with Appfire CLI or OOTB) that runs in a CMD or PS shell to paste the clipboard into a newly created page in Confluence? That way I could  automate the creation of a Confluence space with the same content as my markdown document tree.

1 answer

1 accepted

0 votes
Answer accepted
Naveen Kumar_Appfire
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 28, 2023

HI @Johan Bezem

We also have a support ticket  SUPPORT-96478  to better track your request. However please find the response here as well.

Using Confluence Comand Line Interface, you can convert a markdown file into a confluence page using the storePage action. But you need to download all the required files into a directory on your local computer.
Please use the action shown below to import a single markdown file into a confluence page using CLI.

--action storePage --space test --title markdown --file Downloads/gitFiles/text.md --markdown
For all the files in your directory:
  1. Create a CSV file with column headers: space, parent, title, and, file. If the file(s) are available at different locations, provide the full path of the file(s) under the file column.
  2. Enter the following values in Page.csv:
  3. Execute the following CLI command:
--action runFromCsv --file page.csv --common "--action storePage --markdown" --continue
Please note that if the files are available in the ACLI installation directory then the file name can be mentioned directly, otherwise add the full path of the file location.
Hope this helps!
Thanks,
Naveen

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events