This repository has been archived by the owner on Oct 8, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:nnadeau/pybotics into release-0.3.2
* 'master' of github.com:nnadeau/pybotics: ignoring args fixing SyntaxError: duplicate argument '_' in function definition format arg shadowed built in name and isn't used; ignoring variable converting short sha to int for PEP440 compliance using travis variables to help versioning debugging travis ci parsing git branch to append commit sha to branch versions when uploading to testPyPI fixing vulture lint fixed return value for pandoc 1.12.2.1 fixing json-object path due to old pandoc version used on old travis ci trusty image debugging travis ci downgraded pandocfilters due to compatibility with Travis CI trusty upgraded travis pandoc command added pandocfilters==1.4.1 to ci requirements added pandoc filter cleaned ci yml updated README allowing test branch to deploy for now attempting master deploy to pypi test server
- Loading branch information
Showing
5 changed files
with
75 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,4 @@ pytest-cov==2.5.1 | |
|
||
# misc | ||
GitPython==2.1.5 | ||
pandocfilters==1.2.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from pandocfilters import toJSONFilter | ||
|
||
|
||
def strip_links(key, value, *_): | ||
# strip readme badges | ||
if key == 'Para': | ||
if value[0]['t'] == 'Link' and value[0]['c'][0][0]['t'] == 'Image': | ||
return [] | ||
|
||
# turn links to text | ||
if key == 'Link': | ||
return value[0] | ||
|
||
# strip raw html, logo, and ruled lines | ||
if key in ['RawBlock', 'HorizontalRule', 'Image']: | ||
return [] | ||
|
||
|
||
if __name__ == "__main__": | ||
toJSONFilter(strip_links) | ||
|
||
# debugging | ||
# with open('README.json') as f: | ||
# doc = json.load(f) | ||
# walk(doc, strip_links, '', '') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters