Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Transcript structure generator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
zavolan_group
tools
Transcript structure generator
Commits
5e33bd56
Commit
5e33bd56
authored
2 years ago
by
Larissa Glass
Browse files
Options
Downloads
Patches
Plain Diff
refactor output filename generation
parent
02305427
No related branches found
No related tags found
1 merge request
!8
refactor output filename generation
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tsg/cli.py
+7
-5
7 additions, 5 deletions
tsg/cli.py
with
7 additions
and
5 deletions
tsg/cli.py
+
7
−
5
View file @
5e33bd56
...
@@ -34,11 +34,13 @@ def get_args():
...
@@ -34,11 +34,13 @@ def get_args():
def
output_filename
(
filename
:
str
)
->
str
:
def
output_filename
(
filename
:
str
)
->
str
:
filepath
=
Path
(
filename
)
filepath
=
Path
(
filename
)
if
filename
.
endswith
(
"
.csv
"
)
or
filename
.
endswith
(
"
.tsv
"
):
if
filepath
.
suffix
==
"
.csv
"
or
filepath
.
suffix
==
"
.tsv
"
:
return
"
generated_
"
+
filepath
.
stem
+
"
.csv
"
outfile
=
"
generated_
"
+
filepath
.
stem
+
"
.csv
"
if
filename
.
endswith
(
"
.gtf
"
):
elif
filepath
.
suffix
==
"
.gtf
"
:
return
"
generated_
"
+
filepath
.
name
outfile
=
"
generated_
"
+
filepath
.
name
else
:
raise
NotImplementedError
()
return
outfile
def
app
():
def
app
():
args
=
get_args
()
args
=
get_args
()
...
...
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