Compare commits
9 Commits
3fa516d347
...
8eeb7fab40
| Author | SHA1 | Date | |
|---|---|---|---|
| 8eeb7fab40 | |||
| bea16d9b67 | |||
| f9e46060cf | |||
| b250c89d38 | |||
| 9a598a799d | |||
| be86ebad40 | |||
| a61f197da9 | |||
| 6ed3e30f56 | |||
| a613879338 |
@@ -12,8 +12,10 @@ inputs:
|
|||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
|
- name: Add pipx to PATH
|
||||||
|
run: echo "/root/.local/bin" >> ${GITHUB_PATH}
|
||||||
- name: Install poetry
|
- name: Install poetry
|
||||||
run: pip install poetry
|
run: pipx install poetry
|
||||||
- name: Install poetry package
|
- name: Install poetry package
|
||||||
run: poetry install --no-interaction ${{ inputs.poetry_install_args }}
|
run: poetry install --no-interaction ${{ inputs.poetry_install_args }}
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
@@ -14,11 +14,13 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
# Test building the package and installing it via pip3
|
# Test building the package and installing it via pip3
|
||||||
test-build-install:
|
test-build-install:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- name: Add pipx to PATH
|
||||||
|
run: echo "/root/.local/bin" >> ${GITHUB_PATH}
|
||||||
- name: Install poetry
|
- name: Install poetry
|
||||||
run: pip install poetry
|
run: pipx install poetry
|
||||||
- name: Build package
|
- name: Build package
|
||||||
run: poetry build
|
run: poetry build
|
||||||
- name: Install package
|
- name: Install package
|
||||||
|
|||||||
24
poetry.lock
generated
24
poetry.lock
generated
@@ -1,14 +1,14 @@
|
|||||||
# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand.
|
# This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand.
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "astroid"
|
name = "astroid"
|
||||||
version = "3.1.0"
|
version = "3.3.8"
|
||||||
description = "An abstract syntax tree for Python with inference support."
|
description = "An abstract syntax tree for Python with inference support."
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.8.0"
|
python-versions = ">=3.9.0"
|
||||||
files = [
|
files = [
|
||||||
{file = "astroid-3.1.0-py3-none-any.whl", hash = "sha256:951798f922990137ac090c53af473db7ab4e70c770e6d7fae0cec59f74411819"},
|
{file = "astroid-3.3.8-py3-none-any.whl", hash = "sha256:187ccc0c248bfbba564826c26f070494f7bc964fd286b6d9fff4420e55de828c"},
|
||||||
{file = "astroid-3.1.0.tar.gz", hash = "sha256:ac248253bfa4bd924a0de213707e7ebeeb3138abeb48d798784ead1e56d419d4"},
|
{file = "astroid-3.3.8.tar.gz", hash = "sha256:a88c7994f914a4ea8572fac479459f4955eeccc877be3f2d959a33273b0cf40b"},
|
||||||
]
|
]
|
||||||
|
|
||||||
[package.dependencies]
|
[package.dependencies]
|
||||||
@@ -287,24 +287,24 @@ vulture = ["vulture"]
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pylint"
|
name = "pylint"
|
||||||
version = "3.1.0"
|
version = "3.3.4"
|
||||||
description = "python code static checker"
|
description = "python code static checker"
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.8.0"
|
python-versions = ">=3.9.0"
|
||||||
files = [
|
files = [
|
||||||
{file = "pylint-3.1.0-py3-none-any.whl", hash = "sha256:507a5b60953874766d8a366e8e8c7af63e058b26345cfcb5f91f89d987fd6b74"},
|
{file = "pylint-3.3.4-py3-none-any.whl", hash = "sha256:289e6a1eb27b453b08436478391a48cd53bb0efb824873f949e709350f3de018"},
|
||||||
{file = "pylint-3.1.0.tar.gz", hash = "sha256:6a69beb4a6f63debebaab0a3477ecd0f559aa726af4954fc948c51f7a2549e23"},
|
{file = "pylint-3.3.4.tar.gz", hash = "sha256:74ae7a38b177e69a9b525d0794bd8183820bfa7eb68cc1bee6e8ed22a42be4ce"},
|
||||||
]
|
]
|
||||||
|
|
||||||
[package.dependencies]
|
[package.dependencies]
|
||||||
astroid = ">=3.1.0,<=3.2.0-dev0"
|
astroid = ">=3.3.8,<=3.4.0-dev0"
|
||||||
colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""}
|
colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""}
|
||||||
dill = [
|
dill = [
|
||||||
{version = ">=0.2", markers = "python_version < \"3.11\""},
|
{version = ">=0.2", markers = "python_version < \"3.11\""},
|
||||||
{version = ">=0.3.6", markers = "python_version >= \"3.11\""},
|
|
||||||
{version = ">=0.3.7", markers = "python_version >= \"3.12\""},
|
{version = ">=0.3.7", markers = "python_version >= \"3.12\""},
|
||||||
|
{version = ">=0.3.6", markers = "python_version >= \"3.11\" and python_version < \"3.12\""},
|
||||||
]
|
]
|
||||||
isort = ">=4.2.5,<5.13.0 || >5.13.0,<6"
|
isort = ">=4.2.5,<5.13.0 || >5.13.0,<7"
|
||||||
mccabe = ">=0.6,<0.8"
|
mccabe = ">=0.6,<0.8"
|
||||||
platformdirs = ">=2.2.0"
|
platformdirs = ">=2.2.0"
|
||||||
tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""}
|
tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""}
|
||||||
|
|||||||
@@ -27,6 +27,11 @@ from ._seafile import (
|
|||||||
|
|
||||||
parser = argparse.ArgumentParser(description=__doc__)
|
parser = argparse.ArgumentParser(description=__doc__)
|
||||||
parser.add_argument("-c", "--configdir", required=True, help="The config directory")
|
parser.add_argument("-c", "--configdir", required=True, help="The config directory")
|
||||||
|
parser.add_argument(
|
||||||
|
"-l",
|
||||||
|
"--logfile",
|
||||||
|
help="The path to the logfile. Default: <configdir>/seafile_mirror.log",
|
||||||
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-d",
|
"-d",
|
||||||
"--dry",
|
"--dry",
|
||||||
@@ -52,13 +57,16 @@ parser.add_argument(
|
|||||||
parser.add_argument("--version", action="version", version="%(prog)s " + __version__)
|
parser.add_argument("--version", action="version", version="%(prog)s " + __version__)
|
||||||
|
|
||||||
|
|
||||||
def main(): # pylint: disable=too-many-locals, too-many-statements
|
def main(): # pylint: disable=too-many-locals, too-many-statements, too-many-branches
|
||||||
"""Main function"""
|
"""Main function"""
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
# Set files depending on configdir
|
# Set files depending on configdir
|
||||||
configdir = args.configdir.rstrip("/") + "/"
|
configdir = args.configdir.rstrip("/") + "/"
|
||||||
configfile = configdir + "seafile_mirror.conf.yaml"
|
configfile = configdir + "seafile_mirror.conf.yaml"
|
||||||
cachefile = configdir + ".seafile_mirror.db.json"
|
cachefile = configdir + ".seafile_mirror.db.json"
|
||||||
|
if args.logfile:
|
||||||
|
logfile = args.logfile
|
||||||
|
else:
|
||||||
logfile = configdir + "seafile_mirror.log"
|
logfile = configdir + "seafile_mirror.log"
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
|
|||||||
Reference in New Issue
Block a user