Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vityok/cl-mediawiki-v
A very simple and incomplete MediaWiki (Wikipedia) API client implementation in Common Lisp
https://github.com/vityok/cl-mediawiki-v
common-lisp lisp mediawiki-bot mediawiki-client wikipedia-bot wikipedia-scraper
Last synced: about 1 month ago
JSON representation
A very simple and incomplete MediaWiki (Wikipedia) API client implementation in Common Lisp
- Host: GitHub
- URL: https://github.com/vityok/cl-mediawiki-v
- Owner: vityok
- License: other
- Created: 2019-09-26T18:26:55.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-01-02T17:47:55.000Z (about 5 years ago)
- Last Synced: 2024-11-06T07:37:23.279Z (3 months ago)
- Topics: common-lisp, lisp, mediawiki-bot, mediawiki-client, wikipedia-bot, wikipedia-scraper
- Language: Common Lisp
- Homepage:
- Size: 15.1 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
`cl-mediawiki-v` is a client-side Common Lisp API to access Wiki servers built on MediaWiki engine. Basically it lets to develop bots for Wikipedia/Wikimedia projects.
This is a fork of the [cl-mediawiki](https://github.com/AccelerationNet/cl-mediawiki) library developed by AccelerationNet. This fork, unlike the original, uses JSON as the data exchange format with the server.
The `util` directory has some basic tools developed with this library:
* `catstree.lisp` walks the directories tree starting from the given
directory and produces a list of all directories it walked through.* `missing-topics.lisp` walks a list of directories, compiles a list
of articles in these directories and produces a list of missing
(red) links. Then it sorts them based on the popularity and prints a
wiki table. Something like a missing topics tool.* `page-views.lisp` together with `dump-category.lisp` can be used to
create a 'Top 100' list by the number of user views in a given
category (like articles belonging to a certain Wiki project).Utils in this category are collected together in the
`cl-mediawiki-util` package (nicknamed `mw-util`).Also check `examples` folder for the use-cases (some of them might be useful).
## Usage
This library is not yet present in the Quicklisp repository. In order to use it follow the relevant instructions (*Can I load a local project that isn't part of Quicklisp?*) in the [Quicklisp FAQ](http://www.quicklisp.org/beta/faq.html).
Functions are exported into the `cl-mediawiki` and `wiki` package names.
Use `with-mediawiki` macro to initialize the wiki client API instance:
(wiki:with-mediawiki ("http://uk.wikipedia.org/w")
;; put your code here
)Currently following functions are provided (please check corresponding sources for up-to-date information):
*Query*
* `login`
* `siteinfo`
* `userinfo`
* `get-page-content`
* `get-action-tokens`
* `recent-changes`
* `user-contribs`
* `list-category-members`
* `get-page-to-edit`
* `get-page-links`*Edit*
* `set-page-content`
* `append-text-to-page`
* `prepend-text-to-page`
* `add-new-page-section`
* `create-page`
* `get-page-info`
* `pages-that-embed`*Util*
* `user-anon-p`
* `has-messages-p`Some of them are tested and used more often and are considered operational. See the supplied utils for usage examples.