<commit_before>__copyright__ = "Copyright 2017 Birkbeck, University of London"
__author__ = "<NAME> & <NAME>"
__license__ = "AGPL v3"
__maintainer__ = "Birkbeck Centre for Technology and Publishing"

from django.conf.urls import url

from journal import views

urlpatterns = [
    # Probably needs some multi-journal logic here
    url(r'^article/(?P<article_id>\d+)/galley/(?P<galley_id>\d+)/figure/(?P<file_name>.*)/$',
        views.article_figure,
        name='article_figure'),
    url(r'^article/(?P<identifier_type>.+?)/(?P<identifier>.+)/file/(?P<file_id>\d+|None)/$',
        views.serve_article_file,
        name='article_file_download'),
    url(r'^article/(?P<article_id>\d+)/galley/(?P<galley_id>\d+)/download/',
        views.download_galley,
        name='article_download_galley'),
    url(r'^article/(?P<identifier_type>.+?)/(?P<identifier>.+?/.+?)/(?P<file_name>.+)$',
        views.identifier_figure,
        name='article_figure'),
    url(r'^articles/$', views.articles, name='journal_articles'),
    url(r'^issues/$', views.issues, name='journal_issues'),
    url(r'^issue/current/$', views.current_issue, name='current_issue'),
    url(r'^issue/(?P<issue_id>\d+)/info/$', views.issue, name='journal_issue'),
    url(r'^collections/$', views.collections, name='journal_collections'),
    url(r'^collections/(?P<collection_id>\d+)/$', views.collection, name='journal_collection'),
    url(r'^article/(?P<identifier_type>.+?)/(?P<identifier>.+)/file/(?P<file_id>\d+)/replace$',
        views.replace_article_file,
        name='article_file_replace'),
    url(r'^cover/$', views.serve_journal_cover, name='journal_cover_download'),

    url(r'^article/(?P<identifier_type>.+?)/(?P<identifier>.+)/edit/$', views.edit_article, name='article_edit'),
    url(r'^article/(?P<identifier_type>.+?)/(?P<identifier>.+)/print/$', views.print_article,
        name='article_print_article'),
    url(r'^article/(?P<identifier_type>.+?)/(?P<identifier>.+)/$', views.article, name='article_view'),
    url(r'^(?P<article_id>\d+)/files/(?P<file_id>\d+)/info/$', views.submit_files_info,
        name='submit_replacement_files_info'),
    url(r'^(?P<article_id>\d+)/files/(?P<file_id>\d+)/history/$', views.file_history,
        name='file_history'),
    url(r'^(?P<article_id>\d+)/files/(?P<file_id>\d+)/delete/$', views.file_delete,
        name='file_delete'),
    url(r'^(?P<article_id>\d+)/files/(?P<file_id>\d+)/old/(?P<file_history_id>\d+)/reinstate/$',
        views.file_reinstate,
        name='file_reinstate'),
    url(r'^(?P<article_id>\d+)/file/(?P<file_id>\d+)/makegalley/$', views.article_file_make_galley,
        name='article_file_make_galley'),
    url(r'^note/(?P<article_id>\d+)/new/$', views.new_note, name='article_new_note'),


    # Publication
    url(r'^publish/$',
        views.publish, name='publish'),
    url(r'^publish/article/(?P<article_id>\d+)/$',
        views.publish_article, name='publish_article'),
    url(r'^publish/article/(?P<article_id>\d+)/check/$',
        views.publish_article_check, name='publish_article_check'),
    url(r'^manage/issues/$',
        views.manage_issues, name='manage_issues'),
    url(r'^manage/issues/order/$',
        views.issue_order, name='issue_order'),
    url(r'^manage/issues/(?P<issue_id>\d+)/$',
        views.manage_issues, name='manage_issues_id'),
    url(r'^manage/issues/(?P<issue_id>\d+)/add/article/$',
        views.issue_add_article, name='issue_add_article'),
    url(r'^manage/issues/(?P<issue_id>\d+)/order/$',
        views.issue_article_order, name='issue_article_order'),
    url(r'^manage/issues/(?P<issue_id>\d+)/guest/$',
        views.add_guest_editor, name='manage_add_guest_editor'),
    url(r'^manage/issues/(?P<issue_id>\d+)/(?P<event>[-\w.]+)/$',
        views.manage_issues, name='manage_issues_event'),

    # Sorting
    url(r'^manage/issues/(?P<issue_id>\d+)/sort/sections/$',
        views.sort_issue_sections, name='manage_sort_issue_sections'),


    url(r'^manage/archive/$',
        views.manage_archive, name='manage_archive'),
    url(r'^manage/archive/article/(?P<article_id>\d+)/$',
        views.manage_archive_article, name='manage_archive_article'),

    url(r'^manage/article/(?P<article_id>\d+)/log/$',
        views.manage_article_log, name='manage_article_log'),

    # Reviewer
    url(r'^reviewer/$',
        views.become_reviewer, name='become_reviewer'),
    # Contact
    url(r'^contact/$',
        views.contact, name='contact'),
    # Editorial team
    url(r'^editorialteam/$',
        views.editorial_team, name='editorial_team'),
    # Editorial team
    url(r'^editorialteam/(?P<group_id>\d+)/$',
        views.editorial_team, name='editorial_team_group'),

    # Search
    url(r'^search/$',
        views.search, name='search'),

    # Submissions
    url(r'^submissions/$',
        views.submissions, name='journal_submissions'),


    # Edit file with Texture
    url(r'^texture/(?P<file_id>\d+)/edit/$',
        views.texture_edit, name='texture_edit'),
]
<commit_msg>Tweaked urls.py<commit_after>__copyright__ = "Copyright 2017 Birkbeck, University of London"
__author__ = "<NAME> & <NAME>"
__license__ = "AGPL v3"
__maintainer__ = "Birkbeck Centre for Technology and Publishing"

from django.conf.urls import url

from journal import views

urlpatterns = [
    # Probably needs some multi-journal logic here
    url(r'^article/(?P<article_id>\d+)/galley/(?P<galley_id>\d+)/figure/(?P<file_name>.*)/$',
        views.article_figure,
        name='article_figure'),
    url(r'^article/(?P<identifier_type>.+?)/(?P<identifier>.+)/file/(?P<file_id>\d+)/replace$',
        views.replace_article_file,
        name='article_file_replace'),
    url(r'^article/(?P<identifier_type>.+?)/(?P<identifier>.+)/file/(?P<file_id>\d+|None)/$',
        views.serve_article_file,
        name='article_file_download'),
    url(r'^article/(?P<article_id>\d+)/galley/(?P<galley_id>\d+)/download/',
        views.download_galley,
        name='article_download_galley'),
    url(r'^article/(?P<identifier_type>.+?)/(?P<identifier>.+?/.+?)/(?P<file_name>.+)$',
        views.identifier_figure,
        name='article_figure'),
    url(r'^articles/$', views.articles, name='journal_articles'),
    url(r'^issues/$', views.issues, name='journal_issues'),
    url(r'^issue/current/$', views.current_issue, name='current_issue'),
    url(r'^issue/(?P<issue_id>\d+)/info/$', views.issue, name='journal_issue'),
    url(r'^collections/$', views.collections, name='journal_collections'),
    url(r'^collections/(?P<collection_id>\d+)/$', views.collection, name='journal_collection'),
    url(r'^cover/$', views.serve_journal_cover, name='journal_cover_download'),

    url(r'^article/(?P<identifier_type>.+?)/(?P<identifier>.+)/edit/$', views.edit_article, name='article_edit'),
    url(r'^article/(?P<identifier_type>.+?)/(?P<identifier>.+)/print/$', views.print_article,
        name='article_print_article'),
    url(r'^article/(?P<identifier_type>.+?)/(?P<identifier>.+)/$', views.article, name='article_view'),
    url(r'^(?P<article_id>\d+)/files/(?P<file_id>\d+)/info/$', views.submit_files_info,
        name='submit_replacement_files_info'),
    url(r'^(?P<article_id>\d+)/files/(?P<file_id>\d+)/history/$', views.file_history,
        name='file_history'),
    url(r'^(?P<article_id>\d+)/files/(?P<file_id>\d+)/delete/$', views.file_delete,
        name='file_delete'),
    url(r'^(?P<article_id>\d+)/files/(?P<file_id>\d+)/old/(?P<file_history_id>\d+)/reinstate/$',
        views.file_reinstate,
        name='file_reinstate'),
    url(r'^(?P<article_id>\d+)/file/(?P<file_id>\d+)/makegalley/$', views.article_file_make_galley,
        name='article_file_make_galley'),
    url(r'^note/(?P<article_id>\d+)/new/$', views.new_note, name='article_new_note'),


    # Publication
    url(r'^publish/$',
        views.publish, name='publish'),
    url(r'^publish/article/(?P<article_id>\d+)/$',
        views.publish_article, name='publish_article'),
    url(r'^publish/article/(?P<article_id>\d+)/check/$',
        views.publish_article_check, name='publish_article_check'),
    url(r'^manage/issues/$',
        views.manage_issues, name='manage_issues'),
    url(r'^manage/issues/order/$',
        views.issue_order, name='issue_order'),
    url(r'^manage/issues/(?P<issue_id>\d+)/$',
        views.manage_issues, name='manage_issues_id'),
    url(r'^manage/issues/(?P<issue_id>\d+)/add/article/$',
        views.issue_add_article, name='issue_add_article'),
    url(r'^manage/issues/(?P<issue_id>\d+)/order/$',
        views.issue_article_order, name='issue_article_order'),
    url(r'^manage/issues/(?P<issue_id>\d+)/guest/$',
        views.add_guest_editor, name='manage_add_guest_editor'),
    url(r'^manage/issues/(?P<issue_id>\d+)/(?P<event>[-\w.]+)/$',
        views.manage_issues, name='manage_issues_event'),

    # Sorting
    url(r'^manage/issues/(?P<issue_id>\d+)/sort/sections/$',
        views.sort_issue_sections, name='manage_sort_issue_sections'),


    url(r'^manage/archive/$',
        views.manage_archive, name='manage_archive'),
    url(r'^manage/archive/article/(?P<article_id>\d+)/$',
        views.manage_archive_article, name='manage_archive_article'),

    url(r'^manage/article/(?P<article_id>\d+)/log/$',
        views.manage_article_log, name='manage_article_log'),

    # Reviewer
    url(r'^reviewer/$',
        views.become_reviewer, name='become_reviewer'),
    # Contact
    url(r'^contact/$',
        views.contact, name='contact'),
    # Editorial team
    url(r'^editorialteam/$',
        views.editorial_team, name='editorial_team'),
    # Editorial team
    url(r'^editorialteam/(?P<group_id>\d+)/$',
        views.editorial_team, name='editorial_team_group'),

    # Search
    url(r'^search/$',
        views.search, name='search'),

    # Submissions
    url(r'^submissions/$',
        views.submissions, name='journal_submissions'),


    # Edit file with Texture
    url(r'^texture/(?P<file_id>\d+)/edit/$',
        views.texture_edit, name='texture_edit'),
]

{'fraction_non_alphanumeric': 0.21062599681020733, 'fraction_numerical': 0.000996810207336523, 'mean_word_length': 4.300052826201796, 'pattern_counts': {'":': 0, '<': 101, '<?xml version=': 0, '>': 101, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2928992', 'n_tokens_mistral': 3695, 'n_tokens_neox': 3488, 'n_words': 351}