Memfis Posted September 22, 2014 Yo, I was wondering, is there some easy way to insert a few blank lines after each X lines in text? Let's say I have:aaa bbb ccc ddd Then I tell the program to instert 2 blank lines after each 2 lines and I get:aaa bbb --- --- ccc ddd --- ---The reason I'm asking is because I broke the upper third of my ebook's screen so I can't read with it anymore. But maybe if I could insert blank lines just at the right places, then I could have the text always appearing at the bottom 2\3rds of the display, which works nicely, and then I could read again. Lol. edit: or maybe it could be possible to edit the css style so that each page would start with a bunch of blank lines? But I dunno how that stuff works. 0 Share this post Link to post
gggmork Posted September 22, 2014 Pretty much any language could do that with a txt file etc. What type of file is it though, if its some proprietary weird file type it would be more difficult probably. Like it used to be hard to deal with gif file formats when that was proprietary. Do you have python 2.x installed? 0 Share this post Link to post
printz Posted September 22, 2014 Can you use Microsoft Word's Page Setup to setup margins for this e-book (you may be able to take screenshots of the pages, if nothing else)? If this is plain text, another way is to learn Python programming… 0 Share this post Link to post
Stygian Posted September 22, 2014 I have a feeling that you could use some kind of CLI text manipulation program like "sed" or "awk" to do this for you, assuming you are using Linux, but it's just a hunch. 0 Share this post Link to post
fraggle Posted September 22, 2014 Correct.awk '{print; if ((FNR % 20) == 0) { printf "\n\n";} }' 2 blank lines after every 20 lines. 0 Share this post Link to post