Merge pull request #11 from catseye/develop-0.11
Develop 0.11
Chris Pressey authored 5 years ago
GitHub committed 5 years ago
0 | 0 |
History of Feedmark
|
1 | 1 |
===================
|
|
2 |
|
|
3 |
0.11
|
|
4 |
----
|
|
5 |
|
|
6 |
* Fixed a bug with `--rewrite-markdown` under Python 3.x.
|
2 | 7 |
|
3 | 8 |
0.10
|
4 | 9 |
----
|
0 | |
Copyright (c)2019 Chris Pressey, Cat's Eye Technologies
|
|
0 |
Copyright (c)2019-2020 Chris Pressey, Cat's Eye Technologies
|
1 | 1 |
|
2 | 2 |
Permission is hereby granted, free of charge, to any person obtaining a
|
3 | 3 |
copy of this software and associated documentation files (the "Software"),
|
0 | 0 |
Feedmark
|
1 | 1 |
========
|
2 | 2 |
|
3 | |
*Version 0.10. Subject to change in backwards-incompatible ways without notice.*
|
|
3 |
*Version 0.11. Subject to change in backwards-incompatible ways without notice.*
|
4 | 4 |
|
5 | 5 |
**Feedmark** is a format for embedding structured data in Markdown files
|
6 | 6 |
in a way which is both human-readable and machine-extractable.
|
|
38 | 38 |
|
39 | 39 |
Or you can install it using `pip`:
|
40 | 40 |
|
41 | |
pip install Feedmark==0.9.2019.1015
|
|
41 |
pip install Feedmark==0.11
|
42 | 42 |
|
43 | 43 |
(Depending on your needs, you may wish to establish a virtual environment
|
44 | 44 |
first. How to do this is outside the scope of this document.)
|
5 | 5 |
|
6 | 6 |
setuptools.setup(
|
7 | 7 |
name='Feedmark',
|
8 | |
version='0.10',
|
|
8 |
version='0.11',
|
9 | 9 |
description='Feedmark, a curation-oriented subset of Markdown, and tools for processing it',
|
10 | 10 |
long_description=long_description,
|
11 | 11 |
long_description_content_type="text/markdown",
|
78 | 78 |
help='Process no more than this many entries when making an Atom or HTML feed'
|
79 | 79 |
)
|
80 | 80 |
|
81 | |
argparser.add_argument('--version', action='version', version="%(prog)s 0.10")
|
|
81 |
argparser.add_argument('--version', action='version', version="%(prog)s 0.11")
|
82 | 82 |
|
83 | 83 |
options = argparser.parse_args(args)
|
84 | 84 |
|
|
217 | 217 |
for document in documents:
|
218 | 218 |
s = feedmark_markdownize(document, schema=schema)
|
219 | 219 |
with open(document.filename, 'w') as f:
|
220 | |
f.write(s.encode('UTF-8'))
|
|
220 |
f.write(s)
|
221 | 221 |
|
222 | 222 |
if options.output_html:
|
223 | 223 |
from feedmark.formats.markdown import feedmark_htmlize
|
40 | 40 |
'https://github.com/catseye/Feedmark/blob/master/eg/Recent%20Llama%20Sightings.md#2-llamas-spotted-near-mall'
|
41 | 41 |
)
|
42 | 42 |
os.unlink('feed.xml')
|
|
43 |
|
|
44 |
def test_rewrite_markdown(self):
|
|
45 |
with open('foo.md', 'w') as f:
|
|
46 |
f.write("""# Document
|
|
47 |
|
|
48 |
### Entry
|
|
49 |
|
|
50 |
Have you heard, [2 Llamas Spotted Near Mall]()?
|
|
51 |
|
|
52 |
[2 Llamas Spotted Near Mall]: TK
|
|
53 |
""")
|
|
54 |
main(["foo.md", "--input-refdex={}/eg/refdex.json".format(self.prevdir), '--rewrite-markdown'])
|
|
55 |
self.assert_file_contains('foo.md', '[2 Llamas Spotted Near Mall]: eg/Recent%20Llama%20Sightings.md#2-llamas-spotted-near-mall')
|
|
56 |
os.unlink('foo.md')
|
43 | 57 |
|
44 | 58 |
|
45 | 59 |
class TestFeedmarkCommandLine(unittest.TestCase):
|