A module comment generator for python

Overview

Module Comment Generator

The comment style is as a tribute to the comment from the RA .

The comment generator can parse the ast tree from the python script, then extract docstring from classes and functions. The information about user comes from git config. There could be some problems on windows, because it's only tested on arch linux. Issues or PR are welcome.

Usage

Help Info

usage: cmtprinter [-h] [--desc DESC] [--tablechar TABLECHAR] filepath

positional arguments:
  filepath              the target python script path

optional arguments:
  -h, --help            show this help message and exit
  --desc DESC           the module description.
  --tablechar TABLECHAR
                        the char used for table drawing.
  1. Description(desc): the content filled in Description key,default is empty.
  2. Tbla(tablechar): the char used for table drawing, default is #

Examples

$ cmtprinter ./cmtprinter/core.py --desc "The core module for cmtprinter"
###############################################################################
#                              Filename: core.py                              #
#                 Description: The core module for cmtprinter                 #
#                      Created Time: 2021-10-21 14:33:47                      #
#                             Created By: ssfdust                             #
#                  Last Moidified Time: 2021-10-21 14:33:47                   #
#                         Last Moidified By: ssfdust                          #
###############################################################################
# Change Log:                                                                 #
#   - Initilize.                                                              #
#-----------------------------------------------------------------------------#
# Functions:                                                                  #
#   - parse_ast_tree: extract functions and classes from python script.       #
#   - dump_module_nodes: convert the ModuleNodes class into a dictionary,     #
#     which means dumping.                                                    #
#   - print_table: Print the information from the dumped node json.           #
#-----------------------------------------------------------------------------#
# Classes:                                                                    #
#   - DumpedModuleNodes: A typed dict class for dumped ModuleNodes class.     #
#   - ModuleNodes: The data class with parsed ast tree data.                  #
#-----------------------------------------------------------------------------#

$ cmtprinter ./cmtprinter/core.py --desc "The core module for cmtprinter" --tablechar '*'
*******************************************************************************
*                              Filename: core.py                              *
*                 Description: The core module for cmtprinter                 *
*                      Created Time: 2021-10-21 14:33:47                      *
*                             Created By: ssfdust                             *
*                  Last Moidified Time: 2021-10-21 14:33:47                   *
*                         Last Moidified By: ssfdust                          *
*******************************************************************************
* Change Log:                                                                 *
*   - Initilize.                                                              *
*-----------------------------------------------------------------------------*
* Functions:                                                                  *
*   - parse_ast_tree: extract functions and classes from python script.       *
*   - dump_module_nodes: convert the ModuleNodes class into a dictionary,     *
*     which means dumping.                                                    *
*   - print_table: Print the information from the dumped node json.           *
*-----------------------------------------------------------------------------*
* Classes:                                                                    *
*   - DumpedModuleNodes: A typed dict class for dumped ModuleNodes class.     *
*   - ModuleNodes: The data class with parsed ast tree data.                  *
*-----------------------------------------------------------------------------*
Owner
飘尘
一心顶礼南无大方广佛华严经,华严海会佛菩萨,十六字洪名法宝
飘尘
Tc-python - A Python script to receive message from a twitch chat

Twitch-Chat 📜 I did a script in Python to receive messages from a twitch chat.

miyucode 2 May 31, 2022
Nimbus - Open Source Cloud Computing Software - 100% Apache2 licensed

⚠️ The Nimbus infrastructure project is no longer under development. ⚠️ For more information, please read the news announcement. If you are interested

Nimbus 194 Jun 30, 2022
Tools for teachers and students using nng (Natural Number Game)

nngtools Usage Place your nngsave.json to the directory in which you want to extract the level files. Place nngmap.json on the same directory. Run nng

Thanos Tsouanas 1 Dec 12, 2021
a sketch of what a zkvm could look like

We want to build a ZKP that validates an entire EVM block or as much of it as we can efficiently. Its okay to adjust the gas costs for every EVM opcode. Its also to exclude some opcodes for now if th

25 Dec 30, 2022
Just a simple python script to generate graphs of salt state requisites.

saltstatevis Just a simple python script to generate graphs of salt state requisites. Installation Requirements You will need to install graphviz to r

Dwayn Matthies 3 May 04, 2022
Run the Tianxunet software on the Xiaoyao Android simulator

Run the Tianxunet software on the Xiaoyao Android simulator, and automatically fill in the answers of English listening on the premise of having answers

1 Feb 13, 2022
kurwa deska ADB

kurwa-deska-ADB kurwa-deska Запуск Linux -- python3 kurwa_deska.py Termux -- python3 kurwa_deska.py Встановлення cd kurwa_deska ADB і зразу запуск pyt

1 Jan 21, 2022
A nonebot2 plugin, send news information in a picture form.

A nonebot2 plugin, send news information in a picture form.

幼稚园园长 7 Nov 18, 2022
Create a program for generator Truth Table

Python-Truth-Table-Ver-1.0 Create a program for generator Truth Table in here you have to install truth-table-generator module for python modules inst

JehanKandy 10 Jul 13, 2022
An extension for Arma 3 that lets you write extensions in Python 3

An Arma 3 extension that lets you to write python extensions for Arma 3. And it's really simple and straightforward to use!

Lukasz Taczuk 48 Dec 18, 2022
API wrapper for VCS hosting system.

PythonVCS API wrapper for VCS hosting system. Supported platforms Gitea Github, Gitlab, Bitbucket support will not, until that packages is not updated

MisileLaboratory 1 Apr 02, 2022
A community based economy bot with python works only with python 3.7.8 as web3 requires cytoolz

A community based economy bot with python works only with python 3.7.8 as web3 requires cytoolz has some issues building with python 3.10

4 Jan 01, 2022
End-to-End text sumarization, QAs generation using flask.

Help-Me-Read A web application created with Flask + BootStrap + HuggingFace 🤗 to generate summary and question-answer from given input text. It uses

Ankush Kuwar 12 Nov 13, 2022
Expense-manager - Expense manager with python

Expense_manager TO-DO Source extractor: Credit Card, Wallet Destination extracto

1 Feb 13, 2022
🌌 Economics Observatory Visualisation Repository

Economics Observatory Visualisation Repository Website | Visualisations | Data | Here you will find all the data visualisations and infographics attac

Economics Observatory 3 Dec 14, 2022
Minterpy - Multidimensional interpolation in Python.

minterpy is an open-source Python package for a multivariate generalization of the classical Newton and Lagrange interpolation schemes as well as related tasks.

Center for Advanced Systems Understanding 18 Jan 06, 2023
A functional standard library for Python.

Toolz A set of utility functions for iterators, functions, and dictionaries. See the PyToolz documentation at https://toolz.readthedocs.io LICENSE New

4.1k Jan 04, 2023
OCR-ID-Card VietNamese (new id-card)

OCR-ID-Card VietNamese (new id-card) run project: download 2 file weights and pu

12 Jun 15, 2022
Eatlocal - This package helps users solve PyBites code challenges on their local machine

eatlocal This package helps the user solve Pybites code challenges locally. Inst

Russell 0 Jul 25, 2022
This is a Saleae Logic custom high level analyzer that allows you to search and mark specific packets.

SaleaePacketParser This is a Saleae Logic custom high level analyzer that allows you to search and mark specific packets. Field "Search For" is used f

1 Dec 16, 2021