Skip to content

Commit b945eeb

Browse files
committed
properly fix paths
1 parent fc8d516 commit b945eeb

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

scripts/python_create_readme.py

+10-7
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
import markdown
55

66
# Specify the directory path
7-
dir_path = pathlib.Path('specs/')
7+
#dir_path = pathlib.Path('specs/')
8+
dir_path = pathlib.Path('.')
89

910
# Use glob to retrieve a list of files
10-
files = dir_path.glob('**/*.spec') # only match .spec files
11+
#files = dir_path.glob('**/*.spec') # only match .spec files
12+
files = dir_path.glob('specs/**/*.spec') # only match .spec files
1113

1214
# Sort the files by filename (natural sort)
1315
sorted_files = sorted(files, key=lambda x: x.name)
@@ -39,22 +41,23 @@
3941
4042
<details open>
4143
42-
<summary>Status badges on COPR builds</summary>\n
44+
<summary>Status badges on COPR builds</summary>
4345
"""
4446

4547
for name, url in name_url_pairs:
4648
readme_content += f"""
4749
### {name}
4850
49-
![{name} status](https://copr.fedorainfracloud.org/coprs/relativesure/all-packages/package/{name}/status_image/last_build.png)
50-
[Upstream]({url})\n
51-
"""
51+
![{name} status](https://copr.fedorainfracloud.org/coprs/relativesure/all-packages/package/{name}/status_image/last_build.png)
52+
[Upstream]({url})
53+
"""
5254

5355
# Convert markdown content to HTML (optional, for further use)
5456
#html_content = markdown.markdown(markdown_content)
5557

5658
# Write markdown content to README.md
57-
readme_path = pathlib.Path("../README.md")
59+
#readme_path = pathlib.Path("../README.md")
60+
readme_path = pathlib.Path("README.md")
5861
with readme_path.open("w", encoding="utf-8") as readme_file:
5962
readme_file.write(readme_content)
6063

0 commit comments

Comments
 (0)