Skip to content

Commit 2163a2a

Browse files
sdglitchedgridhead
authored andcommitted
docs: Add usage details for --splt & --dplt flags
Signed-off-by: Shounak Dey <shounakdey@ymail.com>
1 parent e5bba01 commit 2163a2a

File tree

1 file changed

+108
-39
lines changed

1 file changed

+108
-39
lines changed

README.md

Lines changed: 108 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,44 @@ Simple exporter tool that helps migrate repository files, data assets and issue
3131
Sample output
3232
3333
```
34-
Requirement already satisfied: pagure-exporter in ./venv/lib/python3.12/site-packages (0.1.0)
35-
Requirement already satisfied: GitPython<4.0.0,>=3.1.37 in ./venv/lib/python3.12/site-packages (from pagure-exporter) (3.1.40)
36-
Requirement already satisfied: click<9.0.0,>=8.1.3 in ./venv/lib/python3.12/site-packages (from pagure-exporter) (8.1.7)
37-
Requirement already satisfied: requests<3.0.0,>=2.31.0 in ./venv/lib/python3.12/site-packages (from pagure-exporter) (2.31.0)
38-
Requirement already satisfied: tqdm<5.0.0,>=4.64.1 in ./venv/lib/python3.12/site-packages (from pagure-exporter) (4.66.1)
39-
Requirement already satisfied: gitdb<5,>=4.0.1 in ./venv/lib/python3.12/site-packages (from GitPython<4.0.0,>=3.1.37->pagure-exporter) (4.0.10)
40-
Requirement already satisfied: charset-normalizer<4,>=2 in ./venv/lib64/python3.12/site-packages (from requests<3.0.0,>=2.31.0->pagure-exporter) (3.3.0)
41-
Requirement already satisfied: idna<4,>=2.5 in ./venv/lib/python3.12/site-packages (from requests<3.0.0,>=2.31.0->pagure-exporter) (3.4)
42-
Requirement already satisfied: urllib3<3,>=1.21.1 in ./venv/lib/python3.12/site-packages (from requests<3.0.0,>=2.31.0->pagure-exporter) (2.0.7)
43-
Requirement already satisfied: certifi>=2017.4.17 in ./venv/lib/python3.12/site-packages (from requests<3.0.0,>=2.31.0->pagure-exporter) (2023.7.22)
44-
Requirement already satisfied: smmap<6,>=3.0.1 in ./venv/lib/python3.12/site-packages (from gitdb<5,>=4.0.1->GitPython<4.0.0,>=3.1.37->pagure-exporter) (5.0.1)
34+
Collecting pagure-exporter
35+
Downloading pagure_exporter-0.1.4-py3-none-any.whl.metadata (20 kB)
36+
Collecting GitPython<4.0.0,>=3.1.0 (from pagure-exporter)
37+
Downloading GitPython-3.1.44-py3-none-any.whl.metadata (13 kB)
38+
Collecting click<9.0.0,>=8.1.3 (from pagure-exporter)
39+
Using cached click-8.2.1-py3-none-any.whl.metadata (2.5 kB)
40+
Collecting python-gitlab>=3.14.0 (from pagure-exporter)
41+
Downloading python_gitlab-6.1.0-py3-none-any.whl.metadata (8.5 kB)
42+
Collecting requests<3.0.0,>=2.28.0 (from pagure-exporter)
43+
Using cached requests-2.32.4-py3-none-any.whl.metadata (4.9 kB)
44+
Collecting gitdb<5,>=4.0.1 (from GitPython<4.0.0,>=3.1.0->pagure-exporter)
45+
Downloading gitdb-4.0.12-py3-none-any.whl.metadata (1.2 kB)
46+
Collecting smmap<6,>=3.0.1 (from gitdb<5,>=4.0.1->GitPython<4.0.0,>=3.1.0->pagure-exporter)
47+
Downloading smmap-5.0.2-py3-none-any.whl.metadata (4.3 kB)
48+
Collecting charset_normalizer<4,>=2 (from requests<3.0.0,>=2.28.0->pagure-exporter)
49+
Using cached charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (35 kB)
50+
Collecting idna<4,>=2.5 (from requests<3.0.0,>=2.28.0->pagure-exporter)
51+
Using cached idna-3.10-py3-none-any.whl.metadata (10 kB)
52+
Collecting urllib3<3,>=1.21.1 (from requests<3.0.0,>=2.28.0->pagure-exporter)
53+
Using cached urllib3-2.5.0-py3-none-any.whl.metadata (6.5 kB)
54+
Collecting certifi>=2017.4.17 (from requests<3.0.0,>=2.28.0->pagure-exporter)
55+
Using cached certifi-2025.6.15-py3-none-any.whl.metadata (2.4 kB)
56+
Collecting requests-toolbelt>=1.0.0 (from python-gitlab>=3.14.0->pagure-exporter)
57+
Using cached requests_toolbelt-1.0.0-py2.py3-none-any.whl.metadata (14 kB)
58+
Downloading pagure_exporter-0.1.4-py3-none-any.whl (40 kB)
59+
Using cached click-8.2.1-py3-none-any.whl (102 kB)
60+
Downloading GitPython-3.1.44-py3-none-any.whl (207 kB)
61+
Downloading gitdb-4.0.12-py3-none-any.whl (62 kB)
62+
Using cached requests-2.32.4-py3-none-any.whl (64 kB)
63+
Using cached charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (148 kB)
64+
Using cached idna-3.10-py3-none-any.whl (70 kB)
65+
Downloading smmap-5.0.2-py3-none-any.whl (24 kB)
66+
Using cached urllib3-2.5.0-py3-none-any.whl (129 kB)
67+
Using cached certifi-2025.6.15-py3-none-any.whl (157 kB)
68+
Downloading python_gitlab-6.1.0-py3-none-any.whl (144 kB)
69+
Using cached requests_toolbelt-1.0.0-py2.py3-none-any.whl (54 kB)
70+
Installing collected packages: urllib3, smmap, idna, click, charset_normalizer, certifi, requests, gitdb, requests-toolbelt, GitPython, python-gitlab, pagure-exporter
71+
Successfully installed GitPython-3.1.44 certifi-2025.6.15 charset_normalizer-3.4.2 click-8.2.1 gitdb-4.0.12 idna-3.10 pagure-exporter-0.1.4 python-gitlab-6.1.0 requests-2.32.4 requests-toolbelt-1.0.0 smmap-5.0.2 urllib3-2.5.0
4572
```
4673
4774
### From source
@@ -103,29 +130,47 @@ Simple exporter tool that helps migrate repository files, data assets and issue
103130
```
104131
Installing dependencies from lock file
105132
106-
Package operations: 19 installs, 0 updates, 0 removals
107-
108-
• Installing smmap (5.0.0)
109-
• Installing certifi (2022.12.7)
110-
• Installing charset-normalizer (3.0.1)
111-
• Installing click (8.1.3)
112-
• Installing gitdb (4.0.10)
113-
• Installing idna (3.4)
114-
• Installing mccabe (0.6.1)
115-
• Installing mypy-extensions (0.4.3)
116-
• Installing pathspec (0.11.0)
117-
• Installing platformdirs (2.6.2)
118-
• Installing pycodestyle (2.8.0)
119-
• Installing pyflakes (2.4.0)
120-
• Installing urllib3 (1.26.14)
121-
• Installing black (22.12.0)
122-
• Installing flake8 (4.0.1)
123-
• Installing gitpython (3.1.30)
124-
• Installing isort (5.12.0)
125-
• Installing requests (2.28.2)
126-
• Installing tqdm (4.64.1)
127-
128-
Installing the current project: pagure-exporter (0.1.0)
133+
Package operations: 37 installs, 0 updates, 0 removals
134+
135+
- Installing certifi (2025.6.15)
136+
- Installing charset-normalizer (3.4.2)
137+
- Installing idna (3.10)
138+
- Installing urllib3 (2.5.0)
139+
- Installing distlib (0.3.9)
140+
- Installing iniconfig (2.1.0)
141+
- Installing platformdirs (4.3.8)
142+
- Installing packaging (25.0)
143+
- Installing filelock (3.18.0)
144+
- Installing pluggy (1.6.0)
145+
- Installing pygments (2.19.2)
146+
- Installing requests (2.32.4)
147+
- Installing smmap (5.0.2)
148+
- Installing cachetools (6.1.0)
149+
- Installing chardet (5.2.0)
150+
- Installing colorama (0.4.6)
151+
- Installing gitdb (4.0.12)
152+
- Installing cfgv (3.4.0)
153+
- Installing click (8.2.1)
154+
- Installing identify (2.6.12)
155+
- Installing coverage (7.9.1)
156+
- Installing mypy-extensions (1.1.0)
157+
- Installing nodeenv (1.9.1)
158+
- Installing pathspec (0.12.1)
159+
- Installing pyproject-api (1.9.1)
160+
- Installing pytest (8.4.1)
161+
- Installing pyyaml (6.0.2)
162+
- Installing requests-toolbelt (1.0.0)
163+
- Installing virtualenv (20.31.2)
164+
- Installing pre-commit (4.2.0)
165+
- Installing python-gitlab (6.0.0)
166+
- Installing tox (4.27.0)
167+
- Installing gitpython (3.1.44)
168+
- Installing responses (0.25.7)
169+
- Installing black (25.1.0)
170+
- Installing pytest-cov (6.2.1)
171+
- Installing ruff (0.12.0)
172+
173+
Installing the current project: pagure-exporter (0.1.4)
129174
```
130175
131176
## Usage
@@ -196,6 +241,12 @@ Simple exporter tool that helps migrate repository files, data assets and issue
196241
197242
16. As this is the destination namespace, check all the scopes that are required to write the asset information associated with a repository, pick an appropriate role, set a safe expiration date and write an appropriate description for its usage before clicking on the [**Create project access token**](#) button.
198243
244+
Refer [Project access tokens](https://docs.gitlab.com/user/project/settings/project_access_tokens/#scopes-for-a-project-access-token) for more information.
245+
246+
TLDR;
247+
- Select `Developer` as the role for smooth migration
248+
- Select `api`, `read_api`, `read_repository`, `write_repository` as scopes for smooth migration
249+
199250
![](https://raw.githubusercontent.com/gridhead/pagure-exporter/main/data/14.png)
200251
201252
17. Make note of the API token generated and ensure that they are not shared with others or used for a different purpose.
@@ -228,13 +279,19 @@ Simple exporter tool that helps migrate repository files, data assets and issue
228279
Sample output
229280
230281
```
231-
Pagure Exporter by Akashdeep Dhar <t0xic0der@fedoraproject.org>, version 0.1.0
282+
Pagure Exporter by Akashdeep Dhar <t0xic0der@fedoraproject.org>, version 0.1.4
232283
```
233284
234285
```
235286
Usage: pagure-exporter [OPTIONS] COMMAND [ARGS]...
236287
288+
Pagure Exporter
289+
237290
Options:
291+
-a, --splt TEXT Source hostname for accessing Pagure information [default:
292+
pagure.io]
293+
-b, --dplt TEXT Destination hostname for accessing GitLab information
294+
[default: gitlab.com]
238295
-s, --srce TEXT Source namespace for importing assets from [required]
239296
-d, --dest TEXT Destination namespace for exporting assets to [required]
240297
-p, --pkey TEXT Pagure API key for accessing the source namespace
@@ -256,11 +313,11 @@ Simple exporter tool that helps migrate repository files, data assets and issue
256313
2. Check the usage information of the available subcommands.
257314
258315
```
259-
(venv) $ pagure-exporter -s a -d a -p a -g a -f a -t a repo --help
316+
(venv) $ pagure-exporter -a a -b a -s a -d a -p a -g a -f a -t a repo --help
260317
```
261318
262319
```
263-
(venv) $ pagure-exporter -s a -d a -p a -g a -f a -t a tkts --help
320+
(venv) $ pagure-exporter -a a -b a -s a -d a -p a -g a -f a -t a tkts --help
264321
```
265322
266323
Sample output
@@ -281,15 +338,15 @@ Simple exporter tool that helps migrate repository files, data assets and issue
281338
Initiate transfer of issue tickets
282339
283340
Options:
284-
-s, --status [OPEN|SHUT|FULL] Extract issue tickets of the mentioned status
341+
-s, --status [open|shut|full] Extract issue tickets of the mentioned status
285342
[default: OPEN]
286343
-r, --ranges TEXT... Extract issue tickets in the mentioned ranges
287344
-p, --select TEXT Extract issue tickets of the selected numbers
288345
-c, --comments Transfer all the associated comments
289346
-l, --labels Migrate all the associated labels
290347
-a, --commit Assert issue ticket states as they were
291348
-t, --secret Confirm issue ticket privacy as they were
292-
-o, --series Ensure issue tickets sequence as they were
349+
-o, --series Ensure issue ticket sequence as they were
293350
--help Show this message and exit.
294351
```
295352
@@ -315,6 +372,7 @@ Simple exporter tool that helps migrate repository files, data assets and issue
315372
316373
```
317374
(venv) $ pagure-exporter \
375+
--splt pagure.io --dplt gitlab.com \
318376
--fusr srceuser --pkey srcecode --srce srcerepo \
319377
--tusr destuser --gkey destcode --dest destrepo \
320378
repo \
@@ -327,6 +385,7 @@ Simple exporter tool that helps migrate repository files, data assets and issue
327385
328386
```
329387
(venv) $ pagure-exporter \
388+
--splt pagure.io --dplt gitlab.com \
330389
--fusr srceuser --pkey srcecode --srce srcerepo \
331390
--tusr destuser --gkey destcode --dest destrepo \
332391
repo
@@ -354,6 +413,7 @@ Simple exporter tool that helps migrate repository files, data assets and issue
354413
355414
```
356415
(venv) $ pagure-exporter \
416+
--splt pagure.io --dplt gitlab.com \
357417
--fusr srceuser --pkey srcecode --srce srcerepo \
358418
--tusr destuser --gkey destcode --dest destrepo \
359419
tkts \
@@ -364,6 +424,7 @@ Simple exporter tool that helps migrate repository files, data assets and issue
364424
365425
```
366426
(venv) $ pagure-exporter \
427+
--splt pagure.io --dplt gitlab.com \
367428
--fusr srceuser --pkey srcecode --srce srcerepo \
368429
--tusr destuser --gkey destcode --dest destrepo \
369430
tkts \
@@ -374,6 +435,7 @@ Simple exporter tool that helps migrate repository files, data assets and issue
374435
375436
```
376437
(venv) $ pagure-exporter \
438+
--splt pagure.io --dplt gitlab.com \
377439
--fusr srceuser --pkey srcecode --srce srcerepo \
378440
--tusr destuser --gkey destcode --dest destrepo \
379441
tkts \
@@ -384,6 +446,7 @@ Simple exporter tool that helps migrate repository files, data assets and issue
384446
385447
```
386448
(venv) $ pagure-exporter \
449+
--splt pagure.io --dplt gitlab.com \
387450
--fusr srceuser --pkey srcecode --srce srcerepo \
388451
--tusr destuser --gkey destcode --dest destrepo \
389452
tkts \
@@ -394,6 +457,7 @@ Simple exporter tool that helps migrate repository files, data assets and issue
394457
395458
```
396459
(venv) $ pagure-exporter \
460+
--splt pagure.io --dplt gitlab.com \
397461
--fusr srceuser --pkey srcecode --srce srcerepo \
398462
--tusr destuser --gkey destcode --dest destrepo \
399463
tkts \
@@ -404,6 +468,7 @@ Simple exporter tool that helps migrate repository files, data assets and issue
404468
405469
```
406470
(venv) $ pagure-exporter \
471+
--splt pagure.io --dplt gitlab.com \
407472
--fusr srceuser --pkey srcecode --srce srcerepo \
408473
--tusr destuser --gkey destcode --dest destrepo \
409474
tkts \
@@ -414,6 +479,7 @@ Simple exporter tool that helps migrate repository files, data assets and issue
414479
415480
```
416481
(venv) $ pagure-exporter \
482+
--splt pagure.io --dplt gitlab.com \
417483
--fusr srceuser --pkey srcecode --srce srcerepo \
418484
--tusr destuser --gkey destcode --dest destrepo \
419485
tkts \
@@ -426,6 +492,7 @@ Simple exporter tool that helps migrate repository files, data assets and issue
426492
427493
```
428494
(venv) $ pagure-exporter \
495+
--splt pagure.io --dplt gitlab.com \
429496
--fusr srceuser --pkey srcecode --srce srcerepo \
430497
--tusr destuser --gkey destcode --dest destrepo \
431498
tkts \
@@ -442,6 +509,7 @@ Simple exporter tool that helps migrate repository files, data assets and issue
442509
443510
```
444511
(venv) $ pagure-exporter \
512+
--splt pagure.io --dplt gitlab.com \
445513
--fusr srceuser --pkey srcecode --srce srcerepo \
446514
--tusr destuser --gkey destcode --dest destrepo \
447515
tkts \
@@ -457,6 +525,7 @@ Simple exporter tool that helps migrate repository files, data assets and issue
457525
458526
```
459527
(venv) $ pagure-exporter \
528+
--splt pagure.io --dplt gitlab.com \
460529
--fusr srceuser --pkey srcecode --srce srcerepo \
461530
--tusr destuser --gkey destcode --dest destrepo \
462531
tkts \

0 commit comments

Comments
 (0)