mirror of
https://github.com/softinio/softinio.com.git
synced 2025-09-05 11:16:41 -07:00
New refreshed blog for 2024 using Zola
This commit is contained in:
parent
a23dd16b89
commit
46c2405d9e
125 changed files with 1356 additions and 1337 deletions
31
content/til/converting-html-to-markdown-using-markdownify.md
Normal file
31
content/til/converting-html-to-markdown-using-markdownify.md
Normal file
|
@ -0,0 +1,31 @@
|
|||
+++
|
||||
title = "Converting HTML to Markdown using Markdownify"
|
||||
date = 2023-12-26
|
||||
|
||||
[taxonomies]
|
||||
tags = ["markdown"]
|
||||
categories = [ "TIL" ]
|
||||
|
||||
[extra]
|
||||
toc = true
|
||||
keywords = ["markdown", "html", "convert", "python", "nix"]
|
||||
+++
|
||||
|
||||
I had some HTML content that I wanted to convert to markdown.
|
||||
|
||||
The simplest tool I found to do this effectively was a python utility called [Markdownify](https://pypi.org/project/markdownify/).
|
||||
|
||||
I used Nix Shell to install it:
|
||||
|
||||
```bash
|
||||
nix-shell -p python311Packages.markdownify
|
||||
```
|
||||
|
||||
And to do the conversion I just did:
|
||||
|
||||
```bash
|
||||
markdownify myfile.html > myfile.md
|
||||
```
|
||||
|
||||
where `myfile.html` is the name of the file I wanted to convert and `myfile.md` in the name of the markdown file it got converted to.
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue