Skip to main content

BLMARKDOWN

Bear Au Jus Learning Markdown (blmarkdown) is a tool used to help you documenting your learning history in rich and flavored markdown.

Latest Changelog

Release Date : 09/09/2021 v2.3

  • Bug Fixes

Installation

Get latest version of blmarkdown

pip install blmarkdown

How To Use

There is 2 main class is needed to import from blmarkdown

from blmarkdown import Learning, LearningData

Let's create our new learning variable

learning_subject = 'Python Fundamental'
author = 'Haryo Bagas Assyafah'

learning = Learning(learning_subject, author)

Now let's add some data to our learning variable

data = LearningData('Operator')
data.add('Addition')
data.add('Subtraction')
data.add('Multiplication')
data.add('Division')

learning.add(data)
data = LearningData('Control Structure', 'https://github.com/yourLink2')
data.add('Loop', ['For', 'While', 'Do While', 'For Each'])
data.add('Branching', ['If', 'Else If', 'Else'])

learning.add(data)

Let's grab the markdown from learning variable

learning.markdown()

Output

# Learning : Python Fundamental

### Learning 01 - Operator

+ Addition
+ Subtraction
+ Multiplication
+ Division

### Learning 02 - Control Structure
> Shortcut : [Link](https://github.com/yourLink2)

+ Loop
    - For
    - While
    - Do While
    - For Each
+ Branching
    - If
    - Else If
    - Else

**Haryo Bagas Assyafah** @2021 | Generated by [blmarkdown](https://github.com/bearaujus/blmarkdown) v2.3

Congratulations, you just learned how to generate markdown using blmarkdown !

But, those are just some of our features we had. You can look at List Function we had, or some example we just documented here. Happy Reading ! :D

Examples

List Function

A. Class Learning

  • A.1. Constructor
def __init__(self, learning_subject_title, credit_name, footer_data=dict()):
        self.learning_subject_title = learning_subject_title
        self.credit_name = credit_name
        self.footer_data = footer_data
        self.data = list()

Return Type : None

  • A.2. Add LearningData
def add(self, child):
        if isinstance(child, str):
            self.data.append(LearningData(child))
        elif isinstance(child, list):
            tmp = list()
            for data in child:
                if isinstance(data, LearningData):
                    tmp.append(data)
                elif isinstance(data, str):
                    tmp.append(LearningData(data))
                else:
                    raise Exception(
                        "data inside a list must an instance of 'LearningData' or 'str'")
            self.data = self.data + tmp
        elif isinstance(child, LearningData):
            self.data.append(child)
        else:
            raise Exception(
                "'child' must an instance of 'LearningData' or 'str' or 'list'")

Return Type : None

  • A.3. Preview Generated Markdown
# this function will open a new tab in your default browser for viewing the generated markdown
    def preview(self, keep_file_on_complete=False, file_name=''):
        Utill.compile_viewer(self.__generate(), keep_file_on_complete, file_name)

Return Type : None

  • A.4. Save Generated Markdown
def save_markdown(self, file_name=''):
        return Utill.save_markdown(self.__generate(), file_name)

Return Type : String

  • A.5. Get Markdown as Raw String
def get_markdown(self):
        return self.__generate()

Return Type : String

  • A.6. Print Generated Markdown
def markdown(self):
        print(self.__generate())

Return Type : None

  • A.7. Get Added Learning Data by Index
def get_child(self, index):
        return self.data[index]

Return Type : LearningData

  • A.8. Get All Index Data Inside Learning
def index(self):
        if not self.data:
            return {}
        else:
            return {idx: learning_data.title for idx, learning_data in enumerate(self.data)}

Return Type : Dict

B. Class LearningData

  • B.1. Constructor
def __init__(self, title, link=''):
        self.title = title
        self.link = link
        self.learning_data = dict()

Return Type : None

  • B.2. Add Subject
def add(self, subject, subject_data=list()):
        if not isinstance(subject, str):
            raise Exception(
                "'subject' must an instance of class 'string'. Example : Loop")
        elif not isinstance(subject_data, list):
            raise Exception(
                "'subject_data' must an instance of class 'list'. Example : ['For', 'While', 'For Each']")
        else:
            self.learning_data[subject] = subject_data

Return Type : None

  • B.3. Preview Generated Markdown
def preview(self, keep_file_on_complete=False, file_name=''):
        Utill.compile_viewer(self.__generate(),
                             keep_file_on_complete, file_name)

Return Type : None

  • B.4. Save Generated Markdown
def save_markdown(self, file_name=''):
        return Utill.save_markdown(self.__generate(), file_name)

Return Type : String

  • B.5. Get Markdown as Raw String
def get_markdown(self):
        return self.__generate()

Return Type : String

  • B.6. Print Generated Markdown
def markdown(self):
        print(self.__generate())

Return Type : None

Donation

Want bought us some coffee ? :D

  • Bitcoin (BTC)
1CCngoXD8sgbLVatc74fg1z54vbRKxTJn8
  • Ethereum (ETH)
0xec5b67e7ccffa41673e74a64d9f64ea72efc91bc

Credit

Bear Au Jus - ジュースとくま @2021

Metadata

Release files for blmarkdown 2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for blmarkdown 2.3
File Size Uploaded Provenance
blmarkdown-2.3.tar.gz 13.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for blmarkdown 2.3
File Interpreter ABI Platform
blmarkdown-2.3-py3-none-any.whl Python 3 none any Details

Total release size: 27.0 kB

Release files / blmarkdown-2.3.tar.gz

Download URL blmarkdown-2.3.tar.gz
Size 13.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3f1b65181744aa8b344839944895d4e2272b9f645274e12419b0c52064ab46c7
BLAKE2b-256 checksum
How to use checksums
391e879c43982c2dde52e4bed60a713dcd804cae1c3055276ca75e304319eeba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.7.1 requests/2.25.1 setuptools/58.0.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

Release files / blmarkdown-2.3-py3-none-any.whl

Download URL blmarkdown-2.3-py3-none-any.whl
Size 13.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dd7f28b507c1f2321d0ff214bf6b898343e8a439a2d3ad2b539d00b67a44dc07
BLAKE2b-256 checksum
How to use checksums
8d46009e407e41f52ce06d3586144a1b4bd300f3c0e41cc3b4c90a89c7580f68
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.7.1 requests/2.25.1 setuptools/58.0.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

Security for blmarkdown 2.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page