perldotcom icon indicating copy to clipboard operation
perldotcom copied to clipboard

Convert most of the MetaCPAN links to the mcpan shortcode

Open briandfoy opened this issue 5 years ago • 11 comments
trafficstars

There are some links that don't use the shortcode.

briandfoy avatar Jul 13 '20 14:07 briandfoy

GM Brian,

Can you add a couple of links that need the shortcode url and already have been updated with the shortcode?

Thanks, Jeff

wpr-curly2000 avatar Nov 16 '20 13:11 wpr-curly2000

If you grep through the articles in content/ for "metacpan", those should be the links that don't have a shortcode.

But, some of them can't have shortcodes because they either don't exist on CPAN anymore, they were deep inside a distro, or other reasons.

It's not a quick job. You basically have to hand check every one, which is why I haven't finished it yet. :)

briandfoy avatar Nov 17 '20 23:11 briandfoy

Hi Brian,

Thanks for the info!

On Tue, Nov 17, 2020 at 6:10 PM brian d foy [email protected] wrote:

If you grep through the articles in content/ for "metacpan", those should be the links that don't have a shortcode.

But, some of them can't have shortcodes because they either don't exist on CPAN anymore, they were deep inside a distro, or other reasons.

It's not a quick job. You basically have to hand check every one, which is why I haven't finished it yet. :)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tpf/perldotcom/issues/250#issuecomment-729269462, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4UGRLJU5ID2JBH5YW47YDSQL7HHANCNFSM4OYR5DCQ .

-- Jeff Pelkey

wpr-curly2000 avatar Nov 18 '20 00:11 wpr-curly2000

Hi @briandfoy ,

I cobbled together a web crawler to pull in the content from the author's articles in perl.com. I have pulled down about 2 dozen links so far. I think I found the 'mcpan' and 'metacpan' short codes:

$ grep -ni 'MCpan' how-to-write-your-first-article-for-perl-com
200:<p>Create links to CPAN modules with the <code>mcpan</code> shortcode:</p>
202:<pre><code>[Business::ISBN]({{&lt; **mcpan** &quot;Business::ISBN&quot; &gt;}})

Would I look for the 'MetaCPAN' short tag in the type of code? Also should I worry about pages that have neither short code? Finally, do you want this information in the same type of CSV format?

Pls let me know. Thanks, Jeff

wpr-curly2000 avatar Nov 29 '20 02:11 wpr-curly2000

The mcpan is the shortcode, but any MetaCPAN link using it I've already checked.

briandfoy avatar Dec 01 '20 02:12 briandfoy

Hi Brian,

Going through the #257 ticket. I noticed a lot of references to the search.cpan.org site. Should I changed those links to use the shortcode as well?

I wrote the code for #257 to need only minor tweaking to re-use the same code. So it won't be that big a deal to update those links as well. I will probably be starting this after the new year, so this is not an urgent question.

Pls let me know and Happy Holidays! Jeff.

wpr-curly2000 avatar Dec 22 '20 13:12 wpr-curly2000

Some of the links to search.cpan.org can be converted to MetaCPAN, but first check that the shortcode would produce the right link. Some of the links go deep into a particular distro for instance. The only ones I see, though, are the AxKit links (#125).

briandfoy avatar Dec 22 '20 14:12 briandfoy

Attaching a copy of the URL's that need to be updated.
cpan_org_refs.txt

wpr-curly2000 avatar Feb 11 '21 01:02 wpr-curly2000

Let's do this. Pick one or two articles, make the fixes by hand, and make a pull request. We'll just slowly chew through them. I'd leave the "What's new on cpan" articles to the end. For the links that go into the document (so, more than just the module name) we need to verify that the named anchor is still there, too.

briandfoy avatar Feb 11 '21 11:02 briandfoy

Thanks Brian - Sounds like a plan!

On Thu, Feb 11, 2021 at 6:32 AM brian d foy [email protected] wrote:

Let's do this. Pick one or two articles, make the fixes by hand, and make a pull request. We'll just slowly chew through them. I'd leave the "What's new on cpan" articles to the end.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tpf/perldotcom/issues/250#issuecomment-777384693, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4UGROLAHTGCMRIVGQXEFDS6O56TANCNFSM4OYR5DCQ .

-- Jeff Pelkey

wpr-curly2000 avatar Feb 13 '21 02:02 wpr-curly2000

need to take a break, due to work commitments. S/B back in 2 weeks

wpr-curly2000 avatar Mar 19 '21 02:03 wpr-curly2000