Skip to topic | Skip to bottom
Home
Main



Create personal sidebar
Main.CodeRepositoryListManagerr1.2 - 31 Aug 2025 - 18:02 - JeremyCothrantopic end

Start of topic | Skip to actions
Being a compulsive list person, I was looking for a way of sorting my lists more automatically by tagging single lines or sections and letting a program sort through and reorganize the list depending on the tags.

This program will take a single file argument and use the following tags to organize the content to a file 'list.out'. Untagged content is left at the top of the file as is. The 'XX' represents a category number either zero '01' or space padded ' 1'. Note to include a space character after the 'XX' as this is truncated from the output list also.

#tags used
>>>>cahXX #category header number XX
>>>catXX #single line category entry
<<<<catXX #section open category entry
>>>> #section close category entry

Change the $cat_total and @list_order to change the total number of categories and the order they are output. Empty categories are not printed.

#sample input file start
>>>>cah01 home
>>>cat01 home
>>>cat01 ====================================
>>>>cah02 pets
>>>cat02 pets
>>>cat02 ====================================
<<<<cat01
get milk
        tomatoes
>>>>
>>>cat02 feed cats
unmarked text
<<<<cat02
feed dogs
        obedience training
>>>>
more unmarked text
>>>cat01 do laundry
#sample input file end
#output file start
unmarked text
more unmarked text
>>>>cah 1 home
>>>>cah 2 pets
<<<<cat 1
home
====================================
get milk
        tomatoes
do laundry
>>>>
<<<<cat 2
pets
====================================
feed cats
feed dogs
        obedience training
>>>>
#output file end

-- JeremyCothran - 30 Aug 2025
to top

I Attachment Action Size Date Who Comment
procList.pl.txt manage 3.4 K 31 Aug 2025 - 18:02 JeremyCothran NA
test.txt manage 0.3 K 30 Aug 2025 - 22:07 JeremyCothran NA

You are here: Main > CodeRepositoryListManager

to top

Copyright © 1999-2008 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding DMCC? Send feedback