Metadata-Version: 2.4
Name: nextcloud-version-checker
Version: 1.0.3
Summary: Simple tool for checking a bunch of Nextcloud servers, whether their Nextcloud version is supported and up2date.
Project-URL: Homepage, https://codeberg.org/wh0ami/NextcloudVersionChecker
Project-URL: Documentation, https://codeberg.org/wh0ami/NextcloudVersionChecker/src/branch/master/README.md
Project-URL: Repository, https://codeberg.org/wh0ami/NextcloudVersionChecker
Project-URL: Issues, https://codeberg.org/wh0ami/NextcloudVersionChecker/issues
Author-email: wh0ami <wh0ami@noreply.codeberg.org>
License: Copyright (c) 2025 wh0ami
        
        Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
License-File: LICENSE
Keywords: Automation,Nextcloud,Patchmanagement
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.13
Requires-Dist: loguru>=0.7.3
Requires-Dist: semver>=3.0.4
Requires-Dist: tabulate>=0.9.0
Requires-Dist: xmltodict>=0.14.2
Description-Content-Type: text/markdown

# Nextcloud Version Checker

This is a tiny and simple tool for checking a bunch of nextcloud servers, 
whether their Nextcloud version is supported and up2date.

## Usage

### Installation

This project is published on
[PyPI](https://pypi.org/project/nextcloud-version-checker/), so you just want
to install it via pipx or pip. Please note, that pipx is the recommended way.

```commandline
$ pipx install nextcloud-version-checker
 
OR

$ pip install nextcloud-version-checker
```

### How to use

You can call the tool via `nvc` or `nextcloud-version-checker`.

It assumes, that there's an existing input file called `input.json` in your
current directory. If you want to specify a custom input file, just call it
like e.g. `nextcloud-version-checker --server-file myservers.json` or shorter
`nvc -s myservers.json`.

An example input file is located under
`nextcloud_version_checker/misc/input.example.json`.

## How it works

Information about the current latest versions will be fetched from the official
API, which is also fetched by the built-in version check.
([Code Reference on ShitHub](https://github.com/nextcloud/server/blob/master/lib/private/Updater/VersionCheck.php))

The script will throw the list of strings from your input file into a
multiprocessing pool which will fetch, parse and display the update information
in a table at the end.

## Example output

```
user@pc:~/Workspace nextcloud-version-checker
2025-02-09 00:31:20.976 | ERROR    | nextcloud_version_checker.utils.check:check:35 - Error while fetching the current version of 'https://offline.example.com':
2025-02-09 00:31:20.976 | ERROR    | nextcloud_version_checker.utils.check:check:36 - -> <urlopen error [Errno 111] Connection refused>
2025-02-09 00:31:21.428 | INFO     | nextcloud_version_checker.main:main:36 - +++ Nextcloud Version Overview +++
Instance                      Current Version    Supported    Latest Security Update    Next available Version
----------------------------  -----------------  -----------  ------------------------  ------------------------
cloud.example.org             30.0.5.1           ✓            ✓                         -
cloud.example.com/nextcloud   30.0.4.0           ✓            ✖                         30.0.5.1
legacy-cloud.example.org      16.1.0.1           ✖            ✖                         16.0.11.1
offline.example.com           Error              ?            ?                         ?

user@pc:~/Workspace$ 
```

## Development

This is an uv project. You can set up your development environment by cloning
this Repository via `git` and running a `uv sync` in the project
directory afterward.

The Lockfile can be updated by using `uv lock` (also updates the installed
packages in the dependency tree).

The project can be bundled by running `uv build` and published by running
`uv publish`. Results can be found in the `dist/` directory.

For code linting and formatting, `ruff` was used. You may run it via
`uv run ruff check` or `uv run ruff format`.

This project is using [Semantic Versioning](https://semver.org/) and
[Conventional Commits](https://www.conventionalcommits.org/en/).
