yoheinakajima / instagraph

Converts text input or URL into knowledge graph and displays
MIT License
3.47k stars 289 forks source link

Added wikipedia "about" feature #51

Closed nedved2357 closed 1 year ago

nedved2357 commented 1 year ago

I've added the feature to click a node on the graph and get Wikipedia information about it displayed on the side.

Two notes:

  1. If there doesn't exist a wiki page with this name (as of the label) an error message is displayed.
  2. My CSS and design skills are terrible, I would say I haven't much of a clue about how to go around with layouts, so this initial layout is very basic, and hopefully I'll get around making it pretty :)

    Summary by CodeRabbit

New Features:

Refactor:

Updates:

Style:

coderabbitai[bot] commented 1 year ago

Walkthrough

This update introduces a new feature that fetches and displays Wikipedia information for clicked nodes in the graph. It also includes an aesthetic enhancement to the UI, improved async handling, and necessary dependency updates.

Changes

File Summary
main.py Added routes for fetching Wikipedia info and handling node clicks. Updated index() function to render the template.
requirements.txt Added requests, wikipedia dependencies, and updated neo4j.
templates/index.html Enhanced UI with CSS classes, refactored event listener for form submission, added tap event listener on nodes, and a function to calculate text color.

πŸ‡πŸ’»

In the land of code where the shadows lie, A rabbit hops, its eyes on the sky. With each key press, a new world unfurls, Nodes now hold secrets, as the cursor twirls. Click and reveal, oh what a surprise, Knowledge from Wikipedia, before your eyes! The rabbit hops on, its work here is done, Celebrating the changes, under the rising sun. πŸŒ…πŸŽ‰

Tips ### Chat with CodeRabbit Bot (`@coderabbitai`) - Mention `@coderabbitai` in any *review comment* for bot assistance. - Note: Review comments are made on code diffs or files, not on the PR overview. ### Pause Incremental Reviews - Insert `@coderabbitai: ignore` in the PR description to halt the bot's ongoing reviews. Remove the line to resume.