On Wed, Jan 16, 2013 at 5:06 PM, John Delacour <[email protected]> wrote: > I’m afraid I find AppleScript impossibly verbose for this kind of simple > text munging. I don’t know what your docs look like but, supposing each > link is on a separate line, then the Perl script below, saved as a text > filter, will change all the asterisks to the appropriate number. If not, > then the script can almost certainly be modified to do the job, however the > doc is laid out. This script presumes that the docs have UNIX line endings. > If they don’t then again it can easily be modified. If you post a snippet > from a typical doc then it will only take a few moments to write a working > filter
Thanks, John! I've never learned any perl, so I can't really parse what your script is doing, but it's not doing quite what I need. Take a look at these two files for a before and after view: https://dl.dropbox.com/u/574336/AutoRip-original.md and https://dl.dropbox.com/u/574336/AutoRip-numbered.md Basically, for the first Markdown source/destination pair (the source in the text, the destination with a URL after the paragraph), the asterisks need to be replace by 1, and then for the next pair, 2, and so on, sequentially. cheers... -Adam -- -- You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at <http://groups.google.com/group/bbedit?hl=en> If you have a feature request or would like to report a problem, please email "[email protected]" rather than posting to the group. Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
