Looking for a glossary split up script

Hello,
I'm a novice to AppleScript and I'm looking for a script that will be useful for me as a translator: a script to split up a glossary with source-side alternatives, separated by semicolons. As a matter of fact I'm not sure whether this is something that can easily be done with AppleScript or better should be handled with Perl or another solution.
This is how the glossary looks (TAB stands for the tabulator character):
Ethanol;Ethylalkohol;Äthanol;Äthylalkohol;Weingeist;Spiritus;Sprit;Alkohol;Hydro xyethanTABEthanol;ethyl alcohol;pure alcohol;beverage alcohol;drinking alcohol;CH3CH2OH;C2H5OH;C2H6O
Quarz;Tiefquarz;α-QuarzTABSiO2;quartz;citrine;rose quartz;smoky quartz;milk quartz;milky quartz
And this is how this UTF-8 text file should be rewritten:
Ethanol TAB Ethanol;ethyl alcohol;pure alcohol;beverage alcohol;drinking alcohol;CH3CH2OH;C2H5OH;C2H6O
Ethylalkohol TAB Ethanol;ethyl alcohol;pure alcohol;beverage alcohol;drinking alcohol;CH3CH2OH;C2H5OH;C2H6O
etc.
Quarz TAB SiO2;quartz;citrine;rose quartz;smoky quartz;milk quartz;milky quartz
Tiefquarz TAB SiO2;quartz;citrine;rose quartz;smoky quartz;milk quartz;milky quartz
α-Quarz TAB SiO2;quartz;citrine;rose quartz;smoky quartz;milk quartz;milky quartz
Thank you for any suggestions!
Hans

Hello Mark,
The script works beautifully. I now have:
α-Quarz TAB SiO2;quartz;citrine;rose quartz;smoky quartz;milk quartz;milky quartz
If I want to split up the right side of the tab too, I could of course use a spreadsheet program and swap the columns. But that is a little clumsy, especially with large glossaries (500,000+ lines).
Would it be possible that you provide a script for 'the right side' too?
So that I'd get:
α-Quarz TAB SiO2
α-Quarz TAB quartz
α-Quarz TAB citrine
α-Quarz TAB rose
etc.
Many thanks in advance!
Hans

Similar Messages

  • Looking for a One to Many script to extend the system partition for Windows 7 machines

    Looking for a One to Many script to extend the system partition for Windows 7 machines

    Pre-written scripts can be found in the repository:
    http://gallery.technet.microsoft.com/scriptcenter
    If you can't find what you need, you can request a script (no idea if anyone ever bothers to fulfill these requests though, I know I don't):
    http://gallery.technet.microsoft.com/scriptcenter/site/requests
    Let us know if you have any specific questions.
    Don't retire TechNet! -
    (Don't give up yet - 12,950+ strong and growing)

  • Looking for an email discussion lists script.

    HI! I am looking for a email discussion lists script that
    works on a windows
    platform. I have looked on Google but only found Mailman
    which is good but
    only works on UNIX/Linux. The other I found has to be
    installed via a
    setup.exe which is only good if you own and have direct
    access to your own
    server.
    Does anyone out there know of a email discussion lists script
    in ASP or PHP
    or similar that uses an ms-access or ms-SQL database and
    works on a windows
    platform?
    Paul

    trlyka wrote:
    I can't, for the life of me, find an email address for order support. Or any other support for that matter.
    I believe the only email support Apple offers is for Photo Services and iTunes Customer Service.

  • Looking for someone to do paid scripting work

    Hey,
    I'm in a bit of a bind with InDesign scripting - I've got a huge amount of it to do in very little time. I've hired someone on Elance who claims to know about Extendscript etc to help me, but I am slightly dubious. I thought coming to the Adobe forums might be a good idea, as you guys will probably know what you are talking about!
    Is there anyone around here offering scripting services for pay? It's quite an interesting project, automating the production of a certain type of book. I am fairly proficient in scripting myself after having written a script to do a similar thing last year, but simply can't deal with the amount of work I have.
    I'm looking for someone who really knows InDesign and scripting inside out and who would be able to advise me on best practice, rather than the current situation where I'm instructing someone fairly unskilled how to do things the way I've just sort of 'worked them out'.
    Apologies if this is in the wrong place; I'm pretty desperate!
    Thanks,
    Dan

    There's a lot of very qualified folks here on this forum.
    The big question is what's the scope of the project as well as time restrains.
    I, for example would not be able to look at any sizeable project for at least a month.
    Give some more details on what's involved, and someone will probably be able to help...
    Harbs

  • Looking for input on korn shell scripts to java programs

    I have a situation where there are several korn shell scripts and some manual processes using ms access to manipulate input files that will be used to pass to an applications command level commands for the purposes of updating the applications database. That being said, I am looking at creating the same as mentioned above in Java instead of ksh scripts. Mainly for the following reasons.
    The vendor is going web based, using a Java enabled web server, so these korn shell scripts if converted to Java could be called from the web jsp pages, etc.
    The other purpose is I see Java as a better tool for parsing the flat files and calling sql commands from the parsed data.
    I admit I am more a Java programmer than a korn shell programmer.
    What thoughts does this group have to using Java or should I polish my korn shell off a bit more?
    Thanks in advance
    Dean-O

    Hi,
    Is possible run Unix script under java application?, how?
    thanks

  • Looking for Help with Active Directory Script to Remove a User from msExchDelegateListLink

    I'm struggling to put together an Active Directory Powershell script that will remove a specific user from the msExchDelegateListLink.
    It looks like Set-AdUser would do the trick. I would want to remove a user in the format of
    {CN=Wood\, Sandy,OU=Networking,OU=IT,DC=my,DC=domain,DC=com}
    Has anyone succeeded in doing this before?
    Orange County District Attorney

    I use this:
    $user = '<user name>'
    $userDN = Get-ADUser $user | select -ExpandProperty DistinguishedName
    $delegates = Get-ADUser $user -Properties msExchDelegateListBL |
    select -ExpandProperty msExchDelegateListBL
    foreach ($delegate in $delegates)
    Set-ADUser $delegate -Remove @{msExchDelegateListLink = "$UserDN"}
    Never quite got around to putting it into a function.
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • Looking for a good page transition script

    Hi;
    I need a cross browser transition to fade a page out and
    redirect to another
    after a given time period.
    Any suggestions ?
    Thanks;
    Pat

    Such things only delay the next page's loading. I don't think
    it's a viable
    plan.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Pat Jones" <[email protected]> wrote in message
    news:fpkqrg$bpt$[email protected]..
    >I understand the reasoning, but the client wants the
    opening page to
    >transition that way. How about a layer that fades out
    that could be
    >synched with the meta tag refresh ?
    >
    > Thanks;
    >
    > Pat
    >
    >
    >
    > "Paul Davis" <[email protected]>
    wrote in message
    > news:fpkmcd$749$[email protected]..
    >> Yes, don't do it.
    >>
    >> As for a page redirect, a meta tag refresh will do
    that.
    >> Page fade, I think IE has some of their own code
    which does something
    >> like that. Here is a link which does something like
    that cross browser
    >> (of course, when it was written, back in NNv4 and
    IEv4 days)
    >>
    http://codingforums.com/archive/index.php?t-77563.html
    >>
    >> But, seriously, don't do it.
    >>
    >> Paul Davis
    >>
    http://www.kaosweaver.com/
    >> Visit us for dozens of useful Dreamweaver
    Extensions.
    >>
    >>
    http://www.communitymx.com/
    >> Partner at Community MX - Extend your knowledge
    >>
    >> Pat Jones wrote:
    >>> Hi;
    >>>
    >>> I need a cross browser transition to fade a page
    out and redirect to
    >>> another after a given time period.
    >>>
    >>> Any suggestions ?
    >>>
    >>> Thanks;
    >>> Pat
    >
    >

  • I blog on TypePad using Word 2007 and documents freeze when I'm looking at them in Windows explorer; why do I get the error message that Mozilla is looking for a script?

    I have now had two error messages - the first one looked for this script: Script: resource://gre/modules/XPCOMUtils.jsm:258. The second one (today) looked for Script: resource://gre/components/nsPrompter.js:68.
    I have reset my word template, also reset word registry for data and options (as per Microsoft's help pages) for both those 'fixes' there was an initial improvement, but the problem happened again after I reposted on my blog today and then went to Windows explorer to view my files. It seems to 'seize' as I select a file, so that the preview does not appear (for up to 15-20mins).
    I see on the internet using the second script as a search just now that one other has had a similar problem and one also since Mozilla 4 upgrade. My problems have also been pretty much since I upgraded.
    It happens (apart from my fixes) every time I go to look at a word document via Windows explorer. Excel files are less affected.
    One web suggestion is to clear the cache, but I am hesitant to lose all my passwords unless I have to.

    I still have the problem although I uninstalled Mozilla (clearing the cache didn't work and neither did Word diagnostics), so have ended up thinking it could be Norton (the manual update worked x1) or Windows. Today I found an answer: disable the preview pane in Windows Explorer - there's a history of problems with this view.

  • Looking for someone to script a Day Planner to a specific size and style.

    Hi,
    Looking for someone to script a year long Day Planner in Indesign CC. I've tried one or two scripts available out there but none seem to be able to accomplish what I need.
    I would envisage the rolling requirements.
    2015
    Day per page
    Set to a specific Design Style
    Fully Editable style hierarchy
    Ability to add in pages without kicking anything out
    Include Month with highlighted day on right hand page only
    Add localised public holidays
    Add another list of 'special dates'
    Fit size 148.5mm W x 210mm H (would be great to have it scaleable but not essential)
    All/any help appreciated. Here's a screen shot of the desired result.

    Hi Jarek,
    Thanks for the response!
    The script needs to create the pages in an Indesign Doc.
    One the pages are created we would be adding in custom pages at beginning and at other periodic stages in the document.
    Let me know if there's anything else you need
    Mark

  • Looking for Script Exchange-2007: Import-Mailbox Calendar Folder on multiple mailboxes {Distribution Group}

    Hi,
    I'm looking for a PowerShell script which will import a Calendar events into student's mailbox (Calendar). Those students are located in a distribution group and I would like to target the distribution group; I'm trying to simulate what I want to achieve
    in the below code example, I would appreciate if anyone jump in and advise.
    $Users = Import-Csv C:\users.csv | ForEach-Object{Get-DistributionGroup -Identity SC-1213} | Import-Mailbox -Identity $Users -PSTFolderPath c:\Calendar.pst -IncludeFolders '\Calendar' -StartDate -EndDate
    Much appreciated..
    Hussain

    The logic doesn't work unless you are using StartDate and EndDate for the period when you change the item.  As I said above, StartDate and EndDate are not the times when the meeting starts and ends - they are the times that the item was either added
    or modified in the mailbox.  Your filter was trying to pull items that were in the future.
    And as I also said above, if you import a modified item, the original is
    not going to be updated.  You will have a duplicate meeting
    on the calendar.  You would have to remove the original
    and import the updated item if this was how you wished to manage the updates.  This is not nearly as effective as
    sending meeting requests and updating those meetings.
    For example, if we do things the way you are doing them, and we add a "Student Appreciation Bonfire" meeting to the calendar for April 12 at "The Quad", we would do the following:
    On February 1, you get information for the meeting that needs to be imported
    You create this new meeting in the PST calendar - "Student Appreciation Bonfire"; Date April 12, start 8:00 AM, end 12:00 noon; Location The Quad
    You import the PST into everyone's calendar
    You receive a note on March 12 saying the venue has changed to The River Beach, so you update this meeting in your PST
    Since there are other calendar items in the PST, you import the update using StartDate of March 12 and EndDate of March 13 - the date that you changed the item, not the date the item occurs
    At this point, all users have two meetings on their calendar - the original and the update
    If, instead of doing it this way, you create a Student Actvities Calendar mailbox, you would handle it this way:
    On February 1, you get information for the meeting that needs to be imported
    You create this new meeting in the Corporate calendar - "Student Appreciation Bonfire"; Date April 12, start 8:00 AM, end 12:00 noon; Location The Quad
    You invite everyone to the meeting
    You receive a note on March 12 saying the venue has changed to The River Beach, so you update this meeting in that calendar and send out the update
    At this point, all users have only the one meeting on their calendar - the update
    Using the PST as the source for the meetings would work only for items that
    will not be changed - holidays are a good example.

  • Looking for a Powershell Script which can put the scom servers in maintenance mode

    Looking for a Powershell Script which can put the scom servers in maintenance mode so that SCOM should not send an alert during planned task.
    Rahul

    1. Provide list of servers line-by-line in C:\ServerList.txt, make sure you provide limited no. of servers, do not exceed 20 - 25 per batch
    2. Save the script with suitable name (test.ps1)
    3. Open PowerShell cmd prompt
    4. Script accepts 3 params - TimeInMinutes, Reason and Comment
    **** Please note, this script will work for SCOM 2012 R2
    param([int32]$TimeMin, [string]$Reason, [string]$Comment)
    try
    $api = new-object -comObject 'MOM.ScriptAPI'
    Import-Module operationsmanager
    New-SCOMManagementGroupConnection
    $Servers = Get-Content "C:\ServerList.txt"
    $Time = (Get-Date).Addminutes($TimeMin)
    Foreach ($Server in $Servers)
    #Get Computer instance
    $ComputerClass = Get-SCOMClass -Name Microsoft.Windows.Computer
    $ComputerClassInstance = Get-SCOMClassInstance  -Class $ComputerClass | Where {$_.DisplayName -eq $Server}
    If ($ComputerClassInstance -ne $Null)
    $HealthServiceWatcherClass = Get-SCOMClass -name:Microsoft.SystemCenter.HealthServiceWatcher
    #Get Health Service Watcher Class instance of the server
    $HSWClass = Get-SCOMClass -Name Microsoft.SystemCenter.HealthServiceWatcher
    $HSWClassIns = Get-SCOMClassInstance  -Class $HSWClass | Where {$_.DisplayName -eq $Server}
    #Starting the maintenance mode
    Start-SCOMMaintenanceMode -Instance $HSWClassIns -EndTime $Time -Reason $Reason -Comment $Comment
    Start-SCOMMaintenanceMode -Instance $ComputerClassInstance -EndTime $Time  -Reason $Reason -Comment $Comment
    Write-Host "Health Service Watcher and Agent server "$Server " kept in maintenance mode"  -foregroundcolor "green"
    $api.LogScriptEvent('MaintenanceModeScript.ps1', 200, 0, "$Server kept in maintenance mode for $TimeMin minutes")
    Else
    Write-Host $Server" not found " -foregroundcolor "red"
    $api.LogScriptEvent('MaintenanceModeScript.ps1', 201, 1, "$Server could not be found in domain")
    Catch [system.exception]
    $api.LogScriptEvent('MaintenanceModeScript.ps1', 201, 1, $_.Exception.Message)
    Faizan

  • Please help! Looking for script to insert current date on page.

    I currently use a Dreamweaver Extension that lets you insert
    current date and time on your web page.
    The problem is, I don't know Javascript and cannot edit the
    Javascript codes to "remove the time"
    I only need the current date that will change every day.
    Do you know where I can get this script, I goggled and got
    several but I'm looking for something authentic.
    Also is it possible to have your page validate when you use
    Javascript embedded in your HTML?
    Thanks everyone,
    Patrick

    quote:
    Originally posted by:
    Newsgroup User
    Webethics wrote:
    > The problem is, I don't know Javascript and cannot edit
    the Javascript codes
    > to "remove the time"
    > I only need the current date that will change every day.
    JavaScript generates the date by using the clock on the
    computer of each
    visitor to your site. If a visitor's clock has the wrong
    date, your site
    will also display the wrong date.
    > Do you know where I can get this script, I goggled and
    got several but I'm
    > looking for something authentic.
    I don't know what you mean by "authentic". Date generation in
    JavaScript
    is one of the most basic features of the language, so if it
    works, it's
    "authentic".
    > Also is it possible to have your page validate when you
    use Javascript
    > embedded in your HTML?
    Yes, but you shouldn't embed JavaScript in XHTML.
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/
    So mr. Powers are there people that use Javascript Date in
    their page?
    Would you recommend it?
    I could use PHP but I don't know PHP,
    How do I come up with the string in this format, say,
    Wednesday, October 29th, 2008 that will change to a new day
    according to the server time and date.
    Thanks so much for your help and I have two of your books! I
    will be taking PHP classes in December.
    Patrick

  • Looking for a more universal scripting language than AppleScript or Automator

    I want to learn a cross-platform/web scripting language to automate tasks, write scripts and with the potential to create programs and web apps.
    I am looking for something that:
    - is not a program with a GUI like Automator, iKey, Quickeys, Maestro... 
    - is more "universal" than Applescript, cross-platform
    - can be used to automate simple tasks in a simple way
    - can also be used to create more complex scripts, web apps and maybe, eventually, programs (with GUI)
    I've read about Javascript, Python, Ruby, PHP, Perl, C+, C++, Java and others, but I really don't know.
    - Java sounds pretty cool, Python too.
    - I'm not crazy about PHP or Perl, with Javascript, but some people swear by it
    - I don't know anything about C+, C++
    Does anyone have any suggestion(s)?  Please let me know if you need any more details.  Thank you.

    C, C++, Objective-C are nor scripting languages and will not help you do web pages. (Don;t know what C+ is).
    Forget Java it has lots of security problems and more and more users are disabling Java in their web browsers because of this. Developing in Java would be, in my opinion, a mistake.
    If you are doing any web works at all you will need to know some Javascript, no way around that.  But Javascript is actually not a bad language
    Note Java and Javascript are two totally separate languages that have nothing in common  but the first 4 letters of their names.
    So you are left with PHP, Perl, Python and Ruby.
    Dismissing PHP and Perl out of hand is a big mistake, They are both major players and you will run into them just about everywhere. If you are looking to do this for possible employment you will need to be familiar with them at least.
    Python and Ruby are both strong languages as well. I don't have a lot of experience with either so I can;t speak to their strengths  but  learnign either would not be a mistake.
    Knowing what your reasons are for asking this, personal use or for employment, might help refine the list some.
    regards
    Message was edited by: Frank Caggiano - Perl is also included in OS X by default. Not sure about PHP but I believe it also is. I agree TextWrangler would be a good editor for this type of work.

  • Looking for a script to automate renaming layer objects, not the layer itself!

    Hey there everyone,
    I was wondering if there is a possibility to create/have a script for an automated renaming of several named layer objects in Indesign (CS6).
    The situation, I'm facing is a document for a templating process with at least 80 layers and sometimes some special elements on each layer. The naming of the layers is kind of repeating for each page that is used. The only difference is some prefix change in the layer name and/or the name of an element itself. My problem is, that I need to rename most of those layers AND elements in a same way and I'm looking for a script that asks me for the name of a layer or element (perfect would be just a part of the name to have multiple steps at once) and I have the chance to type in the desired value. It affects frames, graphical elements and text boxes.
    If anyone has an idea, how to simplify this process I would be very glad to get some informations or advices.
    Thanks in advance
    Ralf

    Here is a more descriptive version of the script above... :)
    # Change "PSDrive" to PS1: (Sitecode)
    CD PS1:
    # Get all CMPackages to $CMPackages_All Variable
    $CMPackages_All = Get-CMPackage
    # Set the DP to use with. You may need to run it again with other DP just in case some Packages are missing...
    $DPName_FQDN = "YourDP.Contoso.com" # Your FQDN DP name to reference from.
    # Set folder to store *.pkgx files
    $FilePath = "E:\_ESD\Prestage\" # FilePath
    # For all CMPackages
    foreach ($obj in $CMPackages_All) {
        $packageType = $obj.PackageType
        $packageID = $obj.PackageID
        $packageVendor = $obj.Manufacturer
        $packageName = $obj.Name
        $packageVersion = $obj.Version
        # Formulate File name based on Vendor Name, version and PackageID
     $FileName = $FilePath + $packageVendor + "_" + $PackageName + "_" + $packageVersion + "_" + $packageID + ".pkgx"
        # Replace space with underscore
        $FileName = $FileName.Replace(" ","_")
        if ($PackageType -eq 0) {
            if (!( Test-Path $FileName)) { # This makes the package to skip if it is already created.
                Write-host "Publishing CMPrestage Content for $PackageID $PackageName to $FileName via $DPName_FQDN ..."
                Publish-CMPrestageContent -PackageID $packageID -DistributionPointName $DPName_FQDN -fileName $FileName -ErrorAction Continue
    YPae

  • Looking for a script to connect bodytext to footnote and cross-references

    Hi,
    Need to do the following:
    I was provided with separate (tagged-text) files: bodytext, (foot)notes and cross-references. Now I am looking for a solution (script?) that can do the following:
    to restore the connection between the body-text, the footnotes and te cross-references after placing these in a document in Indesign.
    The cross-references should appear (in anchored text-frames) in the margin and the notes in a separate frame at the bottom of the page. If possible in the same way as footnotes in Indesign appear, but in a separate frame to be able to do some more formatting than native footnotes would accept.
    I have tested the plugin: Side Heads from InTools, and tis works well with Indesign files tthat contain footnotes. But this doesn't work with separately placed footnotes from a tagged-text-file, as they re not knotted together.
    I can't do any scripting myself.
    I would appreciate any help, and I am looking forward to your response...
    Regards,
    kkingg

    The first thing to do is:
    regexp "match regexp = ([0-9]+)" $_cli_result match count
    if $count eq 0
    exit 0
    end
    The second is a bit more challenging.  I think this will work:
    cli command "show call active voice br"
    foreach line $_cli_result "\n"
    regexp "^([0-9a-zA-Z]+) : " $line match callid
    if $_regexp_result eq 1
      continue
    end
    regexp "^dur 1d" $line
    if $_regexp_result eq 1
      cli command "show call active voice br | section $callid"
      syslog msg "$_cli_result"
    end
    end

Maybe you are looking for