Since I can not go out, I spend everyday with Keyboard Maestro. It's really a good APP
I don't have experience with csv file. But if the line is like “7:00 am - 9:00 pm”.
You can use “search Using RegEx” macro in KM to extract first Time and last Time.
Problem 1: Extracting Time String From the Line
You can use "search using RegEx" macro.
the RegEx should be:(((\d|\d\d):\d\d)( )(am|pm))( - )(((\d|\d\d):\d\d)( )(am|pm))
I was trying to frame out a solution, yours looks much more robust at first glance compared to where I am at currently.
Currently the file I'm cranking out has the breakdown of 7 days of data. I was testing the process on one isolated day.
I noticed that there's a few entries that have multiple openings and closings, I tried add in some logic checks, but I'm sure it would be much easier if I could figure out how to properly account for those variances.
There's some stylizing html that for some reason is included in the file when there is a multiple opening or closing. It starts with a closing p tag (
) and ends with a "> before the next iteration on the same line so I temporarily just did a search and replace on the string and converted it to *** to try and eventually get them to look like
08:00 - 15:00 16:00 - 19:00
This is a copy of the data I'm using as a source for Monday (after I've manually done a search and replace on the data that isn't needed)
If there isn't an entry in the file and it's a blank line I've replaced the blank line with BLANK
Open 24 hours
Are the only other variances.
My good friend is trying to get a dynamic list going of local businesses that are opened still or are having changing hours and such due to the virus outbreak, so I'm trying to make a directory for them to use, and am trying to clean up this data dump and get it going .I'm super close! Thanks again for everybody's help, I appreciate it.
I agree I tried uploading it and it gave me an error about being an unsupported extension, so I just saved it as a pl file because it said it was a supported extension.
PL = Perl script it was a popular programming language before PHP, I used to dabble in it during my days working with UBB (Ultimate Bulletin Board).
Apparently, I really needed the sleep for some reason I assumed it would only snag one-time code per line and the *** would bork it.
---- What I was asking is if in the source file before I sanitize it there was some stray HTML that made its way into the data. I was curious if there's an easy regex command, to take everything between two tags, for example, the ending of a
tag and "> and replace it with say a space?
I'm going to add finding a video tutorial that breaks this stuff down easy peasy to my to-do list.