Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / Program to expand list of entries

Author
Message
Epimetheus
20
Years of Service
User Offline
Joined: 5th Oct 2003
Location: Naples, Florida
Posted: 11th Jan 2015 02:22
I need a simple program that can take a list of text and then duplicate each line to make the list size a number I can set, with each entry expanded evenly to fill the list e.g.

list item 1
list item 2
list item 3

expanded to 9 entries:

list item 1
list item 1
list item 1
list item 2
list item 2
list item 2
list item 3
list item 3
list item 3

it should be able to expand any size of list, is there any off the shelf program that does this, something like a notepad++ plugin, or ultraedit?
Indicium
15
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 11th Jan 2015 05:43
I highly doubt you'll find anything that'll do this for you. It's not really common to need that, I don't see a use case. You could write a simple program to do it for you.
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 11th Jan 2015 08:25
Download DBPro, and use this code:



Thanks for the challenge!

TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 11th Jan 2015 15:05
Or use python:



Note: The above code is insanely hack-ish because I wanted it to be 2 lines. The more readable version:



With command line args:



Usage example:


I like offending people. People who get offended should be offended. -- Linus Torvalds
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 12th Jan 2015 13:01 Edited at: 12th Jan 2015 13:02
Notepad++ does it out of the box, no programming required. You can do this with any search/replace that accepts regex functions:



Quidquid latine dictum sit, altum sonatur

Attachments

Login to view attachments
Dark Java Dude 64
Community Leader
13
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 12th Jan 2015 14:22 Edited at: 12th Jan 2015 14:23
Ugh, I must be tired this morning. I saw that post there, and thought that a separate window had popped up over the forums. I stared at it for a few seconds, and became slightly angry at it. I tried to click on it, but nothing happened. I then realized, it's just an image...

EDIT I also thought this was the Posting Competition.

Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 12th Jan 2015 15:41
Quote: "I tried to click on it, but nothing happened. I then realized, it's just an image..."


That made me laugh because I sometimes do that

Epimetheus
20
Years of Service
User Offline
Joined: 5th Oct 2003
Location: Naples, Florida
Posted: 13th Jan 2015 20:22
Thanks guys, these are all really useful
Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 17th Jan 2015 12:29
Quote: "Ugh, I must be tired this morning. I saw that post there, and thought that a separate window had popped up over the forums. I stared at it for a few seconds, and became slightly angry at it. I tried to click on it, but nothing happened. I then realized, it's just an image...

EDIT I also thought this was the Posting Competition."


LOL HAHAHAHAHAHA this is brilliant ROFL Just imagining you doing that!

Login to post a reply

Server time is: 2024-03-29 06:25:14
Your offset time is: 2024-03-29 06:25:14