Commit 95ad256805b88a13bd48215d56a3c6c127f7c7e6
1 parent
90b8e483
Exists in
master
Update project description
Showing
2 changed files
with
9 additions
and
1 deletions
Show diff stats
settings_local.py.tmpl
| @@ -16,6 +16,6 @@ APACHE_STATIC_FILES_ENDPOINT = "/wikilibras" | @@ -16,6 +16,6 @@ APACHE_STATIC_FILES_ENDPOINT = "/wikilibras" | ||
| 16 | # PyBossa Configuration | 16 | # PyBossa Configuration |
| 17 | PYBOSSA_APP_NAME = "WikiLibras" | 17 | PYBOSSA_APP_NAME = "WikiLibras" |
| 18 | PYBOSSA_APP_SHORT_NAME = "wikilibras" | 18 | PYBOSSA_APP_SHORT_NAME = "wikilibras" |
| 19 | -PYBOSSA_APP_DESCRIPTION = "Esse projeto possibilitará que voluntários contribuam na expansão de um dicionário de LIBRAS." | 19 | +PYBOSSA_APP_DESCRIPTION = "Esse projeto possibilitará que voluntários contribuam na expansão de um dicionário de LIBRAS, desenvolvido para promover o inclusão e acessibilidade nos meios digitais atravé do VLIBRAS." |
| 20 | PYBOSSA_ENDPOINT = "http://localhost/pybossa" | 20 | PYBOSSA_ENDPOINT = "http://localhost/pybossa" |
| 21 | PYBOSSA_API_KEY = "my-api-key" | 21 | PYBOSSA_API_KEY = "my-api-key" |
| 22 | \ No newline at end of file | 22 | \ No newline at end of file |
wikilibras.py
| @@ -15,6 +15,12 @@ class Wikilibras: | @@ -15,6 +15,12 @@ class Wikilibras: | ||
| 15 | self.env = template_env | 15 | self.env = template_env |
| 16 | self.__setup_pb_client() | 16 | self.__setup_pb_client() |
| 17 | 17 | ||
| 18 | + def __create_tasks(self, project): | ||
| 19 | + test_signs = ["ENSINADO", "ENTANTO", "ENTENDIDO"] | ||
| 20 | + for sign in test_signs: | ||
| 21 | + task = dict(sign_name=sign, submission_date=pyutil.get_date_now()) | ||
| 22 | + pbclient.create_task(project.id, task) | ||
| 23 | + | ||
| 18 | def __setup_pb_client(self): | 24 | def __setup_pb_client(self): |
| 19 | pbclient.set('endpoint', self.config['PYBOSSA_ENDPOINT']) | 25 | pbclient.set('endpoint', self.config['PYBOSSA_ENDPOINT']) |
| 20 | pbclient.set('api_key', self.config['PYBOSSA_API_KEY']) | 26 | pbclient.set('api_key', self.config['PYBOSSA_API_KEY']) |
| @@ -40,6 +46,7 @@ class Wikilibras: | @@ -40,6 +46,7 @@ class Wikilibras: | ||
| 40 | project.info['sched'] = "incremental" | 46 | project.info['sched'] = "incremental" |
| 41 | project.info['published'] = True | 47 | project.info['published'] = True |
| 42 | project.allow_anonymous_contributors = False | 48 | project.allow_anonymous_contributors = False |
| 49 | + project.description = self.config['PYBOSSA_APP_DESCRIPTION'] | ||
| 43 | pbclient.update_project(project) | 50 | pbclient.update_project(project) |
| 44 | 51 | ||
| 45 | def create_project(self): | 52 | def create_project(self): |
| @@ -61,6 +68,7 @@ class Wikilibras: | @@ -61,6 +68,7 @@ class Wikilibras: | ||
| 61 | def update_project(self): | 68 | def update_project(self): |
| 62 | app_short_name = self.config['PYBOSSA_APP_SHORT_NAME'] | 69 | app_short_name = self.config['PYBOSSA_APP_SHORT_NAME'] |
| 63 | project = self.__find_project(app_short_name) | 70 | project = self.__find_project(app_short_name) |
| 71 | + #self.__create_tasks(project) | ||
| 64 | self.__update_project_info(project) | 72 | self.__update_project_info(project) |
| 65 | result_msg = "The project " + app_short_name + " was updated." | 73 | result_msg = "The project " + app_short_name + " was updated." |
| 66 | pyutil.log(result_msg) | 74 | pyutil.log(result_msg) |