Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Wiki
Manage
Activity
Members
Labels
Plan
Issues
53
Issue boards
Milestones
Wiki
Code
Merge requests
6
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MDM Lab
Wiki
Commits
9c241d08
Commit
9c241d08
authored
1 year ago
by
Remi PLANEL
Browse files
Options
Downloads
Patches
Plain Diff
add a command to organize structure files
parent
c5c010d0
No related branches found
No related tags found
1 merge request
!134
Resolve "Table with all PDB files, to make them available to download"
Pipeline
#118263
passed with stages
in 7 minutes and 33 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
packages/df-wiki-cli/df_wiki_cli/content/main.py
+39
-0
39 additions, 0 deletions
packages/df-wiki-cli/df_wiki_cli/content/main.py
packages/df-wiki-cli/pyproject.toml
+1
-1
1 addition, 1 deletion
packages/df-wiki-cli/pyproject.toml
with
40 additions
and
1 deletion
packages/df-wiki-cli/df_wiki_cli/content/main.py
+
39
−
0
View file @
9c241d08
import
typer
import
typer
import
sys
import
sys
import
re
import
shutil
from
typing_extensions
import
Annotated
from
typing_extensions
import
Annotated
from
typing
import
Optional
,
List
from
typing
import
Optional
,
List
from
pathlib
import
Path
from
pathlib
import
Path
...
@@ -72,3 +74,40 @@ def lint(
...
@@ -72,3 +74,40 @@ def lint(
sys
.
exit
(
1
)
sys
.
exit
(
1
)
else
:
else
:
console
.
print
(
"
[green] Everything is alright
"
)
console
.
print
(
"
[green] Everything is alright
"
)
@app.command
()
def
structure
(
dir
:
Annotated
[
Path
,
typer
.
Option
(
exists
=
True
,
file_okay
=
False
,
dir_okay
=
True
,
writable
=
False
,
readable
=
True
,
resolve_path
=
True
,
),
],
output
:
Annotated
[
Path
,
typer
.
Option
(
exists
=
True
,
file_okay
=
False
,
dir_okay
=
True
,
writable
=
True
,
readable
=
True
,
resolve_path
=
True
,
),
],
):
console
.
rule
(
f
"
[bold blue]
{
dir
.
name
}
"
,
style
=
"
blue
"
)
for
f
in
dir
.
iterdir
():
console
.
print
(
f
"
[green]
{
f
.
name
}
"
)
# get the system name
system
=
re
.
split
(
"
_|\.
"
,
f
.
name
)[
0
].
lower
()
console
.
print
(
system
)
systemDir
=
output
/
system
systemDir
.
mkdir
(
parents
=
True
,
exist_ok
=
True
)
shutil
.
copy2
(
f
,
systemDir
)
This diff is collapsed.
Click to expand it.
packages/df-wiki-cli/pyproject.toml
+
1
−
1
View file @
9c241d08
[tool.poetry]
[tool.poetry]
name
=
"df-wiki-cli"
name
=
"df-wiki-cli"
version
=
"0.1.
1
"
version
=
"0.1.
2
"
description
=
""
description
=
""
authors
=
[
"Remi PLANEL <rplanel@pasteur.fr>"
]
authors
=
[
"Remi PLANEL <rplanel@pasteur.fr>"
]
readme
=
"README.md"
readme
=
"README.md"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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