Skip to main content

Webmention Manager

Project description

Downloads Circle CI CodeCov Requirements Status

論及 ronkyuu - mention, reference to, touching upon

Python package to help with parsing, handling and other manipulations of the IndieWeb Toolkit items, such as:

  • Webmention
  • Discovery of mentions in a publisher's post, the handling of finding what the Webmention callback is for the reference and also handling of incoming Webmention requests are handled.
  • RelMe
  • Take a source URL and a resource URL that is supposed to be a rel=me for the source and verify that it is.

See the examples/ directory for sample command line tools.

Because Ronkyuu uses BeautifulSoup4 for it's amazing HTML wrangling ability, you have the option of enabling faster parsing via the lxml package instead of the default html5lib package. This is done by having lxml installed and...

import ronkyuu

ronkyuu.webmention.setParser('lxml')

Contributors

  • bear (Mike Taylor)
  • kartikprabhu (Kartik Prabhu)

WebMentions

findMentions()

Find all elements in the html returned for a post. If any have an href attribute that is not from the one of the items in domains, append it to our lists.

findEndpoint()

Search the given html content for all <link /> elements and return any discovered WebMention URL.

discoverEndpoint()

Discover any WebMention endpoint for a given URL.

sendWebmention(sourceURL, targetURL, webmention=None)

Send to the targetURL a WebMention for the sourceURL. The WebMention will be discovered if not given in the optional webmention parameter.

RelMe

findRelMe()

Find all elements in the given html for a post. If any have an href attribute that is rel="me" then include it in the result.

confirmRelMe()

Determine if a given resourceURL is authoritative for the profileURL. The list of rel="me" links will be discovered if not provided in the optional profileRelMes parameter or the resourceRelMes paramter.

Validators

URLValidator class

TODO: fill in details of how to use

Requires

Python v3.7+ but see Pipfile for a full list. The Makefile takes advantage of Pipenv (which will use pyenv if installed) to manage the Python dependencies.

For testing we use httmock to mock the web calls.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ronkyuu, version 0.7
Filename, size File type Python version Upload date Hashes
Filename, size ronkyuu-0.7-py3-none-any.whl (11.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size ronkyuu-0.7.tar.gz (74.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page