Convertisseur Drupal 6 vers SPIP pour le site web libre à lire
Go to file
2020-08-15 16:32:29 +02:00
drupal2spip_lal fix(convert): corrige une tendance à faire des duplicatas 2020-08-09 18:58:14 +02:00
requirements fix(deps): corrige les deps pour une debian buster nue 2020-08-15 16:32:29 +02:00
.editorconfig commit initial 2020-08-01 11:38:37 +02:00
.gitattributes commit initial 2020-08-01 11:38:37 +02:00
.gitignore feat(build): introspecte le schéma de base de donnée de spip 2020-08-01 14:39:27 +02:00
CHANGELOG.md commit initial 2020-08-01 11:38:37 +02:00
config.env.example feat(doc): Dégraissage du README et MaJ du config.env 2020-08-03 23:14:37 +02:00
CONTRIBUTORS.txt commit initial 2020-08-01 11:38:37 +02:00
LICENSE commit initial 2020-08-01 11:38:37 +02:00
Makefile feat(spip): ajoute la prise en compte d un préfixe de tables 2020-08-01 15:53:56 +02:00
manage.py commit initial 2020-08-01 11:38:37 +02:00
pyproject.toml feat(lint): configuration des linters 2020-08-01 14:39:27 +02:00
README.md ref(convert): filtrage html directement via le module drupal 2020-08-08 16:59:19 +02:00
requirements.txt commit initial 2020-08-01 11:38:37 +02:00
setup.cfg feat(lint): configuration des linters 2020-08-01 14:39:27 +02:00

drupal2spip_lal

Convertisseur Drupal 6 vers SPIP pour le site web libre à lire

Table of content

Installation

Requirements

On a Debian-based host - running at least Debian Stretch, you will need the following packages:

  • python3
  • virtualenv
  • make
  • git (recommended for getting the source)
  • python3-mysqldb (optional, in case of a MySQL / MariaDB database)
  • python3-psycopg2 (optional, in case of a PostgreSQL database)

Let's go

On a Debian-based host - running at least Debian Stretch:

$ sudo apt install python3 virtualenv git make
$ git clone https://forge.april.org/siteweb/drupal2spip_lal
$ cd drupal2spip_lal/
$ make init

A configuration will be created interactively; uncomment

ENV=development

And set:

  • DRUPAL_FQDN
  • DRUPAL_DATABASE_URL
  • SPIP_DATABASE_URL
  • SPIP_TABLES_PREFIX
  • SPIP_LOGO_DIR

Then try:

$ make inspectdb
$ make check

Usage

See:

$ venv/bin/python manage.py import --help

That's it!

Structure

Overview

All the application files - e.g. Django code including settings, templates and statics - are located into drupal2spip_lal/.

Two environments are defined - either for requirements and settings:

  • development: for local application development and testing. It uses a SQLite3 database and enable debugging by default, add some useful settings and applications for development purpose - i.e. the django-debug-toolbar.
  • production: for production. Unused here.

Local changes

You can override and extend statics and templates locally. This can be useful if you have to change the logo for a specific instance for example. For that, just put your files under the local/static/ and local/templates/ folders.

Regarding the statics, do not forget to collect them after that. Note also that the local/ folder is ignored by git.

Variable content

All the variable content - e.g. user-uploaded media, collected statics - are stored inside the var/ folder. It is also ignored by git as it's specific to each application installation.

So, you will have to configure your Web server to serve the var/media/ and var/static/ folders, which should point to /media/ and /static/, respectively.

Development

The easiest way to deploy a development environment is by using the Makefile.

Before running make init, ensure that you have either set ENV=development in the config.env file or have this environment variable. Note that you can still change this variable later and run make init again.

There is some additional rules when developing, which are mainly wrappers for manage.py. You can list all of them by running make help. Here are the main ones:

  • make serve: run a development server
  • make test: test the whole application
  • make lint: check the Python code syntax

License

drupal2spip_lal is developed by François Poulain (April) and licensed under the AGPLv3+. Its basis comes from https://forge.cliss21.org/cliss21/cookiecutter-django/

It embed code from Drupal 6 in drupal2spip_lal/base/php. This code is licensed under the GPLv2+.