dropbox-screenshots
dropbox-screenshots copied to clipboard
Doesn't work with other locale than english
Hello!
Tried to get this working on my Mac running OSX in swedish but it seems it doesn't pick up the correct file as it says "Skärmavbildning" in the beginning of the file, rather than Screenshot.
Hi @intelligence,
Good point, didn't really think of non-English setups. Unfortunately I can't think of an simple way to support the general use case, and at this point the script works well enough for me that I can't justify spending a couple of hours on it.
That said, there's no reason you shouldn't be able to get it to work well enough for you in a couple of minutes.
Start by modifying the following line in the main script file: https://github.com/dergachev/dropbox-screenshots/blob/master/dropbox-screenshots#L31
# Screen Shot 2013-11-01 at 3.10.13 PM.png
time = orig_filename.scan(/Screen Shot (.*) at (.*).png/).first
You'll need to change the regular expression in that line to match your file names. Also you probably have a different default time/date format than I do, so you'll need to also change this line: https://github.com/dergachev/dropbox-screenshots/blob/master/dropbox-screenshots#L40
time = Time.parse(time).strftime("%Y.%m.%d-%H-%M-%S")
See http://www.ruby-doc.org/core-2.1.0/Time.html#method-i-strftime for the list of formatters to use.
If you succeed, please post a diff (generated by git diff
) in this issue for others to learn from.