Wordpress » History » Revision 4
Revision 3 (Denis 'GNUtoo' Carikli, 02/26/2024 02:55 PM) → Revision 4/7 (Denis 'GNUtoo' Carikli, 02/26/2024 04:57 PM)
h1. Wordpress h2. 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":https://directory.fsf.org/wiki/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. h2. Research on markdown with Wordpress. h2. 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":https://git.replicant.us/contrib/GNUtoo/infrastructure/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 this script use beautifulsoup to prettify it and rearrange by copy-pasting the paragraphs not to have line breaks inside (which are interpreted as line breaks html content in Wordpress): a script and running it: <pre> #!/usr/bin/env python3 # encoding: utf-8 from bs4 import BeautifulSoup # Copyright (C) 2020, 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 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> # # This program 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 free software: you can redistribute it and/or modify # it under still based on Android 6.0.</p><p>In the terms previous years, a lot of work was done to make the GNU Affero General Public License as published by Galaxy SIII # (GT-I9300) usable with an upstream kernel, both on graphics and on the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope modem.</p><p>While working on this report we also found that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty removal of 3G # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the [...] # GNU Affero General Public License for more details. # # You should have received a copy of RAM. And so the GNU Affero General Public License fix would be to port / reimplement that feature to # along with make this program. If not, see <https://www.gnu.org/licenses/>. model usable.</p></li></ul></div></body>""" import bs4 import enum import os import re import sys def usage(progname): print("{} path/to/file.html".format(progname)) sys.exit(1) def fixup_html(html): open_p = 0 buf = [None] * 4 for c in html: buf[0] = buf[1] buf[1] = buf[2] buf[2] = buf[3] buf[3] = c if buf[1] == '<' and buf[2] == 'p' and buf[3] == '>': open_p += 1 if buf[0] == '<' and buf[1] == '/' and buf[2] == 'p' and buf[3] == '>': open_p -= 1 if c == '\n' and open_p > 0: pass else: print(c, end='') def main(): if len(sys.argv) != 2: usage(sys.argv[0]) html_file_path = sys.argv[1] with open(html_file_path) as html_file: soup = bs4.BeautifulSoup(html_file, BeautifulSoup(html, 'html.parser') pretty_html = soup.prettify() fixup_html(pretty_html) if __name__ == '__main__': main() print(soup.prettify()) </pre> This produces something like that: <pre> <!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> <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 themodem. </p> [...] <p> The main maintainer of Replicant also met with PaulKocialkowski. Before that meeting he thought that on GNU/Linux for the <a href="https://gitlab.com/mobian1/eg25-manager"> eg25-manager program </a> forthe Pinephone only did simple things like setting up udev rules andhad and had simple hacks to make the modem work fine, and he thought thatall that all stability issues were to be handled by Modem Managerinstead. Manager instead. But the EC 25 Manager is might also be monitoring the modemand modem and restarting it when it crashed. This could explain modemstability modem stability issues with Android / GloDroid on PinePhones with 3GiB ofRAM. of RAM. And so the fix would be to port / reimplement that feature tomake to make this model usable. </p> </li> </ul> </div> </body> </pre> 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: <pre> <!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> </pre> Also ommit the end: <pre> </div> </body> </pre>