Sorting in Writer

classic Classic list List threaded Threaded
7 messages Options
Pat Brown Pat Brown
Reply | Threaded
Open this post in threaded view
|

Sorting in Writer

I received a document which, essentially is a document of song lyrics.
However, they were typed in at random, as they were received. I now want to
sort the songs by song title and can't figure a way to do this. The format
is the following:
 The song title, the artist, the lyrics. Each line is essentially a new
paragraph so I cannot sort by paragraph. I need some way of marking the
beginning and the ending of each song, having the contents between these
two marks recognised as a unit, and then sorting these units. Does anyone
have any ideas, without having to select each song, cutting it and then
pasting it in its correct position alphabetically

--
To unsubscribe e-mail to: [hidden email]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
steveedmonds steveedmonds
Reply | Threaded
Open this post in threaded view
|

Re: Sorting in Writer

How many songs?
Steve

On 2016-06-01 08:12, Pat Brown wrote:

> I received a document which, essentially is a document of song lyrics.
> However, they were typed in at random, as they were received. I now want to
> sort the songs by song title and can't figure a way to do this. The format
> is the following:
>   The song title, the artist, the lyrics. Each line is essentially a new
> paragraph so I cannot sort by paragraph. I need some way of marking the
> beginning and the ending of each song, having the contents between these
> two marks recognised as a unit, and then sorting these units. Does anyone
> have any ideas, without having to select each song, cutting it and then
> pasting it in its correct position alphabetically
>


--
To unsubscribe e-mail to: [hidden email]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
Piet van Oostrum-2 Piet van Oostrum-2
Reply | Threaded
Open this post in threaded view
|

Re: Sorting in Writer

In reply to this post by Pat Brown
Pat Brown wrote:

 > I received a document which, essentially is a document of song lyrics.
 > However, they were typed in at random, as they were received. I now want to
 > sort the songs by song title and can't figure a way to do this. The format
 > is the following:
 >  The song title, the artist, the lyrics. Each line is essentially a new
 > paragraph so I cannot sort by paragraph. I need some way of marking the
 > beginning and the ending of each song, having the contents between these
 > two marks recognised as a unit, and then sorting these units. Does anyone
 > have any ideas, without having to select each song, cutting it and then
 > pasting it in its correct position alphabetically
 >
Here is a recipe that could help you, but it requires the Alternative Searching extension (aka Alternative Find & Replace)

1. Choose two characters that do not appear in your text. I chose # an §.
2. Mark every song title, except the first one, with # at the beginning of the line.
3. With Alt. Find & replace:
   Search For: \p
   Replace: §
   Check "regular expressions" box
   Replace all
4. With Alt. Find & Replace:
   Search for: §#
   Replace \p
   ("regular expressions" box still checked)
5. Select all text and then Tools > Sort.
6. With Alt. Find & Replace:
   Search for: §
   Replace \p
   ("regular expressions" box still checked)

As far as I know, steps 4 and 6 cannot be done with the regular find and replace as you can't specify a paragraph mark in the replace. At least i don't know how to.

--
Piet van Oostrum <[hidden email]>
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]


--
To unsubscribe e-mail to: [hidden email]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Piet van Oostrum-2 Piet van Oostrum-2
Reply | Threaded
Open this post in threaded view
|

Re: Sorting in Writer

Piet van Oostrum wrote:

 > As far as I know, steps 4 and 6 cannot be done with the regular find and replace as you can't specify a paragraph mark in the replace. At least i don't know how to.

Well, in the meantime I found that \n in the Replace field with the regular Find and Replace represents a paragraph break. In the Search For field $ should be used. The recipe with the regular Find and Replace then becomes:
(all Find/replace with "Regular expressions"" ticked):

1. Choose two characters that do not appear in your text. I chose # an §.
2. Mark every song title, except the first one, with # at the beginning of the line.
3. Find & replace:
   Search For: $
   Replace With: §
   Replace all
4. Find & Replace:
   Search for: §#
   Replace With: \n
5. Select all text and then Tools > Sort.
6. Find & Replace:
   Search for: §
   Replace with: \n
--
Piet van Oostrum <[hidden email]>
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]


--
To unsubscribe e-mail to: [hidden email]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

snowshed snowshed
Reply | Threaded
Open this post in threaded view
|

Re: Sorting in Writer

In reply to this post by Pat Brown
On 5/31/16 2:12 PM, Pat Brown wrote:

> I received a document which, essentially is a document of song lyrics.
> However, they were typed in at random, as they were received. I now want to
> sort the songs by song title and can't figure a way to do this. The format
> is the following:
>  The song title, the artist, the lyrics. Each line is essentially a new
> paragraph so I cannot sort by paragraph. I need some way of marking the
> beginning and the ending of each song, having the contents between these
> two marks recognised as a unit, and then sorting these units. Does anyone
> have any ideas, without having to select each song, cutting it and then
> pasting it in its correct position alphabetically

I've got a thought of what might work, but I'd need to see some of the
data first.

Do you have any way of providing a portion of the doc for everyone to view?


--
Ken
Mac OS X 10.8.5
Firefox 44.0
Thunderbird 38.0.1
"My brain is like lightning, a quick flash
      and it's gone!"


--
To unsubscribe e-mail to: [hidden email]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
anne-ology anne-ology
Reply | Threaded
Open this post in threaded view
|

Re: Sorting in Writer

In reply to this post by Pat Brown
       Well, I've done this for any number of lists; sorted in various ways
...
          once it's done, it's much easier to locate what you have & much
easier to maintain the list.

       The manual method is somewhat quicker if you use (1) the 'find' to
sort;
          (2) maybe doing a section at a time.

       There are numerous programs that supposedly will do this for you;
           how they operate or how they would know where to place what, I
haven't the foggiest ...
          some can be located through Gizmo's
http://www.techsupportalert.com/

       Hoping this helps,



From: Pat Brown <[hidden email]>
Date: Tue, May 31, 2016 at 3:12 PM
Subject: [libreoffice-users] Sorting in Writer
To: Libre Office <[hidden email]>


I received a document which, essentially is a document of song lyrics.
However, they were typed in at random, as they were received. I now want to
sort the songs by song title and can't figure a way to do this. The format
is the following:
 The song title, the artist, the lyrics. Each line is essentially a new
paragraph so I cannot sort by paragraph. I need some way of marking the
beginning and the ending of each song, having the contents between these
two marks recognised as a unit, and then sorting these units. Does anyone
have any ideas, without having to select each song, cutting it and then
pasting it in its correct position alphabetically

--
To unsubscribe e-mail to: [hidden email]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
anne-ology anne-ology
Reply | Threaded
Open this post in threaded view
|

Re: Sorting in Writer

In reply to this post by Pat Brown
       So glad you found what will work for you; thanks for letting me know.



From: Pat Brown <[hidden email]>
Date: Thu, Jun 2, 2016 at 7:57 PM
Subject: Re: [libreoffice-users] Sorting in Writer
To: anne-ology <[hidden email]>


Thanks for this. What Piet showed me was like running a macro but manually,
step by step. It worked fine for what I wanted but I think I will write and
save a macro to automate the process in the future. What he suggested was
really logical once I started to think it through



On 3 June 2016 at 02:33, anne-ology <[hidden email]> wrote:

       Well, I've done this for any number of lists; sorted in various ways

> ...
>           once it's done, it's much easier to locate what you have & much
> easier to maintain the list.
>
>        The manual method is somewhat quicker if you use (1) the 'find' to
> sort;
>           (2) maybe doing a section at a time.
>
>        There are numerous programs that supposedly will do this for you;
>            how they operate or how they would know where to place what, I
> haven't the foggiest ...
>           some can be located through Gizmo's
> http://www.techsupportalert.com/
>
>        Hoping this helps,
>
>
>
> From: Pat Brown <[hidden email]>
> Date: Tue, May 31, 2016 at 3:12 PM
> Subject: [libreoffice-users] Sorting in Writer
> To: Libre Office <[hidden email]>
>
>
> I received a document which, essentially is a document of song lyrics.
> However, they were typed in at random, as they were received. I now want to
> sort the songs by song title and can't figure a way to do this. The format
> is the following:
>  The song title, the artist, the lyrics. Each line is essentially a new
> paragraph so I cannot sort by paragraph. I need some way of marking the
> beginning and the ending of each song, having the contents between these
> two marks recognised as a unit, and then sorting these units. Does anyone
> have any ideas, without having to select each song, cutting it and then
> pasting it in its correct position alphabetically
>

--
To unsubscribe e-mail to: [hidden email]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted