Loading ...
Sorry, an error occurred while loading the content.

Re: [Clip] Moving things around with clips

Expand Messages
  • Alec Burgess
    John Shotsky (jshotsky@comcast.net) wrote (in part) (on 2009-05-04 at ... Question: Are Move Line nnn. and Directions nnn. the actual tags found in the
    Message 1 of 3 , May 4 7:52 PM
    • 0 Attachment
      John Shotsky (jshotsky@...) wrote (in part) (on 2009-05-04 at
      07:58):
      > [[[
      > Recipe Title
      > Move Line 1. Line to be moved after Directions 2.
      >
      > Move Line 2. Another line to be moved after Directions 2.
      > Optional ingredient label.
      > 1 ingredient
      > 2 ingredients
      > 3 ingredients
      > Optional directions label.
      > Directions 1. A whole paragraph.
      >
      > Directions 2. A whole paragraph.
      >
      > ]]]
      >
      > After processing:
      > [[[
      > @@@@@ <identifier that denotes that the file has been processed.
      > Recipe Title
      >
      > 1 ingredient
      > 2 ingredients
      > 3 ingredients
      >
      > Directions 1. A whole paragraph.
      >
      > Directions 2. A whole paragraph.
      >
      > Moved Line 1. Line moved after Directions 2.
      >
      > Moved Line 2. Another line moved after Directions 2.
      > ]]]
      >
      > One way to do it would be to store each item, including the final
      > delimiter into variables, then 'print' them back in
      > place of the original. I envision doing that by creating a final
      > variable that contains the entire recipe in the correct
      > order, then replacing the original recipe with that variable. That's
      > quite a bit past my skill set.
      >
      > Later, I'll extend the solution to more items to move.recipes come in
      > many flavors, I've even seen them with the
      > directions preceding the ingredients. I'll always be able to identify
      > and tag these sections, so a generic a solution
      > should work for any of them.
      >
      > To this point, I have always managed to just tag things so they could
      > be moved by another tool, but in this case, the
      > applicable tool will only accept the recipes if they are in the
      > specified order, so that it can recognize them as
      > recipes. Can anyone help? (I have sample files with real recipes
      > available to work with.).
      >
      Question: Are "Move Line nnn. " and "Directions nnn." the actual tags
      found in the original files to be converted?

      Sounds like an interesting text processing job. If you could put up a
      zip containing two files in
      http://tech.groups.yahoo.com/group/ntb-clips/files/Help_wanted/ showing
      (1) 3 or 4 source recipes (I'm assuming each file has more than one
      recipe based on your previous question?)
      (2) the source file converted to desired output format.

      I'll have a look at it if someone else doesn't beat me to it :-)
      Axel's suggestion sounds like the way I'd approach it too. Another
      approach that might be workable would be to grab each individual recipe
      (stuff between delimiters) - transfer it to new file/buffer, then prefix
      lines so that a standard sort will move the "Move Line nnn." below the
      corresponding Directions nnn." then strip the created prefixes and
      finally move the revised recipe back to original location.

      --
      Regards ... Alec (buralex@gmail & WinLiveMess - alec.m.burgess@skype)




      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.