Are there existing tools for comparing a resulting file or string against a Jinja2 template to determine if that resulting file or string complies with the template? Essentially, I want a check that will ensure that the rendered output hasn't been modified in some other area where the template is not variable. Any tools for this?
Related
Is there a way to sort HTML attributes when comparing things in BeyondCompare?
So for example the following should be considered equivalent:
<div class="btn" id="someId">
vs
<div id="someId" class="btn">
Beyond Compare doesn't provide a method to sort HTML attributes.
If you can find a command line application to sort HTML attributes, you can use a Beyond Compare file format to run it as a preprocessor before comparison.
To define a file format that runs an external app before comparison:
Open Tools > File Formats.
Click +.
Select Text Format.
In the General tab, enter *.html as the file mask.
Go to the Conversion tab.
Change the top dropdown from None to External program (Unicode
filenames).
In Loading, enter the path to the external app, followed
by variables %s and %t for the source and target filenames.
Save.
The highest format in the list with matching file mask is used when comparing pairs of files in Beyond Compare or running rules-based comparison in the Folder Compare.
I am working on a project to process data and, depending upon the contents of the data, format it for use by another system. Some of the data provided are not of use to that other system and some of it is so sparsely populated that it would be of no use - is there a way, using Freemarker, to prevent the output of a file at all based upon the contents of the data? I have tried using <#if> statements, but if the checks do not pass, I simply get a blank file output.
This is not up to FreeMarker, but to the software that calls it. FreeMarker doesn't create files, it just writes the output to a Writer. That Writer is provided by the software that calls FreeMarker. So that could implements a logic where the file isn't created until something non-whitespace is written, or could expose a directive to FreeMarker that drops the output file.
PHP Storm: File templates
I would like to add custom file template with generated filename. I do not want to prompt filename by hand, I want it generated with variable values.
E.g. ${YEAR}${MONTH}${DAY}_${MyCustomVar}.sql
It there a way to do that?
Would you like to create files with 'fixed' names generated using temploate variables? It's not currently possible - you can file a request for this feature to youtrack (http://youtrack.jetbrains.com/issues/IDEA)
Related ticket: http://youtrack.jetbrains.com/issue/IDEABKL-6428
When I run certain console applications (particularly, MSBuild or PowerShell) they produce an output containing text of different colors (for warnings, errors etc). Sometimes I need to save it for a future analysis, or to send it in an e-mail. I only can copy plain text from the console, or redirect the program output to a file, but this way all colors are lost. Is there a way to capture an output of a console application in a color-preserving format like HTML or RTF?
Powershell team blogged this script, which captures console screen buffer up to the current cursor position and returns it in HTML format.
How can I use Doxygen to create the HTML documentation as a single, very long file? I want something like the RTF output, but as HTML.
The reason: I need my API published as a single, printable, document. Something that can be loaded into Word, converted to PDF, etc.
I think you can use HTMLDOC to convert the generated html files to a single html file. (I did not try it myself)
The manual includes the following example to generate a html from two source html files:
htmldoc --book -f output.html file1.html file2.html
But there is also a gui.
I don't think there's an option that will produce the output as a single HTML file, but the RTF output may be suitable if you need an editable output format (I haven't tried this myself so I don't know how well this works).
If you want good quality printable output, then Doxygen can output LaTeX format (set GENERATE_LATEX to YES in your doxygen configuration file). This can then be converted to PDF, although you'll need to install a LaTeX distribution such as MiKTeX.