Here is a quick shortcut I used to combine a series of comma separated values into a single list of unique entries. In my case I was trying to get a unique list of tags that came from several different lists of tags. If list A had “apples, oranges, bananas” and list b had “apples,grapes,watermelons” I wanted to get “apples, bananas,grapes,oranges,watermelons” back.
There is the shortcut I used:
Paste each comma-separated list into a file named “x”, separate lines are OK.
Run this Linux command on the file to create a file named “Y” that has my sorted unique list of tags:
# tr ‘,’ ‘\n’ < x | sort -u | tr ‘\n’ ‘,’ > y
This is a quick and efficient way to sort comma-separated lists on Linux, which likely includes OS/X as well.
Store Locator Plus 4.2.41 focuses on speeding up the performance of location import processing for comma separated files of 50,000 locations or more.
CSV Import in Add Mode
Some of the updates include reduce execution time when setting the CSV import duplicates processing to ‘add’ mode. Add mode is useful when importing to a “clean” list of locations. This mode eliminated extra processing when you know you are not updating existing locations during a Pro Pack CSV Import.
Improved Import Error Reporting
The CSV Import processing system has been updated to provide better reporting when CSV imports of location data via Pro Pack or category data via Tagalong fails the import process. Various file processing issues as well as memory restriction errors are reported with details including hints as to how to manage the issue.
Memory consumption is reduced on per-process system calls. This reduction can be significant on systems that are running large location lists, saving up to 1k per location processing request.
The PHP Maximum Execution time setting, included in Store Locator Plus version 4.2.30, is used for bulk import processing as well as volume AJAX queries such as bulk geocoding of locations. If the hosting provider allows for the execution time to be specified by a WordPress application, the new setting can be used to override the typical default of 30-seconds of maximum processing time before the web application terminates. This can be especially useful for large lists of locations where processing 10,000+ locations can take more than 30 seconds on a low-end server. Some hosting companies, especially those on shared hosting plans, do not allow for the maximum PHP execution time to be managed from within WordPress. Contact your hosting company for details.
The latest version of the Pro Pack now uses the Store Locator Plus 4.2 framework for AJAX requests. This increases security and stability while performing background AJAX functions such as report downloads with the Pro Pack.