It’s nearly the day where we all stare at the clocks waiting for the time to strike midnight. I’m talking, of course, about New Year’s Eve. A new year means new beginnings and new adventures. So to count us down to midnight I created a Legato script to inform you how long it is until the new year.
Continue reading "LDC #65: It's Almost The New Year" »Friday, December 29. 2017
LDC #65: It's Almost The New Year
Friday, December 22. 2017
LDC #64: Stripe tables, not candy canes!
Maybe you can stripe candy canes too, given it’s the season. However, this blog post is talking about striping tables! We had another feature request for GoFiler last week that we thought would make a good blog post. This request concerned developing a way for GoFiler to start striping the table after the first dollar sign in the table instead of at the normal body position that GoFiler detects. There are two ways we could do this: we could spend a lot of time modifying a core function of GoFiler, the Polish Table function, or we could make a Legato script that fires on post-process and re-does the striping of the table. The latter is preferable because it doesn’t affect other uses who perhaps don’t want or need this feature. Anyone who does can simply add this script to the extensions folder and that user can get the benefits of a new features.
Continue reading "LDC #64: Stripe tables, not candy canes!" »
Friday, December 15. 2017
LDC #63: Promoting Underlines To Table Cells
Here at Novaworks, we often get requests for features to add to GoFiler. Our topic this week is a client request that I think is another good example of how to use Legato to do some HTML parsing and modification. The original request was to have a way to detect paragraphs within table cells with underlines (border-bottom property) or underline tags in them. It would be great to remove the underlines from the paragraphs and put them on the table cell with the paragraphs instead. This script will work with two selection modes in an HTML file: you can either drag-select the table cells on which you want to run it, or you can click in a cell and run the script without selecting anything. Our script takes the start of your selection and finds the previous table cell. Then, working from that point until the end of the current cell or your selection, it locates any paragraphs with underlines or underline tags. If it finds them, it removes them and puts them in the table cell instead.
Continue reading "LDC #63: Promoting Underlines To Table Cells" »Friday, December 08. 2017
LDC #62: Too Many Links and Not Enough Time
If you have ever wanted to download a bunch of HTML files from a website, you either need to do it manually (yuck!) or find some browser extension to help you along. Today we can offer a third option: using Legato. Since Legato can parse HTML files, you can quickly make a script that reads a website and decides what links to follow and which ones to ignore. Many browser extensions only let you filter by type of file, but with Legato the sky is the limit.
Continue reading "LDC #62: Too Many Links and Not Enough Time" »Friday, December 01. 2017
LDC #61: Logging: Leaving Your Mark
Today we’re going to talk about logs. Legato provides a number of input and output (I/O) methods. The choice and style of I/O can vary as much as programmers and users. Logs are a convenient method of keeping and relaying data without establishing a complex data formatting regiment. They are useful for reporting information to a user (such as the number of instances a search and replace operation changed the text, for example, or whether or not there were errors in an procedure). They are also employed by many high-level application functions, such as a validation function indicating a list of possible notices, warnings, and errors.
Continue reading "LDC #61: Logging: Leaving Your Mark" »