Re: [Framers] ExtendScript for save as text, for Git usage ?

2016-06-09 Thread Monique Semp
> Have you found the Track Changes and Track Text Edits features in FM 
> inadequate in some ways?
No, not at all... *when I’m working in FrameMaker*. And I’ve also used the PDF 
compare utility, which has improved immensely over the years.
But I’m wishing to do something totally different, outside of the 
FrameMaker/Acrobat environment: see the diffs of modified files while using a 
Git GUI client to scroll through a bunch of commits. I wish to see the diffs in 
the FrameMaker files in the same way that I see the diffs in source code files. 
But diff programs (whether built into a given Git client such as SourceTree, or 
separate programs such as BeyondCompare that can be integrated into most Git 
clients) cannot do their work on the binary FM files; they operate on 
ascii/text-based files.
And as others have pointed out, there are many ExtendScript snippets “out 
there” that provide good examples of how to perform an action in response to an 
event. So (when I have the time) I can adapt those scripts to save a file as 
text (the action) whenever a FM file is saved (the event).
Thanks everyone for the big MIF education; whenever I get around to doing this 
(likely not for at least several weeks), I’ll post the results.
-Monique
___

This message is from the Framers mailing list

Send messages to framers@lists.frameusers.com
Visit the list's homepage at  http://www.frameusers.com
Archives located at http://www.mail-archive.com/framers%40lists.frameusers.com/
Subscribe and unsubscribe at 
http://lists.frameusers.com/listinfo.cgi/framers-frameusers.com
Send administrative questions to listad...@frameusers.com

Re: [Framers] ExtendScript for save as text, for Git usage ?

2016-06-09 Thread Chris Despopoulos
Coming in late, but I want to chime in on MIF.  As I recall, MIF also includes 
object IDs, and they get generated every time you open a file.  Note that each 
object in your document has two IDs...  The ObjectID, which is what you usually 
use to access the object in a script or the FDK, and the Unique ID.  The Unique 
ID persists across saves and opens.  But since MIF includes the Object IDs, you 
will never have a DIFF that shows two versions of the file being the same.  

MIF is essentially (or WAS at any rate) a text representation of the binary 
file format.  Neither MIF nor binary are particularly friendly.  
In the old days (before Tables, I think) Frame Technology supported a format 
called Maker Markup Language (MML).  This was like a cross between XML and MIF. 
It extracted the flow content and tagged each object with the corresponding 
format from the catalog (plus any evil inline formatting).  I think it also 
described the master/ref pages, but I forget.  The result was a text format 
that is much more friendly than MIF.  I have often thought I would get around 
to recreating MML.  It would be most useful.  For example, you could imagine 
MML to MarkDown filtering, which would be really cool.  If you could keep Maker 
files in text (say templates, catalogs, insets, boilerplate, and other content) 
then you could simplify web-based services to manage your Maker work flow. In 
my spare time... (I experimented with a web app to manage variables...  It was 
pretty cool if I say so myself.)
A new MML initiative would be pretty useful, eh?  Could be unstructured-only, 
since XML renders MML unnecessary...
cud
PSSorry -- I don't have a script handy to save as text.  It should be 
trivial...  Loop the book and save as text.  There might even be samples out 
there that do 90% of it already.

___

This message is from the Framers mailing list

Send messages to framers@lists.frameusers.com
Visit the list's homepage at  http://www.frameusers.com
Archives located at http://www.mail-archive.com/framers%40lists.frameusers.com/
Subscribe and unsubscribe at 
http://lists.frameusers.com/listinfo.cgi/framers-frameusers.com
Send administrative questions to listad...@frameusers.com

Re: [Framers] ExtendScript for save as text, for Git usage ?

2016-06-08 Thread Peter Gold
In the days of WebWorks, IIRC, there was a feature or add-on that enabled
something like being able to comment FM files, that had been converted to
HTML, and perhaps also make changes to the content, then round-trip those
changed files back to FM. Perhaps I'm only dreaming.

Have you found the Track Changes and Track Text Edits features in FM
inadequate in some ways?

Regards,

Peter
___
Peter Gold


On Wed, Jun 8, 2016 at 10:56 AM, Monique Semp 
wrote:

> Ok, ok—I'll abandon the idea of comparing MIFs. Clearly I didn't realize
> the complexity (or pointlessness) of the effort. My tiny bit of MIF
> knowledge, along with a bunch of unfounded assumptions, led me down the
> wrong path.
>
> But I do like the idea of saving as TXT, which supports what I really
> want: the ability to see what I changed in the actual user instructions.
> All the formatting stuff isn't what I'd want out of a diff. If I've made a
> bunch of formatting changes, they'd be in the templates, and I'd have
> included a relevant comment in the Git commit. And the TXT files seem quite
> small, so not a space hog on the Git server.
>
> So, my request now is whether anyone has an ExtendScript to automatically
> save files as TXT. I'm not sure if the best approach would be to auto-save
> a file as TXT anytime the file's saved as FM (whether explicitly by ctrl-S
> or because I've said Yes to saving when I close a file or a book), to
> auto-save all a book's files whenever I close the book (but sometimes I'd
> have just a file open, such as a Text Inset file), or what?
>
> Thanks for the education,
> -Monique
>
>
___

This message is from the Framers mailing list

Send messages to framers@lists.frameusers.com
Visit the list's homepage at  http://www.frameusers.com
Archives located at http://www.mail-archive.com/framers%40lists.frameusers.com/
Subscribe and unsubscribe at 
http://lists.frameusers.com/listinfo.cgi/framers-frameusers.com
Send administrative questions to listad...@frameusers.com

Re: [Framers] ExtendScript for save as text, for Git usage ?

2016-06-08 Thread Monique Semp
Ok, ok—I'll abandon the idea of comparing MIFs. Clearly I didn't realize the 
complexity (or pointlessness) of the effort. My tiny bit of MIF knowledge, 
along with a bunch of unfounded assumptions, led me down the wrong path.


But I do like the idea of saving as TXT, which supports what I really want: 
the ability to see what I changed in the actual user instructions. All the 
formatting stuff isn't what I'd want out of a diff. If I've made a bunch of 
formatting changes, they'd be in the templates, and I'd have included a 
relevant comment in the Git commit. And the TXT files seem quite small, so 
not a space hog on the Git server.


So, my request now is whether anyone has an ExtendScript to automatically 
save files as TXT. I'm not sure if the best approach would be to auto-save a 
file as TXT anytime the file's saved as FM (whether explicitly by ctrl-S or 
because I've said Yes to saving when I close a file or a book), to auto-save 
all a book's files whenever I close the book (but sometimes I'd have just a 
file open, such as a Text Inset file), or what?


Thanks for the education,
-Monique


___

This message is from the Framers mailing list

Send messages to framers@lists.frameusers.com
Visit the list's homepage at  http://www.frameusers.com
Archives located at http://www.mail-archive.com/framers%40lists.frameusers.com/
Subscribe and unsubscribe at 
http://lists.frameusers.com/listinfo.cgi/framers-frameusers.com
Send administrative questions to listad...@frameusers.com

Re: [Framers] ExtendScript for save as text, for Git usage ?

2016-06-08 Thread Reng, Dr. Winfried
Hi,

I remember that Jeremy Griffith from Omni Systems (the
developer of Mif2Go) had tried to do that: conversion to
MIF and comparison to previous versions. However, he
was not sucessful. MIF code contains too much formatting
code which is not relevant for the reader.

Maybe you could test an export to Text or HTML instead.

Best regards

Winfried

-Original Message-
From: Framers [mailto:framers-bounces+wreng=tycoint@lists.frameusers.com] 
On Behalf Of Scott Prentice
Sent: Wednesday, June 08, 2016 2:37 AM
To: framers@lists.frameusers.com
Subject: Re: [Framers] ExtendScript for save as text, for Git usage ?

I wouldn't wish that on anyone.

While MIF is a wonderful format for an ASCII description of a FM file,
it's really not intended for human consumption. First off, it's not
linear. Each FM object is defined in a section, and within that section
the objects are declared in reasonably orderly fashion, but it's really
complicated to jump from one object to another (as happens from
paragraphs to tables). Also, within a section, say the main body of
content, you may notice that the strings aren't always complete. You can
have a sentence fragment that ends in the middle of a word .. then
continues in the next block. This makes it really hard to search for
things since they may be split.

What you want is some sort of MIF-normalizer, that can make it more user
friendly. But, I don't think that really exists. There is a tool called
MIF-Muncher 
(https://urldefense.proofpoint.com/v2/url?u=http-3A__www.stc-2Dcarolina.org_MIF-2BMuncher=CwICAg=0YGvTs3tT-VMy8_v51yLDw=pdk93NJbIWwQmLZh1EZCoC4wFNMwWj1dp-sJbkswCLE=BkD7Yk4w5mHjRd2IHGLDpqa2we3r8jWIO3qWOHDuHnQ=mYDUQJGxXmBvjoTPj629pThr5yQ-kj8Fxi1ya1Hcnms=
 ) .. that helps with
scanning for various objects in a MIF .. but I don't know that it'll
work on a modern system. I made a tool that converts MIF into MIFML (an
XML representation of a MIF) and back, but that doesn't make it any
easier to read.

MIFs are great but can also be a very scary place to hang out for much
time.  :o

Cheers,
...scott


On 6/7/16 5:17 PM, Monique Semp wrote:
>> Do you really find it useful to diff MIF files very often?
>
> Well, I haven't done it yet because it'd involve so much extra manual
> work. But what I'd like to be able to do is simply scroll through the
> commit list in my Git client (SourceTree on Windows) and have the
> diffs show automatically, just as they do for source code. And with
> MIF files, that'd be possible.
>
> I have noticed, though, that the MIF files are *much* larger than the
> corresponding FM files (a 197 KB FM file became a 952 KB MIF file!),
> so now that I see this, I might rethink it.
>
> But as one more tool to make it easier to see what's been done to a
> particular file, in a way that's not even possible in the
> FM/FrameMaker view, I'd really like to try it.
>
> -Monique



This e-mail contains privileged and confidential information intended for the 
use of the addressees named above. If you are not the intended recipient of 
this e-mail, you are hereby notified that you must not disseminate, copy or 
take any action in respect of any information contained in it. If you have 
received this e-mail in error, please notify the sender immediately by e-mail 
and immediately destroy this e-mail and its attachments.
___

This message is from the Framers mailing list

Send messages to framers@lists.frameusers.com
Visit the list's homepage at  http://www.frameusers.com
Archives located at http://www.mail-archive.com/framers%40lists.frameusers.com/
Subscribe and unsubscribe at 
http://lists.frameusers.com/listinfo.cgi/framers-frameusers.com
Send administrative questions to listad...@frameusers.com


Re: [Framers] ExtendScript for save as text, for Git usage ?

2016-06-07 Thread Scott Prentice

I wouldn't wish that on anyone.

While MIF is a wonderful format for an ASCII description of a FM file, 
it's really not intended for human consumption. First off, it's not 
linear. Each FM object is defined in a section, and within that section 
the objects are declared in reasonably orderly fashion, but it's really 
complicated to jump from one object to another (as happens from 
paragraphs to tables). Also, within a section, say the main body of 
content, you may notice that the strings aren't always complete. You can 
have a sentence fragment that ends in the middle of a word .. then 
continues in the next block. This makes it really hard to search for 
things since they may be split.


What you want is some sort of MIF-normalizer, that can make it more user 
friendly. But, I don't think that really exists. There is a tool called 
MIF-Muncher (http://www.stc-carolina.org/MIF+Muncher) .. that helps with 
scanning for various objects in a MIF .. but I don't know that it'll 
work on a modern system. I made a tool that converts MIF into MIFML (an 
XML representation of a MIF) and back, but that doesn't make it any 
easier to read.


MIFs are great but can also be a very scary place to hang out for much 
time.  :o


Cheers,
...scott


On 6/7/16 5:17 PM, Monique Semp wrote:

Do you really find it useful to diff MIF files very often?


Well, I haven't done it yet because it'd involve so much extra manual 
work. But what I'd like to be able to do is simply scroll through the 
commit list in my Git client (SourceTree on Windows) and have the 
diffs show automatically, just as they do for source code. And with 
MIF files, that'd be possible.


I have noticed, though, that the MIF files are *much* larger than the 
corresponding FM files (a 197 KB FM file became a 952 KB MIF file!), 
so now that I see this, I might rethink it.


But as one more tool to make it easier to see what's been done to a 
particular file, in a way that's not even possible in the 
FM/FrameMaker view, I'd really like to try it.


-Monique

___

This message is from the Framers mailing list

Send messages to framers@lists.frameusers.com
Visit the list's homepage at  http://www.frameusers.com
Archives located at 
http://www.mail-archive.com/framers%40lists.frameusers.com/
Subscribe and unsubscribe at 
http://lists.frameusers.com/listinfo.cgi/framers-frameusers.com

Send administrative questions to listad...@frameusers.com



___

This message is from the Framers mailing list

Send messages to framers@lists.frameusers.com
Visit the list's homepage at  http://www.frameusers.com
Archives located at http://www.mail-archive.com/framers%40lists.frameusers.com/
Subscribe and unsubscribe at 
http://lists.frameusers.com/listinfo.cgi/framers-frameusers.com
Send administrative questions to listad...@frameusers.com


Re: [Framers] ExtendScript for save as text, for Git usage ?

2016-06-07 Thread Robert Lauriston
There is or at least used to be a third-party product that did that
with .fm files. I saw it at a trade show years ago.

On Tue, Jun 7, 2016 at 5:17 PM, Monique Semp  wrote:
>> Do you really find it useful to diff MIF files very often?
>
>
> Well, I haven't done it yet because it'd involve so much extra manual work.
> But what I'd like to be able to do is simply scroll through the commit list
> in my Git client (SourceTree on Windows) and have the diffs show
> automatically, just as they do for source code. And with MIF files, that'd
> be possible.
>
> I have noticed, though, that the MIF files are *much* larger than the
> corresponding FM files (a 197 KB FM file became a 952 KB MIF file!), so now
> that I see this, I might rethink it.
>
> But as one more tool to make it easier to see what's been done to a
> particular file, in a way that's not even possible in the FM/FrameMaker
> view, I'd really like to try it.
>
> -Monique
>
___

This message is from the Framers mailing list

Send messages to framers@lists.frameusers.com
Visit the list's homepage at  http://www.frameusers.com
Archives located at http://www.mail-archive.com/framers%40lists.frameusers.com/
Subscribe and unsubscribe at 
http://lists.frameusers.com/listinfo.cgi/framers-frameusers.com
Send administrative questions to listad...@frameusers.com


Re: [Framers] ExtendScript for save as text, for Git usage ?

2016-06-07 Thread Monique Semp

Do you really find it useful to diff MIF files very often?


Well, I haven't done it yet because it'd involve so much extra manual work. 
But what I'd like to be able to do is simply scroll through the commit list 
in my Git client (SourceTree on Windows) and have the diffs show 
automatically, just as they do for source code. And with MIF files, that'd 
be possible.


I have noticed, though, that the MIF files are *much* larger than the 
corresponding FM files (a 197 KB FM file became a 952 KB MIF file!), so now 
that I see this, I might rethink it.


But as one more tool to make it easier to see what's been done to a 
particular file, in a way that's not even possible in the FM/FrameMaker 
view, I'd really like to try it.


-Monique

___

This message is from the Framers mailing list

Send messages to framers@lists.frameusers.com
Visit the list's homepage at  http://www.frameusers.com
Archives located at http://www.mail-archive.com/framers%40lists.frameusers.com/
Subscribe and unsubscribe at 
http://lists.frameusers.com/listinfo.cgi/framers-frameusers.com
Send administrative questions to listad...@frameusers.com


Re: [Framers] ExtendScript for save as text, for Git usage ?

2016-06-02 Thread Robert Lauriston
Git does not support binary files. It assumes that all files under its
control are mergeable text.

I'd use something like git-annex or Git LFS for unstructured
FrameMaker and image binaries. (It's not currently an issue for me
since my doc source is in Confluence and the only files I put in Git
are those required by the build process.)

Do you really find it useful to diff MIF files very often?

On Thu, Jun 2, 2016 at 9:47 AM, Monique Semp  wrote:
> I'm also using Git, and the option of having a plaintext version for Git
> compares sounds appealing. Can you elaborate on the process you're using,
> anything to look out for, and post the script?
>
> I can see great potential for this, but wonder whether extraneous info will
> clutter up a Git compare (I'm using the SourceTree GUI client on Windows,
> which has a good compare normally; and I also can use GitLab's compare on
> the server-side to see diffs), or whether relevant diffs might get lost due
> to formatting diffs or something?
___

This message is from the Framers mailing list

Send messages to framers@lists.frameusers.com
Visit the list's homepage at  http://www.frameusers.com
Archives located at http://www.mail-archive.com/framers%40lists.frameusers.com/
Subscribe and unsubscribe at 
http://lists.frameusers.com/listinfo.cgi/framers-frameusers.com
Send administrative questions to listad...@frameusers.com


[Framers] ExtendScript for save as text, for Git usage ?

2016-06-02 Thread Monique Semp
Would it be an option for you to keep a copy of every FM document in plain 
text? This is not as cumbersome as it sounds, since you can install an 
Extendscript which saves the plain text copy automatically whenever you 
choose File > Save. I've set up something similiar to have a readable copy 
for Git version management. If you're interested, I can post the 
Extendscript on the mailing list.


Hi Jo,

I'm also using Git, and the option of having a plaintext version for Git 
compares sounds appealing. Can you elaborate on the process you're using, 
anything to look out for, and post the script?


I can see great potential for this, but wonder whether extraneous info will 
clutter up a Git compare (I'm using the SourceTree GUI client on Windows, 
which has a good compare normally; and I also can use GitLab's compare on 
the server-side to see diffs), or whether relevant diffs might get lost due 
to formatting diffs or something?


Thanks much,
-Monique 


___

This message is from the Framers mailing list

Send messages to framers@lists.frameusers.com
Visit the list's homepage at  http://www.frameusers.com
Archives located at http://www.mail-archive.com/framers%40lists.frameusers.com/
Subscribe and unsubscribe at 
http://lists.frameusers.com/listinfo.cgi/framers-frameusers.com
Send administrative questions to listad...@frameusers.com