<commit_before>===================================
 <NAME>' Professional Website
===================================

This package contains the source and deployment instructions for my personal
website. The latest version is available from `my github website
<http://github.com/anjos/website>`.

Installation
------------

Clone this package using the following command::

  $ git clone <EMAIL>:anjos/website
  $ git submodule init
  $ git submodule update

After that, bootstrap the environment::

  $ python bootstrap.py
  $ ./bin/buildout

Create the PDF for your CV::

  $ cd anjos/website/static/cv
  $ make

By default, the settings on the project are setup to work with a local
``db.sql3`` that should be placed at the root of the package. You can also work
against a MySQL server. In such a case, you will need to get hold of the MySQL
connection string. You can copy the one on your private server, if you have the
right to do so::

  $ scp <EMAIL>:andreanjos.org/anjos.website/anjos/website/dbconfig.py anjos/website

Otherwise, here is a template (it should be placed on the same directory as
``settings.py`` is)::

  import os

  DATABASES = {
      'local': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': os.path.join(os.path.dirname(__file__), 'local.sql3')
        },
      'server': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': '<database-name>',
        'USER': '<database-user>',
        'PASSWORD': '*********',
        'HOST': 'mysql.andreanjos.org',
        'PORT': '3306',
        },
      }

  DATABASES['default'] = DATABASES['server']

.. warning::

  Make sure you don't make the above file public, or checks it into the git
  repository. It contains sensitive data (username, password and the database
  server address).

Next, you will need to copy media only available remotely, to the current
working directory and collect all apps static files::

  $ ./bin/dj collectstatic --noinput
  $ rsync -avz andreanj<EMAIL>:andreanjos.org/public/ static/

Maintenance
-----------

Here are some common tips for maintenance.

Running a Test Server
=====================

To start a test server::

  $ ./bin/dj runserver

Removing Obsolete ContentTypes<commit_msg>Do not copy the static, but the media folder<commit_after>===================================
 <NAME>' Professional Website
===================================

This package contains the source and deployment instructions for my personal
website. The latest version is available from `my github website
<http://github.com/anjos/website>`.

Installation
------------

Clone this package using the following command::

  $ git clone <EMAIL>:anjos/website
  $ git submodule init
  $ git submodule update

After that, bootstrap the environment::

  $ python bootstrap.py
  $ ./bin/buildout

Create the PDF for your CV::

  $ cd anjos/website/static/cv
  $ make

By default, the settings on the project are setup to work with a local
``db.sql3`` that should be placed at the root of the package. You can also work
against a MySQL server. In such a case, you will need to get hold of the MySQL
connection string. You can copy the one on your private server, if you have the
right to do so::

  $ scp <EMAIL>:andreanjos.org/anjos.website/anjos/website/dbconfig.py anjos/website

Otherwise, here is a template (it should be placed on the same directory as
``settings.py`` is)::

  import os

  DATABASES = {
      'local': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': os.path.join(os.path.dirname(__file__), 'local.sql3')
        },
      'server': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': '<database-name>',
        'USER': '<database-user>',
        'PASSWORD': '*********',
        'HOST': 'mysql.andreanjos.org',
        'PORT': '3306',
        },
      }

  DATABASES['default'] = DATABASES['server']

.. warning::

  Make sure you don't make the above file public, or checks it into the git
  repository. It contains sensitive data (username, password and the database
  server address).

Next, you will need to copy media only available remotely, to the current
working directory and collect all apps static files::

  $ ./bin/dj collectstatic --noinput
  $ rsync -avz <EMAIL>:andreanjos.org/public/media media/

Maintenance
-----------

Here are some common tips for maintenance.

Running a Test Server
=====================

To start a test server::

  $ ./bin/dj runserver

Removing Obsolete ContentTypes
{'fraction_non_alphanumeric': 0.1491169237648111, 'fraction_numerical': 0.003129890453834116, 'mean_word_length': 3.347910592808552, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1135193', 'n_tokens_mistral': 1320, 'n_tokens_neox': 1248, 'n_words': 497}