Author Topic: Index stuff - EditPad Pro  (Read 315 times)

Mizery Made

  • 'G'
  • **
  • Posts: 184
  • Karma: 133
Index stuff - EditPad Pro
« on: September 30, 2009, 09:26:09 AM »
(Example removed)



... and there you go. No sure there's any software out there with a "sort, but ignore numerical values" option (besides, that would cause trouble because then "2Eleven" would be sorted under E instead of grouped in with numerical values.) I used a combination of RegExp and the Sorting feature in "EditPad Pro." A case of a RegExp Find & Replace with Find value of:

Code: [Select]
(\[url=http://www\.dubcc\.com/forum/index\.php\?topic=[0-9]+\.0\](.+)\[/url\])
and Replace value "\2 ~ \1" and then Replace All. That takes this:

Code: [Select]
[url=http://www.dubcnn.com/connect/index.php?topic=220967.0]Young Jeezy - Trappin Ain't Dead[/url]
[url=http://www.dubcnn.com/connect/index.php?topic=229288.0]YT - Born Inna Babylon[/url]
[url=http://www.dubcnn.com/connect/index.php?topic=226026.0]Yukmouth - The West Coast Don[/url]
[url=http://www.dubcnn.com/connect/index.php?topic=226903.0]Yung Joc - The Grind Flu[/url]

To this:

Code: [Select]
Young Jeezy - Trappin Ain't Dead ~ [url=http://www.dubcnn.com/connect/index.php?topic=220967.0]Young Jeezy - Trappin Ain't Dead[/url]
YT - Born Inna Babylon ~ [url=http://www.dubcnn.com/connect/index.php?topic=229288.0]YT - Born Inna Babylon[/url]
Yukmouth - The West Coast Don ~ [url=http://www.dubcnn.com/connect/index.php?topic=226026.0]Yukmouth - The West Coast Don[/url]
Yung Joc - The Grind Flu ~ [url=http://www.dubcnn.com/connect/index.php?topic=226903.0]Yung Joc - The Grind Flu[/url]

Which gives you the link titles out front, so they'll be sorted before the thread numbers. Select all, use the "Sort Alphabetically A-Z" featured and you've got a correctly sorted list. Clean-up is as simple as a Find value of ".+ ~ " and an empty Replace box. Thus, it simply deletes everything on each line before the " ~ ". Though, a link title with " ~ " in the title would throw a wrench into the work flow.

Anyway... um... yeah...
« Last Edit: March 21, 2010, 02:37:54 PM by Jome »
 

Jome

Re: TO BE ADDED TO INDEX LATER
« Reply #1 on: September 30, 2009, 12:32:47 PM »
Oh shit, you the man! +10  8)

Editpad pro huh, I need to check that out..
 

Mizery Made

  • 'G'
  • **
  • Posts: 184
  • Karma: 133
Re: TO BE ADDED TO INDEX LATER
« Reply #2 on: September 30, 2009, 02:57:02 PM »
The trouble with EditPad Pro is that it's not free. They offer a free version of it, but it has limited features and I'm pretty sure the Sorting one isn't included. However, you can accomplish it with Notepad++ too, and it's completely free. You would just have to copy the list of formated links into it, and then open up the advanced Find/Replace feature ("TextFX -> TextFX Quick -> Find/Replace" or CRTL+R) and then run the same regular expressions I mentioned before. Highlight the list, then use "TextFX -> TextFX Tools -> Sort lines case insensitive (at column)" then run the other regular expression I mentioned to clean the list back up and then you've accomplished the same task for free, haha.

However, a plus to putting out the money for EditPad Pro (or otherwise... using it) would be that it also has a Macro feature, which would allow you to basically record those three steps into a macro, that could then be activated in the future with two simple clicks (or even a hotkey). In fact...

Code: [Select]
[EditPadProMacro]
Caption=Sort DubCC Credits List
ShortCut=0
CommandCount=5
C0=Search.History
C1=Search.ActionReplaceAll
C2=Actions.ActionExtraSort
C3=Search.History
C4=Search.ActionReplaceAll

[EditPadProMacroC0]
SearchText=(\\[url=http://www\\.dubcc\\.com/forum/index\\.php\\?topic=[0-9]+\\.0\\](.+)\\[/url\\])
ReplaceText=\\2 ~ \\1
Regex=1

[EditPadProMacroC3]
SearchText=".+ ~ "
ReplaceText=
Regex=1

If you check out the program and need to do sorting on the list here at times, this would be of use. Just copy the above into a text file, and then save it as "(something).ini" Doesn't really matter what you name it as you won't have to keep it, so long as you know where you save it and it's a ini file. Then, go into EditPad Pro, click on the Macros menu. "Organize Macros..." and then "Import Macro." Point it to the ini file with the above as it's contents and it'll add the macro for you. Then, to sort these formated links in the future, all you would have to do is paste the list of them into EditPad Pro (one link per line, like they're displayed here) and then click "Macros" and then select "Sort DubCC Credits List" and it'll automatically run all three actions for you, resulting in a correctly formated list with very few clicks or work.  ;)

That is, if you check out EditPad Pro and need to worry about sorting a list of links for here more than once every year, haha.
« Last Edit: September 30, 2009, 03:01:49 PM by Mizery Made »
 

Jome

Re: TO BE ADDED TO INDEX LATER
« Reply #3 on: September 30, 2009, 05:03:52 PM »
Installed Editpad Pro and followed your guide, works like a charm, thanks a lot.  :cheers:

This will save me 1-2 hours of tedious sorting every 2-3 months.  :)