5,364
edits
Line 37: | Line 37: | ||
===Sort galleries alphabetically=== | ===Sort galleries alphabetically=== | ||
To sort a gallery alphabetically, put the code contents in a text file and run the command <code>sort -t '|' - | To sort a gallery alphabetically, put the code contents in a text file and run the command <code>awk -F'|' '{ print $NF "|" $0 }' filename | sort -t '|' -k1 | cut -d '|' -f2-4</code> on it. This sorts alphabetically by the contents of the last text field, with text fields, in this case, separated by "|", therefore grabbing the display names of links. By default, this will ignore special characters, such as <code><nowiki>[[</nowiki></code>, which is generally desired. If you want to sort all characters literally, run <code>export LC_ALL=C</code> first. | ||
===Tricks with imagemagick=== | ===Tricks with imagemagick=== |
edits