Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Readme
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:
<img>
tag.Also, if you want to use separate functions, you can just import the package.
You need Python 3.9+.
Run:
git clone "https://github.com/artiomn/markdown_articles_tool"
pip3 install -r markdown_articles_tool/requirements.txt
pip3 install markdown-tool
Syntax:
markdown_tool [options] <article_file_path_or_url>
options:
-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) (default: disabled)
-d IMAGES_DIRNAME, --images-dirname IMAGES_DIRNAME
Folder in which to download images (possible variables: $article_name, $time, $date, $dt, $base_url) (default: images)
-a, --skip-all-incorrect
skip all incorrect images (default: False)
-E, --download-incorrect-mime
download "images" with unrecognized MIME type (default: False)
-s SKIP_LIST, --skip-list SKIP_LIST
skip URL's from the comma-separated list (or file with a leading '@') (default: None)
-i {md,html,md+html,html+md}, --input-format {md,html,md+html,html+md}
input format (default: md)
-l, --process-local-images
[DEPRECATED] Process local images (default: False)
-n, --replace-image-names
Replace image names, using content hash (default: False)
-o {md,html}, --output-format {md,html}
output format (default: md)
-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)
-P, --prepend-images-with-path
Save relative images paths (default: False)
-R, --remove-source Remove or replace source file (default: False)
-t DOWNLOADING_TIMEOUT, --downloading-timeout DOWNLOADING_TIMEOUT
how many seconds to wait before downloading will be failed (default: -1)
-O OUTPUT_PATH, --output-path OUTPUT_PATH
article output file name or path
--verbose, -v More verbose logging (default: False)
--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
-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
.
-l, --process-local-images
deprecated from the version 0.1.2 and will not work: local images will always be processed.-E
to disable this behaviour).-P, --prepend-images-with-path
changes image output path structure. If this option is enabled,
"remote" image path will be saved in the local directory structure.Tools is a pipeline, which get Markdown form the source and process them, using blocks:
ImageDownloader
download every image.
Inside may be used image deduplicator blocks applied to the image.ArticleProcessor
class is a strategy, applies blocks, based on the parameters (from the CLI, for example).
FAQs
Markdown articles downloader and converter
We found that markdown-tool demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.