From 14c9139718df8fad22cfb4c486d09a331d5d61e4 Mon Sep 17 00:00:00 2001 From: Enrico Ludwig Date: Thu, 18 Jul 2024 12:52:39 +0200 Subject: [PATCH] Merged option tables --- gitlab2gitea/README.md | 77 ++++++++++++++---------------------------- 1 file changed, 26 insertions(+), 51 deletions(-) diff --git a/gitlab2gitea/README.md b/gitlab2gitea/README.md index 83c555f..e099082 100644 --- a/gitlab2gitea/README.md +++ b/gitlab2gitea/README.md @@ -23,31 +23,32 @@ Settings will be applied in the following order: python3 gitlab2gitea.py [options] ``` -## Options -| Option | Description | -| ------------------------------------------- | -------------------------------------------------------------------------------------- | -| `--help` | Show help message and exit. | -| `--gitlab-token ` | GitLab access token. | -| `--gitlab-url ` | GitLab URL. | -| `--gitlab-api-version ` | GitLab API version (default: v4). | -| `--gitea-token ` | Gitea access token. | -| `--gitea-url ` | Gitea URL. | -| `--gitea-api-version ` | Gitea API version (default: v1). | -| `--no-create-missing-groups` | Do not create missing groups on Gitea (default: False). | -| `--no-create-missing-users` | Do not create missing users on Gitea (default: False). | -| `--no-create-missing-projects` | Do not create missing projects on Gitea (default: False). | -| `--no-update-existing-groups` | Do not update existing groups on Gitea (default: False). | -| `--no-update-existing-users` | Do not update existing users on Gitea (default: False). | -| `--no-update-existing-projects` | Do not update existing projects on Gitea (default: False). | -| `--only-groups` | Migrate only groups (default: False). | -| `--only-users` | Migrate only users (default: False). | -| `--only-projects` | Migrate only projects (default: False). | -| `--quiet` | Enable quiet mode (default: False). | -| `--debug` | Enable debug mode (default: False). | -| `--trace` | Enable trace mode (default: False). | -| `--dry-run` | Enable dry-run mode (default: False). | -| `--log-file ` | Log file (default: gitlab2gitea.log). If not set, logs will be only printed to stdout. | -| `--append-log` | Append to log file instead of overwriting (default: False). | +## Arguments and Environment Variables + +| Argument | Environment Variable | Description | +| ------------------------------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `--help` | | Show help message and exit. | +| `--gitlab-url ` | `GITLAB_URL` | The full URL to your Gitlab instance (e.g. https://gitlab.myhost.com) | +| `--gitlab-token ` | `GITLAB_TOKEN` | The access token from your Gitlab instance ([see here](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#create-a-personal-access-token)) | +| `--gitlab-api-version ` | `GITLAB_API_VERSION` | GitLab API version (default: v4). | +| `--gitea-url ` | `GITEA_URL` | The full URL to your Gitea instance (e.g. https://gitea.myhost.com) | +| `--gitea-token ` | `GITEA_TOKEN` | The access token from your Gitea instance (example URL to find the settings: https://gitea.myhost.com/user/settings/applications) | +| `--gitea-api-version ` | `GITEA_API_VERSION` | Gitea API version (default: v1). | +| `--no-create-missing-groups` | `NO_CREATE_MISSING_GROUPS` | Do not create missing groups on Gitea (default: False). | +| `--no-create-missing-users` | `NO_CREATE_MISSING_USERS` | Do not create missing users on Gitea (default: False). | +| `--no-create-missing-projects` | `NO_CREATE_MISSING_PROJECTS` | Do not create missing projects on Gitea (default: False). | +| `--no-update-existing-groups` | `NO_UPDATE_EXISTING_GROUPS` | Do not update existing groups on Gitea (default: False). | +| `--no-update-existing-users` | `NO_UPDATE_EXISTING_USERS` | Do not update existing users on Gitea (default: False). | +| `--no-update-existing-projects` | `NO_UPDATE_EXISTING_PROJECTS` | Do not update existing projects on Gitea (default: False). | +| `--only-groups` | `ONLY_GROUPS` | Migrate only groups (default: False). | +| `--only-users` | `ONLY_USERS` | Migrate only users (default: False). | +| `--only-projects` | `ONLY_PROJECTS` | Migrate only projects (default: False). | +| `--quiet` | `QUIET` | Enable quiet mode (default: False). | +| `--debug` | `DEBUG` | Enable debug mode (default: False). | +| `--trace` | `TRACE` | Enable trace mode (default: False). | +| `--dry-run` | `DRY_RUN` | Enable dry-run mode (default: False). | +| `--log-file ` | `LOG_FILE` | Log file (default: gitlab2gitea.log). If not set, logs will be only printed to stdout. | +| `--append-log` | `APPEND_LOG` | Append to log file instead of overwriting (default: False). | ## Example ```sh @@ -58,32 +59,6 @@ python3 gitlab2gitea.py \ --gitea-token ``` -## Environment Variables - -| Option | Description | -| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `GITLAB_URL` | The full URL to your Gitlab instance (e.g. https://gitlab.myhost.com) | -| `GITLAB_TOKEN` | The access token from your Gitlab instance ([see here](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#create-a-personal-access-token)) | -| `GITLAB_API_VERSION` | The API version to be used (default: v4) - do not change unless you know, what you do. | -| `GITEA_URL` | The full URL to your Gitea instance (e.g. https://gitea.myhost.com) | -| `GITEA_TOKEN` | The access token from your Gitea instance (example URL to find the settings: https://gitea.myhost.com/user/settings/applications) | -| `GITEA_API_VERSION` | The API version to be used (default: v1) - do not change unless you know, what you do. | -| `NO_CREATE_MISSING_GROUPS` | Set to prevent creation of groups in Gitea (default: `0`, allowed: `0` or `1`) | -| `NO_CREATE_MISSING_USERS` | Set to prevent creation of users in Gitea (default: `0`, allowed: `0` or `1`) | -| `NO_CREATE_MISSING_PROJECTS` | Set to prevent creation of projects in Gitea (default: `0`, allowed: `0` or `1`) | -| `NO_UPDATE_EXISTING_GROUPS` | Set to prevent updating of existing groups in Gitea (default: `0`, allowed: `0` or `1`) | -| `NO_UPDATE_EXISTING_USERS` | Set to prevent updating of existing users in Gitea (default: `0`, allowed: `0` or `1`) | -| `NO_UPDATE_EXISTING_PROJECTS` | Set to prevent updating of existing projects in Gitea (default: `0`, allowed: `0` or `1`) | -| `ONLY_GROUPS` | Set to only migrate groups to Gitea (default: `0`, allowed: `0` or `1`) | -| `ONLY_USERS` | Set to only migrate users to Gitea (default: `0`, allowed: `0` or `1`) | -| `ONLY_PROJECTS` | Set to only migrate projects to Gitea (default: `0`, allowed: `0` or `1`) | -| `DEBUG` | Enable or disable debug output (default: `0`, allowed: `0` or `1`) | -| `TRACE` | Enable or disable trace (or verbose) output (default: `0`, allowed: `0` or `1`) | -| `DRY_RUN` | Only do a dry run, no actual migration will be performed and no data will be changed (default: `0`, allowed: `0` or `1`) | -| `LOG_FILE` | Path to the log file (default: `gitlab2gitea.log`, allowed: a valid file path or `""` to disable file logging) | -| `APPEND_LOG` | Enable or disable appending log output to the specified log file (default: `0`, allowed: `0` or `1`) | -| `QUIET` | Enable or disable quiet mode (default: `0`, allowed: `0` or `1`) | - ## Notes & Caveats - **Mutually Exclusive Options**: Some options cannot be used together, such as: - `--only-groups` and `--only-users`