diff --git a/PluginDirectories/1/hoogle.bundle/1.version b/PluginDirectories/1/hoogle.bundle/1.version deleted file mode 100644 index 42547b37..00000000 --- a/PluginDirectories/1/hoogle.bundle/1.version +++ /dev/null @@ -1 +0,0 @@ -cb442b7f8f7377ce4be75638d3e585055a79ad0db9ac942560d8396e169164c0 \ No newline at end of file diff --git a/PluginDirectories/1/hoogle.bundle/2.version b/PluginDirectories/1/hoogle.bundle/2.version new file mode 100644 index 00000000..2fdd7e15 --- /dev/null +++ b/PluginDirectories/1/hoogle.bundle/2.version @@ -0,0 +1 @@ +909cfef8c012ec8ad93f7088536e25aab2b698789da2d7d77da5b8c78365167b \ No newline at end of file diff --git a/PluginDirectories/1/hoogle.bundle/info.json b/PluginDirectories/1/hoogle.bundle/info.json index 4ffacf73..94ccf8aa 100644 --- a/PluginDirectories/1/hoogle.bundle/info.json +++ b/PluginDirectories/1/hoogle.bundle/info.json @@ -3,7 +3,7 @@ "displayName": "Hoogle Search", "description": "Search Haskell API", "examples": ["hoogle map", "hoogle (a -> b) -> [a] -> [b]"], - "categories": ["Search", "Developper"], + "categories": ["Search", "Developer"], "creator_name": "hekt", "creator_url": "http://www.hekt.org/" } diff --git a/PluginDirectories/1/index.json b/PluginDirectories/1/index.json index bb9526af..7dfb5110 100644 --- a/PluginDirectories/1/index.json +++ b/PluginDirectories/1/index.json @@ -986,7 +986,7 @@ { "categories": [ "Search", - "Developper" + "Developer" ], "creator_name": "hekt", "creator_url": "http://www.hekt.org/", diff --git a/PluginDirectories/1/thing.bundle/info.json b/PluginDirectories/1/thing.bundle/info.json index ef332ee3..ee85b593 100755 --- a/PluginDirectories/1/thing.bundle/info.json +++ b/PluginDirectories/1/thing.bundle/info.json @@ -2,5 +2,6 @@ "name": "thing", "displayName": "Thingiverse", "description": "Search Thingiverse for 3D printable models", - "examples": ["thing extruder upgrade", "t wall plate customizer"] + "examples": ["thing extruder upgrade", "t wall plate customizer"], + "categories": ["Search"] } \ No newline at end of file diff --git a/PluginDirectories/1/upload.py b/PluginDirectories/1/upload.py index f537a986..a289b51c 100644 --- a/PluginDirectories/1/upload.py +++ b/PluginDirectories/1/upload.py @@ -17,8 +17,7 @@ def get_plugin_name(data): name = get_plugin_name(data) print "Uploading plugin:", name -host = 'flashlightplugins.appspot.com' -# host = 'localhost:24080' +host = 'localhost:24080' if '--local' in sys.argv else 'flashlightplugins.appspot.com' info = requests.get('http://{0}/console_upload/{1}'.format(host, name.encode('utf-8'))).json() print info['version'] diff --git a/flashlightplugins/directory.html b/flashlightplugins/directory.html index 518dd92c..3798aca0 100644 --- a/flashlightplugins/directory.html +++ b/flashlightplugins/directory.html @@ -207,12 +207,12 @@

{% if browse %} {% if deep_links %} - Show {{plugin.model.downloads}} + Show {{plugin.model.downloads | format_as_compact_download_count}} {% else %} - View {{plugin.model.downloads}} + View {{plugin.model.downloads | format_as_compact_download_count}} {% endif %} {% else %} - Install {{plugin.model.downloads}} + Install {{plugin.model.downloads | format_as_compact_download_count}} {% endif %} Installing... Uninstall diff --git a/flashlightplugins/util.py b/flashlightplugins/util.py index 7ffee73f..50c463d6 100644 --- a/flashlightplugins/util.py +++ b/flashlightplugins/util.py @@ -9,6 +9,13 @@ extensions=['jinja2.ext.autoescape'], autoescape=True) +def format_as_compact_download_count(count): + if count > 9000: + return "{:.1f}k".format(count/1000.0) + else: + return str(count) + +JINJA_ENVIRONMENT.filters['format_as_compact_download_count'] = format_as_compact_download_count def template(name, vars={}): template = JINJA_ENVIRONMENT.get_template(name) @@ -34,7 +41,6 @@ def language_suffixes(languages): break yield '' - def get_localized_key(dict, name, languages, default=None): for suffix in language_suffixes(languages): key = name + suffix