diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md new file mode 100644 index 00000000..da2e8745 --- /dev/null +++ b/DEVELOPMENT.md @@ -0,0 +1,22 @@ +This document contains instructions to set up your system for WROLPi development. + +# Setup + +## Debian 12 + +1. Install accessory packages necessary for testing: + * `sudo apt install ffmpeg chromium chromium-driver sysstat aria2 nodejs npm` +2. Create Python environment: + * `python -m venv venv` +3. Activate the new environment: + * `. venv/bin/activate` +4. Build the docker containers: + * `./scripts/dev_build.sh` +5. Start the docker containers: + * `docker compose up` +6. Browse to the development containers: + * https://localhost:8443 +7. Install npm dependencies used outside the app: + * `npm install single-file-cli@2.0.73 readability-extractor@0.0.6` +8. Run the tests. All tests should pass. + * `pytest` diff --git a/modules/archive/test/test_lib.py b/modules/archive/test/test_lib.py index f6ed8d30..8bc1d29e 100644 --- a/modules/archive/test/test_lib.py +++ b/modules/archive/test/test_lib.py @@ -277,7 +277,7 @@ def test_get_domains(test_session, archive_factory): @pytest.mark.asyncio -async def test_new_archive(test_session, fake_now): +async def test_new_archive(test_session, fake_now, test_directory): singlefile, readability, screenshot = make_fake_archive_result() fake_now(datetime(2000, 1, 1)) archive1 = await model_archive_result('https://example.com', singlefile, readability, screenshot) diff --git a/wrolpi/files/indexers.py b/wrolpi/files/indexers.py index 0b58997c..502fb3d2 100644 --- a/wrolpi/files/indexers.py +++ b/wrolpi/files/indexers.py @@ -150,6 +150,7 @@ class DocIndexer(Indexer, ABC): def create_index(cls, path: pathlib.Path): a = cls.get_title(path) + text = '' if CATDOC_PATH: # Use catdoc on Linux cmd = (CATDOC_PATH, str(path.absolute()))