Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort file lists #247

Merged
merged 1 commit into from
Dec 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion locale/grass_po_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def read_po_files(inputdirpath):
originalpath = os.getcwd()
os.chdir(inputdirpath)
languages = {}
for pofile in glob.glob("*.po"):
for pofile in sorted(glob.glob("*.po")):
lang = pofile.split('_')[1:]
# check if are two definitions like pt_br
if len(lang) == 2:
Expand Down
2 changes: 1 addition & 1 deletion man/build_class_graphical.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def main():
img_extensions = ['png', 'jpg', 'gif']
img_patterns = ['*.' + extension for extension in img_extensions]
imgs = []
for filename in os.listdir(html_dir):
for filename in sorted(os.listdir(html_dir)):
if file_matches(filename, img_patterns):
imgs.append(filename)

Expand Down
4 changes: 2 additions & 2 deletions man/build_manual_gallery.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def file_matches(filename, patterns):

def get_files(directory, patterns, exclude_patterns):
files = []
for filename in os.listdir(directory):
for filename in sorted(os.listdir(directory)):
if file_matches(filename, patterns):
if not file_matches(filename, exclude_patterns):
files.append(filename)
Expand Down Expand Up @@ -168,7 +168,7 @@ def main():
"Manual: Manual gallery" % grass_version))
output.write(header_graphical_index_tmpl)
output.write('<ul class="img-list">\n')
for image, html_file in img_html_files.items():
for image, html_file in sorted(img_html_files.items()):
name = get_module_name(html_file)
title = title_from_names(name, image)
output.write(
Expand Down