FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Crosswalk directory refactor by meldra · Pull Request #130 · codemeta/codemeta.github.io · GitHub

Crosswalk directory refactor - #130

Open
meldra wants to merge 10 commits into
codemeta:masterfrom
meldra:crosswalk-directory-refactor
Open

Crosswalk directory refactor#130
meldra wants to merge 10 commits into
codemeta:masterfrom
meldra:crosswalk-directory-refactor

Conversation

meldra commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

This automates the sync of crosswalks to the website repository.

It does not remove the existing markdown files in content/crosswalk/. I think this allows for easier reviewing. They should all be faithfully reproduced with amendments. I believe the github action will happily commit the changes when deployed live.

meldra added 5 commits August 4, 2026 21:26
This is a fairly significant change. The script grabs the
field headers from the `codemeta.csv` file and generates a
markdown file in /content/crosswalk for each. The default
values can be overridden using the values in the
`data/crosswalk_pages.json

This somewhat future-proofs crosswalk additions as it will
no longer be necessary for a page to be manually created in
a whole separate repo, for the crosswalk to be properly
disoverable. Which has demonstrably been an issue. I could
have simply made the missing pages but this is the more
sensible approach.

The script preserves the existing customizations for each of
the existing crosswalk pages. This PR does not yet remove
the pages, pending discussion.
Also make use of new parameters for the alt text for list images.

progval left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It does not remove the existing markdown files in content/crosswalk/. I think this allows for easier reviewing.

It's fine, you can remove them.

Comment thread content/crosswalk/_index.md Outdated
Comment on lines +23 to +24
Various [tools](/tools) for CodeMeta use Crosswalk mappings to convert existing
metadata into a `codemeta.json` file.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I'm not sure any of them actually use the crosswalks. They are not really machine-readable.

lindangulopez left a comment
edited
Loading

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@meldra is there a bug in line 41:

match = next((item for item in orides if (item["stem"] == real_stem) or (["short"] == real_stem) or (["name"] == real_stem)), None)

The second and third conditions are missing item before the brackets. ["short"] on
its own is a new list containing the word "short" not a lookup on item. So it's
comparing a list to a string, which is never true in Python. Same issue with ["name"].

stem_clean = real_stem = stem.strip()
stem_slug = re.sub(r'[^a-zA-Z0-9]+', '-', stem_clean)

# Find our stem in the overrides file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@meldra is there a bug in line 41:

match = next((item for item in orides if (item["stem"] == real_stem) or (["short"] == real_stem) or (["name"] == real_stem)), None)

The second and third conditions are missing item before the brackets. ["short"] on
its own is a new list containing the word "short" not a lookup on item. So it's
comparing a list to a string, which is never true in Python. Same issue with ["name"].

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

oh wow i have no idea how... they were definitely the complete var before. thanks.

meldra commented Aug 28, 2026
edited
Loading

Copy link
Copy Markdown
Contributor Author

One issue I've just noticed is that these generated files need to be gitignored. However the _index.md page needs to remain, so the directory cannot be fully ignored. Easiest solution would be to generate a gitignore for the directory at the same time as the pages, which I'll do tomorrow.

They're generated now and don't need to live in the repository
so the generated collection just pollutes checkouts.
meldra force-pushed the crosswalk-directory-refactor branch from 8d6f72e to 03227e1 Compare August 28, 2026 17:48

meldra commented Aug 28, 2026
edited
Loading

Copy link
Copy Markdown
Contributor Author

One issue I've just noticed is that these generated files need to be gitignored. However the _index.md page needs to remain, so the directory cannot be fully ignored. Easiest solution would be to generate a gitignore for the directory at the same time as the pages, which I'll do tomorrow.

I was tired and forgot about !

The generated stuff is gitignored now. This is also now temporarily available for preview at https://codemeta.opinions.monster/crosswalk

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL