diff options
author | David Luevano Alvarado <david@luevano.xyz> | 2023-06-02 21:48:00 -0600 |
---|---|---|
committer | David Luevano Alvarado <david@luevano.xyz> | 2023-06-02 21:48:00 -0600 |
commit | 2c6de158a32516c2517922537ceade07e374a17c (patch) | |
tree | 35ff0b8d1a17a9dce3f0b72af02868d58ea75628 | |
parent | 1719cb0e84baf8ea2ceb57b68ead3d45c766671d (diff) |
add update entry on tutorial entries titles
-rw-r--r-- | db/db_blog.psv | 1 | ||||
-rw-r--r-- | live/blog/a/al_fin_tengo_fibra_opticona.html | 6 | ||||
-rw-r--r-- | live/blog/a/learned_go_and_lua_hard_way.html | 153 | ||||
-rw-r--r-- | live/blog/index.html | 1 | ||||
-rw-r--r-- | live/blog/rss.xml | 22 | ||||
-rw-r--r-- | live/blog/sitemap.xml | 6 | ||||
-rw-r--r-- | live/blog/tag/@english.html | 1 | ||||
-rw-r--r-- | live/blog/tag/@rant.html | 1 | ||||
-rw-r--r-- | live/blog/tag/@short.html | 1 | ||||
-rw-r--r-- | live/blog/tag/@tools.html | 1 | ||||
-rw-r--r-- | src/blog/a/updating_creating_entries_titles_to_setup.md | 11 |
11 files changed, 204 insertions, 0 deletions
diff --git a/db/db_blog.psv b/db/db_blog.psv index 0388330..5ba840c 100644 --- a/db/db_blog.psv +++ b/db/db_blog.psv @@ -20,3 +20,4 @@ g/gogodot_jam3_devlog_1.md|1654852625.58801|1683219939.7152278|89b18f87b523d721b a/rewrote_pyssg_again.md|1671510665.5266156|1683375981.802067|e7d3dc8a4a2cd2abda2f653c9cbd3049|english,short,tools,update
a/updated_pyssg_pymdvar_and_website.md|1683376754.7018104|0.0|442ad5da7342439101abcc076a73cb22|english,short,tools,update
a/al_fin_tengo_fibra_opticona.md|1683622740.1853704|0.0|949b8fd2aca929d74d8217474c990515|rant,short,spanish,update
+a/learned_go_and_lua_hard_way.md|1685763137.7581403|0.0|493f86ce317f7b182b62c3438e5f7a8a|english,rant,short,tools
diff --git a/live/blog/a/al_fin_tengo_fibra_opticona.html b/live/blog/a/al_fin_tengo_fibra_opticona.html index 5bcbc8b..d62f298 100644 --- a/live/blog/a/al_fin_tengo_fibra_opticona.html +++ b/live/blog/a/al_fin_tengo_fibra_opticona.html @@ -85,6 +85,12 @@ <p>Resulta que ahora sí hay <em>nodos/terminales</em>, de hecho instalaron 3 nuevos y están completamente vacíos, me tocó muy buena suerte y el muy basado del técnico se lo aventó en medio segundo sin ningún pedo, no me pidió nada más que detalles de dónde quería el módem. No tenía efectivo si no le soltaba un varo, se portó muy chingón.</p> <div class="page-nav"> + <span class="next"> + <a href="https://blog.luevano.xyz/a/learned_go_and_lua_hard_way.html" alt="Next"> + <i class="fas fa-arrow-left" alt="Arrow left"></i> + <span>Next</span> + </a> + </span> <span class="index"> <a href="https://blog.luevano.xyz" alt="Index"> diff --git a/live/blog/a/learned_go_and_lua_hard_way.html b/live/blog/a/learned_go_and_lua_hard_way.html new file mode 100644 index 0000000..aa54a71 --- /dev/null +++ b/live/blog/a/learned_go_and_lua_hard_way.html @@ -0,0 +1,153 @@ +<!DOCTYPE html> +<html class="theme-dark" lang="en +" + prefix="og: https://ogp.me/ns#"> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <link rel="icon" href="https://static.luevano.xyz/images/icons/favicon.ico"> +<title>I had to learn Go and Lua the hard way -- Luévano's Blog</title> + <meta name="description" content="Thanks to the issues of a program (mangal) I'm starting to use for my manga media server, I had to learn Go and Lua the hard way so that I can fix it and use it."/> +<link rel="alternate" type="application/rss+xml" href="https://blog.luevano.xyz/rss.xml" title="Luévano's Blog RSS"> + <!-- general style --> + <link rel="stylesheet" type="text/css" href="https://static.luevano.xyz/css/style.css"> + <link rel="stylesheet" type="text/css" href="https://static.luevano.xyz/fork-awesome/css/fork-awesome.min.css"> + <link rel="stylesheet" type="text/css" href="https://static.luevano.xyz/font-awesome/css/all.min.css"> + <!-- theme related --> + <script type="text/javascript" src="https://static.luevano.xyz/scripts/theme.js"></script> + <link id="theme-css" rel="stylesheet" type="text/css" href="https://static.luevano.xyz/css/theme.css"> + <!-- misc functions--> + <script type="text/javascript" src="https://static.luevano.xyz/scripts/return_top.js"></script> + <!-- extra --> + + + + + <!-- og meta --> + <meta property="og:title" content="I had to learn Go and Lua the hard way -- Luévano's Blog"/> + <meta property="og:type" content="article"/> + <meta property="og:url" content="https://blog.luevano.xyz/a/learned_go_and_lua_hard_way.md"/> + <meta property="og:image" content="https://static.luevano.xyz/images/b/default.png"/> + <meta property="og:description" content="Thanks to the issues of a program (mangal) I'm starting to use for my manga media server, I had to learn Go and Lua the hard way so that I can fix it and use it."/> + <meta property="og:locale" content="en"/> + <meta property="og:site_name" content="Luévano's Blog"/> + </head> + + <body> + <header> +<nav> + <ul> + <li> + <a href="https://luevano.xyz/"><i class="fas fa-home" alt="Home"></i><span>Home</span></a> + </li> + + <li> + <a href="https://blog.luevano.xyz/"><i class="fas fa-book-open" alt="Blog"></i><span>Blog</span></a> + </li> + + <li> + <a href="https://art.luevano.xyz/"><i class="fas fa-paint-brush" alt="Art"></i><span>Art</span></a> + </li> + + <li><i class="fab fa-git" alt="Git"></i><span>Git</span> + <ul> + <li><a href="https://git.luevano.xyz/" target="_blank"><i class="fab fa-git-alt" alt="Git-alt"></i></a></li> + + <li><a href="https://github.com/luevano" target="_blank"><i class="fab fa-github" alt="Github"></i></a></li> + + <li><a href="https://gitlab.com/dluevano" target="_blank"><i class="fab fa-gitlab" alt="Gitlab"></i></a></li> + </ul> + </li> + + <li><i class="fas fa-box-open" alt="Stuff"></i><span>Stuff</span> + <ul> + <li><a href="https://gb.luevano.xyz/"><i class="fas fa-gamepad" alt="Gameboy"></i><span>Gameboy</span></a></li> + </ul> + </li> + </ul> +</nav> + +<button class="theme-switcher" onclick="toggleTheme()"><i class="fas fa-moon"></i><i class="fas fa-sun"></i></button> + + </header> + + <main> + <div class="return-top"> + <button class="return-top" onclick="returnTop()" id="returnTopButton"> + <i class="fas fa-arrow-up" alt="Return to top"></i> + </button> + </div> + <h1>I had to learn Go and Lua the hard way</h1> + + <p><mark>TL;DR</mark>: I learned Go and Lua the hard way by forking (for fixing):</p> +<ul> +<li><a href="https://github.com/luevano/mangal">mangal</a>: main manga scraper written in Go.</li> +<li><a href="https://github.com/luevano/mangal-lua-libs">mangal-lua-libs</a>: <a href="https://github.com/yuin/gopher-lua">gopher-lua</a> libraries for mangal.</li> +<li><a href="https://github.com/luevano/mangal-scrapers">mangal-scrapers</a>: custom mangal scrapers written in Lua.</li> +</ul> +<p>In the last couple of days I’ve been setting up a <a href="https://komga.org/">Komga</a> server for manga downloaded using <a href="https://github.com/metafates/mangal">metafates/mangal</a> (upcoming set up entry about it) and everything was fine so far until I tried to download One Piece from <a href="https://mangadex.org/">MangaDex</a> of which <code>mangal</code> has a built-in scraper. Long story short the issue was that MangaDex’s API only allows requesting manga chapters on chunks of 500 and the way that was being handled was completely wrong, specifics can be found on my <a href="https://github.com/luevano/mangal/commit/395bce96e439ee828d0180328a5cf9204bfd818a">commit</a> (and the subsequent minor fix <a href="https://github.com/luevano/mangal/commit/6bf709fe9b333ec9d4375ed80f9b055d07a40c1c">commit</a>).</p> +<p>I tried to do a PR, but the project hasn’t been active since Feb 2023 (same reason I didn’t even try to do PRs on the other repos) so I closed it and will start working on my own <a href="https://github.com/luevano/mangal">fork</a>, probaly just merging everything <a href="https://github.com/Belphemur">Belphemur</a>‘s <a href="https://github.com/Belphemur/mangal">fork</a> has to offer, as he’s been working on <code>mangal</code> actively. I could probably just fork from him and/or just submit PR requests to him, but I think I saw some changes I didn’t really like, will have to look more into it.</p> +<p>Also, while trying to use some of the custom scrapers I ran into issues with the headless chrome explorer implementation where it didn’t close on each manga chapter download, causig my CPU and Mem usage to get maxed out and losing control of the system, so I had to also <a href="https://github.com/luevano/mangal-lua-libs">fork</a> the <a href="https://github.com/metafates/mangal-lua-libs">metafates/mangal-lua-libs</a> and “fixed” (I say fixed because that wasn’t the issue at the end, it was how the custom scrapers where using it, shitty documentation) the issue by adding the <code>browser.Close()</code> function to the <code>headless</code> Lua API (<a href="https://github.com/luevano/mangal-lua-libs/commit/97fba97ab23efe88278dfacbeed2dd83c5472de0">commit</a>) and merged some commits from the original <a href="https://github.com/vadv/gopher-lua-libs">vadv/gopher-lua-libs</a> just to include any features added to the Lua libs needed.</p> +<p>Finally I <a href="https://github.com/luevano/mangal-scrapers">forked</a> the <a href="https://github.com/metafates/mangal-scrapers">metafates/mangal-scrapers</a> (which I actually forked <a href="https://github.com/NotPhantomX">NotPhantomX</a>‘s <a href="https://github.com/NotPhantomX/mangal-scrapers">fork</a> as they had included more scrapers from some pull requests) to be able to have updated custom Lua scrapers (in which I also fixed the <code>headless</code> bullshit) and use them on my <code>mangal</code>.</p> +<p>So, I went into the rabbit hole of manga scrapping because I wanted to set up my Komga server, and more importantly I had to quickly learn Go and Lua (Lua was easier) and I have to say that Go is super convoluted on the module management, all research I did lead me to totally different responses, but it is just because of different Go versions and the year of the responses.</p> + + <div class="page-nav"> + + <span class="index"> + <a href="https://blog.luevano.xyz" alt="Index"> + <i class="fas fa-home" alt="Home"></i> + <span>Index</span> + </a> + </span> + + <span class="previous"> + <a href="https://blog.luevano.xyz/a/al_fin_tengo_fibra_opticona.html" alt="Previous"> + <i class="fas fa-arrow-right" alt="Arrow right"></i> + <span>Previous</span> + </a> + </span> +</div> + + + <hr> + <div class="article-info"> + <p>By David Luévano</p> + <p>Created: Sat, Jun 03, 2023 @ 03:32 UTC</p> + <div class="article-tags"> + <p>Tags: +<a href="https://blog.luevano.xyz/tag/@english.html">english</a>, <a href="https://blog.luevano.xyz/tag/@rant.html">rant</a>, <a href="https://blog.luevano.xyz/tag/@short.html">short</a>, <a href="https://blog.luevano.xyz/tag/@tools.html">tools</a> </p> +</div> + + </div> + </main> + + <footer> +<span> + <i class="fas fa-address-card" alt="Contact"></i> + <a href="https://blog.luevano.xyz/contact.html">Contact</a> +</span> + +<span> + <i class="fas fa-donate" alt="Donate"></i> + <a href="https://blog.luevano.xyz/donate.html">Donate</a> +</span> + +<span> + <i class="fas fa-rss" alt="RSS"></i> + <a target="_blank" href="https://blog.luevano.xyz/rss.xml">RSS</a> +</span> + +<br> +<span class="created-with"> + <i class="fas fa-hammer" alt="Hammer"></i> + Created with <a href="https://github.com/luevano/pyssg">pyssg</a> +</span> + +<br> +<span class="copyright"> + Copyright <i class="far fa-copyright" alt="Copyright"></i> 2023 David Luévano Alvarado +</span> + + </footer> + </body> +</html>
\ No newline at end of file diff --git a/live/blog/index.html b/live/blog/index.html index 81ab48c..551becb 100644 --- a/live/blog/index.html +++ b/live/blog/index.html @@ -88,6 +88,7 @@ <h2>Articles</h2> <ul class="page-list"> <h3>2023</h3> + <li><span class="page-list-item">Jun 03</span> - <a href="https://blog.luevano.xyz/a/learned_go_and_lua_hard_way.html">I had to learn Go and Lua the hard way</a></li> <li><span class="page-list-item">May 09</span> - <a href="https://blog.luevano.xyz/a/al_fin_tengo_fibra_opticona.html">Al fin tengo fibra ópticona</a></li> <li><span class="page-list-item">May 06</span> - <a href="https://blog.luevano.xyz/a/updated_pyssg_pymdvar_and_website.html">Updated pyssg to include pymdvar and the website</a></li> <h3>2022</h3> diff --git a/live/blog/rss.xml b/live/blog/rss.xml index 0dcff76..975bccd 100644 --- a/live/blog/rss.xml +++ b/live/blog/rss.xml @@ -23,6 +23,28 @@ <link>https://blog.luevano.xyz</link> </image> <item> + <title>I had to learn Go and Lua the hard way</title> + <link>https://blog.luevano.xyz/a/learned_go_and_lua_hard_way.html</link> + <guid isPermaLink="true">https://blog.luevano.xyz/a/learned_go_and_lua_hard_way.html</guid> + <pubDate>Sat, 03 Jun 2023 03:32:17 GMT</pubDate> + <category>English</category> + <category>Rant</category> + <category>Short</category> + <category>Tools</category> + <description>Thanks to the issues of a program (mangal) I'm starting to use for my manga media server, I had to learn Go and Lua the hard way so that I can fix it and use it.</description> + <content:encoded><![CDATA[<p><mark>TL;DR</mark>: I learned Go and Lua the hard way by forking (for fixing):</p> +<ul> +<li><a href="https://github.com/luevano/mangal">mangal</a>: main manga scraper written in Go.</li> +<li><a href="https://github.com/luevano/mangal-lua-libs">mangal-lua-libs</a>: <a href="https://github.com/yuin/gopher-lua">gopher-lua</a> libraries for mangal.</li> +<li><a href="https://github.com/luevano/mangal-scrapers">mangal-scrapers</a>: custom mangal scrapers written in Lua.</li> +</ul> +<p>In the last couple of days I’ve been setting up a <a href="https://komga.org/">Komga</a> server for manga downloaded using <a href="https://github.com/metafates/mangal">metafates/mangal</a> (upcoming set up entry about it) and everything was fine so far until I tried to download One Piece from <a href="https://mangadex.org/">MangaDex</a> of which <code>mangal</code> has a built-in scraper. Long story short the issue was that MangaDex’s API only allows requesting manga chapters on chunks of 500 and the way that was being handled was completely wrong, specifics can be found on my <a href="https://github.com/luevano/mangal/commit/395bce96e439ee828d0180328a5cf9204bfd818a">commit</a> (and the subsequent minor fix <a href="https://github.com/luevano/mangal/commit/6bf709fe9b333ec9d4375ed80f9b055d07a40c1c">commit</a>).</p> +<p>I tried to do a PR, but the project hasn’t been active since Feb 2023 (same reason I didn’t even try to do PRs on the other repos) so I closed it and will start working on my own <a href="https://github.com/luevano/mangal">fork</a>, probaly just merging everything <a href="https://github.com/Belphemur">Belphemur</a>‘s <a href="https://github.com/Belphemur/mangal">fork</a> has to offer, as he’s been working on <code>mangal</code> actively. I could probably just fork from him and/or just submit PR requests to him, but I think I saw some changes I didn’t really like, will have to look more into it.</p> +<p>Also, while trying to use some of the custom scrapers I ran into issues with the headless chrome explorer implementation where it didn’t close on each manga chapter download, causig my CPU and Mem usage to get maxed out and losing control of the system, so I had to also <a href="https://github.com/luevano/mangal-lua-libs">fork</a> the <a href="https://github.com/metafates/mangal-lua-libs">metafates/mangal-lua-libs</a> and “fixed” (I say fixed because that wasn’t the issue at the end, it was how the custom scrapers where using it, shitty documentation) the issue by adding the <code>browser.Close()</code> function to the <code>headless</code> Lua API (<a href="https://github.com/luevano/mangal-lua-libs/commit/97fba97ab23efe88278dfacbeed2dd83c5472de0">commit</a>) and merged some commits from the original <a href="https://github.com/vadv/gopher-lua-libs">vadv/gopher-lua-libs</a> just to include any features added to the Lua libs needed.</p> +<p>Finally I <a href="https://github.com/luevano/mangal-scrapers">forked</a> the <a href="https://github.com/metafates/mangal-scrapers">metafates/mangal-scrapers</a> (which I actually forked <a href="https://github.com/NotPhantomX">NotPhantomX</a>‘s <a href="https://github.com/NotPhantomX/mangal-scrapers">fork</a> as they had included more scrapers from some pull requests) to be able to have updated custom Lua scrapers (in which I also fixed the <code>headless</code> bullshit) and use them on my <code>mangal</code>.</p> +<p>So, I went into the rabbit hole of manga scrapping because I wanted to set up my Komga server, and more importantly I had to quickly learn Go and Lua (Lua was easier) and I have to say that Go is super convoluted on the module management, all research I did lead me to totally different responses, but it is just because of different Go versions and the year of the responses.</p>]]></content:encoded> + </item> + <item> <title>Al fin tengo fibra ópticona</title> <link>https://blog.luevano.xyz/a/al_fin_tengo_fibra_opticona.html</link> <guid isPermaLink="true">https://blog.luevano.xyz/a/al_fin_tengo_fibra_opticona.html</guid> diff --git a/live/blog/sitemap.xml b/live/blog/sitemap.xml index 8dc6877..a25e6eb 100644 --- a/live/blog/sitemap.xml +++ b/live/blog/sitemap.xml @@ -46,6 +46,12 @@ </url> <url> + <loc>https://blog.luevano.xyz/a/learned_go_and_lua_hard_way.html</loc> + <lastmod>2023-06-03</lastmod> + <changefreq>weekly</changefreq> + <priority>1.0</priority> + </url> + <url> <loc>https://blog.luevano.xyz/a/al_fin_tengo_fibra_opticona.html</loc> <lastmod>2023-05-09</lastmod> <changefreq>weekly</changefreq> diff --git a/live/blog/tag/@english.html b/live/blog/tag/@english.html index effffe1..f405442 100644 --- a/live/blog/tag/@english.html +++ b/live/blog/tag/@english.html @@ -78,6 +78,7 @@ <h2>Articles</h2> <ul class="page-list"> <h3>2023</h3> + <li><span class="page-list-item">Jun 03</span> - <a href="https://blog.luevano.xyz/a/learned_go_and_lua_hard_way.html">I had to learn Go and Lua the hard way</a></li> <li><span class="page-list-item">May 06</span> - <a href="https://blog.luevano.xyz/a/updated_pyssg_pymdvar_and_website.html">Updated pyssg to include pymdvar and the website</a></li> <h3>2022</h3> <li><span class="page-list-item">Dec 20</span> - <a href="https://blog.luevano.xyz/a/rewrote_pyssg_again.html">Rewrote pyssg again</a></li> diff --git a/live/blog/tag/@rant.html b/live/blog/tag/@rant.html index 6a81798..f915c7c 100644 --- a/live/blog/tag/@rant.html +++ b/live/blog/tag/@rant.html @@ -78,6 +78,7 @@ <h2>Articles</h2> <ul class="page-list"> <h3>2023</h3> + <li><span class="page-list-item">Jun 03</span> - <a href="https://blog.luevano.xyz/a/learned_go_and_lua_hard_way.html">I had to learn Go and Lua the hard way</a></li> <li><span class="page-list-item">May 09</span> - <a href="https://blog.luevano.xyz/a/al_fin_tengo_fibra_opticona.html">Al fin tengo fibra ópticona</a></li> <h3>2022</h3> <li><span class="page-list-item">May 15</span> - <a href="https://blog.luevano.xyz/a/devs_android_me_trozaron.html">Los devs de Android/MIUI me trozaron</a></li> diff --git a/live/blog/tag/@short.html b/live/blog/tag/@short.html index 1fe0106..1e9d3c3 100644 --- a/live/blog/tag/@short.html +++ b/live/blog/tag/@short.html @@ -78,6 +78,7 @@ <h2>Articles</h2> <ul class="page-list"> <h3>2023</h3> + <li><span class="page-list-item">Jun 03</span> - <a href="https://blog.luevano.xyz/a/learned_go_and_lua_hard_way.html">I had to learn Go and Lua the hard way</a></li> <li><span class="page-list-item">May 09</span> - <a href="https://blog.luevano.xyz/a/al_fin_tengo_fibra_opticona.html">Al fin tengo fibra ópticona</a></li> <li><span class="page-list-item">May 06</span> - <a href="https://blog.luevano.xyz/a/updated_pyssg_pymdvar_and_website.html">Updated pyssg to include pymdvar and the website</a></li> <h3>2022</h3> diff --git a/live/blog/tag/@tools.html b/live/blog/tag/@tools.html index 7f177e0..65d22f5 100644 --- a/live/blog/tag/@tools.html +++ b/live/blog/tag/@tools.html @@ -78,6 +78,7 @@ <h2>Articles</h2> <ul class="page-list"> <h3>2023</h3> + <li><span class="page-list-item">Jun 03</span> - <a href="https://blog.luevano.xyz/a/learned_go_and_lua_hard_way.html">I had to learn Go and Lua the hard way</a></li> <li><span class="page-list-item">May 06</span> - <a href="https://blog.luevano.xyz/a/updated_pyssg_pymdvar_and_website.html">Updated pyssg to include pymdvar and the website</a></li> <h3>2022</h3> <li><span class="page-list-item">Dec 20</span> - <a href="https://blog.luevano.xyz/a/rewrote_pyssg_again.html">Rewrote pyssg again</a></li> diff --git a/src/blog/a/updating_creating_entries_titles_to_setup.md b/src/blog/a/updating_creating_entries_titles_to_setup.md new file mode 100644 index 0000000..c726804 --- /dev/null +++ b/src/blog/a/updating_creating_entries_titles_to_setup.md @@ -0,0 +1,11 @@ +title: Updated the how-to entries titles +author: David Luévano +lang: en +summary: Just a small update on the title for some old entries. +tags: short + update + english + +One of the main reasons I started "blogging" was basically just to document how I set up stuff up so I can reference them later in the future if I ever needed to replicate the steps or just to show somebody, and these entries had helped to do so multiple times. I'll keep creating these entries but after a while the *Creating a* title started to feel weird, because we're not *creating* anything really, it is just a set up/configuration/how-to/etc. So I think that using *Set up a* for the titles is better and makes more sense; probably using *How to set up a* is better for the SEO bullshit. + +Anyways, so I'll start using *Set up a* instead of *Creating a* and will retroactively change the titles for these entries (by this entry the change should be applied already). This might impact some RSS feeds as they keep up a cache of the feed and might duplicate the entries, heads up if for some reason somebody is using it. |