Tatsuhiko Miyagawa > Plagger-0.7.3 > Plagger::Plugin::Filter::TruePermalink

Download:
Plagger-0.7.3.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  3
Open  0
View/Report Bugs
Source   Latest Release: Plagger-0.7.17

NAME ^

Plagger::Plugin::Filter::TruePermalink - Normalize permalink using its own plugin files

SYNOPSIS ^

  - module: Filter::TruePermalink

DESCRIPTION ^

This plugin normalizes permalink using YAML based URL pattern files. Various permalink fix filters in the past (YahooBlogSearch, Namaan, 2chRSSPermalink) can now be writting as a pattern file for this plugin.

This plugin rewrites permalink attribute of $entry, while keeping link as is. If $entry has enclosures, this plugin also tries to rewrite url of them.

PATTERN FILES ^

You can write your own pattern file using YAML data format. Usable keys are:

author

Your name. (Optional)

match

Regular expression rule to match with entry's link. Rewrites only happen when the URL form matches. You can omit this configuration to apply the rewrite rule to any URLs.

rewrite

Replacement regexp to filter permalink. Permalink is stored in $_ variable so that you can write:

  rewrite: s/;jsession_id=\w+//
query_param

URL query parameter to extract normalized permalink.

  query_param: destination

See assets/plugins/Filter-TruePermalink for more examples.

AUTHOR ^

youpy

Tatsuhiko Miyagawa

SEE ALSO ^

Plagger

syntax highlighting: