From: SourceForge.net <no...@so...> - 2012-12-18 08:48:49
|
Feature Requests item #1008553, was opened at 2004-08-13 01:20 Message generated for change (Comment added) made by amake You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=520350&aid=1008553&group_id=68187 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: OmegaT Application Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Maxym Mykhalchuk (mihmax) Assigned to: Nobody/Anonymous (nobody) Summary: Launch an external script from OmegaT Initial Comment: --- Marc Prior <...> wrote: ... I have a small - I hope - feature request. What I am looking for is a more efficient API to OmegaT than the clipboard, so that I can hook up external features in Tcl/Tk to it. Would it be possible to add the following function, perhaps to a non-production version of OmegaT: A menu item and/or keyboard shortcut which when activated: - executes an external (i.e. system) script - writes the current (target text) content of the active segment to an external (plain text UTF-8) file From what little research I've done, this could be done using Java's Runtime.exec() method, but not knowing any Java I can't do it myself. Marc ---------------------------------------------------------------------- Comment By: Aaron Madlon-Kay (amake) Date: 2012-12-18 00:48 Message: The "external command" feature I recently submitted to omegat-developers is quite similar to this RFE. ---------------------------------------------------------------------- Comment By: Didier Briel (didierbr) Date: 2011-07-26 04:31 Message: See also - Running scripts from within OmegaT http://sourceforge.net/support/tracker.php?aid=2818664 Didier ---------------------------------------------------------------------- Comment By: Aaron Madlon-Kay (amake) Date: 2011-02-21 18:03 Message: I would find it very convenient to have the ability to automatically run a script of my choosing when outputting translated files. I would like to be able to specify the command to be run, with the option of passing it 1. the path to my OmegaT project and 2. the source and 3. target languages of the project. ---------------------------------------------------------------------- Comment By: Jean-Christophe Helary (brandelune) Date: 2009-05-22 07:44 Message: I think what could be nice here is a special folder in /preferences/ that OmegaT reads, to generate a menu from the name of the files inside. When the menu items are called, OmegaT launches them if they are executable, or has them opened by the app the OS identifies as the associated application. A nice trick would be to be able to assign shortcuts for any arbitrary item (like "the first of the list, the second of the list) etc... ---------------------------------------------------------------------- Comment By: Didier Briel (didierbr) Date: 2009-02-10 13:26 Message: The second part of the request (write the current target text to an external text file) has been implemented in 2.0. See [1989533]Interface for scripting languages http://sourceforge.net/support/tracker.php?aid=1989533 I change the title to reflect more what is asked: Launch an external script from OmegaT Didier ---------------------------------------------------------------------- Comment By: Henry Pijffers (henry_pijffers) Date: 2006-11-10 06:39 Message: Logged In: YES user_id=545103 Java 1.6 will include a scripting API. It will support JavaScript by default, but can also be used with other scripting languages. The following page describes how scripts can be called from a Java app and vice versa: http://java.sun.com/developer/technicalArticles/J2SE/Desktop/scripting/ The following page lists which languages are currently supported: https://scripting.dev.java.net/ Notable support languages are: Java, JavaScript, BeanShell, Python, Ruby, Scheme, Tcl, Velocity, XPath, XSLT ---------------------------------------------------------------------- Comment By: Jean-Christophe Helary (brandelune) Date: 2005-05-19 04:56 Message: Logged In: YES user_id=915082 my understanding was that beanshell is a Java like interpreted script language. We have python and perl scripts to enhance OmegaT, having a language that directly accesses OmegaT objects would be more practicle. ---------------------------------------------------------------------- Comment By: Maxym Mykhalchuk (mihmax) Date: 2005-05-19 03:05 Message: Logged In: YES user_id=488500 JC, what for? I mean, who will ever you that beanshell...? ---------------------------------------------------------------------- Comment By: Jean-Christophe Helary (brandelune) Date: 2005-05-15 11:21 Message: Logged In: YES user_id=915082 beanshell could be embeded and give access to OmegaT's objects etc... ---------------------------------------------------------------------- Comment By: Maxym Mykhalchuk (mihmax) Date: 2005-05-05 08:07 Message: Logged In: YES user_id=488500 OmegaT now may load filters from plugins. That's some step forward extensibility... (Plugins are pieces of Java code, packed to JAR files) ---------------------------------------------------------------------- Comment By: Maxym Mykhalchuk (mihmax) Date: 2004-10-23 02:28 Message: Logged In: YES user_id=488500 Not present in roadmap: http://sf.net/docman/display_doc.php?docid=25106&group_id=68187 ---------------------------------------------------------------------- Comment By: Maxym Mykhalchuk (mihmax) Date: 2004-08-13 06:28 Message: Logged In: YES user_id=488500 ***************************** Oops! Don't read the previous comment, it should go to another RFE ***************************** ---------------------------------------------------------------------- Comment By: Maxym Mykhalchuk (mihmax) Date: 2004-08-13 06:23 Message: Logged In: YES user_id=488500 Keith wrote: Maxym - I haven't forgotten about writing instructions on how to make a parser (I've started, but as of yet the ramblings don't make any sense). In short, the philosophy behind the parsing mechanism is that a single file stream is used for both reading and writing - this avoids the problem of keeping import/export filters in sync. To make this work, each file stream is parsed as it is read. Non translatable text is immediately diverted to the output file (if in WRITE mode, otherwise it is ignored) and translatable text is sent to the 'processEntry' function. When the filter is in READ mode, processEntry sends the string to the core for processing. in WRITE mode, processEntry looks up the translation of the string and passes it to the open output file stream. The TabFileHandler class provides a pretty straight forward example of this. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=520350&aid=1008553&group_id=68187 |