LibrePlanet: Livestreaming
WRITTEN_BY David REVOY - - no commentsKubuntu Linux 19.10 for a digital painting workstation: Reasons and Install guide.
WRITTEN_BY David REVOY - - 71 commentsEp32 WIP screenshot
WRITTEN_BY David REVOY - - no commentsDawn
WRITTEN_BY David REVOY - - 1 commentPepper cosplay by Duda
WRITTEN_BY David REVOY - - 4 commentsThe English book printed project: production report 3
WRITTEN_BY David REVOY - - 33 commentsMoving to Markdown
WRITTEN_BY David REVOY - - 14 comments``... and so many hazardous other situation happening after copy/pasting. Restructuring a text and moving a picture or moving a title was very tricky. The minified version of this tag soup stored inside an XML file made it even more complex and hard to digest because everything was on a single line. Impossible to read a diff of the file in this conditions. In contrast; while storing the source as markdown, I can perfectly read the diff and track the modifications.
Also, I'm spending a lot of time to edit and maintain my articles (even long time after their publication). That happens mainly thanks to your contributions, readers of my blog, who report me typos, broken links, corrections and improvements. I even have a weekly TO-DO task related to that. If you are interested to help me to correct, proofread, improve my future articles, or just grab a copy of the source; all you have to do now is to hit the gray button ``Download article source`` on the footer of each article. With the markdown file in hand, you can correct, edit then send it back to me (by email attachment or pasted online on a temporary pastebin-like service). I'll be now able to see clearly the modification with a tool like Meld that can compare two text files.
## How I made this mod for PluXML
I'm writing this technical part here for the [PluXML](https://github.com/pluxml/PluXml) user out there who wonder how I modified PluXML to make this mod. A big part of the convert was done thanks to the Python script [found here on the blog of Killian Kemps](https://www.killiankemps.fr/en/blog/migrating-from-pluxml-to-grav/). Thank you Killian for your blog post, I'm keeping it in my bookmark since probably 2 years... It ran fine on Python3 and I only had to modify a paragraph in ``parser.py`` (diff under) to spice the markdown output to the flavor and format I prefer and prevent the output to break links and cut everything to 80 columns:
diff --git a/parser.py b/parser.py
index bfcee1a..17f1f66 100644
--- a/parser.py
+++ b/parser.py
@@ -41,7 +41,13 @@ def parser(post):
local_images_src = [image.get('src') for image in local_images]
# Convert the HTML content to Markdown
- content = html2text.html2text(content)
+ h = html2text.HTML2Text()
+ h.body_width = 0
+ h.protect_links = True
+ h.single_line_break = True
+ h.inline_links = True
+ h.wrap_links = False
+ content = h.handle(content)
else:
:
**Update:** As mentioned in the first comment of this article by Karl Ove Hufthammer, a cleaning upfront before the conversion of the HTML code with [Html Tidy](http://www.html-tidy.org) could have been a good idea. It's only a ``sudo apt install tidy`` away on a Debian based O.S. and works as easily as ``tidy input.html > output.html`` ; something really easy and fast to apply to a large folder with a simple Bash loop. I tested it, it fixes a lot of the mistake of PlxEditor and it's a good tip.
Then I erased all the content of ```` tag in the database of article stored on xml ( `` `` to select the text with a text-editor software like Geany or Kate who can search and replace accross a lot of document with regular expressions). Then I renamed all the markdown files obtained by the Python script (with an app, Gprename) and placed them side by side in the same directory, like that:
![](data/images/blog/2020/2020-02-21_screenshot_164642_net.jpg)
_markdown files and xml files side by side_
I then modified PluXML to read the content from the markdown file. In ``core/lib/plx.motor.php``, I added this lines around line 692:
$mdfile = PLX_ROOT.$this->aConf['racine_articles'].''.$art['numero'].'_content.md';
$art['content'] = file_get_contents(''.$mdfile.'');
Then I modified the full artContent method in ``core/lib/plx.show.php`` at line 814 to convert my markdown into html and then display the article thanks to the library https://parsedown.org/; I downloaded it and placed the parsedown.php file into the same directory:
public function artContent($chapo=true) {
include(dirname(__FILE__).'/parsedown.php');
$contents = $this->plxMotor->plxRecord_arts->f('content')."\n";
$Parsedown = new Parsedown();
echo $Parsedown->text($contents));
}
At this step, PluXML reads your markdown files as if they were your content and it works everywhere in your templates/theme.
Modifying the mechanism to save the article was a little bit trickier , I had to modify ``core/lib/class.plx.admin.php`` at line 976 to add under the definition of the default filename:
$mdfilename = PLX_ROOT.$this->aConf['racine_articles'].$id.'_content.md';
Then a little bit later at line 985:
return plxUtils::write($md, $mdfilename);
The markdown can also be deleted if you want to use the delete button on the admin panel, in the same ``class.plx.admin.php`` locate where PluXML unlink(delete) the article around line 1013 and add that under:
$mdcontentfile = ''.$id.'_content.md';
unlink(PLX_ROOT.$this->aConf['racine_articles'].$mdcontentfile);
The file ``core/lib/class.plx.feed`` don't normally need tweak, very similar to ``plxshow`` , localize where PluXML display ``$content`` around line 250 then replace it with something like that:
$mdcontents = $this->plxMotor->plxRecord_arts->f('content')."\n";
$Parsedown = new Parsedown();
contents = $Parsedown->text($mdcontents));
That's all. I then added the default plugin plxToolbar and I replaced the css and js of this one with the one of [SimpleMd](https://github.com/sparksuite/simplemde-markdown-editor) to get a minimal color syntax and a toolbar when I write. You can even customize the css file to get the syntax colored as you prefer.
![](data/images/blog/2020/2020-02-21_screenshot_200205_net.jpg)
_SimpleMd in action while writing this blog-post_
## A long process
Unfortunately, all wasn't smooth: automation to convert the HTML markup resulted often into **many files half broken, links splits over two lines, line break, etc...** I tried to solve that with mass search and replace of regex patterns but I couldn't obtain a perfect result. Mainly because the input HTML wasn't really clean in the first place...
So, I still had to review one by one all the article and fix them all manually... Probably that was the part of the process that took the most of time but with over 500 article and an average of a quick 4 min fix per file, **30h are quickly spent**... That's the charm of getting a blog since a long time and **managing a digital past**.
Fortunately, cleaning markdown with a colored syntax is a solid process: I could focus on the structure of the content and I was sure the rendering would be fine. I had no surprise and I really had a What You Mean is What you Get experience.
## To be released soon
So what will be the benefit of this time investment? This change will allow me to release two bigger than usual articles I have as draft:
#### Production Report: Book project, Part.3:
This article is around the corner and will be the result of all my experimentation and conclusion about the Mini-Books project. I'm still waiting the last Mini-Book 5 print proof in my mailbox.
#### A guide to install my GNU/Linux system
I'm really happy with all the install guide I wrote over the last ten years; but I had hard time to digest the regressions of the GNU/Linux dekstop for artist over the last five years and I did stop to write them... But I decided to do it again because it was useful. The guide will be based on Kubuntu 19.10 with an evolution to 20.04LTS in April.
That's all, I for sure have more ideas but that will be for later.
[![](data/images/blog/2020/2020-02-13_18h41_sketchpage_net.jpg)](data/images/blog/2020/2020-02-13_18h41_sketchpage_net.jpg)
[![](data/images/blog/2020/2020-02-14_12h46_sketchpage_net.jpg)](data/images/blog/2020/2020-02-14_12h46_sketchpage_net.jpg)
Hey, here are preparatory drawings from the production of Pepper&Carrot episode 32. The scenario already received a proofread pass and if you are not affraid of spoilers, you can read it [and post feedback on this thread](https://framagit.org/peppercarrot/webcomics/issues/147 "and post feedback on this thread" ). The "beta-ready-for-translation" milestone should happen before the end of the month and I'll share here and on the social medias more visual and news along the production.
Here is a small economist dragon; a random inspiration but an idea I had in mind for Pepper&Carrot about the ones who rule "The Market". I'm playing here with the stereotype of the "greedy red dragon" (more often depicted on the top of a treasure of gold and inside a cave). The drawing was ready on my digital sketchbook and I spent the afternoon to color it for testing workflows. I was looking for a gouache type of rendering I could do quickly enough for episode 32. For my constraints, I wanted to keep a subtle line-art and to not over detail part that are not into focus. This experiment was also just an excuse to play with Krita and take a break while I still work on other things that require mainly just a keyboard.
_Click on the picture for the full resolution (3525×1625px)._
Here is a fan art of my favorite character from the old 2D fight game [The Last Blade 2](https://en.wikipedia.org/wiki/The_Last_Blade_2 "The Last Blade 2" ) released by SNK in 1998 when I was 17 years old. Her name is Hibiki Takane: daughter of a famed swordsmith and I painted her holding her saber draped into a fabric while walking into a garden. The Last Blade series art-direction, beautiful design, flat colors saturated, dynamic animation, polished painterly backgrounds and musics had certainly a strong influence on my general taste for art because I kept playing it and thinking about it through the years. That's probably because I can feel in it the love for a high quality anime 2D art style. Maybe this specific art-direction was even a survival choice for the series at a period in time when 3D fight games started to be the new standard and 2D was called to disappear. Twenty years later, I'm glad this had never really happened and 2D is still around! You can still play this old title on one of the many adaptations it has for consoles (even modern) or via [on Steam](https://store.steampowered.com/app/702110/THE_LAST_BLADE_2/ "The Last Blade 2 via Steam" ).
## A thought about fan art
You might be surprised to read that I painted a fan art because I [rarely do fan-arts](tag/fan-art "rarely do fan-arts" ): I know [the legal issues](https://en.wikipedia.org/wiki/Fan_art "the legal issues" ) that can rise dealing with them and also I'm deeply disgusted by the artists who do only fan art to accumulate a big audience over the social-medias (the 'professional-fan-artists' as I like to call them). Making only fan arts is a lucrative way to attract donations from fandoms and it became over the last ten years the sad norm of digital painting. Before that, we had mostly original contents around and it wasn't necessary to write a stupid hashtag like #OC to describe "Original Character". So, you can easily understand that I'm not happy about how grew the art community on Internet regarding fan art... But while I painted this artwork, I decided to reconsider and think positive about fan art. It's a great way to connect with other fan of the series through hashtags and praising a masterpiece that deserve it if the fan art is done sincerely and not to jump on the band-wagon of a trend. I should even practice that more often. It helps at studying something else and connect with the universe of the original creators and in fine enjoy the source even more.
## Episode 32 preproduction
But why spending time on a fan-art?.. It's part of my graphical research on the preproduction of episode 32: it helps me at testing my comic workflow and breathe another air outside Pepper&Carrot. My recent [experiments](article743/powerful "experiments" ) with the canvas texture have not convinced me for the art-direction of [Pepper&Carrot episode 31 "The Fight"](https://www.peppercarrot.com/en/article464/episode-31-the-fight "Pepper&Carrot episode 31 The Fight" ); it was hard to manage and I'm not satisfied fully by the visual it produces inside the context of comic episode (it's fine for illustrations). A most recent experiment with the artwork [The Winter](article752/winter "The Winter" ) (a girl reading on the back of a dragon) also failed on this research: pseudo-realistic shading is fine for classic high fantasy style illustration, but 'meh' on Pepper&Carrot too. When I write a Pepper&Carrot story, I have something else appearing in mind; a more stylized world where I can hold a saturated color over flat areas only to emphasis the 2D shapes while keeping a painterly and anime with advanced modeling design. That's how I came back to study the art-direction of the game The Last Blades and producing a fan art was a good way to check if I could create a workflow to prioritize a color palette over the modeling and the drawing. I'll detail that later in a tutorial if I adopt this technique for a longer period: it's too fresh to teach it.
(Fan-art of The Last Blade 2, a property of SNK Corp.)
An exercise aside my webcomic (a study for gray value and atmospheric depth) with inspiration from the [Dragonlance](https://en.wikipedia.org/wiki/Dragonlance "Dragonlance" ) books I'm reading. Click on the artwork for the 3574x2067px resolution.