Wikipedia:Reference desk/Archives/Computing/2014 February 3

Computing desk
< February 2 << Jan | February | Mar >> February 4 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


February 3

edit

Finding specific Wikimarkup

edit

Many people on Wikipedia use relative image sizing of thumbnails to respect logged-in registered user's preferences where they have bothered to set them.

Unfortunately, over at our sister project Wikivoyage the discussion about introducing this image syntax seems to have both been sidelined and stalled.

I'm trying to find occurrences of "|upright=" within 20 characters of "thumb" so that I can see the earliest use of relative image sizing of thumbnails in a Wikivoyage article to bolster the case for introducing this syntax more widely there. Does anyone know of a tool or simple method I could use to search with, please? --118.93nzp (talk) 04:23, 21 January 2014 (UTC)[reply]

You could download the complete edit history of every article and search it locally. The file is only 320 MB compressed, but expands to 65 GB, so you might be limited in the tools you can use. Here's a short Python 2.x program that will search for approximately what you're looking for.
	  	
import re, sys
	  	
for line in sys.stdin:
	  	
m = re.search('<timestamp>(.*)</timestamp>', line)
	  	
if m: timestamp = m.group(1)
	 	
m = re.search('<title>(.*)</title>', line)
	  	
if m: title = m.group(1)
	  	
if re.search(r'thumb.{,20}\|upright=', line) and title is not None:
	  	
print timestamp, title
	 	
title = None # only print the earliest revision
You would use it like this:

7z x -so enwikivoyage-20140117-pages-meta-history.xml.7z | python find_thumb_upright.py

-- BenRG (talk) 08:54, 21 January 2014 (UTC)[reply]
One can alternatively use more elegant tools. Σσς(Sigma) 09:53, 21 January 2014 (UTC)[reply]

Thank you both for your helpful replies!

Unfortunately I am such a computer ignoramus that I fear your solutions are beyond my abilities. I assume that I need some programming or Unix skills to use them, do I?

I was rather hoping for some search engine like beast that I could get results from if I knew the correct search syntax.

All I really need is diffs with the first half dozen or so uses on Wikitravel that migrated to Wikivoyage... --118.93nzp (talk) 03:56, 1 February 2014 (UTC)[reply]

The archiving robot seems to archive here based on the H1 heading rather than how recently there has been a post, so I've had to restore my unanswered question... --118.93nzp (talk) 05:47, 3 February 2014 (UTC)[reply]

What's likely to screw up file permissions in OS X 10.6.8?

edit

I sometimes use a computer with OS X 10.6.8. It's fine. But it quickly starts to slow down. Then I use OnyX to fix file permissions, whereupon the computer again runs fast. But it soon starts to slow down. So OnyX is run every day, which is ridiculous.

The computer's mostly used for Safari, but also for Smultron, LibreOffice, and one or two more. Nothing that doesn't happily run on at least one other Mac (my wife's, or this one before its OS was "up" (?) graded).

(Yes, I asked the same question on January 23, but nobody replied--maybe because I was too longwinded--and so I'm asking a second time. Hope this doesn't seem rude.) Morenoodles (talk) 07:24, 3 February 2014 (UTC)[reply]

I really don't know. My first suspicion would be that you run some crapware or hidden malware, but the fact that Apple even sees it fit to include a tool to "fix permissions" makes me me wonder - It's one of the great mysteries. You don't need to use OnyX, you can use Disk Utility, in /Applications/Utilities. That at least should show you if the effect really is due to permission problems or due to something else OnyX does. Good luck, and let us know if you find out something useful! --Stephan Schulz (talk) 08:30, 3 February 2014 (UTC)[reply]
Instead of using OnyX, try using the inbuilt OS X Disk Utility to verify/fix the permissions. If it truly is the permissions that is causing your computer to slow down, and fixing them speeds it up, then it would be useful to have a look at the log the utility displays so you get an idea which files or applications are repeatedly causing the problem. I have not used OnyX, but if it outputs a similar log you can use that, but you really need to see what it is doing if you're going to isolate the cause and fix the problem. --Canley (talk) 03:13, 4 February 2014 (UTC)[reply]
Also check the activity monitor and compare the entries between state "normal" and state "slow". That may indicate what is gobbling up resources. --Cookatoo.ergo.ZooM (talk) 21:58, 4 February 2014 (UTC)[reply]

My thanks to all of you, Stephan Schulz, Canley, and Cookatoo.ergo.ZooM. I shan't be able to work on the computer until Friday afternoon; but then I'll follow your suggestions and see what happens. Morenoodles (talk) 08:18, 5 February 2014 (UTC)[reply]