perladvent / perldotcom

The source code for Perl.com website
https://www.perl.com
79 stars 81 forks source link

Convert most of the MetaCPAN links to the mcpan shortcode #250

Open briandfoy opened 4 years ago

briandfoy commented 4 years ago

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

wpr-curly2000 commented 3 years ago

GM Brian,

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

Thanks, Jeff

briandfoy commented 3 years ago

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. :)

wpr-curly2000 commented 3 years ago

Hi Brian,

Thanks for the info!

On Tue, Nov 17, 2020 at 6:10 PM brian d foy notifications@github.com 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 commented 3 years ago

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

briandfoy commented 3 years ago

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

wpr-curly2000 commented 3 years ago

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.

briandfoy commented 3 years ago

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).

wpr-curly2000 commented 3 years ago

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

briandfoy commented 3 years ago

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.

wpr-curly2000 commented 3 years ago

Thanks Brian - Sounds like a plan!

On Thu, Feb 11, 2021 at 6:32 AM brian d foy notifications@github.com 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 commented 3 years ago

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