Command line interface for FLEx

54 views
Skip to first unread message

Hugh Paterson

unread,
Feb 18, 2017, 1:27:15 PM2/18/17
to flex...@googlegroups.com
Just curious,

I am massaging some data via some Command Line tools before it gets to
FLEx. I am wondering if there is a command line interface for FLEx.
This way I could make a copy of my data (back up), then execute a
series of commands (basically a CLI to bulk edit). This way if I goof
I don't have to start over, I can keep working via series of commands.
Something, like teckit, has a series of operations for changes.

all via linux...

- Hugh

Eric Jackson

unread,
Feb 19, 2017, 8:48:21 PM2/19/17
to flex...@googlegroups.com
Hi, Hugh. Are you able to work in Python? If so, are you aware of FlexTools?


This might address what you'd like to do.

--Eric


- Hugh

--
You are subscribed to the publicly accessible group "FLEx list".
Only members can post but anyone can view messages on the website.
To change your status, please write to flex_d...@sil.org.
---
You received this message because you are subscribed to the Google Groups "FLEx list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flex-list+unsubscribe@googlegroups.com.
To post to this group, send email to flex...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flex-list/CAB0NEmybUO5Z_fNkDfHbaHSovHjSOgnd7akm1WBL__W-Rz9QtQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.



--
Eric M. Jackson, Ph.D.        芮建生博士
SIL International in Yunnan 世界少数民族语文研究院(美国)云南代表处

Hugh Paterson

unread,
Feb 20, 2017, 3:06:12 AM2/20/17
to flex...@googlegroups.com
I was under the impression that FLExTools was a windows only implementation. I am on linux.

- Hugh

Hugh Paterson

unread,
Feb 20, 2017, 3:15:22 AM2/20/17
to flex...@googlegroups.com
@Eric,

Also am I correct to understand that the software is not actually on github? It appears to only be a wiki about the software.

Jim Kornelsen

unread,
Feb 20, 2017, 11:04:14 AM2/20/17
to flex...@googlegroups.com
The FDO (FieldWorks Data Object) layer can be connected on Windows.  I have not tried it on Linux, but perhaps it could be done with Mono (maybe MonoDevelop would help).  My C# code starts like this:

    using SIL.FieldWorks.FDO;
    using SIL.FieldWorks.FDO.LangProj;

    SIL.FieldWorks.FDO.FdoCache cache = FdoCache.Create("Irula NT");
    ILangProject lp = cache.LangProject;
    SIL.FieldWorks.Common.Utils.Set<NamedWritingSystem> wss = lp.GetActiveNamedWritingSystems();


Another approach I tried once is to connect directly to Flex's underlying database using SQL.  However I have been warned that this is a bad idea, because it bypasses constraints designed to keep the data consistent.

In the end, the approach that worked best for me was to modify XML files.  For example, unzip a .fwbackup file.  I used a combination of scripts and manual editing with a text editor.  Be aware that what you need to modify may have pieces in several different locations in the XML file.

-Jim K

Andy Black

unread,
Feb 20, 2017, 11:12:42 AM2/20/17
to flex...@googlegroups.com
One possibility would be to write XSLT transforms and apply them to the
fwdata file. It would be non-trivial, though.

--Andy

>
> - Hugh
>

Eric Jackson

unread,
Feb 20, 2017, 8:47:41 PM2/20/17
to flex...@googlegroups.com
Hmmm... I'm on Linux, too, but I assumed (yes, I know the dangers of assumption) that since FLExTools was a Python-based tool, the modules themselves could be used in Python on Linux, as well. I haven't tried to use it myself yet, though, so I could be wrong; and in fact, I see now that Craig lists Windows as a system requirement. I'm not sure if that's because of the UI, or because the modules themselves are Windows-specific. Craig must be on this list, though, and he would be the authority, I suppose. 

As for getting FLExTools, it doesn't appear to be in a git repository, but there is a link from the GitHub Setup page to a Dropbox file that holds the code. If you're not after all able to use the Python modules on Linux, then that's a side point, but there it is, nonetheless.

I hope you're able to find something that will work for you!

--Eric


For more options, visit https://groups.google.com/d/optout.

Hugh Paterson

unread,
Feb 21, 2017, 3:54:20 AM2/21/17
to flex...@googlegroups.com

Craig

unread,
Jul 26, 2017, 1:19:25 AM7/26/17
to flex...@googlegroups.com
Hi,

Sorry I don't have time to watch the Flex list much these days.

As explained in that thread FLExTools requires .NET, which means
Windows. It does not support the Linux version of Fieldworks. It would
be good to investigate what that would involve.

Secondly, I'd like to get the code itself on github, but that again, is
a project for another date when I have time to dig into that; or if
someone volunteered to help...

Craig.

On 21/02/2017 4:53 PM, Hugh Paterson wrote:
> Yea, see this thread:
> https://groups.google.com/d/msgid/flex-list/606792fa-d7c6-4cf1-8eb6-2478ee3484a5%40googlegroups.com?utm_medium=email&utm_source=footer
>
> On Tue, Feb 21, 2017 at 2:47 AM, Eric Jackson <eric_j...@sil.org
> <mailto:eric_j...@sil.org>> wrote:
>
> Hmmm... I'm on Linux, too, but I /assumed/ (yes, I know the
> dangers of assumption) that since FLExTools was a Python-based
> tool, the modules themselves could be used in Python on Linux, as
> well. I haven't tried to use it myself yet, though, so I could be
> wrong; and in fact, I see now that Craig lists Windows as a system
> requirement. I'm not sure if that's because of the UI, or because
> the modules themselves are Windows-specific. Craig must be on this
> list, though, and he would be the authority, I suppose.
>
> As for /getting/ FLExTools, it doesn't appear to be in a git
> repository, but there /is/ a link from the GitHub Setup
> <https://github.com/cdfarrow/FLExTools/wiki#Setup> page to a
> <hugh_p...@sil.org <mailto:hugh_p...@sil.org>>
> wrote:
>
> Just curious,
>
> I am massaging some data via some Command Line
> tools before it gets to
> FLEx. I am wondering if there is a command line
> interface for FLEx.
> This way I could make a copy of my data (back up),
> then execute a
> series of commands (basically a CLI to bulk edit).
> This way if I goof
> I don't have to start over, I can keep working via
> series of commands.
> Something, like teckit, has a series of operations
> for changes.
>
> all via linux...
>
> - Hugh
>
> --
> You are subscribed to the publicly accessible
> group "FLEx list".
> Only members can post but anyone can view messages
> on the website.
> To change your status, please write to
> flex_d...@sil.org <mailto:flex_d...@sil.org>.
> ---
> You received this message because you are
> subscribed to the Google Groups "FLEx list" group.
> To unsubscribe from this group and stop receiving
> emails from it, send an email to
> flex-list+...@googlegroups.com
> <mailto:flex-list%2Bunsu...@googlegroups.com>.
> To post to this group, send email to
> flex...@googlegroups.com
> <mailto:flex...@googlegroups.com>.
> <https://groups.google.com/d/msgid/flex-list/CAB0NEmybUO5Z_fNkDfHbaHSovHjSOgnd7akm1WBL__W-Rz9QtQ%40mail.gmail.com>.
> For more options, visit
> https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
>
>
>
> --
> Eric M. Jackson, Ph.D. 芮建生博士
> SIL International in Yunnan
> 世界少数民族语文研究院(美国)云南代表处
> http://sil.academia.edu/EricJackson/
> <http://sil.academia.edu/EricJackson/>
> --
> You are subscribed to the publicly accessible group
> "FLEx list".
> Only members can post but anyone can view messages on
> the website.
> To change your status, please write to
> flex_d...@sil.org <mailto:flex_d...@sil.org>.
> ---
> You received this message because you are subscribed
> to the Google Groups "FLEx list" group.
> To unsubscribe from this group and stop receiving
> emails from it, send an email to
> flex-list+...@googlegroups.com
> <mailto:flex-list+...@googlegroups.com>.
> To post to this group, send email to
> flex...@googlegroups.com
> <mailto:flex...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/flex-list/CAL_hr4HVAK%3D3_LWxcy9%3DsaOc4atekoYYb2ucgzWrHopzKJ8cYg%40mail.gmail.com
> <https://groups.google.com/d/msgid/flex-list/CAL_hr4HVAK%3D3_LWxcy9%3DsaOc4atekoYYb2ucgzWrHopzKJ8cYg%40mail.gmail.com?utm_medium=email&utm_source=footer>.
> For more options, visit
> https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
>
>
> --
> You are subscribed to the publicly accessible group "FLEx list".
> Only members can post but anyone can view messages on the website.
> To change your status, please write to flex_d...@sil.org
> <mailto:flex_d...@sil.org>.
> ---
> You received this message because you are subscribed to the
> Google Groups "FLEx list" group.
> To unsubscribe from this group and stop receiving emails from
> it, send an email to flex-list+...@googlegroups.com
> <mailto:flex-list+...@googlegroups.com>.
> To post to this group, send email to
> flex...@googlegroups.com <mailto:flex...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/flex-list/CAB0NEmw6KBvqty0ORS%3D6aRFJcoy%2BpuK_E1oy3M3Qi-m5h51pSg%40mail.gmail.com
> <https://groups.google.com/d/msgid/flex-list/CAB0NEmw6KBvqty0ORS%3D6aRFJcoy%2BpuK_E1oy3M3Qi-m5h51pSg%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>
> For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
>
>
>
> --
> Eric M. Jackson, Ph.D. 芮建生博士
> SIL International in Yunnan 世界少数民族语文研究院(美国)云南代表处
> http://sil.academia.edu/EricJackson/
> <http://sil.academia.edu/EricJackson/>
> --
> You are subscribed to the publicly accessible group "FLEx list".
> Only members can post but anyone can view messages on the website.
> To change your status, please write to flex_d...@sil.org
> <mailto:flex_d...@sil.org>.
> ---
> You received this message because you are subscribed to the Google
> Groups "FLEx list" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to flex-list+...@googlegroups.com
> <mailto:flex-list+...@googlegroups.com>.
> To post to this group, send email to flex...@googlegroups.com
> <mailto:flex...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/flex-list/CAL_hr4EkegAdtER9vs0qANvjYOyYiwPJ7Qz5z%2BcbigXUSRQrJA%40mail.gmail.com
> <https://groups.google.com/d/msgid/flex-list/CAL_hr4EkegAdtER9vs0qANvjYOyYiwPJ7Qz5z%2BcbigXUSRQrJA%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>
>
> For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
>
> --
> You are subscribed to the publicly accessible group "FLEx list".
> Only members can post but anyone can view messages on the website.
> To change your status, please write to flex_d...@sil.org.
> ---
> You received this message because you are subscribed to the Google
> Groups "FLEx list" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to flex-list+...@googlegroups.com
> <mailto:flex-list+...@googlegroups.com>.
> To post to this group, send email to flex...@googlegroups.com
> <mailto:flex...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/flex-list/CAB0NEmws1_9T0-6N1cx3tBhNDWod%3DB5TXg6v8NNC9T7hUK0v4A%40mail.gmail.com
> <https://groups.google.com/d/msgid/flex-list/CAB0NEmws1_9T0-6N1cx3tBhNDWod%3DB5TXg6v8NNC9T7hUK0v4A%40mail.gmail.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages