Skip to main content

CPCC Tool.

Project description


Some method for Software copyright application in China, including the generation of source code Word documents, source code statistics, etc.

pip install cpcctool

Example: Generate documentation for the first and last 40 pages of source code

  import uuid
  import os
  from cpcctool import gen_code_docx, docx_first_40_pages, docx_last_40_pages
  src_dirs = [
  dst_file = str(uuid.uuid4()) + ".docx"
  gen_code_docx(src_dirs, dst_file)
  dst_file = os.path.abspath(dst_file)
  docx_first_n_pages(dst_file, r"xxxSystem XXX V2.0.0 Source Code first 40 pages.docx", 40)
  docx_last_n_pages(dst_file, r"xxxSystem XXX V2.0.0 Source Code last 40 pages.docx", 40)

Example: Statistics source code total lines

from cpcctool import count_code_lines
src_dirs = [
cloc_exe = r"F:\workspace\l2m2\cpcc-tool\cloc-1.84.exe"
count = count_code_lines(cloc_exe, src_dirs)

Publish to PyPI

pip install --user --upgrade setuptools wheel twine
python sdist bdist_wheel
python -m twine upload dist/*


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for cpcctool, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size cpcctool-0.0.3-py3-none-any.whl (5.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size cpcctool-0.0.3.tar.gz (3.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page