Ellié Computing Home Page
My Shopping Cart

Your shopping cart is empty

Display Cart

Call us at +1 586 62 ELLIE / +1 586 62 35543 Office Opened
sales@elliecomputing.com - Contact us


Advanced Tutorial 1: synchronizing my website via FTP

 

 

What you will learn with this tutorial

  • how to set up a synchronization view  with Open New Comparison box
  • how to filter files or folders out of a folder comparison
  • how to use converters
  • how to generate a HTML report
  • how to run a synchronization visually
  • how to run a synchronization from the command line

Prerequisites

  • First of all let's imagine that your website contains PDF documents in addition to all the usual files to find in a website (such as HTML, ASP/X, PHP and web images as JPG, PNG and GIF), so take a few PDF documents of your own or from Internet, or use other documents for which you know a converter program (i.e. a program transforming files to something readable by Ellié Computing Merge, that is, text files or images in the supported list).
  • You need to have access to an FTP site, preferably into a private site or folder, so that you do not interfer with others work. You can create a Site in the Launcher to remember all the connection information.

Step 1: Setting up the synchronization view

  • Click on the Document / Comparison/Merge / New Comparison... (Ctrl+N) menu item.
  • Select "Folder Comparison" as the document type.
  • In the "left" source, select the path to your working copy of the website on your local computer.
  • In the "right" source, enter your FTP account infos or drag a site from the Launcher onto the empty panel or the source combo field.
    NOTE: you can copy/paste local file paths or URLs in the source combos, or open the Browse button menu and select the desired file/folder selector. This may be useful to enter advanced FTP options.  If you have doubt about what or how to enter your information, click the Help button in the FTP Source box.
  • Check the "Merge" checkbox, and select the "right" source as the output location.
  • If "3-way merge " was checked, uncheck it
  • Validate the box.

Now you should see a 3 panels view with at left and right your data and in the bottom panel a list of actions, probably still telling 'Not yet computed' or 'Not resolved' on many items. This is normal as you did not explain yet what expect to do with the files which are different.

Step 2: Filtering the view

Filtering the view is very often is generally a very fast step which will gain you a great deal of time when comparing or synchronizing. Why? first because filtering out files or folders based on their name or presence is very simple and efficient.

Imagine that you are using a version control tool, e.g. SubVersion or CVS.

  • Open the document options dialog box (Document / View and Comparison Options... menu item or  toolbar icon).
  • Go into the Folder Comparison/File Name Filters section, enter the list of extensions for the files or folders that you do not wish to synchronize
    • to exclude VCS folders, enter something like: .svn/;.cvs/ (notice the slash  to tell Ellié Computing Merge that the filter is about folders)
    • to exclude backup file saved by various editors: *~;*.bak;*.orig
  • NB: you can exclude files or folders located under folder or folder hierarchy (e.g. ///debug///*.o removes files .o under any 'debug' folder)
  • If on the contrary, it is easier to express the files or folders that should be kept, you can use 'Include Patterns:' field

If you know a date which determines precisely a cut-off between files already synchronized and files to synchronize, e.g., the date/time just after last synchronization or the start date/time for current task, it is good idea to set up a filter using dates

  • First of all, is your FTP site time correct? this is often not the case, because many FTP site display their local time which is often not your local time. As a test, drag'n'drop a dummy file from left to right (you can create a dummy file with the right button New/Text File). Press the Refresh  button, the date set by your FTP server appears in front of the file name, is it nearly now or is there some time shift, for example, one hour or two?
    • if there is a shift, open the document options dialog box (Edit/Document Options... menu item or  toolbar icon).
    • go into the Data Sources Options, enter the time shift here for the FTP (right) source
    • when validated, all the dates on the right side are immediately visually updated, date and time comparisons are based on this visual date
  • Go into Folder Comparison/File Date Filter section
    • check "Use dates to hide files" then "Modified before"
    • select the right date and time in the date and time fields which are now enabled , or the 'days ago' field

 Finally let imagine that you want to update only files already existing in the FTP site:

  • Open the document options dialog box (Document / View and Comparison Options... menu item or  toolbar icon).
  • Go into Folder Comparison/File Status Filter section
    • in the "Hide files or folder missing" group, check "in the right hierarchy"

Of course, you can hide files or folders individually using the right click menu on any item (or selection), and click Hide item, and also change your mind clicking Make item visible.
Using this filtering option makes the comparison process much faster. When you validate the options, the filtering applies at once, it may take from a fewer millisecond to many seconds on very large folder collections (many thousands). If you feel that you can easily remove many files and filtering be slow, because you first forgot to set the filter before visiting, use a full refresh command (Ctrl+F5) it will completely empty the view with only root folder loaded, then changing your options and reloading will not list uninteresting files or folders and may be much faster.

Step 3: Setting up a converter

If you are not interested yet in proprietary documents, you can safely skip this step.

The converters are program which transform proprietary formats (such as format from Adobe, Microsoft and so on...) into standard formats (such as plain text, XML, HTML or images such as JPEG, GIF, BMP...).
These converters can be set up manually, but it can be a tedious process. To avoid you that, we have introduced a feature called 'Auto-detection' in Ellié Computing Merge using the scripting engine. This feature let Ellié Computing write a small script for you (which we publish on the Add-Ons section of the website), and you just have to put it in your macros directory to get the converter configured correctly.
Remember, that mostly all the options in Ellié Computing Merge are per-session (i.e. per document): you can publish these options to Options Set and reuse them, but nothing forces you to do that.

  • Open the document options dialog box (Document / View and Comparison Options... menu item or  toolbar icon).
  • Go into the Converter panel by selecting it in the left tree view:
    • if the converters list is empty, click the Auto-detect button, it will fill the list with the converters which are recognized by the default installation.
    • if no converter is able to treat the files that you want, or if you have installed a converter from which you know it can do the conversion work, contact us by the ticket system or at info@elliecomputing.com, we will help you get your documents converted to something that Ellié Computing Merge can compare.
  • Validate your options
  • Find one of these documents in the comparison tree view (you can use Ctrl+F Find Box for that, entering something like *.PDF, or .+\.PDF if regular expressions are on).
  • Double-click on the document's line, it will display a view comparing the converted documents, showing you the potential differences
  • If you are particularly happy with your converters settings, remember that you can export them (with the Export button at the bottom left of the Document Options dialog box) to an existing or a new Options Set, in particular to the default one, the Options Set used as a base for new comparisons in the graphical user interface (and in the command line if --default parameter is used).

Step 4: Generating a HTML report

If you are not interested yet in generating comparison reports, you can safely skip this step.

Before synchronizing your website, let generate a HTML report of the comparison, it will let a nice snapshot of what was to be changed be the synchronization. Here you will have to determine what you want to generate exactly, Ellié Computing Merge has many options and though the pre-selected options match most users' needs. You may feel that they do not.

  •   As a first step, review what are the Reports generation options:
    • Open the document options dialog box (Document / View and Comparison Options... menu item or  toolbar icon)
    • Go into the Reports panel by selecting it in the left tree view, review the options then alos have a look to each type of document (Texts, Images and Folders) it will give you a good overview of what can be generated.
    • Click the Help button when a panel is displayed to get a description of the usage of each field
  • For the sake of this tutorial, let's imagine that you want to export only a folder with its content, so select a folder in the folder comparison view.
  • Open the Reports dialog box with File/Export/Export XML/HTML
  • In the left side list, choose HTML
  • In the Scope group, choose Selection
  • In the Selection output group, choose Preview. Later, if you want to keep this report choose a report location.
  • You can choose which type of sub-documents are generated for the files; HTML or HTML (embedded) will let you easily review the changes
  • Click OK (Apply would simply save your choice for feature usage, for example from command line, or when coming back, after changing the selection, or using bookmark instead of the selection)
  • A web-browser should pop-up with the report inside once the comparison is finished

Step 5: Running the synchronization visually

Here you have two situations with two different technics to synchronize:

  • you know that the synchronization process will always be the same, Left to Right, and want maximum automation:
    • Open the document options dialog box (Document / View and Comparison Options... menu item or  toolbar icon)
    • In the Folder Comparison/2-Way rules section, select "Mirror left" as the rule to apply.
    • Validate the box, then verify that the actions are those expected in the bottom view "Remaining Actions" column
    • press the Write to result folder(s)  button in the toolbar, it displays a validation box telling you what will happen. Here you can press Test to have a list a what would be done, or Run to actually do the job
    • when the mirroring operation is finished, click on Close to dismiss the log window
  • you prefer to operate by hand:
    • select all the items in left view with Select All
    • drag and drop them on the right view, or right click to open the contextual menu and select "Copy", look at the task summary to check it matches your evaluation (this may avoid copy errors, or to many selected items causing a long operation)
    • click on Run to validate
    • when the copy operation is finished, click on Close to dismiss the log window

Step 6: Running the synchronization from the command line

 Use the same process a Step 5 'you know that the synchronization process will always be the same', but instead of running the job:

  • Use the Document / Save / Save Comparison or press Ctrl+Shift+S to save the Comparison Template, here comparison status will not be of interest for you (you do not care about the actual merge status of individual items, only the sources and settings interest you).
  • To run a synchronization: launch the following command line, with the paths of Ellié Computing Merge, of your template and left and right paths appropriately set:
    • "c:\program files\ellié computing\merge\merge.exe --mode=merge2 --doc-settings=mytemplate.ecmt path1 path2

We hope that you found this tutorial useful and that you learnt several features. If you think that we could improve this tutorial, please contact us at info@elliecomputing.com or create a ticket on our website.