Skip to content

Implement Zsh scraper#2519

Merged
simon04 merged 4 commits intofreeCodeCamp:mainfrom
spamguy:zsh
Jun 27, 2025
Merged

Implement Zsh scraper#2519
simon04 merged 4 commits intofreeCodeCamp:mainfrom
spamguy:zsh

Conversation

@spamguy
Copy link
Copy Markdown
Contributor

@spamguy spamguy commented Jun 4, 2025

Fixes #2184.

  • Tested the scraper on a local copy of DevDocs
  • Ensured that the docs are styled similarly to other docs on DevDocs
  • Added these files to the public/icons/your_scraper_name/ directory:
    • 16.png: a 16×16 pixel icon for the doc
    • 16@2x.png: a 32×32 pixel icon for the doc
    • SOURCE: A text file containing the URL to the page the image can be found on or the URL of the original image itself

@spamguy spamguy requested a review from a team as a code owner June 4, 2025 22:35
Copy link
Copy Markdown
Contributor

@simon04 simon04 left a comment

Choose a reason for hiding this comment

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

Thank you. Looks good, but please consider a few suggestions for improvement.

extract_header_text(at_css('h1.chapter').content)
end

def additional_entries
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.

Please also add all (relevant) functions and (math) operators. Searching for zfopen currently yields no result.

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.

Fixed locally.

header_text = module_name if module_name.present?
end

entries << [header_text, a['name'], type] if header_text != 'Description'
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.

Some entries lack context, for instance "utility" refers to different topics. Suggestion: add some helpful context in parenthesis after the entry name, such as "Utility functions (calendar)".

Screenshot 2025-06-05 at 17-55-42 Zsh _ Utilities — DevDocs

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.

Thanks for the suggestion. What is a good example of a previous scraper adding context to ambiguously named entries?

Copy link
Copy Markdown
Contributor

@simon04 simon04 left a comment

Choose a reason for hiding this comment

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

Great, thank you!

@simon04 simon04 merged commit fb62266 into freeCodeCamp:main Jun 27, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Zsh docs

2 participants