{"id":13742280,"url":"https://github.com/datopian/ckanext-orgportals","last_synced_at":"2025-10-24T07:29:01.099Z","repository":{"id":141957787,"uuid":"73272635","full_name":"datopian/ckanext-orgportals","owner":"datopian","description":"A CKAN extension for creating organization portals","archived":false,"fork":false,"pushed_at":"2018-10-12T10:24:31.000Z","size":3250,"stargazers_count":5,"open_issues_count":3,"forks_count":7,"subscribers_count":26,"default_branch":"master","last_synced_at":"2024-08-29T02:02:12.915Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/datopian.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2016-11-09T10:10:56.000Z","updated_at":"2020-03-07T02:43:00.000Z","dependencies_parsed_at":"2024-02-10T09:41:21.010Z","dependency_job_id":"a87b3ae6-8d50-420b-beb6-294606488cf4","html_url":"https://github.com/datopian/ckanext-orgportals","commit_stats":null,"previous_names":["viderumglobal/ckanext-orgportals"],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datopian%2Fckanext-orgportals","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datopian%2Fckanext-orgportals/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datopian%2Fckanext-orgportals/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datopian%2Fckanext-orgportals/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datopian","download_url":"https://codeload.github.com/datopian/ckanext-orgportals/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224788430,"owners_count":17370133,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T05:00:27.293Z","updated_at":"2025-10-24T07:29:00.963Z","avatar_url":"https://github.com/datopian.png","language":"CSS","funding_links":[],"categories":["Extensions"],"sub_categories":[],"readme":".. image:: https://travis-ci.org/ViderumGlobal/ckanext-orgportals.svg?branch=master\n     :target: https://travis-ci.org/ViderumGlobal/ckanext-orgportals\n \n------------------------\nDevelopment installation\n------------------------\n\nTo install ckanext-orgportals for development, activate your CKAN virtualenv and\ndo::\n\n    git clone https://github.com/ViderumGlobal/ckanext-orgportals.git\n    cd ckanext-orgportals\n    python setup.py develop\n    pip install -r requirements.txt\n\n\n---------------\nConfig settings\n---------------\n\nAdd the extension to the plugins::\n\n    ckanext.plugins = ... orgportals\n\nAdd storage path for uploading assets as well as storing temp images for Twitter::\n\n    ckan.storage_path = /path/to/storage\n\nAdd entity name for organization (default is organization). This setting can either be set to ``country`` or ``organization``. If you set\nit to ``country`` it will use text references for \"Country/Countries\" instead of\n\"Organization/Organizations\" throughout the web interface. Though, this only\napplies to certain parts of the UI. For some, you have to manually override/extend\nthe templates.\n::\n\n    ckanext.orgdashboards.organization_entity_name = country\n\nAdd entity name for group (default is group). This setting can either be set to ``group`` or ``topic``. If you set\nit to ``topic`` it will use text references for \"Topic/Topics\" instead of\n\"Group/Groups\" throughout the web interface. Though, this only applies to\ncertain parts of the UI. For some, you have to manually override/extend the\ntemplates.::\n\n    ckanext.orgdashboards.group_entity_name = topic\n\nAdd Facebook App ID to share a graph on Facebook::\n\n    ckanext.orgportals.facebook_app_id = ...\n\nAdd Twitter consumer keys to share a graph on Twitter::\n\n    ckanext.orgportals.twitter_consumer_key = ...\n    ckanext.orgportals.twitter_consumer_secret = ...\n\nAdd email settings for contact form::\n\n    ckanext.orgportals.smtp.mail.from = ...\n    ckanext.orgportals.smtp.server = ...\n    ckanext.orgportals.smtp.user = ...\n    ckanext.orgportals.smtp.password = ...\n\nAdd number of datasets to show in data section in the portal (default is 5)::\n\n    ckanext.orgdashboards.datasets_per_page = 10\n\nAdd ``ckanext.orgdashboards.custom_dns_active`` as a setting in the\nconfig file::\n\n    ckanext.orgdashboards.custom_dns_active = true\n\nThis setting enables functionality for adding custom domain for individual dashboards.\n\n------------------------------\nInstallation of a new language\n------------------------------\n\nIn order to use languages that are not supported by CKAN, you have to install\nthem manually. Open up a terminal inside the CKAN's source directory, and type\nthe following command to initialize a new catalog for a language::\n\n    python setup.py init_catalog --locale YOUR_LANGUAGE\n\nwhere ``YOUR_LANGUAGE`` is the locale of the language. This command will\ncreate a ``.po`` file inside ``ckan/i18n/YOUR_LANGUAGE/LC_MESSAGES``\nwhich contains the strings for the language.\n\nNext you have to compile tha language into a binary format with the following\ncommand::\n\n    python setup.py compile_catalog --locale YOUR_LANGUAGE\n\nwhere ``YOUR_LANGUAGE`` is the locale of the language. This command will\ncreate a ``.mo`` file, and the one which CKAN will read the strings from.\n\n------------------------\nLanguage translation\n------------------------\n\nIf you want to add additional strings for a certain language and translate\nthem, then follow these instructions:\n\n1. Switch to the extension's directory and add a directory to store your\ntranslations::\n\n    mkdir ckanext/orgportals/i18n\n\n2. Extract the strings from the extension with this\ncommand::\n\n    python setup.py extract_messages\n\nThis will create a template ``.po`` file named\n``ckanext/orgportals/i18n/ckanext-orgportals.pot``\n\n3. The next step is to create the translations. Let's say that you want to\ntranslate strings for the ``de`` locale. Create the translation ``.po`` file\nfor the locale that you are translating for by running ``init_catalog``::\n\n    python setup.py init_catalog -l de\n\nThis will generate a file called ``i18n/de/LC_MESSAGES/ckanext-orgportals.po``.\nIt contains every string extracted from the extension. For example, if you want\nto translate the string ``Groups``, locate it in the ``.po`` file and type the\nappropriate translation::\n\n    msgid \"Groups\"\n    msgstr \"Gruppen\"\n\nA ``.po`` file can also be edited using a special program for translation called\n`Poedit \u003chttps://poedit.net/\u003e`_.\n\n4. Once you are done with translation, next step is to compile the catalog with\nthe ``compile_catalog`` command::\n\n    python setup.py compile_catalog -l de\n\nThis will create a binary ``.mo`` file named\n``ckanext/orgportals/i18n/ckanext-orgportals.mo`` containing your\ntranslations.\n\nOnce you have added the translated strings, you will need to inform CKAN that\nyour extension is translated by implementing the ``ITranslation`` interface in\nyour extension. Edit your ``plugin.py`` to contain the following::\n\n    from ckan.lib.plugins import DefaultTranslation\n\n\n    class YourPlugin(plugins.SingletonPlugin, DefaultTranslation):\n        plugins.implements(plugins.ITranslation)\n\nRestart the server and you should find that switching to the ``de`` locale in\nthe web interface should change the ``Groups`` string.\n\nMore information on translating extensions can be found on the offical\ndocumentation on CKAN.\n\nAdditional flags for countries can be taken from http://flag-icon-css.lip.is\n\n-----------------\nRunning the Tests\n-----------------\n\nSome of the tests require that you run a CKAN server, the one where the\norgdashboards extension is installed.\n\nFirst create a new database called ``ckan_test`` if you haven't already, and\nin the config file for the server change the ``sqlalchemy.url`` to point to the\ndatabase ``ckan_test``. This database will be used by the tests.\n\nAnd second, set a storage path in the config file where uploaded resources will\nbe stored.\n\nckan.storage_path = /path/to/storage\n\nAlso, make sure to install the dev requirements for running the tests::\n\n    pip install -r /usr/lib/ckan/default/src/ckan/dev-requirements.txt\n\nTo run the tests, change the current working directory to the extension and do::\n\n    nosetests --ckan --with-pylons=test.ini\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatopian%2Fckanext-orgportals","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatopian%2Fckanext-orgportals","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatopian%2Fckanext-orgportals/lists"}