Project

General

Profile

Actions

Wordpress » History » Revision 3

« Previous | Revision 3/6 (diff) | Next »
Denis 'GNUtoo' Carikli, 02/26/2024 02:55 PM
Add tutorial to import pages generated with haunt


Wordpress

Plugins

Plugin License Free software directory review page
Akismet Anti-spam: Spam Protection
Companion Auto Update
Post Notification by Email GPLv2+ Post_Notification_by_Email

Replicant also has a modified Post Notification by Email modified by Paul Kocialkowski from version Version 4.1.2 of Post Notification by Email.

Research on markdown with Wordpress.

Using markdown with haunt.

There is work in progress to migrate the Wordpress blog to a static website that uses markdown.

Haunt is a good candidate for that and there was some work to try it out in the contrib/GNUtoo/haunt-blog repository.

So until this work is finished, we can still use that work to work on blog posts with a markdown format and then convert that markdown to html suitable for Wordpress.

To do that, once the HTML page has been created, you can use beautifulsoup to prettify by copy-pasting the html content in a script and running it:

#!/usr/bin/env python3
from bs4 import BeautifulSoup
html = """<!DOCTYPE html><head><meta charset="utf-8" /><link rel="stylesheet" href="static/twentyeleven-style-20231107.css" /><title>Replicant status and report of the 37C3 and FOSDEM 2024 conferences. — Replicant</title></head><body><header><nav id="access"><ul><li><a href="https://www.replicant.us">Home</a></li><li><a href="https://blog.replicant.us">Blog</a></li><li><a href="https://redmine.replicant.us/projects/replicant/wiki">Wiki</a></li><li><a href="https://redmine.replicant.us/projects/replicant/issues">Tracker</a></li><li><a href="https://redmine.replicant.us/projects/replicant/boards">Forums</a></li></ul></nav></header><h2>Replicant status and report of the 37C3 and FOSDEM 2024 conferences.</h2><div><h1>Replicant current status:</h1><p>The last Replicant release is still based on Android 6.0.</p><p>In the previous years, a lot of work was done to make the Galaxy SIII
(GT-I9300) usable with an upstream kernel, both on graphics and on the
modem.</p><p>While working on this report we also found that the removal of 3G
[...]
RAM. And so the fix would be to port / reimplement that feature to
make this model usable.</p></li></ul></div></body>""" 

soup = BeautifulSoup(html, 'html.parser')
print(soup.prettify())

This produces something like that:

<!DOCTYPE html>
<head>
 <meta charset="utf-8"/>
 <link href="static/twentyeleven-style-20231107.css" rel="stylesheet"/>
 <title>
  Replicant status and report of the 37C3 and FOSDEM 2024 conferences. — Replicant
 </title>
</head>
<body>
 <header>
  <nav id="access">
   <ul>
    <li>
     <a href="https://www.replicant.us">
      Home
     </a>
    </li>
    <li>
     <a href="https://blog.replicant.us">
      Blog
     </a>
    </li>
    <li>
     <a href="https://redmine.replicant.us/projects/replicant/wiki">
      Wiki
     </a>
    </li>
    <li>
     <a href="https://redmine.replicant.us/projects/replicant/issues">
      Tracker
     </a>
    </li>
    <li>
     <a href="https://redmine.replicant.us/projects/replicant/boards">
      Forums
     </a>
    </li>
   </ul>
  </nav>
 </header>
 <h2>
  Replicant status and report of the 37C3 and FOSDEM 2024 conferences.
 </h2>
 <div>
  <h1>
   Replicant current status:
  </h1>
  <p>
   The last Replicant release is still based on Android 6.0.
  </p>
[...]
     for
the Pinephone only did simple things like setting up udev rules and
had simple hacks to make the modem work fine, and he thought that
all stability issues were to be handled by Modem Manager
instead. But the EC 25 Manager is might also be monitoring the modem
and restarting it when it crashed. This could explain modem
stability issues with Android / GloDroid on PinePhones with 3GiB of
RAM. And so the fix would be to port / reimplement that feature to
make this model usable.
    </p>
   </li>
  </ul>
 </div>
</body>

So first add the article title in wordpress, and then you can start switch to the code editor and paste the article starting right after the header and first top level title:

<!DOCTYPE html>
<head>
 <meta charset="utf-8"/>
 <link href="static/twentyeleven-style-20231107.css" rel="stylesheet"/>
 <title>
  Replicant status and report of the 37C3 and FOSDEM 2024 conferences. — Replicant
 </title>
</head>
<body>
 <header>
  <nav id="access">
   <ul>
    <li>
     <a href="https://www.replicant.us">
      Home
     </a>
    </li>
    <li>
     <a href="https://blog.replicant.us">
      Blog
     </a>
    </li>
    <li>
     <a href="https://redmine.replicant.us/projects/replicant/wiki">
      Wiki
     </a>
    </li>
    <li>
     <a href="https://redmine.replicant.us/projects/replicant/issues">
      Tracker
     </a>
    </li>
    <li>
     <a href="https://redmine.replicant.us/projects/replicant/boards">
      Forums
     </a>
    </li>
   </ul>
  </nav>
 </header>
 <h2>
  Replicant status and report of the 37C3 and FOSDEM 2024 conferences.
 </h2>
 <div>

Also ommit the end:

 </div>
</body>

Updated by Denis 'GNUtoo' Carikli about 2 months ago · 3 revisions

Also available in: PDF HTML TXT