<commit_before>**************************
djangocms-lab-publications
**************************

``djangocms-lab-publications`` is a Django app for adding sets of scientific publications with PubMed metadata to a Django site with django CMS-specific features. It uses ``pubmed-lookup`` to query PubMed using PubMed IDs or PubMed URLs.

Source code is available on GitHub at `mfcovington/djangocms-lab-publications <https://github.com/mfcovington/djangocms-lab-publications>`_. Information about and source code for ``pubmed-lookup`` is available on GitHub at `mfcovington/pubmed-lookup <https://github.com/mfcovington/pubmed-lookup>`_.

.. contents:: :local:


Installation
============

**PyPI**

.. code-block:: sh

    pip install djangocms-lab-publications

**GitHub**

.. code-block:: sh

    pip install https://github.com/mfcovington/djangocms-lab-publications/releases/download/0.1.4/djangocms-lab-publications-0.1.4.tar.gz


Configuration
=============

Do the following in ``settings.py``:

- Add ``cms_lab_publications`` and its dependencies to ``INSTALLED_APPS``:

.. code-block:: python

    INSTALLED_APPS = (
        ...
        'taggit',
        'taggit_helpers',
        'cms_lab_publications',
        'easy_thumbnails',
        'filer',
        'mptt',
    )


- Specify your media settings, if necessary:

.. code-block:: python

    MEDIA_URL = '/media/'
    MEDIA_ROOT = os.path.join(BASE_DIR, 'media')


- Add ``easy_thumbnail`` settings: 

.. code-block:: python

    # For easy_thumbnails to support retina displays (recent MacBooks, iOS)
    THUMBNAIL_HIGH_RESOLUTION = True
    THUMBNAIL_QUALITY = 95
    THUMBNAIL_PROCESSORS = (
        'easy_thumbnails.processors.colorspace',
        'easy_thumbnails.processors.autocrop',
        'filer.thumbnail_processors.scale_and_crop_with_subject_location',
        'easy_thumbnails.processors.filters',
    )
    THUMBNAIL_PRESERVE_EXTENSIONS = ('png', 'gif')
    THUMBNAIL_SUBDIR = 'versions'


If ``cms_lab_publications`` is used in a project served by Apache, a config directory must be created within the Apache user's home directory. This config directory is used by code within biopython's ``Bio.Entrez.Parser.DataHandler`` which is used by ``pubmed_lookup``, a dependency of ``cms_lab_publications``.

.. code-block:: sh

    # In this snippet, the Apache user is 'www-data' and<commit_msg>Remove media settings info from README (already included by django CMS)<commit_after>**************************
djangocms-lab-publications
**************************

``djangocms-lab-publications`` is a Django app for adding sets of scientific publications with PubMed metadata to a Django site with django CMS-specific features. It uses ``pubmed-lookup`` to query PubMed using PubMed IDs or PubMed URLs.

Source code is available on GitHub at `mfcovington/djangocms-lab-publications <https://github.com/mfcovington/djangocms-lab-publications>`_. Information about and source code for ``pubmed-lookup`` is available on GitHub at `mfcovington/pubmed-lookup <https://github.com/mfcovington/pubmed-lookup>`_.

.. contents:: :local:


Installation
============

**PyPI**

.. code-block:: sh

    pip install djangocms-lab-publications

**GitHub**

.. code-block:: sh

    pip install https://github.com/mfcovington/djangocms-lab-publications/releases/download/0.1.4/djangocms-lab-publications-0.1.4.tar.gz


Configuration
=============

Do the following in ``settings.py``:

- Add ``cms_lab_publications`` and its dependencies to ``INSTALLED_APPS``:

.. code-block:: python

    INSTALLED_APPS = (
        ...
        'taggit',
        'taggit_helpers',
        'cms_lab_publications',
        'easy_thumbnails',
        'filer',
        'mptt',
    )


- Add ``easy_thumbnail`` settings: 

.. code-block:: python

    # For easy_thumbnails to support retina displays (recent MacBooks, iOS)
    THUMBNAIL_HIGH_RESOLUTION = True
    THUMBNAIL_QUALITY = 95
    THUMBNAIL_PROCESSORS = (
        'easy_thumbnails.processors.colorspace',
        'easy_thumbnails.processors.autocrop',
        'filer.thumbnail_processors.scale_and_crop_with_subject_location',
        'easy_thumbnails.processors.filters',
    )
    THUMBNAIL_PRESERVE_EXTENSIONS = ('png', 'gif')
    THUMBNAIL_SUBDIR = 'versions'


If ``cms_lab_publications`` is used in a project served by Apache, a config directory must be created within the Apache user's home directory. This config directory is used by code within biopython's ``Bio.Entrez.Parser.DataHandler`` which is used by ``pubmed_lookup``, a dependency of ``cms_lab_publications``.

.. code-block:: sh

    # In this snippet, the Apache user is 'www-data' and
{'fraction_non_alphanumeric': 0.13793845491715084, 'fraction_numerical': 0.003443081557994405, 'mean_word_length': 3.9133192389006344, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1135223', 'n_tokens_mistral': 1552, 'n_tokens_neox': 1434, 'n_words': 374}