You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+73-58Lines changed: 73 additions & 58 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,66 +47,58 @@ Install python package via pip.
47
47
pip install confluence-markdown-exporter
48
48
```
49
49
50
-
### 2. Configure Authentication
50
+
### 2. Exporting
51
51
52
-
You must set environment variables for **one** of the following authentication options:
52
+
Run the exporter with the desired Confluence page ID or space key. Execute the console application by typing `confluence-markdown-exporter` and one of the commands `page`, `page-with-descendants`, `space`, `all-spaces` or `config`. If a command is unclear, you can always add `--help` to get additional information.
53
53
54
-
1. Username + API Token
55
-
56
-
-`ATLASSIAN_USERNAME`: Your Atlassian account email address
confluence-markdown-exporter page <page-id e.g. 645208921><output path e.g. ./output_path/>
74
63
```
75
64
76
-
If you have separate Confluence and Jira instances or authentication, you can provide them via `CONFLUENCE_` or `JIRA_` prefixed environment variables.
65
+
or by URL:
77
66
78
-
### 3. Exporting
67
+
```sh
68
+
confluence-markdown-exporter page <page-url e.g. https://company.atlassian.net/MySpace/My+Page+Title><output path e.g. ./output_path/>
69
+
```
79
70
80
-
Run the exporter with the desired Confluence page ID or space key.
71
+
#### 2.2. Export Page with Descendants
81
72
82
-
Export a single Confluence page by ID or URL:
73
+
Export a Confluence page and all its descendant pages by page ID:
83
74
84
75
```sh
85
-
confluence-markdown-exporter page <page-id e.g. 645208921 or page-url e.g. https://company.atlassian.net/MySpace/My+Page+Title><output path e.g. ./output_path/>
76
+
confluence-markdown-exporter page-with-descendants<page-id e.g. 645208921><output path e.g. ./output_path/>
86
77
```
87
78
88
-
Export a Confluence page and all it's descendants:
79
+
or by URL:
89
80
90
81
```sh
91
-
confluence-markdown-exporter page-with-descendants <page-id e.g. 645208921 or page-url e.g. https://company.atlassian.net/MySpace/My+Page+Title><output path e.g. ./output_path/>
82
+
confluence-markdown-exporter page-with-descendants <page-url e.g. https://company.atlassian.net/MySpace/My+Page+Title><output path e.g. ./output_path/>
92
83
```
93
84
85
+
#### 2.3. Export Space
86
+
94
87
Export all Confluence pages of a single Space:
95
88
96
89
```sh
97
90
confluence-markdown-exporter space <space-key e.g. MYSPACE><output path e.g. ./output_path/>
98
91
```
99
92
93
+
#### 2.3. Export all Spaces
94
+
100
95
Export all Confluence pages across all spaces:
101
96
102
97
```sh
103
98
confluence-markdown-exporter all-spaces <output path e.g. ./output_path/>
104
99
```
105
100
106
-
> [!TIP]
107
-
> Instead of `confluence-markdown-exporter` you can also use the shorthand `cf-export`.
108
-
109
-
### 4. Output
101
+
### 3. Output
110
102
111
103
The exported Markdown file(s) will be saved in the specified `output` directory e.g.:
112
104
@@ -121,45 +113,64 @@ output_path/
121
113
└── Another one.md
122
114
```
123
115
124
-
## Configuration Options
116
+
## Configuration
117
+
118
+
All configuration and authentication is stored in a single JSON file managed by the application. You do not need to manually edit this file.
119
+
120
+
### Interactive Configuration
125
121
126
-
By default the converter uses a GitHub Flavored Markdown (GFM). You can also choose an Obsidian flavored markdown by setting:
122
+
To interactively view and change configuration, run:
127
123
128
124
```sh
129
-
export MARKDOWN_STYLE="Obsidian"
125
+
confluence-markdown-exporter config
130
126
```
131
127
132
-
Via `PAGE_PATH` and `ATTACHMENT_PATH` you can customize how pages and attachments are organized in the output directory.
128
+
This will open a menu where you can:
129
+
- See all config options and their current values
130
+
- Select a config to change (including authentication)
131
+
- Reset all config to defaults
132
+
- Navigate directly to any config section (e.g. `auth.confluence`)
| auth.confluence.api_token | Confluence API token | "" |
149
+
| auth.confluence.pat | Confluence Personal Access Token | "" |
150
+
| auth.jira.url | Jira instance URL | "" |
151
+
| auth.jira.username | Jira username/email | "" |
152
+
| auth.jira.api_token | Jira API token | "" |
153
+
| auth.jira.pat | Jira Personal Access Token | "" |
154
+
155
+
You can always view and change the current config with the interactive menu above.
156
+
157
+
### Custom Config File Location
158
+
159
+
By default, configuration is stored in a platform-specific application directory. You can override the config file location by setting the `CME_CONFIG_PATH` environment variable to the desired file path. If set, the application will read and write config from this file instead. Example:
1.**Missing Attachment File ID on Server**: For some Confluence Server version/configuration the attachment file ID might not be provided (https://github.com/Spenhouet/confluence-markdown-exporter/issues/39). In the default configuration, this is used for the export path. Solution: Adjust the attachment path in the export config and use the `{attachment_id}` or `{attachment_title}` instead.
184
+
2.**Connection Issues when behind Proxy or VPN**: There might be connection issues if your Confluence Server is behind a proxy or VPN (https://github.com/Spenhouet/confluence-markdown-exporter/issues/38). If you experience issues, help to fix this is appreciated.
185
+
171
186
## Contributing
172
187
173
188
If you would like to contribute, please read [our contribution guideline](CONTRIBUTING.md).
0 commit comments