ramile icon indicating copy to clipboard operation
ramile copied to clipboard

feat: auto cut the overflow lines and keep only the first 1500 lines (30 pages) and the last 1500 lines (last 30 pages) as per the regulation

Open Jeff-Tian opened this issue 5 years ago • 5 comments

根据《中国著作权法》要求,如果代码超过3000行,word里保留前30页和后30页,每页50行。

这个改动自动完成这件事。

Jeff-Tian avatar May 14 '19 08:05 Jeff-Tian

当有的一行代码在输出到word之后,实际可能会排版成2~3行,所以造成我们输出3000行代码后,实际的word文件排版会超过60页。请问这种情况在当前commit是否能支持?

luxel avatar May 16 '19 05:05 luxel

通过多次试验,将每一行最大长度限制在 60 字符,可以做到。

这个 commit 有一个改动就是限制了每行截取的字符数。 image

我在自己的几个项目中使用过,的确正好60页。

Jeff-Tian avatar May 16 '19 05:05 Jeff-Tian

好的,这个功能可以做成一个可选项不?

luxel avatar May 29 '19 13:05 luxel

目前就是可选项,用原来的命令行参数就行。

如果要激活这个功能,需要在原来的命令行参数基础上多传入一个参数。 这个参数是指定要导出多少行代码,比如传Inf,代表导出所有代码。如果代码量超过3000,就会激活裁剪逻辑。

如果不传,还是原来的逻辑,导出前3000行。

获取 Outlook for Androidhttps://aka.ms/ghei36


From: Luxel Tao [email protected] Sent: Wednesday, May 29, 2019 9:49:40 PM To: luxel/ramile Cc: Jeff; Author Subject: Re: [luxel/ramile] feat: auto cut the overflow lines and keep only the first 1500 lines (30 pages) and the last 1500 lines (last 30 pages) as per the regulation (#4)

好的,这个功能可以做成一个可选项不?

― You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/luxel/ramile/pull/4?email_source=notifications&email_token=AAZWHDADFLV6L2YRWZFZOYDPX2CXJA5CNFSM4HMXTR6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWPMM4Y#issuecomment-496944755, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAZWHDCBWWNKME34M5TH4K3PX2CXJANCNFSM4HMXTR6A.

Jeff-Tian avatar May 30 '19 00:05 Jeff-Tian

更新了 README,对此进行说明:

image

Jeff-Tian avatar May 30 '19 02:05 Jeff-Tian