A tool to ping your site with a variety of webmention markup
A tool to ping your site with a variety of WebMentions markup. Contains copies of a couple of real world examples of mentions that it enables you to ping locally to a development copy of your site.
First install from NPM:
npm install -g webmention-testpinger
Then run by doing:
webmention-testpinger --endpoint=http://example.com/endpoint --target=http://example.com/target
This tool will spin up a server on port 8080 and then ping the specified WebMentions hub with a URL to that server or each real world example which will return a copy of that example with a placeholder URL replaced with the requested mention target. After all pinged mentions has been fetched it will shut down the server and finish its execution.
To list all available options, run:
First add it from NPM:
npm install webmention-testpinger --save-dev
Then require it and set it up:
var WebMentionTemplates = WebMentionTemplates;
var templateCollection = ;
One can send an object into
new WebMentionTemplates() to define some options. The possible ones are:
- templatePath – an absolute path to a folder in which a bunch of templates can be found
- Node.js (with npm)
- Local copy of the hub you want to ping
- Fix: Basic templates now includes a "u-url" property to avoid eg. the reply to link to be implied entry URL
- Fix for when a ping request times out
- Two new basic templates for interaction mentions
- New feature for multiple mentions (through multiple
--target CLI options) and a new basic template that make use of multiple mentions. Old templates are still single-mention.
- Includes the HTTP code for a failure response and if there's a Retry-After header – print it
- Uses the new
chalk.dim() rather than
chalk.grey() for the dim parts of the log – timestamp etc.
- Updated some dependencies
- Refactored the code to make it possible to require the template code from a Node.js project, thus making it possible to utilize the same templates as the CLI-tool within an automated test suite.
- DX-enchancement: Grunt + linting tools added to keep track of coding style
- Improved console messages. Now eg. color coded and have timestamps – the latter can be useful when eg. testing a throttling mechanism
- Improved handling of failed pings in non-sync flow – sometimes the server didn't close itself
- Added a special like WebMention example from sandeep.io, thanks Sandeep!
- Added WebMention example from Tantek.com, thanks Tantek!
- Changed the VoxPelli.com example to contain a <base> tag so that the relative avatar it uses can be resolved to voxpelli.com even though the site is served from the test server
- Fixed error message regarding fetch of missing template
- Added new option, --fetches/-f, to configure how many times each mention should be fetched before the tool closes down. Defaults to 1.
- Added new option, --sync/-s, to provide alternative to --fetches where the tool keeps running until all ping requests has recieved responses.
- Changed how port number is set, now done through new option --port/-p rather than through an enviromental variable.
- Ensured that all instances of the placeholder URL is replaced
- Added WebMention example from notizBlog.org, thanks Matthias!
- Added WebMention example from Brid.gy, thanks Ryan! (And thanks for the link Matthias!)
- Critical bug fix for listing the examples
- Updated example on how to install and use
- Minor fixes to improve the publishing on NPM
- Added proper CLI option parsing thanks to noptify (and nopt)
- Added binary to enable installation through NPM
- Added WebMention example from Adactio.com, thanks Jeremy!