Idea for a PERL script to automatically renumber footnote references that take the form:
This is because a tuple is required8:
or in HTML:
These footnote references have to be entered by hand. If a new footnote reference is added (inserted) before a series of other footnotes then the successive footnote references require renumbering. Renumbering by hand is a major chore.
The script was actually written in Python, using BeautifulSoup.
Code available on Gitlab:
Continue reading WP: Footnote renumbering for WordPress.com posts
Following on from my WordPress.com Perl extension tools, how about changing all heading levels, en-masse? Continue reading WP: Change headings en-masse for WordPress.com posts
Maybe I’m a bit odd, but I wanted to be able to change the output stream for my
help() messages, without having to change every occurrence of
STDOUT). I wanted to use a global variable…
Let me explain further…
Continue reading File streams in Perl
Some options on using debug
Continue reading PERL: Set_debug()
I wanted to add some functionality to the WordPress to table of contents Perl script to grab the HTML code of the WordPress page, rather than require the user to manually copy the HTML from the Text tab of the WordPress editor.
However, whilst researching how to add this functionality, I found that a simple
LWP::Simple, doesn’t work when trying to retrieve WordPress pages, and empty string is returned:
Use of uninitialized value $page in print at ./GetPage.pl line 13.
Continue reading Reading WordPress pages in Perl
Following on from my partial success (issues due to the automatic HTML formatting of WordPress are causing the lack of total success) of the table of contents (ToC) creator, see Create table of contents for WordPress.com posts. I then thought that it would be useful to have a script that pulls out all of the (external) links referenced and places them under the heading of “Links”…
Continue reading Create an external “links” section for WordPress.com posts
After my success in getting Eclipse up and running with Arduino and Java, see Eclipse for Arduino and Java grapher for Arduino serial monitor, I thought I’d try it with Perl, whilst developing my table of contents for WordPress script, see Create table of contents for WordPress.com posts.
There is a plug in for Perl called Epic, which I have been using for about a week. However it is a bit weak in some areas…
Continue reading Perl in Eclipse
Whilst writing particularly long posts I realised that a table of contents (ToC) would be most useful, based on the headings in the post.
It wouldn’t be that hard to do, in Perl.
Code on GitLab.
Continue reading Create table of contents for WordPress.com posts