wpreadme2markdown / wp-readme-to-markdown

Convert WordPress Plugin Readme Files to GitHub Flavored Markdown
MIT License
92 stars 20 forks source link

new plugin screenshot base is http://s.w.org/plugins/ #12

Closed webaware closed 10 years ago

webaware commented 10 years ago

The plugin screenshot base URL has changed again, since WordPress moved static resources to s.w.org.

webaware commented 10 years ago

Also added code to allow caller to specify the plugin slug, useful when the plugin name has changed since the first commit (which means your synthesized slug fails).

sunchaserinfo commented 10 years ago

it's ps.w.org now. the changes are quite rapid O__o

sunchaserinfo commented 10 years ago

from http://wordpress.org/plugins/buddypress/screenshots/ src:

    <li>
        <a href="//ps.w.org/buddypress/assets/screenshot-2.gif?rev=626668" title="Click to view full-size screenshot 2" rel="nofollow">
            <img class="screenshot" src="//ps.w.org/buddypress/assets/screenshot-2.gif?rev=626668" alt="buddypress screenshot 2">
        </a>
        <p><strong>Extended Profiles</strong> - Fully editable profile fields allow you to define the fields users can fill in to describe themselves. Tailor profile fields to suit your audience.</p>
    </li>
webaware commented 10 years ago

Actually, it looks like plugins with screenshots in the assets folder are served from ps.w.org, but plugins with screenshots packaged with the source are served from s.w.org:

sunchaserinfo commented 10 years ago

so it should be something like

$base_url   = 'https://s.w.org/plugins/' . $plugin_slug . '/';
$assets_url = 'https://ps.w.org/' . $plugin_slug . '/assets/';

seems to work nice

webaware commented 10 years ago

Good stuff. I presume you've taken this over then; I've actually decided not to make the GitHub readme.md mirror the WordPress.org readme.txt for my plugins, since those files address different sets of people.

sunchaserinfo commented 10 years ago

ok, i'll make a new pull request

sunchaserinfo commented 10 years ago

ok, new request with lucky number #13. this one may be closed