kci-confluence-cli 0.4.0__tar.gz → 0.4.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- kci_confluence_cli-0.4.2/.devcontainer/.dockerignore +1 -0
- kci_confluence_cli-0.4.2/.devcontainer/.extensions/.gitignore +2 -0
- kci_confluence_cli-0.4.2/.devcontainer/Dockerfile +82 -0
- kci_confluence_cli-0.4.2/.devcontainer/devcontainer.json +49 -0
- kci_confluence_cli-0.4.2/.github/dependabot.yml +6 -0
- kci_confluence_cli-0.4.2/.github/workflows/lint-test.yml +40 -0
- kci_confluence_cli-0.4.2/.github/workflows/publish-to-pypi.yml +24 -0
- kci_confluence_cli-0.4.2/.gitignore +106 -0
- kci_confluence_cli-0.4.2/.readthedocs.yaml +15 -0
- kci_confluence_cli-0.4.2/.vscode/cspell.json +36 -0
- kci_confluence_cli-0.4.2/.vscode/extension.json +7 -0
- kci_confluence_cli-0.4.2/.vscode/settings.json +27 -0
- kci_confluence_cli-0.4.2/Makefile +26 -0
- {kci_confluence_cli-0.4.0 → kci_confluence_cli-0.4.2}/PKG-INFO +23 -21
- {kci_confluence_cli-0.4.0 → kci_confluence_cli-0.4.2}/README.md +11 -5
- {kci_confluence_cli-0.4.0 → kci_confluence_cli-0.4.2}/confluence/__main__.py +1 -2
- kci_confluence_cli-0.4.2/confluence/__version__.py +1 -0
- {kci_confluence_cli-0.4.0 → kci_confluence_cli-0.4.2}/confluence/attachment/create_attachment.py +6 -6
- {kci_confluence_cli-0.4.0 → kci_confluence_cli-0.4.2}/confluence/attachment/delete_attachment.py +5 -5
- {kci_confluence_cli-0.4.0 → kci_confluence_cli-0.4.2}/confluence/attachment/get_attachment.py +2 -2
- {kci_confluence_cli-0.4.0 → kci_confluence_cli-0.4.2}/confluence/attachment/subcommand.py +3 -3
- {kci_confluence_cli-0.4.0 → kci_confluence_cli-0.4.2}/confluence/common/api.py +11 -13
- {kci_confluence_cli-0.4.0 → kci_confluence_cli-0.4.2}/confluence/common/cli.py +4 -6
- {kci_confluence_cli-0.4.0 → kci_confluence_cli-0.4.2}/confluence/common/utils.py +3 -3
- {kci_confluence_cli-0.4.0 → kci_confluence_cli-0.4.2}/confluence/content/get_content_by_id.py +2 -2
- {kci_confluence_cli-0.4.0 → kci_confluence_cli-0.4.2}/confluence/content/subcommand.py +3 -3
- {kci_confluence_cli-0.4.0 → kci_confluence_cli-0.4.2}/confluence/local/subcommand.py +1 -2
- kci_confluence_cli-0.4.2/confluence/page/get_page_body.py +94 -0
- {kci_confluence_cli-0.4.0 → kci_confluence_cli-0.4.2}/confluence/page/subcommand.py +3 -3
- {kci_confluence_cli-0.4.0 → kci_confluence_cli-0.4.2}/confluence/page/update_page.py +2 -2
- kci_confluence_cli-0.4.2/docs/Makefile +19 -0
- kci_confluence_cli-0.4.2/docs/_static/.gitkeep +0 -0
- kci_confluence_cli-0.4.2/docs/_templates/.gitkeep +0 -0
- kci_confluence_cli-0.4.2/docs/command_reference/attachment/create.rst +40 -0
- kci_confluence_cli-0.4.2/docs/command_reference/attachment/delete.rst +42 -0
- kci_confluence_cli-0.4.2/docs/command_reference/attachment/get.rst +63 -0
- kci_confluence_cli-0.4.2/docs/command_reference/attachment/index.rst +29 -0
- kci_confluence_cli-0.4.2/docs/command_reference/content/get_by_id.rst +52 -0
- kci_confluence_cli-0.4.2/docs/command_reference/content/index.rst +28 -0
- kci_confluence_cli-0.4.2/docs/command_reference/index.rst +23 -0
- kci_confluence_cli-0.4.2/docs/command_reference/local/convert_html.rst +85 -0
- kci_confluence_cli-0.4.2/docs/command_reference/local/index.rst +27 -0
- kci_confluence_cli-0.4.2/docs/command_reference/page/get_body.rst +39 -0
- kci_confluence_cli-0.4.2/docs/command_reference/page/index.rst +29 -0
- kci_confluence_cli-0.4.2/docs/command_reference/page/update.rst +40 -0
- kci_confluence_cli-0.4.2/docs/conf.py +82 -0
- kci_confluence_cli-0.4.2/docs/index.rst +22 -0
- kci_confluence_cli-0.4.2/docs/requirements.txt +4 -0
- kci_confluence_cli-0.4.2/docs/user_guide/getting_started.rst +84 -0
- kci_confluence_cli-0.4.2/docs/user_guide/google_docs_migration.rst +68 -0
- kci_confluence_cli-0.4.2/docs/user_guide/images/confluence_source_editor.png +0 -0
- kci_confluence_cli-0.4.2/docs/user_guide/images/google_docs_download.png +0 -0
- kci_confluence_cli-0.4.2/docs/user_guide/index.rst +11 -0
- {kci_confluence_cli-0.4.0 → kci_confluence_cli-0.4.2}/pyproject.toml +44 -61
- kci_confluence_cli-0.4.2/pytest.ini +5 -0
- kci_confluence_cli-0.4.2/tests/__init__.py +0 -0
- kci_confluence_cli-0.4.2/tests/local/__init__.py +0 -0
- kci_confluence_cli-0.4.2/tests/local/test__convert_html_to_xml.py +8 -0
- kci_confluence_cli-0.4.2/tests/resources/page.html +6 -0
- kci_confluence_cli-0.4.2/tests/test____main__.py +17 -0
- kci_confluence_cli-0.4.2/uv.lock +1425 -0
- kci_confluence_cli-0.4.0/confluence/__version__.py +0 -1
- kci_confluence_cli-0.4.0/confluence/page/get_page_body.py +0 -52
- {kci_confluence_cli-0.4.0 → kci_confluence_cli-0.4.2}/confluence/__init__.py +0 -0
- {kci_confluence_cli-0.4.0 → kci_confluence_cli-0.4.2}/confluence/attachment/__init__.py +0 -0
- {kci_confluence_cli-0.4.0 → kci_confluence_cli-0.4.2}/confluence/common/__init__.py +0 -0
- {kci_confluence_cli-0.4.0 → kci_confluence_cli-0.4.2}/confluence/content/__init__.py +0 -0
- {kci_confluence_cli-0.4.0 → kci_confluence_cli-0.4.2}/confluence/data/logging.yaml +0 -0
- {kci_confluence_cli-0.4.0 → kci_confluence_cli-0.4.2}/confluence/local/__init__.py +0 -0
- {kci_confluence_cli-0.4.0 → kci_confluence_cli-0.4.2}/confluence/local/convert_html_to_xml.py +0 -0
- {kci_confluence_cli-0.4.0 → kci_confluence_cli-0.4.2}/confluence/page/__init__.py +0 -0
- {kci_confluence_cli-0.4.0 → kci_confluence_cli-0.4.2}/confluence/py.typed +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/venv
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
FROM ubuntu:22.04
|
|
2
|
+
|
|
3
|
+
# Install prerequisites
|
|
4
|
+
RUN set -x \
|
|
5
|
+
&& export DEBIAN_FRONTEND=noninteractive \
|
|
6
|
+
&& apt-get update \
|
|
7
|
+
&& apt-get install -y --no-install-recommends \
|
|
8
|
+
gnupg2 \
|
|
9
|
+
software-properties-common \
|
|
10
|
+
language-pack-ja \
|
|
11
|
+
tzdata \
|
|
12
|
+
curl \
|
|
13
|
+
lsb-release \
|
|
14
|
+
&& apt-get -y clean \
|
|
15
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
16
|
+
|
|
17
|
+
# Set locale & timezone
|
|
18
|
+
RUN update-locale LANG=ja_JP.UTF-8 LANGUAGE=ja_JP:ja \
|
|
19
|
+
&& ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime \
|
|
20
|
+
&& echo "Asia/Tokyo" > /etc/timezone
|
|
21
|
+
|
|
22
|
+
ENV LANG ja_JP.UTF-8
|
|
23
|
+
ENV LC_ALL ja_JP.UTF-8
|
|
24
|
+
ENV LC_CTYPE ja_JP.UTF-8
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
RUN set -x \
|
|
28
|
+
&& sed -i.bak -r 's!(deb|deb-src) \S+!\1 mirror://mirrors.ubuntu.com/mirrors.txt!' /etc/apt/sources.list
|
|
29
|
+
|
|
30
|
+
# Install Ubuntu packages
|
|
31
|
+
RUN set -x \
|
|
32
|
+
# Python3.12をインストールするために、deadsnakes PPAを追加
|
|
33
|
+
&& add-apt-repository ppa:deadsnakes/ppa \
|
|
34
|
+
# Install packages
|
|
35
|
+
&& apt-get update \
|
|
36
|
+
&& apt-get install -y --no-install-recommends \
|
|
37
|
+
# python
|
|
38
|
+
python3.12-dev \
|
|
39
|
+
python3-pip \
|
|
40
|
+
# common tools
|
|
41
|
+
bash-completion \
|
|
42
|
+
build-essential \
|
|
43
|
+
git \
|
|
44
|
+
iputils-ping \
|
|
45
|
+
jq \
|
|
46
|
+
less \
|
|
47
|
+
net-tools \
|
|
48
|
+
openssh-client \
|
|
49
|
+
shellcheck \
|
|
50
|
+
sudo \
|
|
51
|
+
tar \
|
|
52
|
+
time \
|
|
53
|
+
unzip \
|
|
54
|
+
vim \
|
|
55
|
+
wget \
|
|
56
|
+
xz-utils \
|
|
57
|
+
zip \
|
|
58
|
+
&& apt-get -y clean \
|
|
59
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
# Python / pip
|
|
63
|
+
RUN ln -s $(which python3.12) /usr/bin/python
|
|
64
|
+
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
65
|
+
PIP_DEFAULT_TIMEOUT=100 \
|
|
66
|
+
PIP_NO_CACHE_DIR=on \
|
|
67
|
+
PIP_DISABLE_PIP_VERSION_CHECK=on
|
|
68
|
+
|
|
69
|
+
# uv
|
|
70
|
+
RUN set -x \
|
|
71
|
+
&& python -m pip install -U \
|
|
72
|
+
pip \
|
|
73
|
+
setuptools \
|
|
74
|
+
requests \
|
|
75
|
+
&& python -m pip install \
|
|
76
|
+
uv
|
|
77
|
+
|
|
78
|
+
# Add user / Grant sudo privileges
|
|
79
|
+
RUN useradd -m -s /bin/bash -u 5000 -U vscode \
|
|
80
|
+
&& echo "vscode ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/ALL
|
|
81
|
+
|
|
82
|
+
USER vscode
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
|
|
2
|
+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.154.0/containers/docker-existing-dockerfile
|
|
3
|
+
{
|
|
4
|
+
"name": "Existing Dockerfile",
|
|
5
|
+
"build": {
|
|
6
|
+
"dockerfile": "Dockerfile",
|
|
7
|
+
"context": ".",
|
|
8
|
+
"args": {}
|
|
9
|
+
},
|
|
10
|
+
"containerUser": "vscode",
|
|
11
|
+
"remoteUser": "vscode",
|
|
12
|
+
"updateRemoteUserUID": true,
|
|
13
|
+
// マウント対象のディレクトリを事前に作成する
|
|
14
|
+
"initializeCommand": "mkdir -p ${localWorkspaceFolder}/.devcontainer/venv",
|
|
15
|
+
"mounts": [
|
|
16
|
+
// ホスト側のvenvとコンテナ側のvenvを分離する
|
|
17
|
+
"source=${localWorkspaceFolder}/.devcontainer/venv,target=${containerWorkspaceFolder}/.venv,type=bind"
|
|
18
|
+
],
|
|
19
|
+
"forwardPorts": [],
|
|
20
|
+
"runArgs": [
|
|
21
|
+
"--init",
|
|
22
|
+
"--net=host",
|
|
23
|
+
"--env=CONFLUENCE_USER_NAME",
|
|
24
|
+
"--env=CONFLUENCE_USER_PASSWORD",
|
|
25
|
+
"--env=CONFLUENCE_BASE_URL"
|
|
26
|
+
],
|
|
27
|
+
"containerEnv": {
|
|
28
|
+
"CONTAINER_WORKSPACE": "${containerWorkspaceFolder}",
|
|
29
|
+
"LOCAL_WORKSPACE": "${localWorkspaceFolder}"
|
|
30
|
+
},
|
|
31
|
+
"workspaceMount": "source=${localWorkspaceFolder},target=/workspaces,type=bind,consistency=cached",
|
|
32
|
+
"workspaceFolder": "/workspaces",
|
|
33
|
+
"postStartCommand": "uv sync --all-groups",
|
|
34
|
+
"customizations": {
|
|
35
|
+
"vscode": {
|
|
36
|
+
"extensions": [
|
|
37
|
+
"mosapride.zenkaku",
|
|
38
|
+
"ms-python.python",
|
|
39
|
+
"ms-python.vscode-pylance",
|
|
40
|
+
"charliermarsh.ruff",
|
|
41
|
+
"streetsidesoftware.code-spell-checker",
|
|
42
|
+
"bungcip.better-toml",
|
|
43
|
+
"njpwerner.autodocstring",
|
|
44
|
+
"mechatroner.rainbow-csv",
|
|
45
|
+
"lextudio.restructuredtext"
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
name: Test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
python-version: ['3.12', '3.13', '3.14']
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
20
|
+
uses: actions/setup-python@v5
|
|
21
|
+
with:
|
|
22
|
+
python-version: ${{ matrix.python-version }}
|
|
23
|
+
|
|
24
|
+
- name: Set up uv
|
|
25
|
+
uses: astral-sh/setup-uv@v6
|
|
26
|
+
with:
|
|
27
|
+
enable-cache: true
|
|
28
|
+
cache-dependency-glob: uv.lock
|
|
29
|
+
|
|
30
|
+
- name: Install dependencies
|
|
31
|
+
env:
|
|
32
|
+
PIP_DEFAULT_TIMEOUT: 300
|
|
33
|
+
run: uv sync --all-groups
|
|
34
|
+
|
|
35
|
+
- name: Run tests
|
|
36
|
+
run: make test
|
|
37
|
+
|
|
38
|
+
- name: Run lint (Python 3.14 only)
|
|
39
|
+
if: matrix.python-version == '3.14'
|
|
40
|
+
run: make lint
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: Publish Python 🐍 distributions 📦 to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
build-n-publish:
|
|
9
|
+
name: Build and publish Python 🐍 distributions 📦 to PyPI
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
- name: Set up Python 3.12
|
|
14
|
+
uses: actions/setup-python@v5
|
|
15
|
+
with:
|
|
16
|
+
python-version: "3.12"
|
|
17
|
+
- name: Set up uv
|
|
18
|
+
uses: astral-sh/setup-uv@v6
|
|
19
|
+
- name: Publish
|
|
20
|
+
env:
|
|
21
|
+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
|
|
22
|
+
run: |
|
|
23
|
+
uv build
|
|
24
|
+
uv publish
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
*.egg-info/
|
|
24
|
+
.installed.cfg
|
|
25
|
+
*.egg
|
|
26
|
+
MANIFEST
|
|
27
|
+
|
|
28
|
+
# PyInstaller
|
|
29
|
+
# Usually these files are written by a python script from a template
|
|
30
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
31
|
+
*.manifest
|
|
32
|
+
*.spec
|
|
33
|
+
|
|
34
|
+
# Installer logs
|
|
35
|
+
pip-log.txt
|
|
36
|
+
pip-delete-this-directory.txt
|
|
37
|
+
|
|
38
|
+
# Unit test / coverage reports
|
|
39
|
+
htmlcov/
|
|
40
|
+
.tox/
|
|
41
|
+
.coverage
|
|
42
|
+
.coverage.*
|
|
43
|
+
.cache
|
|
44
|
+
nosetests.xml
|
|
45
|
+
coverage.xml
|
|
46
|
+
*.cover
|
|
47
|
+
.hypothesis/
|
|
48
|
+
.pytest_cache/
|
|
49
|
+
|
|
50
|
+
# Translations
|
|
51
|
+
*.mo
|
|
52
|
+
*.pot
|
|
53
|
+
|
|
54
|
+
# Django stuff:
|
|
55
|
+
*.log
|
|
56
|
+
local_settings.py
|
|
57
|
+
db.sqlite3
|
|
58
|
+
|
|
59
|
+
# Flask stuff:
|
|
60
|
+
instance/
|
|
61
|
+
.webassets-cache
|
|
62
|
+
|
|
63
|
+
# Scrapy stuff:
|
|
64
|
+
.scrapy
|
|
65
|
+
|
|
66
|
+
# Sphinx documentation
|
|
67
|
+
docs/_build/
|
|
68
|
+
|
|
69
|
+
# PyBuilder
|
|
70
|
+
target/
|
|
71
|
+
|
|
72
|
+
# Jupyter Notebook
|
|
73
|
+
.ipynb_checkpoints
|
|
74
|
+
|
|
75
|
+
# pyenv
|
|
76
|
+
.python-version
|
|
77
|
+
|
|
78
|
+
# celery beat schedule file
|
|
79
|
+
celerybeat-schedule
|
|
80
|
+
|
|
81
|
+
# SageMath parsed files
|
|
82
|
+
*.sage.py
|
|
83
|
+
|
|
84
|
+
# Environments
|
|
85
|
+
.env
|
|
86
|
+
.venv
|
|
87
|
+
env/
|
|
88
|
+
venv/
|
|
89
|
+
ENV/
|
|
90
|
+
env.bak/
|
|
91
|
+
venv.bak/
|
|
92
|
+
|
|
93
|
+
# Spyder project settings
|
|
94
|
+
.spyderproject
|
|
95
|
+
.spyproject
|
|
96
|
+
|
|
97
|
+
# Rope project settings
|
|
98
|
+
.ropeproject
|
|
99
|
+
|
|
100
|
+
# mkdocs documentation
|
|
101
|
+
/site
|
|
102
|
+
|
|
103
|
+
# mypy
|
|
104
|
+
.mypy_cache/
|
|
105
|
+
|
|
106
|
+
out/
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.2",
|
|
3
|
+
"ignorePaths": [
|
|
4
|
+
"**/.git/objects/**",
|
|
5
|
+
".devcontainer/",
|
|
6
|
+
".vscode/",
|
|
7
|
+
"LICENSE",
|
|
8
|
+
"tests/"
|
|
9
|
+
],
|
|
10
|
+
"enabledLanguageIds": [
|
|
11
|
+
"python",
|
|
12
|
+
"reStructuredText"
|
|
13
|
+
],
|
|
14
|
+
"words": [
|
|
15
|
+
"annofab",
|
|
16
|
+
"astimezone",
|
|
17
|
+
"astype",
|
|
18
|
+
"asyncio",
|
|
19
|
+
"backoff",
|
|
20
|
+
"dateutil",
|
|
21
|
+
"dtypes",
|
|
22
|
+
"getrgb",
|
|
23
|
+
"giveup",
|
|
24
|
+
"groupby",
|
|
25
|
+
"inplace",
|
|
26
|
+
"itertools",
|
|
27
|
+
"nargs",
|
|
28
|
+
"noqa",
|
|
29
|
+
"popen",
|
|
30
|
+
"pylint",
|
|
31
|
+
"pyquery",
|
|
32
|
+
"toolbelt",
|
|
33
|
+
"tzlocal",
|
|
34
|
+
"unsubscriptable"
|
|
35
|
+
]
|
|
36
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"terminal.integrated.allowChords": false, // terminal上でEmacsキーバインドを使うための設定
|
|
3
|
+
"files.exclude": {
|
|
4
|
+
"**/.devcontainer/.extensions": true,
|
|
5
|
+
"**/__pycache__": true,
|
|
6
|
+
"**/.pytest_cache": true
|
|
7
|
+
},
|
|
8
|
+
"files.watcherExclude": {
|
|
9
|
+
"**/.devcontainer/.extensions": true,
|
|
10
|
+
},
|
|
11
|
+
"search.exclude": {
|
|
12
|
+
"**/.devcontainer/.extensions": true,
|
|
13
|
+
},
|
|
14
|
+
"files.autoSave": "afterDelay",
|
|
15
|
+
"files.autoSaveDelay": 1000,
|
|
16
|
+
"python.languageServer": "Pylance",
|
|
17
|
+
"python.autoComplete.extraPaths": [
|
|
18
|
+
".venv/lib/python3.12/site-packages/"
|
|
19
|
+
],
|
|
20
|
+
"python.analysis.extraPaths": [
|
|
21
|
+
".venv/lib/python3.12/site-packages/"
|
|
22
|
+
],
|
|
23
|
+
"python.analysis.completeFunctionParens": true,
|
|
24
|
+
"[python]": {
|
|
25
|
+
},
|
|
26
|
+
"python.testing.autoTestDiscoverOnSaveEnabled": false,
|
|
27
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
ifndef SOURCE_FILES
|
|
2
|
+
export SOURCE_FILES:=confluence
|
|
3
|
+
endif
|
|
4
|
+
ifndef TEST_FILES
|
|
5
|
+
export TEST_FILES:=tests
|
|
6
|
+
endif
|
|
7
|
+
|
|
8
|
+
.PHONY: format lint test docs publish
|
|
9
|
+
|
|
10
|
+
format:
|
|
11
|
+
uv run ruff format ${SOURCE_FILES} ${TEST_FILES}
|
|
12
|
+
uv run ruff check ${SOURCE_FILES} ${TEST_FILES} --fix-only --exit-zero
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
lint:
|
|
17
|
+
uv run ruff check ${SOURCE_FILES} ${TEST_FILES}
|
|
18
|
+
uv run mypy ${SOURCE_FILES}
|
|
19
|
+
|
|
20
|
+
test:
|
|
21
|
+
# 並列実行してレポートも出力する
|
|
22
|
+
uv run pytest -n auto --cov=kci --cov-report=html tests
|
|
23
|
+
|
|
24
|
+
docs:
|
|
25
|
+
cd docs && uv run make html
|
|
26
|
+
|
|
@@ -1,42 +1,39 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: kci-confluence-cli
|
|
3
|
-
Version: 0.4.
|
|
4
|
-
Summary:
|
|
5
|
-
|
|
6
|
-
License: MIT
|
|
3
|
+
Version: 0.4.2
|
|
4
|
+
Summary: Confluence v6.15.7を操作するためのCLIです。
|
|
5
|
+
Project-URL: Repository, https://github.com/kurusugawa-computer/confluence-cli
|
|
7
6
|
Author: Kurusugawa Computer Inc.
|
|
8
|
-
|
|
7
|
+
License: MIT
|
|
9
8
|
Classifier: Development Status :: 4 - Beta
|
|
10
9
|
Classifier: Environment :: Console
|
|
11
10
|
Classifier: Intended Audience :: Developers
|
|
12
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
13
11
|
Classifier: Operating System :: OS Independent
|
|
14
|
-
Classifier: Programming Language :: Python :: 3
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
18
12
|
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
19
15
|
Classifier: Topic :: Utilities
|
|
16
|
+
Requires-Python: >=3.12
|
|
20
17
|
Requires-Dist: backoff
|
|
21
|
-
Requires-Dist:
|
|
22
|
-
Requires-Dist:
|
|
18
|
+
Requires-Dist: lxml
|
|
19
|
+
Requires-Dist: more-itertools
|
|
20
|
+
Requires-Dist: pyquery>=2
|
|
23
21
|
Requires-Dist: pyyaml
|
|
24
22
|
Requires-Dist: requests
|
|
25
|
-
Requires-Dist: requests-toolbelt
|
|
26
|
-
Project-URL: Repository, https://github.com/kurusugawa-computer/confluence-cli
|
|
23
|
+
Requires-Dist: requests-toolbelt>=1
|
|
27
24
|
Description-Content-Type: text/markdown
|
|
28
25
|
|
|
29
26
|
# confluence-cli
|
|
30
|
-
|
|
27
|
+
Confluence v6.15.7を操作するためのCLIです。
|
|
31
28
|
|
|
32
29
|
|
|
33
|
-
[](https://github.com/kurusugawa-computer/confluence-cli/actions/workflows/lint-test.yml)
|
|
34
31
|
[](https://badge.fury.io/py/kci-confluence-cli)
|
|
35
32
|
[](https://pypi.org/project/kci-confluence-cli/)
|
|
36
33
|
[](https://confluence-cli.readthedocs.io/ja/latest/?badge=latest)
|
|
37
34
|
|
|
38
35
|
# Requirements
|
|
39
|
-
Python 3.
|
|
36
|
+
Python 3.12+
|
|
40
37
|
|
|
41
38
|
# Install
|
|
42
39
|
|
|
@@ -44,6 +41,13 @@ Python 3.9+
|
|
|
44
41
|
$ pip install kci-confluence-cli
|
|
45
42
|
```
|
|
46
43
|
|
|
44
|
+
`uv` を使用している場合は、インストールせずに実行することもできます。
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
$ uvx --from kci-confluence-cli confluence page get_body --page_id 123456
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
|
|
47
51
|
# Quick Start
|
|
48
52
|
|
|
49
53
|
環境変数で認証情報を設定:
|
|
@@ -57,7 +61,7 @@ export CONFLUENCE_BASE_URL="https://your-domain.com/confluence"
|
|
|
57
61
|
ページ本文を取得:
|
|
58
62
|
|
|
59
63
|
```bash
|
|
60
|
-
$ confluence page get_body --page_id
|
|
64
|
+
$ confluence page get_body --page_id 123456
|
|
61
65
|
```
|
|
62
66
|
|
|
63
67
|
# Documentation
|
|
@@ -67,5 +71,3 @@ $ confluence page get_body --page_id 12345
|
|
|
67
71
|
- [Getting Started](https://confluence-cli.readthedocs.io/ja/latest/user_guide/getting_started.html) - インストール方法と基本的な使い方
|
|
68
72
|
- [User Guide](https://confluence-cli.readthedocs.io/ja/latest/user_guide/index.html) - チュートリアルと実践的な使い方
|
|
69
73
|
- [Command Reference](https://confluence-cli.readthedocs.io/ja/latest/command_reference/index.html) - 全コマンドのリファレンス
|
|
70
|
-
|
|
71
|
-
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# confluence-cli
|
|
2
|
-
|
|
2
|
+
Confluence v6.15.7を操作するためのCLIです。
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
[](https://github.com/kurusugawa-computer/confluence-cli/actions/workflows/lint-test.yml)
|
|
6
6
|
[](https://badge.fury.io/py/kci-confluence-cli)
|
|
7
7
|
[](https://pypi.org/project/kci-confluence-cli/)
|
|
8
8
|
[](https://confluence-cli.readthedocs.io/ja/latest/?badge=latest)
|
|
9
9
|
|
|
10
10
|
# Requirements
|
|
11
|
-
Python 3.
|
|
11
|
+
Python 3.12+
|
|
12
12
|
|
|
13
13
|
# Install
|
|
14
14
|
|
|
@@ -16,6 +16,13 @@ Python 3.9+
|
|
|
16
16
|
$ pip install kci-confluence-cli
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
+
`uv` を使用している場合は、インストールせずに実行することもできます。
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
$ uvx --from kci-confluence-cli confluence page get_body --page_id 123456
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
|
|
19
26
|
# Quick Start
|
|
20
27
|
|
|
21
28
|
環境変数で認証情報を設定:
|
|
@@ -29,7 +36,7 @@ export CONFLUENCE_BASE_URL="https://your-domain.com/confluence"
|
|
|
29
36
|
ページ本文を取得:
|
|
30
37
|
|
|
31
38
|
```bash
|
|
32
|
-
$ confluence page get_body --page_id
|
|
39
|
+
$ confluence page get_body --page_id 123456
|
|
33
40
|
```
|
|
34
41
|
|
|
35
42
|
# Documentation
|
|
@@ -39,4 +46,3 @@ $ confluence page get_body --page_id 12345
|
|
|
39
46
|
- [Getting Started](https://confluence-cli.readthedocs.io/ja/latest/user_guide/getting_started.html) - インストール方法と基本的な使い方
|
|
40
47
|
- [User Guide](https://confluence-cli.readthedocs.io/ja/latest/user_guide/index.html) - チュートリアルと実践的な使い方
|
|
41
48
|
- [Command Reference](https://confluence-cli.readthedocs.io/ja/latest/command_reference/index.html) - 全コマンドのリファレンス
|
|
42
|
-
|
|
@@ -3,7 +3,6 @@ from __future__ import annotations
|
|
|
3
3
|
import argparse
|
|
4
4
|
import logging
|
|
5
5
|
from collections.abc import Sequence
|
|
6
|
-
from typing import Optional
|
|
7
6
|
|
|
8
7
|
import confluence
|
|
9
8
|
import confluence.attachment.subcommand
|
|
@@ -30,7 +29,7 @@ def create_parser() -> argparse.ArgumentParser:
|
|
|
30
29
|
return parser
|
|
31
30
|
|
|
32
31
|
|
|
33
|
-
def main(arguments:
|
|
32
|
+
def main(arguments: Sequence[str] | None = None): # noqa: ANN201
|
|
34
33
|
parser = create_parser()
|
|
35
34
|
if arguments is None:
|
|
36
35
|
args = parser.parse_args()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.0.0" # `uv-dynamic-versioning`を使ってGitHubのバージョンタグを取得している。変更不要
|
{kci_confluence_cli-0.4.0 → kci_confluence_cli-0.4.2}/confluence/attachment/create_attachment.py
RENAMED
|
@@ -5,7 +5,7 @@ import logging
|
|
|
5
5
|
from pathlib import Path
|
|
6
6
|
from typing import Any
|
|
7
7
|
|
|
8
|
-
import
|
|
8
|
+
from confluence.common import cli
|
|
9
9
|
from confluence.common.api import Api
|
|
10
10
|
from confluence.common.cli import create_api_instance
|
|
11
11
|
|
|
@@ -27,9 +27,9 @@ def create_attachments_from_file_list(
|
|
|
27
27
|
|
|
28
28
|
try:
|
|
29
29
|
api.create_attachment(content_id, file, query_params=query_params, mime_type=mime_type)
|
|
30
|
-
logger.debug(f"{index+1}件目: '{file}'をアップロードしました。")
|
|
30
|
+
logger.debug(f"{index + 1}件目: '{file}'をアップロードしました。")
|
|
31
31
|
if (index + 1) % 10 == 0:
|
|
32
|
-
logger.info(f"{index+1}件目のファイルのアップロードが完了しました。")
|
|
32
|
+
logger.info(f"{index + 1}件目のファイルのアップロードが完了しました。")
|
|
33
33
|
|
|
34
34
|
except Exception:
|
|
35
35
|
logger.warning(f"'{file}'のアップロードに失敗しました。", exc_info=True)
|
|
@@ -62,9 +62,9 @@ def create_attachments_from_directory(
|
|
|
62
62
|
for index, file in enumerate(files):
|
|
63
63
|
try:
|
|
64
64
|
api.create_attachment(content_id, file, query_params=query_params, mime_type=mime_type)
|
|
65
|
-
logger.debug(f"{index+1}件目: '{file}'をアップロードしました。")
|
|
65
|
+
logger.debug(f"{index + 1}件目: '{file}'をアップロードしました。")
|
|
66
66
|
if (index + 1) % 10 == 0:
|
|
67
|
-
logger.info(f"{index+1}件目のファイルのアップロードが完了しました。")
|
|
67
|
+
logger.info(f"{index + 1}件目のファイルのアップロードが完了しました。")
|
|
68
68
|
|
|
69
69
|
except Exception:
|
|
70
70
|
logger.warning(f"'{file}'のアップロードに失敗しました。", exc_info=True)
|
|
@@ -107,7 +107,7 @@ def add_parser(subparsers: argparse._SubParsersAction | None = None) -> argparse
|
|
|
107
107
|
subcommand_name = "create"
|
|
108
108
|
subcommand_help = "添付ファイルを作成します。"
|
|
109
109
|
|
|
110
|
-
parser =
|
|
110
|
+
parser = cli.add_parser(subparsers, subcommand_name, subcommand_help)
|
|
111
111
|
|
|
112
112
|
add_arguments_to_parser(parser)
|
|
113
113
|
return parser
|
{kci_confluence_cli-0.4.0 → kci_confluence_cli-0.4.2}/confluence/attachment/delete_attachment.py
RENAMED
|
@@ -4,7 +4,7 @@ import argparse
|
|
|
4
4
|
import logging
|
|
5
5
|
from typing import Any
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
from confluence.common import cli
|
|
8
8
|
from confluence.common.api import Api
|
|
9
9
|
from confluence.common.cli import create_api_instance, prompt_yesnoall
|
|
10
10
|
|
|
@@ -54,15 +54,15 @@ def main(args: argparse.Namespace) -> None:
|
|
|
54
54
|
|
|
55
55
|
yes, all_yes = prompt_yesnoall(confirm_message)
|
|
56
56
|
if yes or all_yes:
|
|
57
|
-
logger.debug(f"{index+1}件目: id='{attachment_id}', title='{attachment_title}'をゴミ箱に移動します。 ")
|
|
57
|
+
logger.debug(f"{index + 1}件目: id='{attachment_id}', title='{attachment_title}'をゴミ箱に移動します。 ")
|
|
58
58
|
api.delete_content(attachment_id, query_params={"status": "current"})
|
|
59
59
|
if is_purged:
|
|
60
|
-
logger.debug(f"{index+1}件目: id='{attachment_id}', title='{attachment_title}'をゴミ箱から完全に削除します。 ")
|
|
60
|
+
logger.debug(f"{index + 1}件目: id='{attachment_id}', title='{attachment_title}'をゴミ箱から完全に削除します。 ")
|
|
61
61
|
api.delete_content(attachment_id, query_params={"status": "trashed"})
|
|
62
62
|
success_count += 1
|
|
63
63
|
|
|
64
64
|
except Exception:
|
|
65
|
-
logger.warning(f"{index+1}件目: id='{attachment_id}', title='{attachment_title}'の削除に失敗しました。", exc_info=True)
|
|
65
|
+
logger.warning(f"{index + 1}件目: id='{attachment_id}', title='{attachment_title}'の削除に失敗しました。", exc_info=True)
|
|
66
66
|
continue
|
|
67
67
|
|
|
68
68
|
logger.info(f"{success_count}/{len(results)} 件の添付ファイルを削除しました。")
|
|
@@ -81,7 +81,7 @@ def add_parser(subparsers: argparse._SubParsersAction | None = None) -> argparse
|
|
|
81
81
|
subcommand_name = "delete"
|
|
82
82
|
subcommand_help = "添付ファイルを削除します。"
|
|
83
83
|
|
|
84
|
-
parser =
|
|
84
|
+
parser = cli.add_parser(subparsers, subcommand_name, subcommand_help)
|
|
85
85
|
|
|
86
86
|
add_arguments_to_parser(parser)
|
|
87
87
|
return parser
|