Skip to content

Implement Zsh scraper #2519

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Implement Zsh scraper #2519

wants to merge 1 commit into from

Conversation

spamguy
Copy link
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
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
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
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
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
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?

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.

Add Zsh docs
2 participants