def GET(self, onto_acronym):
     if onto_acronym is not None and onto_acronym.strip() != "":
         if re.search("%s(\.xml|\.ttl|\.json|\.html|\.nt)?" % src_fragment,
                      onto_acronym):
             web.seeother('https://w3id.org/spar/' +
                          onto_acronym.replace(src_fragment, ""))
         else:
             ontology_path = ontology_base_path + onto_acronym + ".txt"
             example_path = example_base_path + onto_acronym + ".txt"
             if os.path.exists(ontology_path) and os.path.exists(
                     example_path):
                 cur_ontology_dict = process_hashformat(ontology_path)[0]
                 cur_example_list = process_hashformat(example_path)
                 web_logger.mes()
                 return render.ontology(
                     "SPAR Ontologies - ", pages, cur_ontology_dict["name"],
                     cur_ontology_dict["acronym"], cur_ontology_dict["url"],
                     cur_ontology_dict["doi"],
                     cur_ontology_dict["documentation"],
                     cur_ontology_dict["repository"],
                     cur_ontology_dict["description"], cur_example_list,
                     process_hashformat(publication_list_path),
                     onto_acronym)
             else:
                 raise web.notfound()
     else:  # Load home
         web_logger.mes()
         return render.ontologies("SPAR Ontologies - Ontologies", pages,
                                  process_hashformat(publication_list_path),
                                  "spar")
 def GET(self):
     web_logger.mes()
     return render.uptake(
         "SPAR Ontologies - Uptake", pages,
         sorted(process_hashformat(projects_list_path),
                key=itemgetter('name')),
         sorted(process_hashformat(citing_paper_list_path),
                key=itemgetter('title')))
 def GET(self):
     spar_acronym = "spar"
     spar_title = "Semantic Publishing and Referencing (SPAR) Ontologies"
     acronyms_dict = process_hashformat(acronyms_path)[0]
     acron_list = sorted(acronyms_dict.keys())
     acron_list.insert(0, "spar")
     acronyms_dict[spar_acronym] = spar_title
     web_logger.mes()
     return render.publications("SPAR Ontologies - Publications", pages,
                                acron_list, acronyms_dict,
                                process_hashformat(publication_list_path))
 def GET(self):
     all_examples = []
     for cur_dir, cur_subdir, cur_files in os.walk(example_base_path):
         for cur_file in cur_files:
             if cur_file.endswith(".txt"):
                 cur_example_list = process_hashformat(cur_dir + cur_file)
                 all_examples += cur_example_list
     web_logger.mes()
     return render.examples("SPAR Ontologies - Examples", pages,
                            all_examples)
 def GET(self):
     all_news = []
     for cur_dir, cur_subdir, cur_files in os.walk(news_base_path,
                                                   topdown=True):
         for cur_file in cur_files:
             if cur_file.endswith(".txt"):
                 cur_news_list = process_hashformat(cur_dir + cur_file)
                 all_news += cur_news_list
     web_logger.mes()
     return render.news("SPAR Ontologies - News", pages, all_news)