projects
/
geekigeeki.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b2d45e5
)
Autorotate image thumbnails.
author
Bernie Innocenti
<bernie@codewiz.org>
Sat, 18 Apr 2015 04:52:35 +0000
(
00:52
-0400)
committer
Bernie Innocenti
<bernie@codewiz.org>
Sat, 18 Apr 2015 04:52:35 +0000
(
00:52
-0400)
geekigeeki.py
patch
|
blob
|
history
diff --git
a/geekigeeki.py
b/geekigeeki.py
index e15db21cf57a601071b208df64449f50ca1e2825..1891fdd8c5842cea4357d5339009ad40f90134d6 100755
(executable)
--- a/
geekigeeki.py
+++ b/
geekigeeki.py
@@
-649,7
+649,7
@@
class Page:
emit_header(self._mtime())
print('<!doctype html>\n<html lang="en">')
print("<head><title>%s: %s</title>" % (config_get('site_name', "Unconfigured Wiki"), text))
emit_header(self._mtime())
print('<!doctype html>\n<html lang="en">')
print("<head><title>%s: %s</title>" % (config_get('site_name', "Unconfigured Wiki"), text))
- print(' <meta charset="
UTF
-8">')
+ print(' <meta charset="
utf
-8">')
if not name:
print(' <meta name="robots" content="noindex,nofollow" />')
if not name:
print(' <meta name="robots" content="noindex,nofollow" />')
@@
-665,10
+665,8
@@
class Page:
print(' <link rel="alternate" type="application/x-wiki" title="Edit this page" href="%s" />' \
% relative_url('?a=edit&q=' + name, privileged=True))
print(' <link rel="alternate" type="application/x-wiki" title="Edit this page" href="%s" />' \
% relative_url('?a=edit&q=' + name, privileged=True))
- history = config_get('history_url')
- if history is not None:
- print(' <link rel="alternate" type="application/rss+xml" title="RSS" href="%s" />' \
- % relative_url(history + '?a=rss'))
+ print(' <link rel="alternate" type="application/atom+xml" title="Atom feed" href="%s" />' \
+ % relative_url(name + '?a=atom'))
print('</head>')
print('</head>')
@@
-692,6
+690,7
@@
class Page:
else:
print(' <b>' + text + '</b> ')
print(' | ' + link_tag('FindPage', 'Find Page', cssclass='navlink'))
else:
print(' <b>' + text + '</b> ')
print(' | ' + link_tag('FindPage', 'Find Page', cssclass='navlink'))
+ history = config_get('history_url')
if history:
print(' | <a href="' + relative_url(history) + '" class="navlink">Recent Changes</a>')
if name:
if history:
print(' | <a href="' + relative_url(history) + '" class="navlink">Recent Changes</a>')
if name:
@@
-781,7
+780,8
@@
class Page:
if 'maxwidth' in args:
import subprocess
sys.stdout.flush()
if 'maxwidth' in args:
import subprocess
sys.stdout.flush()
- subprocess.check_call(['gm', 'convert', self._filename(),
+ subprocess.check_call(['convert', self._filename(),
+ '-auto-orient', '-orient', 'TopLeft',
'-scale', args['maxwidth'].value + ' >', '-'])
else:
body = self.get_raw_body()
'-scale', args['maxwidth'].value + ' >', '-'])
else:
body = self.get_raw_body()