-
Notifications
You must be signed in to change notification settings - Fork 667
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Confluence] new method added confluence_get_tables_from_page +requir…
…ements.txt
- Loading branch information
gkowalc
committed
Dec 12, 2023
1 parent
3e1ef05
commit 760717f
Showing
5 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from atlassian import Confluence | ||
import logging | ||
|
||
confluence = Confluence( | ||
url="<instance_url>", | ||
username="<user_enamil>", | ||
password="api_key", | ||
) | ||
page_id = 393464 | ||
logging.basicConfig(level=logging.INFO) | ||
# Page_id is the page id of the page you want to get the tables from. | ||
|
||
result = confluence.get_tables_from_page(page_id) | ||
print(result) | ||
# Let's say page has two table, each one has 3 columns and 2 rows' | ||
# Method should return following output: {"page_id": 393464, "number_of_tables_in_page": 2, "tables_content": [[["header1", "header2", "header3"], ["h1r1", "h2r1", "h3r1"], ["h1r2", "h2r2", "h3r2"]], [["table2 header1", "table2 header2", "table2 header3"], ["h1r1", "h2r1", "h3r1"], ["h1r2", "h2r2", "h3r2"]]]} | ||
# tables_content is a list of lists of lists. Each nested list represents a table. Each nested list inside a table represents a row. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,5 @@ six | |
oauthlib | ||
requests_oauthlib | ||
requests-kerberos==0.14.0 | ||
bs4 | ||
lxml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters