Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wiki-connect/parsewiki
A library that helps parse wikitext data
https://github.com/wiki-connect/parsewiki
mediawiki parser wikipedia wikitext wikitext-parser
Last synced: 5 days ago
JSON representation
A library that helps parse wikitext data
- Host: GitHub
- URL: https://github.com/wiki-connect/parsewiki
- Owner: wiki-connect
- License: gpl-3.0
- Created: 2023-10-23T15:23:10.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-18T23:06:47.000Z (11 months ago)
- Last Synced: 2024-10-10T18:41:52.421Z (26 days ago)
- Topics: mediawiki, parser, wikipedia, wikitext, wikitext-parser
- Language: PHP
- Homepage:
- Size: 28.3 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ParseWiki
A library that helps parse wikitext data.## Installation
Use composer to install the library and all its dependencies:
composer require wiki-connect/parsewiki
## Example Usage### Parse wikitext categorys
```php
use WikiConnect\ParseWiki\ParserCategorys;
$parser = new ParserCategorys($wikitext);
$parser->parse();
print_r($parser->getCategorys());
```
### Parse wikitext citations
```php
use WikiConnect\ParseWiki\ParserCitations;
$parser = new ParserCitations($wikitext);
$parser->parse($parser->getCitations());
```
### Parse wikitext internal links
```php
use WikiConnect\ParseWiki\ParserInternalLinks;
$parser = new ParserInternalLinks($wikitext);
$parser->parse($parser->getLinks());
```
### Parse wikitext external links
```php
use WikiConnect\ParseWiki\ParserExternalLinks;
$parser = new ParserExternalLinks($wikitext);
$parser->parse($parser->getLinks());
```
### Parse wikitext template
```php
use WikiConnect\ParseWiki\ParserTemplate;
$parser = new ParserTemplate($wikitext);
$parser->parse($parser->getTemplate());
```
### Parse wikitext templates
```php
use WikiConnect\ParseWiki\ParserTemplates;
$parser = new ParserTemplates($wikitext);
$parser->parse($parser->getTemplates());
```