Community
    • Login

    Copying content from allmusic

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 223 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • jacobacciJ
      jacobacci
      last edited by jacobacci

      Hi all, this is my first post on this forum, so please bear with me. I cannot post links yet. If you do a google search for ‘allmusic brahms symphony 1’ the correct page will be the first search result.

      I want to copy some information from the composition database of allmusic dot com

      First I want to copy the movement information to a text file. This is trivial, as the source info is already in the right format. I can just do copy pase of the whole block.

      Un poco sostenuto - Allegro
      Andante sostenuto
      Un poco allegretto e grazioso
      Finale. Adagio - Più andante - Allegro non troppo, ma con brio
      

      Then I would like to add sequential number, hyphens and spaces to the beginning of the lines:

       - 1. Un poco sostenuto - Allegro
       - 2. Andante sostenuto
       - 3. Un poco allegretto e grazioso
       - 4. Finale. Adagio - Più andante - Allegro non troppo, ma con brio
      

      Finally I would like to paste the work name to the beginning of each line

      Symphony No. 1 in C minor, Op. 68 - 1. Un poco sostenuto - Allegro
      Symphony No. 1 in C minor, Op. 68 - 2. Andante sostenuto
      Symphony No. 1 in C minor, Op. 68 - 3. Un poco allegretto e grazioso
      Symphony No. 1 in C minor, Op. 68 - 4. Finale. Adagio - Più andante - Allegro non troppo, ma con brio
      

      Could this process be automated, so I can simply do two copy / pastes ?
      Thanks for any help.

      PeterJonesP 1 Reply Last reply Reply Quote 1
      • PeterJonesP
        PeterJones @jacobacci
        last edited by

        @jacobacci said in Copying content from allmusic:

        I cannot post links yet. If you do a google search for ‘allmusic brahms symphony 1’ the correct page will be the first search result.

        I assume you mean https://www.allmusic.com/composition/symphony-no-1-in-c-minor-op-68-mc0002366601#partsMovements – it took me a bit to find that the text you were quoting was in a hidden section of the page.

        Then I would like to add sequential number, hyphens and spaces to the beginning of the lines:

         - 1. Un poco sostenuto - Allegro
         - 2. Andante sostenuto
         - 3. Un poco allegretto e grazioso
         - 4. Finale. Adagio - Più andante - Allegro non troppo, ma con brio
        

        Notepad++'s search/replace doesn’t have a counter. For something as short as the movements in a piece of music, you could just use a Column Mode selection and then Edit > Column Editor (Alt+C) to insert the numbering. (Column Mode selection could either be activated by clicking before the U of the first line and then Alt+Shift+Clicking before the F on the last line; or you could put the typing caret/cursor before the U, then Edit > Begin/End Select in Column Mode (Alt+Shift+B), then move caret/cursor before the F and use the same menu command or shortcut to end it. Actually, I’d probably suggest doing that Column Mode selection, type - . to get the punctuation inserted; then do another Column Mode selection between the space and the . and then use Column Editor to insert the numbers.

        Alternatively, use either the Columns++ or MultiReplace plugins, which have their own extended regex syntax which allows mathematical replacement

        • The Columns++ Plugin-based idea is described in the Columns++ “REPLACE WITH A SIMPLE COUNTER” example – so you could use something like:
          FIND = ^
          REPLACE = - (?=match).
          in the Columns++ Search/Replace feature
        • The MultiReplace plugin-based idea is to use the CNT special-variable described in the Variables Overview , so it would be something like
          FIND = ^
          REPLACE = set("- "..CNT..".")
          in the Columns++ Search/Replace feature

        (Note: I have neither plugin, so I haven’t tried those exact replacements, but it should be something similar to what I’ve shown. Since the owners of both those plugins are often here, they will probably chime in to correct me if I’ve mis-described their replacement syntax)

        Finally I would like to paste the work name to the beginning of each line

        Do another column selection before the - on the lines above, then when you paste in Symphony No. 1 in C minor, Op. 68 , it will put that same text before all the lines.

        Actually, this could be done at the same time as the column-mode - . above, so the simplified sequence would be

        1. Paste the list of movements
        2. Column Mode selection
          1. Paste the “work name”
          2. Type - .
        3. Second Column Mode
          1. Use Column Editor for numbering.

        Or, if you are using one of the two plugins

        1. Paste the list of movements
        2. Use plugin search/replace, where you paste the title when defining your REPLACE WITH string, use something like:
          • Columns++ = PASTEDTITLE - (?=match).
          • MultiReplace = set("PASTEDTITLE - "..CNT..".")

        Could this process be automated, so I can simply do two copy / pastes ?

        “simply” – maybe not by your definition of the word. But that’s about as simple as I could do it

        1 Reply Last reply Reply Quote 4
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors