Branch: refs/heads/master
Author: Matthew Brush <matt(a)geany.org>
Committer: GitHub <noreply(a)github.com>
Date: Sat, 29 Jun 2019 16:33:23 UTC
Commit: aacc9141c05f61ef6663daf7460d080cb100cedc
https://github.com/geany/geany-themes/commit/aacc9141c05f61ef6663daf7460d08…
Log Message:
-----------
Change thumbnail size in the index to 128x128 pixels (#32)
Also, since I can't remember where the screenshot-missing.png icon
came from, replace it with …
[View More]the 'image missing' icon from Tango[0]
[0]: https://commons.wikimedia.org/wiki/Tango_icons#/media/File:Image-missing.svg
Modified Paths:
--------------
index/README.md
index/index.json
index/index.json.md5
screenshots/screenshot-missing.png
scripts/mkindex.py
Modified: index/README.md
6 lines changed, 3 insertions(+), 3 deletions(-)
===================================================================
@@ -4,7 +4,7 @@ Geany Themes Index File README
The `index.json` file is auto-generated using the `make index` command.
The `index` rule of the Makefile runs the `scripts/mkindex.py` script
which reads the colour schemes' info, generates screenshot and download
-URLs, base64 encoded 64x64 thumbnails and stores it all into a JSON
+URLs, base64 encoded 128x128 thumbnails and stores it all into a JSON
formatted text file.
File Format
@@ -73,12 +73,12 @@ image.
#### thumbnail
-This is a thumbnail image, 64 pixels wide and 64 pixels high, in PNG
+This is a thumbnail image, 128 pixels wide and 128 pixels high, in PNG
format, base64 encoded (for storing in text file). This is a small icon
of the preview screenshot suitable for displaying for example in a GUI
list of schemes. This maybe be an empty string if the colour scheme
doesn't have a screenshot or it maybe be a generic "screenshit missing"
-icon that is 64 pixels wide and tall.
+icon that is 128 pixels wide and tall.
#### version
Modified: index/index.json
72 lines changed, 36 insertions(+), 36 deletions(-)
===================================================================
No diff available, check online
Modified: index/index.json.md5
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -1 +1 @@
-f8100bdab45f1627a33bde393dbb63f1 index.json
+861793e9be8d3f9ca27dcda0ce5caa95 index.json
Modified: screenshots/screenshot-missing.png
0 lines changed, 0 insertions(+), 0 deletions(-)
===================================================================
No diff available, check online
Modified: scripts/mkindex.py
3 lines changed, 2 insertions(+), 1 deletions(-)
===================================================================
@@ -14,6 +14,7 @@
import StringIO
from PIL import Image, ImageDraw, ImageOps, ImageFilter
+THUMBNAIL_SIZE = (128, 128)
SCREENSHOT_BASE = 'https://raw.github.com/geany/geany-themes/master/screenshots/'
SCHEMES_BASE = 'https://raw.github.com/geany/geany-themes/master/colorschemes/'
@@ -36,7 +37,7 @@ def generate_thumbnail(conf_fn, screenshot_dir='screenshots'):
else:
img = Image.open(png_file)
img = img.crop((2,2,img.size[1]-2,img.size[1]-2))
- img.thumbnail((64,64), Image.ANTIALIAS)
+ img.thumbnail(THUMBNAIL_SIZE, Image.ANTIALIAS)
#-- set to True to save thumbs into screenshots/.thumbs
do_thumbs = False
if do_thumbs:
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
[View Less]
Branch: refs/heads/master
Author: Enrico Tröger <enrico.troeger(a)uvena.de>
Committer: Enrico Tröger <enrico.troeger(a)uvena.de>
Date: Sat, 29 Jun 2019 10:42:25 UTC
Commit: 0b724996c1898c83e36ab4d15b582668b0ac25b7
https://github.com/geany/www.geany.org/commit/0b724996c1898c83e36ab4d15b582…
Log Message:
-----------
Provide better contact possibilities on About page
Closes #10.
Modified Paths:
--------------
page_content/about/geany.md
…
[View More]Modified: page_content/about/geany.md
8 lines changed, 7 insertions(+), 1 deletions(-)
===================================================================
@@ -33,8 +33,14 @@ The code is licensed under the terms of the [GNU General Public Licence][3].
- Jiří Techet (regular contributor, MacOS expert)
- and many other contributors, translators and patch writers
-To contact all of us for general questions or feedback, please use the address <team (at) geany (dot) org>. This address will forward your email to all of us.
+## Contact
+
+To contact us for general questions or feedback, either use one of our [mailing lists][4], the [IRC channel][5] or the [Github issue tracker][6].
+
[1]: /about/filetypes/
[2]: /support/plugins/
[3]: https://www.gnu.org/licenses/gpl-2.0.en.html
+ [4]: /support/mailing-lists
+ [5]: /support/irc
+ [6]: https://github.com/geany/geany/issues
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
[View Less]
Branch: refs/heads/master
Author: Enrico Tröger <enrico.troeger(a)uvena.de>
Committer: GitHub <noreply(a)github.com>
Date: Sat, 29 Jun 2019 10:28:46 UTC
Commit: 9bd8f9b5564953cbd4f0c0d817a691454813fc5e
https://github.com/geany/www.geany.org/commit/9bd8f9b5564953cbd4f0c0d817a69…
Log Message:
-----------
Merge pull request #11 from andy5995/hobbyists
templates/home.html:correct spelling of "hobbyists"
Modified Paths:
--------------
geany/…
[View More]templates/home.html
Modified: geany/templates/home.html
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -133,7 +133,7 @@ <h2 class="text-center">Great Community</h2>
Using the <a href="http://www.gnu.org/licenses/gpl-2.0.txt">GPL v2 license</a>,
Geany assures that not only can you customize and hack it, but
that everyone benefits from changes the community makes. Geany
- has a vibrant community of professionals and hobbiests alike
+ has a vibrant community of professionals and hobbyists alike
that contribute improvements and fixes across numerous
platforms including
<a href="{% url "page" "support/mailing-lists" %}">The Mailing Lists</a>,
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
[View Less]
Branch: refs/heads/issue5_geany_themes_preview
Author: Enrico Tröger <enrico.troeger(a)uvena.de>
Committer: Enrico Tröger <enrico.troeger(a)uvena.de>
Date: Sat, 29 Jun 2019 08:13:56 UTC
Commit: c5a12415d902bdcb5d66538a885e1ca90ea52d88
https://github.com/geany/www.geany.org/commit/c5a12415d902bdcb5d66538a885e1…
Log Message:
-----------
Theme preview: Refetch theme index only if MD5 hash has changed
Instead of fetching the whole theme index each …
[View More]hour, fetch the MD5 hash
and compare it to the hash of the last change and then fetch the theme
index only if the hash has changed.
Modified Paths:
--------------
static_docs/views.py
Modified: static_docs/views.py
45 lines changed, 40 insertions(+), 5 deletions(-)
===================================================================
@@ -19,6 +19,7 @@
import re
from django.conf import settings
+from django.core.cache import cache
from django.http import Http404
from django.views.generic.base import TemplateView
from mezzanine_pagedown.filters import plain as markdown_plain
@@ -30,6 +31,9 @@
RELEASE_REGEXP = re.compile(r'^Geany (?P<version>[0-9\.]+) \((?P<date>.*)\)$')
DATE_PATTERNS_TO_BE_IGNORED = ('TBD', 'TBA', 'unreleased')
+CACHE_KEY_THEME_INDEX_MD5_HASH = 'THEME_INDEX_MD5_HASH'
+CACHE_KEY_THEME_INDEX = 'THEME_INDEX'
+
logger = logging.getLogger(__name__) # pylint: disable=invalid-name
@@ -257,11 +261,42 @@ def get_context_data(self, **kwargs):
return context
# ----------------------------------------------------------------------
- @cache_function(CACHE_TIMEOUT_1HOUR)
def _get_theme_index(self):
- self._fetch_file_via_github_api('index/index.json', repository='geany-themes')
- return self._parse_themes_index()
+ """
+ Refresh the theme index by:
+ - querying the MD5 hash from Github
+ - compare the freshly retrieved MD5 hash against the cached one
+ - load the whole theme index if:
+ - the MD5 hashes differ
+ - the MD5 hash was not retrieved yet or has been expired from cache
+ - the theme index was not retrieved yet or has been expired from cache
+ - after loading the whole theme index cache it long (24 hours)
+ - store the freshly retrieved MD5 hash in the cache
+ """
+ theme_index_md5_hash = self._query_theme_index_md5_hash()
+ cached_theme_index_md5_hash = cache.get(CACHE_KEY_THEME_INDEX_MD5_HASH)
+ theme_index = cache.get(CACHE_KEY_THEME_INDEX)
+
+ # theme index has been changed remotely?
+ if theme_index_md5_hash != cached_theme_index_md5_hash or theme_index is None:
+ logger.debug('Refresh theme index from Github (MD5: {})'.format(theme_index_md5_hash))
+ # query whole theme index
+ theme_index = self._query_parse_themes_index()
+ # cache it for later
+ cache.set(CACHE_KEY_THEME_INDEX, theme_index, CACHE_TIMEOUT_24HOURS)
+
+ # cache MD5 hash
+ cache.set(CACHE_KEY_THEME_INDEX_MD5_HASH, theme_index_md5_hash, CACHE_TIMEOUT_24HOURS)
+
+ return theme_index
# ----------------------------------------------------------------------
- def _parse_themes_index(self):
- return json.loads(self._file_contents)
+ def _query_theme_index_md5_hash(self):
+ self._fetch_file_via_github_api('index/index.json.md5', repository='geany-themes')
+ return self._file_contents.strip()
+
+ # ----------------------------------------------------------------------
+ def _query_parse_themes_index(self):
+ self._fetch_file_via_github_api('index/index.json', repository='geany-themes')
+ theme_index = json.loads(self._file_contents)
+ return theme_index
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
[View Less]