Welcome to TalkGraphics.com
Results 1 to 10 of 10
  1. #1

    Default Search for text in XAR files?

    Countless times I've added little notes and comments alongside my graphics when developing in Xara.

    Now, I'd like to be able to enter a keyword and see which XAR files contain that word anywhere in a text block. I've tried a couple of 3rd-party generic file search programs with no luck.

    Does anyone know of a program or a method for doing this?


    As an alternative, it there a Xara feature to export all the text elements from a file?

    Thanks in advance for any help.

  2. #2
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,862

    Default Re: Search for text in XAR files?

    If you had version 10, you could create a SuperSite and export that.
    All the text on all pages and all layers are then accessible.

    I use REBOL and a simple script to remove all the HTML tags leaving text:
    Code:
    data: load/markup http://www.rebol.com/rebolintro.html
    remove-each item data [tag? item]
    write %rebintro.txt data
    You can use a text editor to strip out with a few global search and replaces or REGEX values.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  3. #3

    Default Re: Search for text in XAR files?

    Thanks for your response.

    Quote Originally Posted by Acorn View Post
    ... a simple script to remove all the HTML tags leaving text
    It's interesting that you mention exporting and then using a script. I have found that you can Export Website and then select RTF instead of the default HTML. All the text is there, albeit with some strange foreground and background colors. But if you Select All in a rich text editor, you can assign No Background and a uniform font color. Text sizes are a little trickier unless you don't care to have headings apparent, for example.

    I'll look at what might be involved to post-process these files with a script.

    The downside of this approach, I suppose, is having to remember to "publish" each XAR in order to update the searchable view of the text content.

    I think I'll try it for my Top 20 or so.

  4. #4
    Join Date
    Aug 2000
    Location
    Placitas, New Mexico, USA
    Posts
    41,512

    Default Re: Search for text in XAR files?

    I moved this thread to Dear Xara as it is more of a feature request.

  5. #5

    Default Re: Search for text in XAR files?

    Quote Originally Posted by gwpriester View Post
    I moved this thread to Dear Xara as it is more of a feature request.
    That's fine, I suppose. I had thought of just doing a request, but I felt my question to the community was a valid one:

    Does anyone know of a program or a method for doing this?

    I would have liked for it to stand for a week or so to see if anyone has other ideas. Xara features take time ... and sometimes never materialize.

  6. #6
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,862

    Default Re: Search for text in XAR files?

    Quote Originally Posted by Contours View Post
    Thanks for your response.



    It's interesting that you mention exporting and then using a script. I have found that you can Export Website and then select RTF instead of the default HTML. All the text is there, albeit with some strange foreground and background colors. But if you Select All in a rich text editor, you can assign No Background and a uniform font color. Text sizes are a little trickier unless you don't care to have headings apparent, for example.

    I'll look at what might be involved to post-process these files with a script.

    The downside of this approach, I suppose, is having to remember to "publish" each XAR in order to update the searchable view of the text content.

    I think I'll try it for my Top 20 or so.
    When I use RTF for the export, I also get the images; that's why i didn't recommend it.
    You could equally export as PDF then use save As... Text.
    You still have issues with these methods for hidden layers.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  7. #7

    Default Re: Search for text in XAR files?

    Quote Originally Posted by Acorn View Post
    When I use RTF for the export, I also get the images;
    I'll investigate that further. On my first two tests, the Xara-built graphics did not come into the RTF ... so I'll assume you're referring to JPGs, PNGs and the like that have been imported into the XAR.

    If that's the case, I won't have many to delete in order to get a words-only result. And there may even be a way to script them out of the RTF.

    Thanks for your responses.

  8. #8

    Default Re: Search for text in XAR files?

    Quote Originally Posted by Contours View Post
    Countless times I've added little notes and comments alongside my graphics when developing in Xara.

    Now, I'd like to be able to enter a keyword and see which XAR files contain that word anywhere in a text block. I've tried a couple of 3rd-party generic file search programs with no luck.

    Does anyone know of a program or a method for doing this?


    As an alternative, it there a Xara feature to export all the text elements from a file?

    Thanks in advance for any help.
    Oops. Disregard. I didn't see that it had found the text in the filename. Doesn't find the text in a XAR file.

    Mike
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	capture-003143.jpg 
Views:	125 
Size:	47.1 KB 
ID:	107238  

  9. #9
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,862

    Info Re: Search for text in XAR files?

    I created a small jQuery script that if put in a Placeholder head can output the page text to the screen:

    Code:
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
    <script>
    var notes;
    $(document).ready(function() {
        notes = $('.Heading_2, .Normal_text').text();
        //alert(notes);
        $('body').html(notes).css('background-color','white');
    });
    </script>
    You need to remove it from the page to restore normal presentation of your page.

    A quick demo, where only Normal text and Heading 2 text are shown: jQuery - Notes.xar

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  10. #10

    Default Re: Search for text in XAR files?

    Indeed, that does build an "index" of all the notes. Capturing the result to a parallel file would give a basis for searching for words and phrases ... which was my original intention. Xara should do something similar—as an option for individual XAR files. It could serve as a substitute for making XAR text directly searchable ... which I'll suppose is difficult, since they haven't done it in the 8 years since it was first requested.

    In the mean time, I wrote a script to open each of my main XAR files and click through the sequence to write an RTF version. After some minor cleanup with a text editor, the files are a good basis for searching/finding ... and basic text formatting is preserved. I just have to remember to keep them updated after significant changes.

    Thanks for your response.

    (BTW, how do we know that Xara acknowledges these requests? Do they ever post a response?)

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •