Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gitlab-pages-shortlinks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
FS Info TU Dortmund
Administration
gitlab-pages-shortlinks
Commits
0fb0b44f
Commit
0fb0b44f
authored
Jul 9, 2022
by
David Mehren
Committed by
Felix Schäfer
Jul 10, 2022
Browse files
Options
Downloads
Patches
Plain Diff
Rename vanity_file to redirects_file
parent
dc0b07fe
No related branches found
No related tags found
1 merge request
!2
Rewrite CLI
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
shortlinks/cli.py
+3
-3
3 additions, 3 deletions
shortlinks/cli.py
with
3 additions
and
3 deletions
shortlinks/cli.py
+
3
−
3
View file @
0fb0b44f
...
...
@@ -40,7 +40,7 @@ def version(verbose):
@cli.command
()
@click.argument
(
"
vanity
_file
"
,
type
=
click
.
File
(
"
r
"
),
envvar
=
"
VANITY
_FILE
"
)
@click.argument
(
"
redirects
_file
"
,
type
=
click
.
File
(
"
r
"
),
envvar
=
"
REDIRECTS
_FILE
"
)
@click.option
(
"
-o
"
,
"
--out-dir
"
,
...
...
@@ -61,9 +61,9 @@ def version(verbose):
@click.option
(
"
-c
"
,
"
--check
"
,
is_flag
=
True
,
envvar
=
"
CHECK_MODE
"
,
help
=
"
Run in check mode
"
)
def
generate
(
vanity
_file
:
TextIOWrapper
,
out_dir
,
ignore_urls
,
check
):
def
generate
(
redirects
_file
:
TextIOWrapper
,
out_dir
,
ignore_urls
,
check
):
"""
Generate shortlink filetree
"""
generator
=
ShortlinkGenerator
(
vanity
_file
,
ignore_urls
)
generator
=
ShortlinkGenerator
(
redirects
_file
,
ignore_urls
)
if
check
:
if
not
generator
.
check_all_urls
():
sys
.
exit
(
1
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment