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
飘尘
一心顶礼南无大方广佛华严经,华严海会佛菩萨,十六字洪名法宝
飘尘
Subnet calculator script using python

subnetCalculator Subnet calculator script using python3 Interactive Version Define the subnet variable interactively Use: subnetDict = subnetCalculato

1 Feb 15, 2022
Tool that adds githuh profile views to ur acc

Tool that adds githuh profile views to ur acc

Lamp 2 Nov 28, 2021
dta Convert Dict To Attributes!

dta (Dict to Attributes) dta is very small dict (or json) to attributes converter. It is only have 1 files and applied to every python versions.

Rukchad Wongprayoon 0 Dec 31, 2021
Python package that mirrors the original Nodejs ReplAPI-It.

Python-ReplAPI-It Python package that mirrors the original Nodejs ReplAPI-It. Contributing First fork the repo: $ git clone https://github.com/ReplAPI

The ReplAPI.it Project 10 Jun 05, 2022
ASVspoof 2021 Baseline Systems

ASVspoof 2021 Baseline Systems Baseline systems are grouped by task: Speech Deepfake (DF) Logical Access (LA) Physical Access (PA) Please find more de

91 Dec 28, 2022
A Python script to parse Fortinet products serial numbers, and detect the associated model and version.

ParseFortinetSerialNumber A Python script to parse Fortinet products serial numbers, and detect the associated model and version. Example $ ./ParseFor

Podalirius 10 Oct 28, 2022
Introduction to Databases Coursework 2 (SQL) - dataset generator

Introduction to Databases Coursework 2 (SQL) - dataset generator This is python script generates a text file with insert queries for the schema.sql fi

Javier Bosch 1 Nov 08, 2021
🚀 emojimash 🚀 is a programming language with ALL THE EMOJI

🚀 emojimash 🚀 is a programming language with ALL THE EMOJI

Python Whiz 256 1 Oct 26, 2021
Covid-19-Trends - A project that me and my friends created as the CSC110 Final Project at UofT

Covid-19-Trends Introduction The COVID-19 pandemic has caused severe financial s

1 Jan 07, 2022
Objetivo: de forma colaborativa pasar de nodos de Dynamo a Python.

ITTI_Ed01_De-nodos-a-python ITTI. EXPERT TRAINING EN AUTOMATIZACIÓN DE PROCESOS BIM: OFFICIAL DE AUTODESK. Edición 1 Enlace al Master Enunciado: Traba

1 Jun 06, 2022
One-stop-shop for docs and test coverage of dbt projects.

dbt-coverage One-stop-shop for docs and test coverage of dbt projects. Why do I need something like this? dbt-coverage is to dbt what coverage.py and

Slido 106 Dec 27, 2022
Automation of VASP DFT workflows with ASE - application scripts

This repo contains a library that aims at automatizing some Density Functional Theory (DFT) workflows in VASP by using the ASE toolkit.

Frank Niessen 5 Sep 06, 2022
Socorro is the Mozilla crash ingestion pipeline. It accepts and processes Breakpad-style crash reports. It provides analysis tools.

Socorro Socorro is a Mozilla-centric ingestion pipeline and analysis tools for crash reports using the Breakpad libraries. Support This is a Mozilla-s

Mozilla Services 552 Dec 19, 2022
A pypi package details search python module

A pypi package details search python module

Fayas Noushad 5 Nov 30, 2021
pythonOS: An operating system kernel made in python and assembly

pythonOS An operating system kernel made in python and assembly Wait what? It uses a custom compiler called snek that implements a part of python3.9 (

Abbix 69 Dec 23, 2022
Wrappers around the most common maya.cmds and maya.api use cases

Maya FunctionSet (maya_fn) A package that decompose core maya.cmds and maya.api features to a set of simple functions. Tests The recommended approach

Ryan Porter 9 Mar 12, 2022
Reso is a low-level circuit design language and simulator, inspired by things like Redstone, Conway's Game of Life, and Wireworld.

Reso Reso is a low-level circuit design language and simulator, inspired by things like Redstone, Conway's Game of Life, and Wireworld. What is Reso?

Lynn 287 Nov 26, 2022
《赛马娘》(ウマ娘: Pretty Derby)辅助 🐎🖥 基于 auto-derby 可视化操作/设置 启动器 一键包

ok-derby 《赛马娘》(ウマ娘: Pretty Derby)辅助 🐎 🖥 基于 auto-derby 可视化操作/设置 启动器 一键包 便捷,好用的 auto_derby 管理器! 功能 支持客户端 DMM (前台) 实验性 安卓 ADB 连接(后台)开发基于 1080x1920 分辨率

秋葉あんず 90 Jan 01, 2023
PREFS is a Python library to store and manage preferences and settings.

PREFS PREFS is a Python library to store and manage preferences and settings. PREFS stores a Python dictionary in a total human-readable file, the PRE

Pat 13 May 26, 2022
Improving Representations via Similarities

embetter warning I like to build in public, but please don't expect anything yet. This is alpha stuff! notes Improving Representations via Similaritie

vincent d warmerdam 229 Jan 08, 2023