GitPedia

Ramile

China software copyright extraction tool - 中国软件著作权代码自动提取工具

From luxel·Updated June 23, 2026·View on GitHub·

_Ramile a handy tool used to automatically extract 3000 lines of source codes from given project/folder, as a requirement of China Software Copyright application process. The goal of Ramile is to save 0.5~1 hour of your time spent on preparing the 60 pages of source code for each Software Copyright submission._ Currently Ramile has below features: The project is written primarily in Python, distributed under the MIT License license, first published in 2017. Key topics include: china, china-software-copyright, copyright.

Ramile

Ramile a handy tool used to automatically extract 3000 lines of source codes from given project/folder, as a requirement of China Software Copyright application process. The goal of Ramile is to save 0.5~1 hour of your time spent on preparing the 60 pages of source code for each Software Copyright submission.
Currently Ramile has below features:

  • Automatically extracting the source code and generating a docx file containing 3000 lines. (You have to manually remove the last few pages of the docx to make it exactly 60 pages, though)
  • Supporting most of the commmon front-end projects: android/ios/web/Wechat mini program, etc
  • Configurable. Just place a .ramileconfig.json under the project root folder. (See "Config" section for details)

Tested under python 3.6.1.

Installation

Right now we can only run Ramile from source code. In the future it may be uploaded to pypi.

To run Ramile source code, clone the repository and install dependencies: pip install -r requirements.txt. Or if in China, mirros could be used pip install -i https://pypi.mirrors.ustc.edu.cn/simple/ -r requirements.txt

Basic Usage

Running from source code:

python ramile-cli.py extract <path to your project root>

When the extraction is completed, a file named extracted_code.docx will be generated under your project root directory, with 3000 lines of code. You just have to open it and remove unnecessary pages to make the document exact 60 pages.

If you want to strictly meet the regulation, you can extract all the lines by append Inf to the command line:

python ramile-cli.py extract <path to your project root> Inf

And then you just have to open it and keep the first 30 pages and the last 30 pages, and remove all the intermediate pages.

Config

Ramile automatically loads the config file .ramileconfig.json from the project root, if it exits. The file should be in json format. Possible config items as below:

KeyDescriptionDefaultExample
ignoreSets the directories/files to be ignored by Ramile. "ignore" paths should be sub directories/files under source_root. Any directories/files starting with any one of the "ignore" items will be ignored. Wildcars are not supported.[]['Pods', 'libs']
source_rootOverwrites the root directory of source codes to avoid Ramile process from the project root.'''app'
filtersSets the exclusive filters (which means, all other extensions will NOT be processed) for file extensions. By default all files will be processed.[]['.js', '.vue']
lines_to_extractSets the total lines to extract30003000

Supported Languages

LanguageExtensions
JavaScript.js, .jsx, .vue, .wpy
Java.java
PHP.php
HTML.html, .htm
CSS.css, .less, .sass
Swift.swift
Objective-C.m

Test:

shell
cd tests pytest

Contributors

Showing top 2 contributors by commit count.

View all contributors on GitHub →

This article is auto-generated from luxel/ramile via the GitHub API.Last fetched: 6/26/2026