Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various improvements to muttdown #5

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

GrantEdwards
Copy link

  • Only remove the first occurance of the sigil, and add option to also remove it from plaintext version.

  • Allow main.py to run without installing (useful during development).

  • Add '!p' sigil that just encloses everything in pre /pre tags. Useful when you want to send ascii diagrams to HTML users.

  • Allow user to specify markdown extensions.

  • Return failure if sendmail subprocess fails.

  • Add 'utf8' option to tell muttdown to treat text/plain message as UTF8 when converting.

@@ -153,6 +176,8 @@ def main():

proc = subprocess.Popen(cmd, stdin=subprocess.PIPE, shell=False)
proc.communicate(rebuilt.as_string())
proc.wait()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

communicate waits for the process to end implicitly

return message
except Exception:
except Exception as e:
sys.stderr.write('muttdown: '+str(e))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

newline here perhaps

Copy link
Owner

@Roguelazer Roguelazer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry for the mega slow review; this looks like a great set of changes

can you run through flake8 and clean up style to match PEP8 (you can ignore line length warnings)

@GrantEdwards
Copy link
Author

Thanks,

I'll make the suggested changes, run it through flake8, and submit another pull request.

@Roguelazer
Copy link
Owner

Roguelazer commented May 22, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants