[Markdown Checklist](https://github.com/FND/markdown-checklist)
a [Python Markdown](http://pythonhosted.org/Markdown/) extension for lists of
tasks with checkboxes
inspired by
[GitHub task lists](https://github.com/blog/1375-task-lists-in-gfm-issues-pulls-comments):
* [ ] foo
* [x] bar
* [ ] baz
becomes
<ul>
<li><input type="checkbox" disabled> foo</li>
<li><input type="checkbox" disabled checked> bar</li>
<li><input type="checkbox" disabled> baz</li>
</ul>
* a dash can be used instead of an asterisk for list items
* both upper- and lowercase "x" are accepted to activate checkboxes
Installation
------------
$ pip install markdown-checklist
Usage
-----
import markdown
html = markdown.markdown(source, extensions=['markdown_checklist.extension'])
or
import markdown
from markdown_checklist.extension import ChecklistExtension
html = markdown.markdown(source, extensions=[ChecklistExtension()])
There is also a small JavaScript/jQuery library to make checkboxes interactive:
new Checklists("article", function(checkbox, callback) {
var uri = checkbox.closest("article").find("h1 a").attr("href");
jQuery.get(uri, callback);
}, function(markdown, checkbox, callback) {
var uri = checkbox.closest("article").find("h1 a").attr("href");
jQuery.ajax({
type: "put",
uri: uri,
data: markdown,
success: callback
});
});
See included `checklists.js` for details.
a [Python Markdown](http://pythonhosted.org/Markdown/) extension for lists of
tasks with checkboxes
inspired by
[GitHub task lists](https://github.com/blog/1375-task-lists-in-gfm-issues-pulls-comments):
* [ ] foo
* [x] bar
* [ ] baz
becomes
<ul>
<li><input type="checkbox" disabled> foo</li>
<li><input type="checkbox" disabled checked> bar</li>
<li><input type="checkbox" disabled> baz</li>
</ul>
* a dash can be used instead of an asterisk for list items
* both upper- and lowercase "x" are accepted to activate checkboxes
Installation
------------
$ pip install markdown-checklist
Usage
-----
import markdown
html = markdown.markdown(source, extensions=['markdown_checklist.extension'])
or
import markdown
from markdown_checklist.extension import ChecklistExtension
html = markdown.markdown(source, extensions=[ChecklistExtension()])
There is also a small JavaScript/jQuery library to make checkboxes interactive:
new Checklists("article", function(checkbox, callback) {
var uri = checkbox.closest("article").find("h1 a").attr("href");
jQuery.get(uri, callback);
}, function(markdown, checkbox, callback) {
var uri = checkbox.closest("article").find("h1 a").attr("href");
jQuery.ajax({
type: "put",
uri: uri,
data: markdown,
success: callback
});
});
See included `checklists.js` for details.
Metadata
Release files for markdown-checklist 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| markdown-checklist-0.3.0.tar.gz | 6.0 kB | Details |
Release files / markdown-checklist-0.3.0.tar.gz
| Download URL | markdown-checklist-0.3.0.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5199c57c96cc2752b667674a04275b231942a10a7b754a41e749ceefe7eab860
|
|
BLAKE2b-256 checksum How to use checksums |
dafd07cdc82759c49818365d99157bb6eb9e6df8756abefdbec2c2f314444cc5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |