Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
docker-images
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sandro
docker-images
Commits
4a89ad9c
Verified
Commit
4a89ad9c
authored
3 years ago
by
nd
Browse files
Options
Downloads
Patches
Plain Diff
sort files and folders
parent
ff7ab2ae
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Dockerfile.debian-bullseye-directory-listing
+1
-1
1 addition, 1 deletion
Dockerfile.debian-bullseye-directory-listing
directory-listing/create-index.py
+2
-0
2 additions, 0 deletions
directory-listing/create-index.py
with
3 additions
and
1 deletion
Dockerfile.debian-bullseye-directory-listing
+
1
−
1
View file @
4a89ad9c
...
@@ -7,4 +7,4 @@ RUN apt-get -qq update && \
...
@@ -7,4 +7,4 @@ RUN apt-get -qq update && \
apt-get -qq install python3 python3-jinja2 && \
apt-get -qq install python3 python3-jinja2 && \
apt-get -qq clean
apt-get -qq clean
COPY directory
-
list
en
ing/create-index.py /usr/local/bin/create-directory-html-index
COPY directory
listing/create-index.py /usr/local/bin/create-directory-html-index
This diff is collapsed.
Click to expand it.
directory-list
en
ing/create-index.py
→
directory-listing/create-index.py
+
2
−
0
View file @
4a89ad9c
...
@@ -83,6 +83,8 @@ def main(inputfolder, outputfolder, ignore_files):
...
@@ -83,6 +83,8 @@ def main(inputfolder, outputfolder, ignore_files):
</html>
</html>
"""
)
"""
)
for
path
,
dirs
,
files
in
os
.
walk
(
inputfolder
):
for
path
,
dirs
,
files
in
os
.
walk
(
inputfolder
):
dirs
.
sort
()
files
.
sort
()
relativ_path_to_input
=
os
.
path
.
relpath
(
path
,
inputfolder
)
relativ_path_to_input
=
os
.
path
.
relpath
(
path
,
inputfolder
)
entries
=
[(
i
,
os
.
stat
(
os
.
path
.
join
(
path
,
i
)),
i
in
dirs
)
for
i
in
dirs
+
files
if
not
i
in
ignore_files
]
entries
=
[(
i
,
os
.
stat
(
os
.
path
.
join
(
path
,
i
)),
i
in
dirs
)
for
i
in
dirs
+
files
if
not
i
in
ignore_files
]
html_index
=
template
.
render
(
path
=
relativ_path_to_input
,
entries
=
entries
)
html_index
=
template
.
render
(
path
=
relativ_path_to_input
,
entries
=
entries
)
...
...
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