Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lqez/slmd
Sort lists in Markdown
https://github.com/lqez/slmd
markdown
Last synced: 19 days ago
JSON representation
Sort lists in Markdown
- Host: GitHub
- URL: https://github.com/lqez/slmd
- Owner: lqez
- License: mit
- Created: 2017-10-20T09:09:21.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2021-12-29T01:36:21.000Z (almost 3 years ago)
- Last Synced: 2024-10-14T14:47:56.344Z (about 1 month ago)
- Topics: markdown
- Language: Python
- Homepage:
- Size: 17.6 KB
- Stars: 18
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE
Awesome Lists containing this project
README
## slmd
[![Build Status](https://travis-ci.org/lqez/slmd.svg?branch=master)](https://travis-ci.org/lqez/slmd)
[![codecov](https://codecov.io/gh/lqez/slmd/branch/master/graph/badge.svg)](https://codecov.io/gh/lqez/slmd)Sort lists in Markdown
### WHAT
Yes, it simply sorts
```
- This
- Gonna
- Be
- Like
- That
```into
```
- Like
- That
- This
- Be
- Gonna
```P R O F I T .
### Installation
```
$ pip install slmd
```### Usage
```
$ slmd [outfile] [-s ORDER_BY ...]- Simply
$ slmd some.md- To file
$ slmd src.md out.md- Sort case-insensitive
$ slmd some.md -i- Sort the first depth by ascending order
$ slmd some.md -s 1- Do not sort the first depth and sort the second depth by descending order
$ slmd some.md -s 0 -1- I'd like to shuffle the second depth only
$ slmd some.md -s 0 2- Just shuffle all randomly
$ slmd somd.md -r- Overwrite
$ slmd somd.md -o- Help?
$ slmd -h
```or use it in Python code
```
from slmd import sort_stringresult = sort_string(some_markdown_string)
```### Exit code
- 0
- Nothing to sort.
- 1
- I sorted something.### Why do I have to use this?
I made it for managing `awesome-blahblah` list. And you can use it when you want to check list items are ordered properly.
### License
MIT (See LICENSE file)