I need the comparison output in HTML format. Tried following command in script: output-to:"C:\ABC\XYZ.html [output-options:html-color] [C:\ABC\D XYZ.html] - Doesn't work. Works fine with text file. Pls help.
Script Output to HTML
Collapse
X
-
Re: Script Output to HTML
The convention in the scripting reference is that text in brackets is optional, [] characters aren't actually used in the script.
To generate an html file comparison of the currently selected files, use syntax like:
Code:file-report layout:side-by-side options:display-context output-to:c:\report.html output-options:html-color
Chris K Scooter Software -
Re: Script Output to HTML
Here's a sample script. I checked the log file - it doesn't show any error message. It doesn't create the html file either.
# Beyond Compare Script To Scan Windows Directory For Changes.
#
################################################## ################################################## #
# Turn logging on
log verbose "C:\Beyond Compare\Windows-log.txt"
# Load the base folders
load "C:\Beyond Compare\Windows.bcss" "C:\Windows"
expand all
file-report layout:side-by-side options:display-mismatches output-to:C:\Beyond Compare\Windows-results.html output-options:html-color
snapshot save-version rt output:"C:\Beyond Compare\Windows.bcss"
################################################## ################################################## ###Comment
-
Re: Script Output to HTML
The file-report command operates on the currently selected files. If you add a select all statement between the expand all and file-report command it should generate the report.
The file-report command will list a content comparison. If you're only interested in listing the names of different files you should use a folder-report command instead.
In your snapshot, you're saving version information. If you want to compare timestamps, size, and version information, add the line criteria version timestamp size at the beginning of your script. If you don't specify the criteria, it will use the default, typically just timestamp and size.Chris K Scooter SoftwareComment
-
Re: Script Output to HTML
Default criteria is fine with me. I added Select all command. Still, I can't get the script file to generate html file. No errors in the log file. Am stuck!
# Beyond Compare Script To Scan Windows Directory For Changes.
#
################################################## ################################################## #
# Turn logging on
log verbose "C:\Beyond Compare\Windows-log.txt"
# Load the base folders
load "C:\Beyond Compare\Windows.bcss" "C:\Windows"
expand all
Select all
folder-report layout:side-by-side options:display-mismatches output-to:C:\Beyond Compare\Windows-results.html output-options:html-color
snapshot save-version rt output:"C:\Beyond Compare\Windows.bcss"
################################################## ################################################## ###
Comment
-
Re: Script Output to HTML
I missed it the first time, but your "C:\Beyond Compare\Windows-results.html" needs to be in quotes because of the space in the folder name. Then it should generate the report.
If you aren't going to compare version information, the snapshot command will run much faster without that option.Chris K Scooter SoftwareComment
-
Re: Script Output to HTML
I put an example template up on our website.
You can download it from:
http://www.scootersoftware.com/stylesheetsample.css
If you need help customizing it, please let us know.Chris K Scooter SoftwareComment
-
Re: Script Output to HTML
Hi Chris,
I'm new to BC and really enjoyed using this product so far.
I have taken a look at the style sheet and would like some help on html formats for csv file comparisons.
Currently, I'm usig a side by side layout and I would like to see the data align in columns. The rows are correctly aligned and created but the columns are displayed using commas.
It would be wonderful if the data can be displayed in tables using style sheets. Currently I'm making the tables manually and it has been a pain and I would greatly appreciate your help in this matter if possible.
Thanks
LiComment
-
Re: Script Output to HTML
There isn't a way to generate a report of CSV files from the File Viewer that will list each comma separated field as a column in an HTML table. I also don't think it is possible to do it only with a custom style sheet.
If you use the Data Viewer plug-in, you can use the File|Data Comparison Report command to generate a csv file showing the differences. You might be able to import the csv file into Excel and convert it into HTML from Excel.Chris K Scooter SoftwareComment
-
Re: Script Output to HTML
Great thanks Chris!
Now the only problem is we're using a trail version. We are in the process of testing BC to our needs and my manager hasnt decided to purchase this product yet.
Would it be possible to send me some examples of the result csv file showing differences after using Data Viewer? I want to see how it actually looks like.
Thanks a bunch.Comment
-
Re: Script Output to HTML
Here's an example of the Data Viewer's report output.
Two files to compare
original.csv:
"smith","123"
"kennedy","456"
modified.csv:
"smith","123"
"added","111"
"kennedy","457"
And the output of a data comparison report to a file.
Output.csv:
"File1","File2","Column","File1 Row","File1 Data","File2 Row","File2 Data"
"C:\w\original.csv","C:\w\modified.csv","A",,,1,"a dded"
"C:\w\original.csv","C:\w\modified.csv","B",,,1,11 1
"C:\w\original.csv","C:\w\modified.csv","B",1,456, 2,457Chris K Scooter SoftwareComment
Comment