Jump to content

Tagged Text Set Up


ReminderVDP

Recommended Posts

We are researching if using tagged text is going to be the best way to display customer letters on our custom magazine covers. Currently, we get .txt files from our interface where the user types out their letter. We then go into each letter and remove extra spaces or weird formatting that won't print correctly. Essentially we want to remove the step of editing the letters. I saw a previous post where Dan told someone they could use tagged markup text files and then set up rules in FP to read the tags in the text file. I've never used tags in FP so how would I start a rule for letters that are all different and custom?

 

Would it start like this?:

 

<record>

<story copyhole = "LetterFileName">

</story>

</record>

 

LetterFileName is currently the field in our data that we pull the text file from with a text rule. This would really change things for us if I could understand how the tags work with our layout and CRM system.

Link to comment
Share on other sites

We are researching if using tagged text is going to be the best way to display customer letters on our custom magazine covers. Currently, we get .txt files from our interface where the user types out their letter. We then go into each letter and remove extra spaces or weird formatting that won't print correctly. Essentially we want to remove the step of editing the letters. I saw a previous post where Dan told someone they could use tagged markup text files and then set up rules in FP to read the tags in the text file. I've never used tags in FP so how would I start a rule for letters that are all different and custom?

 

Would it start like this?:

 

<record>

<story copyhole = "LetterFileName">

</story>

</record>

 

LetterFileName is currently the field in our data that we pull the text file from with a text rule. This would really change things for us if I could understand how the tags work with our layout and CRM system.

I'm not sure what you mean by "a rule for letters that are all different and custom". If the field is returning a file name, then you presumably are already doing something to read in the contents of the file in a rule. If you posted that rule, it would help me to understand what you're doing.

 

At any rate, I'm not sure that changing the format of the main input file to tagged markup is what you need to do, since any markup you would use in a tagged markup data file could be returned from a JavaScript rule instead.he markup you would return from a rule is exactly the is the same markup. As for what exactly a rule should do, that depends on the specifics of exactly what kind of "extra spaces or weird formatting that won't print correctly" you're trying to remove. Can you post an example of one of the problematic letters?

Link to comment
Share on other sites

Dan,

I am going to attach a couple different sample text files that people submit in the interface and this is how they appear in the plain text file. The current rule I use to call the text file is:

 

// Return tagged text file with embeded resource

 

 

var Var1 = "LetterFileName";

var Var2 = ".txt";

var Var3 = "/Grapes/DARWINTESTDATA/TEXT";

var Var4 = "NoLetterAvailable.txt";

 

 

 

temp = '';

var_extension = '';

has_extension = '';

 

if (Var3 == "")

Var3 = Var3;

else

{

if (FusionPro.isMac)

Var3 = Var3 + ":";

else

Var3 = Var3 + "\\";

}

 

for (i=0; i<Field(Var1).length; i++)

{

temp = Mid(Field(Var1), Field(Var1).length-i,1);

var_extension = temp + var_extension;

 

if(var_extension == ".txt")

{

has_extension = "true";

i=Field(Var1).length;

}

else

has_extension = "false";

}

 

if(has_extension == "true")

LetterText = CreateResource(Var3 + Field(Var1), "Plain text file", true);

 

else

{

if(Var2 == ".txt")

{

Pic = CreateResource(Var3 + Field(Var1) + ".jpeg", "graphic", true);

if (Pic.exists)

Pic = Pic;

else

Pic = CreateResource(Var3 + Field(Var1) + ".jpg", "graphic", true);

}

 

 

if(Var2 == ".tif")

{

Pic = CreateResource(Var3 + Field(Var1) + ".tif", "graphic", true);

if (Pic.exists)

Pic = Pic;

else

Pic = CreateResource(Var3 + Field(Var1) + ".tiff", "graphic", true);

}

 

 

if(Var2 == ".png" || Var2 == ".pdf" || Var2 == ".eps" || Var2 == ".gif")

{

Pic = CreateResource(Var3 + Field(Var1) + Var2, "graphic", true);

}

 

}

 

if (LetterText.exists)

{

return LetterText;

}

 

else

{

return CreateResource(Var3 + Var4, "graphic", true);

}

 

From everything I'm reading, I can't see how tagging would work because of the customization in every letter. Should I just continue to edit every letter? Is there a better file option that we could use?

55L771892G30303.txt

55L522238G18188.txt

55L1064174G51593.txt

Link to comment
Share on other sites

From everything I'm reading, I can't see how tagging would work because of the customization in every letter. Should I just continue to edit every letter? Is there a better file option that we could use?

Well, I guess the other thing I need to know is, exactly what is it that you're fixing in these files? There may be a way to automate some of that with JavaScript logic. I'm not sure that it would involve tagging, though.

Link to comment
Share on other sites

We remove extra returns put in by customers, take out the spaces before headers that are trying to be centered on the letter. Sometimes we need to combine paragraphs if the letter is too long.

Well, some of that sounds like more art than science, so I'm not sure that an algorithm can be programmed to automate that. It sounds like something you would need to address in whatever front-end interface the users are accessing to create the letters, so that the input is constrained at that point.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...