All Projects → artiomn → markdown_articles_tool

artiomn / markdown_articles_tool

Licence: MIT License
Parse markdown article, download images and replace images URL's with local paths

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to markdown articles tool

Mditor
📝 [ M ] arkdown + E [ ditor ] = Mditor
Stars: ✭ 523 (+1313.51%)
Mutual labels:  markdown-parser, markdown-to-html, markdown-converter, md
Flexmark Java
CommonMark/Markdown Java parser with source level AST. CommonMark 0.28, emulation of: pegdown, kramdown, markdown.pl, MultiMarkdown. With HTML to MD, MD to PDF, MD to DOCX conversion modules.
Stars: ✭ 1,673 (+4421.62%)
Mutual labels:  markdown-parser, markdown-to-html, markdown-to-pdf
Mdtool
A tool which can process markdown to HTML
Stars: ✭ 136 (+267.57%)
Mutual labels:  markdown-parser, markdown-to-html, markdown-converter
Markdown
A super fast, highly extensible markdown parser for PHP
Stars: ✭ 945 (+2454.05%)
Mutual labels:  markdown-parser, markdown-to-html, markdown-converter
Markitdown
📱 A React app to preview and edit Markdown✍. You can also export it as HTML.
Stars: ✭ 26 (-29.73%)
Mutual labels:  markdown-parser, markdown-to-html, markdown-converter
Markdown-for-Documentation
Markdown is a HTML compatible language used for Documentation.
Stars: ✭ 14 (-62.16%)
Mutual labels:  markdown-parser, markdown-to-html, md
kMD2PDF
Markdown to PDF conversion library written in Kotlin
Stars: ✭ 14 (-62.16%)
Mutual labels:  markdown-to-html, markdown-converter, markdown-to-pdf
Markdig
A fast, powerful, CommonMark compliant, extensible Markdown processor for .NET
Stars: ✭ 2,730 (+7278.38%)
Mutual labels:  markdown-parser, markdown-to-html
Markdown
A Python implementation of John Gruber’s Markdown with Extension support.
Stars: ✭ 2,725 (+7264.86%)
Mutual labels:  markdown-parser, markdown-to-html
Instagramdownloader
Firefox and Chrome Extention which creates an download button for instagram images and videos and videos
Stars: ✭ 144 (+289.19%)
Mutual labels:  downloader, images
Liked-Saved-Image-Downloader
Save content you enjoy!
Stars: ✭ 80 (+116.22%)
Mutual labels:  downloader, images
Markdown-Crash-Course
Markdown Crash Course. Learn Markdown language on a simple way.
Stars: ✭ 100 (+170.27%)
Mutual labels:  markdown-to-html, md
mdconv
A CLI markdown converter written in Go, that does not depend on LaTeX.
Stars: ✭ 42 (+13.51%)
Mutual labels:  markdown-to-html, markdown-to-pdf
Remarkable
Markdown parser, done right. Commonmark support, extensions, syntax plugins, high speed - all in one. Gulp and metalsmith plugins available. Used by Facebook, Docusaurus and many others! Use https://github.com/breakdance/breakdance for HTML-to-markdown conversion. Use https://github.com/jonschlinkert/markdown-toc to generate a table of contents.
Stars: ✭ 5,252 (+14094.59%)
Mutual labels:  markdown-parser, md
htmlup
light and fast markdown parser
Stars: ✭ 48 (+29.73%)
Mutual labels:  markdown-parser, markdown-to-html
swift-markdownkit
A framework for parsing and transforming text in Markdown format written in Swift 5 for macOS, iOS, and Linux. The supported syntax is based on the CommonMark specification. The framework defines an abstract syntax for Markdown, provides a parser for parsing strings into abstract syntax trees, and comes with generators for creating HTML and attr…
Stars: ✭ 64 (+72.97%)
Mutual labels:  markdown-parser, markdown-converter
Derpibooru Downloader
Downloads images from derpibooru.org using a variety of options
Stars: ✭ 45 (+21.62%)
Mutual labels:  downloader, images
Markdown
📖Clean & Modern MarkDown Generator, 🔌Offline Support and Easy Generation of Markdown ⚡️⚛️ https://github.com/JP1016/Markdown-Electron/releases
Stars: ✭ 170 (+359.46%)
Mutual labels:  markdown-to-html, markdown-converter
Pikax
一个基于requests的P站下载器/ A pixiv downloader based on requests
Stars: ✭ 49 (+32.43%)
Mutual labels:  downloader, images
html2md
helloworld 开发者社区开源的一个轻量级,强大的 html 一键转 md 工具,支持多平台文章一键转换,并保存下载到本地。
Stars: ✭ 332 (+797.3%)
Mutual labels:  markdown-to-html, md

Python package License Stargazers Forks Latest Release

Markdown articles tool 0.1.0

Free command line utility, written in Python, designed to help you manage online and downloaded Markdown documents (e.g., articles). The Markdown Articles Tool is available for macOS, Windows, and Linux.

Tool can be used:

  • To download markdown text with images with images and:
    • Find all links to images, download images and fix links in the document.
    • Can skip broken links.
    • Deduplicate similar images by content hash or using hash as a name.
  • Support images, linked with HTML <img> tag.
  • Support local image files.
  • Convert Markdown documents to:
    • HTML.
    • PDF.
    • Or save in the plain Markdown.

Also, if you want to use separate functions, you can just import the package.

Changes

-D (deduplication) option was changed in the version 0.0.8. Now option is not boolean, it has several values: "disabled", "names_hashing", "content_hash". Long option name was changed too: now it's deduplication-type.

Possibly bugs

Deduplication can replace not similar images. Probability of this is very low, but it's possible. Will be fixed in the next version.

Installation

From the repository

You need Python 3.8+. Run:

git clone "https://github.com/artiomn/markdown_articles_tool"
pip3 install -r markdown_articles_tool/requirements.txt

From the PIP

pip3 install markdown-tool

Usage

Syntax:

usage: markdown_tool.py [-h] [-D {disabled,names_hashing,content_hash}] [-d IMAGES_DIRNAME] [-a] [-s SKIP_LIST]
                        [-i {md,html,md+html,html+md}] [-l] [-n] [-o {md,html,pdf}] [-p IMAGES_PUBLIC_PATH] [-R]
                        [-t DOWNLOADING_TIMEOUT] [-O OUTPUT_PATH] [--verbose] [--version]
                        article_file_path_or_url

Simple script to download images and replace image links in markdown documents.

positional arguments:
  article_file_path_or_url
                        path to the article file in the Markdown format

optional arguments:
  -h, --help            show this help message and exit
  -D {disabled,names_hashing,content_hash}, --deduplication-type {disabled,names_hashing,content_hash}
                        Deduplicate images, using content hash or SHA1(image_name)
  -d IMAGES_DIRNAME, --images-dirname IMAGES_DIRNAME
                        Folder in which to download images (possible variables: $article_name, $time, $date, $dt, $base_url)
  -a, --skip-all-incorrect
                        skip all incorrect images
  -s SKIP_LIST, --skip-list SKIP_LIST
                        skip URL's from the comma-separated list (or file with a leading '@')
  -i {md,html,md+html,html+md}, --input-format {md,html,md+html,html+md}
                        input format
  -l, --process-local-images
                        Process local images
  -n, --replace-image-names
                        Replace image names, using content hash
  -o {md,html,pdf}, --output-format {md,html,pdf}
                        output format
  -p IMAGES_PUBLIC_PATH, --images-public-path IMAGES_PUBLIC_PATH
                        Public path to the folder of downloaded images (possible variables: $article_name, $time, $date, $dt, $base_url)
  -R, --remove-source   Remove or replace source file
  -t DOWNLOADING_TIMEOUT, --downloading-timeout DOWNLOADING_TIMEOUT
                        how many seconds to wait before downloading will be failed
  -O OUTPUT_PATH, --output-path OUTPUT_PATH
                        article output file name
  --verbose, -v         More verbose logging
  --version             return version number

Example 1:

./markdown_tool.py nc-1-zfs/article.md

Example 2:

./markdown_tool.py not-nas/sov/article.md -o html -s "http://www.ossec.net/_images/ossec-arch.jpg" -a

Example 3 (run on a folder):

find content/ -name "*.md" | xargs -n1 ./markdown_tool.py
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].