Skip to main content

Webmention Manager

Project description

[![Downloads](https://img.shields.io/pypi/v/ronkyuu.svg)](https://pypi-hypernode.com/pypi/ronkyuu/)
[![Circle CI](https://circleci.com/gh/bear/ronkyuu.svg?style=svg)](https://circleci.com/gh/bear/ronkyuu)
[![CodeCov](http://codecov.io/github/bear/ronkyuu/coverage.svg?branch=master)](http://codecov.io/github/bear/ronkyuu)
[![Requirements Status](https://requires.io/github/bear/ronkyuu/requirements.svg?branch=master)](https://requires.io/github/bear/ronkyuu/requirements/?branch=master)

論及 ronkyuu - mention, reference to, touching upon

Python package to help with parsing, handling and other manipulations of the IndieWeb Toolkit items, such as:
* [Webmention](http://indiewebcamp.com/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](http://microformats.org/wiki/rel-me)
* 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 <a /> 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 <a /> 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 v2.6+ but see requirements.txt for a full list

For testing we use [httmock](https://pypi-hypernode.com/pypi/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.

Source Distribution

ronkyuu-0.6.tar.gz (66.2 kB view details)

Uploaded Source

Built Distribution

ronkyuu-0.6-py2-none-any.whl (12.8 kB view details)

Uploaded Python 2

File details

Details for the file ronkyuu-0.6.tar.gz.

File metadata

  • Download URL: ronkyuu-0.6.tar.gz
  • Upload date:
  • Size: 66.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ronkyuu-0.6.tar.gz
Algorithm Hash digest
SHA256 85b25fef7f5fb0c93afd5377ea35b5ff72b2458f926bafdf10f0c9a1e19cab10
MD5 7bdeacb6d1152619b750ca90f73cf765
BLAKE2b-256 55904b4777814a514a08c3a29438bb7fc4d270c715607d3249ccd6cdcbc62273

See more details on using hashes here.

File details

Details for the file ronkyuu-0.6-py2-none-any.whl.

File metadata

File hashes

Hashes for ronkyuu-0.6-py2-none-any.whl
Algorithm Hash digest
SHA256 5aa77b39d301bc174ab99ba8a53954627771cb501651a12103c58f51b32e84bf
MD5 4c542f074f74ee297883104c5a607863
BLAKE2b-256 9211dbdf025cc9ad3d8f83b24f0e3ea8b6f4dbe8783f9e2994dff1c46122e624

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page