I am looking for a way to create an output of a user guide (preferably HTML but PDF is acceptable) that includes only the figures.
This output would facilitate (1) review of figures and (2) distribution of figures with the rest of the organization.
I am guessing this could be done with a script that would display only the <img> elements or only the content tagged with the condition "Figure". Any tips on how to get started to write such a script?
Thanks
Isabelle
Generating output that contains only the figures
-
- Senior Propellus Maximus
- Posts: 2089
- Joined: Tue Mar 07, 2006 5:06 pm
- Location: Adelaide, far side of the world ( 34°56'0.78\"S 138°46'44.28\"E).
- Contact:
Re: Generating output that contains only the figures
You could put a condition on what you want to include and create a new target that only uses that condition.
Steve
Life's too short for bad coffee, bad chocolate, and bad red wine.
Re: Generating output that contains only the figures
Thank you - I thought of that but I was not sure how to exclude everything else. As far as I know, there is no way to say "include only condition A and excludes everything else , even content that is not conditionalized". But I could be wrong.
Isabelle
Isabelle
-
- Sr. Propeller Head
- Posts: 249
- Joined: Thu May 24, 2018 3:11 pm
- Location: Queensland, Australia
Re: Generating output that contains only the figures
I can't see a way to do this from within Flare without including other things.
I thought at first you could use Acrobat's "Create from Web Page" feature. You could point it at a generated List of Figures in your HTML output and ask it to get 2 levels (That is, it would get the List of Figures and the files that contain the images). It works well (but slowly) but it does capture the entire page containing each figure and not just the image itself.
The simplest thing I can think is to use the Acrobat "Combine Files into a single PDF" feature. Then you can drag your entire images folder into the Acrobat window and it converts them and adds them to a PDF binder for you. The drawback is that each image is on its own page scaled to the size of the image. But it's quick and simple.
As a Python nerd, I'd either use BeautifulSoup to scrape your HTML output for IMG files (plenty of examples online for web scraping for images), or just run a script over all files in the HTML output folder for "<img src=..." and copy those into a new blank HTML document. With a single file TOC containing just this output file and a basic target you could output all the images in one go. You'd need to run any script each time you wanted to send the images for review of course. With a bit of clever scripting you could store the timestamps of each file and then only include in your review those files that had been changed in the past week/month/whatever. The advantage to this is you can scale the images and control how they are displayed in your final HTML page, even collecting extra information such as file names, figure captions, etc to aid in the review.
Rob
I thought at first you could use Acrobat's "Create from Web Page" feature. You could point it at a generated List of Figures in your HTML output and ask it to get 2 levels (That is, it would get the List of Figures and the files that contain the images). It works well (but slowly) but it does capture the entire page containing each figure and not just the image itself.
The simplest thing I can think is to use the Acrobat "Combine Files into a single PDF" feature. Then you can drag your entire images folder into the Acrobat window and it converts them and adds them to a PDF binder for you. The drawback is that each image is on its own page scaled to the size of the image. But it's quick and simple.
As a Python nerd, I'd either use BeautifulSoup to scrape your HTML output for IMG files (plenty of examples online for web scraping for images), or just run a script over all files in the HTML output folder for "<img src=..." and copy those into a new blank HTML document. With a single file TOC containing just this output file and a basic target you could output all the images in one go. You'd need to run any script each time you wanted to send the images for review of course. With a bit of clever scripting you could store the timestamps of each file and then only include in your review those files that had been changed in the past week/month/whatever. The advantage to this is you can scale the images and control how they are displayed in your final HTML page, even collecting extra information such as file names, figure captions, etc to aid in the review.
Rob
Re: Generating output that contains only the figures
Thank you Rob. Lots to try! I hadn't thought of using Acrobat. But I will probably go the script route.
Isabelle
Isabelle