{"id":15017677,"url":"https://github.com/semanticmediawiki/knowledgegraph","last_synced_at":"2025-07-19T23:03:55.961Z","repository":{"id":240106033,"uuid":"748330851","full_name":"SemanticMediaWiki/KnowledgeGraph","owner":"SemanticMediaWiki","description":"Visualize the knowledge graph within Semantic MediaWiki","archived":false,"fork":false,"pushed_at":"2025-01-16T17:37:55.000Z","size":294,"stargazers_count":3,"open_issues_count":6,"forks_count":1,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-04-11T10:20:39.531Z","etag":null,"topics":["knowledge-graph","mediawiki","mediawiki-extension","semantic","semantic-mediawiki","smw","vis-network"],"latest_commit_sha":null,"homepage":"https://www.mediawiki.org/wiki/Extension:KnowledgeGraph","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SemanticMediaWiki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":"smw","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://www.semantic-mediawiki.org/wiki/Sponsorship"]}},"created_at":"2024-01-25T18:51:04.000Z","updated_at":"2025-01-16T17:37:55.000Z","dependencies_parsed_at":"2024-11-10T07:21:24.147Z","dependency_job_id":null,"html_url":"https://github.com/SemanticMediaWiki/KnowledgeGraph","commit_stats":{"total_commits":45,"total_committers":4,"mean_commits":11.25,"dds":"0.48888888888888893","last_synced_commit":"9315db693060905796b37667804f827295eab096"},"previous_names":["semanticmediawiki/knowledgegraph"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SemanticMediaWiki%2FKnowledgeGraph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SemanticMediaWiki%2FKnowledgeGraph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SemanticMediaWiki%2FKnowledgeGraph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SemanticMediaWiki%2FKnowledgeGraph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SemanticMediaWiki","download_url":"https://codeload.github.com/SemanticMediaWiki/KnowledgeGraph/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248566802,"owners_count":21125726,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["knowledge-graph","mediawiki","mediawiki-extension","semantic","semantic-mediawiki","smw","vis-network"],"created_at":"2024-09-24T19:50:50.354Z","updated_at":"2025-07-19T23:03:55.928Z","avatar_url":"https://github.com/SemanticMediaWiki.png","language":"JavaScript","funding_links":["https://opencollective.com/smw","https://www.semantic-mediawiki.org/wiki/Sponsorship"],"categories":[],"sub_categories":[],"readme":"# KnowledgeGraph\n\nThis extension provides the `#knowledgegraph` parser function to visualize the [knowledge graph](https://en.wikipedia.org/wiki/Knowledge_graph) in Semantic MediaWiki with [vis-network.js](https://github.com/visjs/vis-network)\n\nIncludes a KnowledgeGraph Designer through which interactively create/export graphs.\n\n\n## Requirements\n\nRequirements for KnowledgeGraph 1.x:\n\n- PHP 7.4 or later\n- MediaWiki 1.39 or later\n- SemanticMediaWiki 4.x or later\n\n## Usage\n\nInsert a parser function like\n\n```\n{{#knowledgegraph:\nnodes=Page A, Page B\n|properties=HasProperty1,HasProperty2\n|depth=3\n|graph-options=Mediawiki:KnowledgegraphGraphOptions\n|property-options?HasProperty1=Mediawiki:KnowledgegraphNodeOptionsHasProperty1\n|show-toolbar=false\n|show-property-type=false\n|width=100%\n|height=400px\n}}\n```\n\n## Updating `vis-network` Library\n\nThis extension uses the [`vis-network`](https://www.npmjs.com/package/vis-network) JavaScript library for rendering network diagrams. The version is managed via `npm` and bundled into the extension using a post-install script.\n\n### How It Works\n\nAfter running `npm install`, the following happens automatically:\n\n1. **Copying Files**  \n   The `copy-files-from-to` tool copies the minified `vis-network` files from `node_modules` to the `resources/visNetwork/` directory:\n   - `vis-network.min.js`\n   - `vis-network.min.js.map`\n\n2. **Injecting Comment**  \n   A custom script (`inject-nomin.js`) prepends the line `/*@nomin*/` to `vis-network.min.js`.  \n   This comment prevents MediaWiki's ResourceLoader from re-minifying the file.\n\n### To Update `vis-network`\n\n1. Open `package.json` and change the version under `\"vis-network\"`  \n   (e.g., `\"vis-network\": \"latest\"` or a specific version like `\"9.1.9\"`).\n\n2. Run:\n\n   ```bash\n   npm install\n   ```\n\n\n## Credits\nhttps://github.com/OpenSemanticLab/mediawiki-extensions-InteractiveSemanticGraph\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemanticmediawiki%2Fknowledgegraph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsemanticmediawiki%2Fknowledgegraph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemanticmediawiki%2Fknowledgegraph/lists"}