8000 Add an index page for local browsing without a server by pressdarling · Pull Request #21 · simonw/tools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add an index page for local browsing without a server #21

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

Closed
wants to merge 3 commits into from

Conversation

pressdarling
Copy link
@pressdarling pressdarling commented Mar 14, 2025

Most of what's below the h1 is written by Claude 3.7 Sonnet, but here's the high-level by a human:

  1. Added a build_local_index.py #script that can be run easily with inline dependencies. This is the core of the PR. It takes build_colophon.py as a starting point, and incorporates a part of gather_links.py in case the purpose of that file changes.
  2. Updated README.md to mention this
  3. Added a local build option to build_colophon.py.
  4. Finally, and least essentially, there's a layout-demo.html tool with matching layout-demo.docs.md, which functioned as a useful playground while playing with this.

It's not quite a Perfect Commit but I'm not a perfect developer :)

The tool index should be fully keyboard-accessible, with a search bar for filtering. The design is suitable for mobile although it doesn't seem to work on my phone.

Some things that were considered but dropped include categories, a table of contents (search/full list seems more usable), additional optimisations (dark mode, debounce for search), and including Python tools in the listing.

Of course, this is your repo, so I completely understand if you don't want any of this - I found it useful to have a neat way to browse the list, with some neat learning bonuses. Claude transcript available on request although it's a branchy mess.

Speaking of, over to our artificially intelligent friend for the details...

Add local browsing capability without server deployment

This PR adds a simple script that generates an index.html file for browsing
Simon's tools collection locally without needing to set up GitHub Pages or
any other server.

What this adds

  • A standalone Python script that creates a searchable index of all tools
  • README instructions for local browsing
  • No changes to existing functionality

How it works

The script:

  1. Gathers information about HTML files and their commit history
  2. Extracts descriptions from .docs.md files
  3. Builds an interactive index page with search and sorting
  4. Checks for and creates colophon.html if needed

How to test

  1. Clone the repository
  2. Run: uv run --no-project --with markdown ./build_local_index.py
  3. Open index.html in your browser
  4. Check that:
    • All HTML tools are listed with descriptions when available
    • Search works for both tool names and content
    • Sorting by name and date functions correctly
    • The dark mode toggle works if implemented
    • All tools can be opened directly from the index
    • The UI is responsive on different screen sizes

@pressdarling pressdarling marked this pull request as ready for review March 14, 2025 15:52
@pressdarling pressdarling force-pushed the local-build-option branch 2 times, most recently from 00885a8 to 23d5a7a Compare March 15, 2025 00:19
@pressdarling pressdarling deleted the local-build-option branch March 15, 2025 00:36
@pressdarling
Copy link
Author

Renamed the branch, cleaning up commits a bit, will open a new PR with a simpler approach.

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.

1 participant
0