GithubHelp home page GithubHelp logo

ignisda / python-random-markdown-generator Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 8.0 5.84 MB

Python library to generate random markdown text

License: Apache License 2.0

Python 100.00%
django fake fake-data hacktoberfest python test-data testing

python-random-markdown-generator's Introduction

Greetings ๐Ÿ‘‹, I am Diptesh

I love to solve problems with code. I am based in New Delhi, India. You can find out more about me on my website.

Socials

My presence in the FOSS community

IgnisDa GitHub Stats IgnisDa GitHub Stats

Donations

If you like my projects and want to support their development, consider sponsoring me. Every single donation will be appreciated and will boost my motivation to keep on coding in open source ๐Ÿ™ƒ.

Please don't forget to leave me some kind of message (with the donation or as a separate e-mail) to let me know which specific project the donations is for, what you like about it and what I can do to improve it further ๐Ÿ™‚.

python-random-markdown-generator's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

python-random-markdown-generator's Issues

Add new method to MarkdownGenerator called `new_code_block`

This method should be added to mdgen.markdown.MarkdownGenerator.
Here's what the method signature will look like:

def new_code_block(self, code, language='python'):
    pass

So that when the method is called, it will act something like:

>>> m = MarkdownGenerator()
>>> m.new_code_block("import os\nprint(os.cwd())", code="python")
```python
import os
print(os.cwd())
\``` 
>>> print('ok')
ok

(\ added because of escaping issues)

Note: The logic shouldn't be added to MarkdownGenerator directly. Instead a releavant class should be created in mdgen/core/code.py (create if necessary) and then imported from there. See source code to understand what I mean.

Also please make your PR to the dev branch.

Add new method to MarkdownGenerator called `new_blockquote`

This method should be added to mdgen.markdown.MarkdownGenerator.
Here's what the method signature will look like:

def new_blockquote(self, quote: str):
    pass

So that when the method is called, it will act something like:

>>> m = MarkdownGenerator()
>>> m.new_blockquote("Some epic quote by gandhi")
> Some epic quote by gandhi

Note: The logic shouldn't be added to MarkdownGenerator directly. Instead a relevant class should be created in mdgen/core/blockquote.py (create if necessary) and then imported from there. See source code to understand what I mean.

Also please make your PR to the dev branch.

Add checks to Travis configuration file

At the time of writing, the CI tests are run using Travis CI. In .travis.yml and under the script section, you'll notice that coverage run --source mdgen -m pytest is invoked. This is done to ensure that code coverage is picked up by coveralls.io inspite of the testing already being automated using tox. This results in pytest running trice, once for each python interpretor on travis. This is redundant and a waste of machine power and can be fixed quite easily.

What to do: Simple add a conditional in .travis.yml checking if $TRAVIS_PYTHON_VERSION is 3.8.5 and if it is- only then run coverage run --source mdgen -m pytest. Relevant line: https://github.com/IgnisDa/python-random-markdown-generator/blob/dev/.travis.yml#L18

Write examples for flask

I have included a short example of how to use this package with django in docs/example,rst. However I don't know flask but I am sure this package can be used for flask too.

What you need to do: Edit docs/examples.rst and add an example using flask under the Implementation in flask section. You should follow a similar structure as the django example does. The code involving mdgen should be same as the ones in django. Please make sure you add relevant links whenever you use them. The documentation should be short, concise and self explanatory.

Important note: Please make your PR to dev branch. The master branch doesn't accept PRs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.