Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Source specifying for relative links is allowed #2

6 changes: 6 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ The link map file can be supplied using `-f` or `--link_file`::

cc2olx -r zip -i <IMSCC_FILE> -f <CSV_FILE>

If the original course content contains relative links and the resources
(images, documents etc) the links point to are not included into the exported
course dump, you can specify their source using `-s` flag:

cc2olx -i <IMSCC_FILE> -s <RELATIVE_LINKS_SOURCE>

Dockerization
-------------

Expand Down
1 change: 1 addition & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[pytest]
usefixtures = chdir_to_workspace
DJANGO_SETTINGS_MODULE = cc2olx.django_settings
1 change: 1 addition & 0 deletions requirements/base.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Core requirements for this package

Django
lxml
requests
youtube-dl
22 changes: 16 additions & 6 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,27 @@
#
# make upgrade
#
certifi==2024.2.2
asgiref==3.8.1
# via django
backports-zoneinfo==0.2.1
# via django
certifi==2024.12.14
# via requests
charset-normalizer==3.3.2
charset-normalizer==3.4.1
# via requests
idna==3.6
django==4.2.17
# via -r requirements/base.in
idna==3.10
# via requests
lxml==5.1.0
lxml==5.3.0
# via -r requirements/base.in
requests==2.31.0
requests==2.32.3
# via -r requirements/base.in
urllib3==2.2.1
sqlparse==0.5.3
# via django
typing-extensions==4.12.2
# via asgiref
urllib3==2.2.3
# via requests
youtube-dl==2021.12.17
# via -r requirements/base.in
123 changes: 71 additions & 52 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,125 +4,144 @@
#
# make upgrade
#
black==24.3.0
# via -r requirements/quality.txt
cachetools==5.3.3
asgiref==3.8.1
# via
# -r /home/misha/work/cc2olx/requirements/quality.txt
# django
backports-zoneinfo==0.2.1
# via
# -r /home/misha/work/cc2olx/requirements/quality.txt
# django
black==24.8.0
# via -r /home/misha/work/cc2olx/requirements/quality.txt
cachetools==5.5.0
# via tox
certifi==2024.2.2
certifi==2024.12.14
# via
# -r requirements/quality.txt
# -r /home/misha/work/cc2olx/requirements/quality.txt
# requests
chardet==5.2.0
# via tox
charset-normalizer==3.3.2
charset-normalizer==3.4.1
# via
# -r requirements/quality.txt
# -r /home/misha/work/cc2olx/requirements/quality.txt
# requests
click==8.1.7
click==8.1.8
# via
# -r requirements/quality.txt
# -r /home/misha/work/cc2olx/requirements/quality.txt
# black
colorama==0.4.6
# via tox
coverage[toml]==7.4.4
coverage[toml]==7.6.1
# via
# -r /home/misha/work/cc2olx/requirements/quality.txt
# -r requirements/ci.in
# -r requirements/quality.txt
# pytest-cov
distlib==0.3.8
distlib==0.3.9
# via virtualenv
exceptiongroup==1.2.0
django==4.2.17
# via -r /home/misha/work/cc2olx/requirements/quality.txt
exceptiongroup==1.2.2
# via
# -r requirements/quality.txt
# -r /home/misha/work/cc2olx/requirements/quality.txt
# pytest
filelock==3.13.3
filelock==3.16.1
# via
# tox
# virtualenv
flake8==7.0.0
# via -r requirements/quality.txt
idna==3.6
flake8==7.1.1
# via -r /home/misha/work/cc2olx/requirements/quality.txt
idna==3.10
# via
# -r requirements/quality.txt
# -r /home/misha/work/cc2olx/requirements/quality.txt
# requests
iniconfig==2.0.0
# via
# -r requirements/quality.txt
# -r /home/misha/work/cc2olx/requirements/quality.txt
# pytest
lxml==5.1.0
# via -r requirements/quality.txt
lxml==5.3.0
# via -r /home/misha/work/cc2olx/requirements/quality.txt
mccabe==0.7.0
# via
# -r requirements/quality.txt
# -r /home/misha/work/cc2olx/requirements/quality.txt
# flake8
mypy-extensions==1.0.0
# via
# -r requirements/quality.txt
# -r /home/misha/work/cc2olx/requirements/quality.txt
# black
packaging==24.0
packaging==24.2
# via
# -r requirements/quality.txt
# -r /home/misha/work/cc2olx/requirements/quality.txt
# black
# pyproject-api
# pytest
# tox
pathspec==0.12.1
# via
# -r requirements/quality.txt
# -r /home/misha/work/cc2olx/requirements/quality.txt
# black
platformdirs==4.2.0
platformdirs==4.3.6
# via
# -r requirements/quality.txt
# -r /home/misha/work/cc2olx/requirements/quality.txt
# black
# tox
# virtualenv
pluggy==1.4.0
pluggy==1.5.0
# via
# -r requirements/quality.txt
# -r /home/misha/work/cc2olx/requirements/quality.txt
# pytest
# tox
pycodestyle==2.11.1
pycodestyle==2.12.1
# via
# -r requirements/quality.txt
# -r /home/misha/work/cc2olx/requirements/quality.txt
# flake8
pyflakes==3.2.0
# via
# -r requirements/quality.txt
# -r /home/misha/work/cc2olx/requirements/quality.txt
# flake8
pyproject-api==1.6.1
pyproject-api==1.8.0
# via tox
pytest==8.1.1
pytest==8.3.4
# via
# -r requirements/quality.txt
# -r /home/misha/work/cc2olx/requirements/quality.txt
# pytest-cov
# pytest-django
# pytest-mock
pytest-cov==5.0.0
# via -r requirements/quality.txt
# via -r /home/misha/work/cc2olx/requirements/quality.txt
pytest-django==4.9.0
# via -r /home/misha/work/cc2olx/requirements/quality.txt
pytest-mock==3.14.0
# via -r requirements/quality.txt
requests==2.31.0
# via -r requirements/quality.txt
tomli==2.0.1
# via -r /home/misha/work/cc2olx/requirements/quality.txt
requests==2.32.3
# via -r /home/misha/work/cc2olx/requirements/quality.txt
sqlparse==0.5.3
# via
# -r requirements/quality.txt
# -r /home/misha/work/cc2olx/requirements/quality.txt
# django
tomli==2.2.1
# via
# -r /home/misha/work/cc2olx/requirements/quality.txt
# black
# coverage
# pyproject-api
# pytest
# tox
tox==4.14.2
tox==4.23.2
# via -r requirements/ci.in
typing-extensions==4.10.0
typing-extensions==4.12.2
# via
# -r requirements/quality.txt
# -r /home/misha/work/cc2olx/requirements/quality.txt
# asgiref
# black
urllib3==2.2.1
# tox
urllib3==2.2.3
# via
# -r requirements/quality.txt
# -r /home/misha/work/cc2olx/requirements/quality.txt
# requests
virtualenv==20.25.1
virtualenv==20.28.1
# via tox
xmlformatter==0.2.6
# via -r requirements/quality.txt
xmlformatter==0.2.8
# via -r /home/misha/work/cc2olx/requirements/quality.txt
youtube-dl==2021.12.17
# via -r requirements/quality.txt
# via -r /home/misha/work/cc2olx/requirements/quality.txt
17 changes: 8 additions & 9 deletions requirements/common_constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,21 @@
# Note: Changes to this file will automatically be used by other repos, referencing
# this file from Github directly. It does not require packaging in edx-lint.


# using LTS django version
Django<5.0

# elasticsearch>=7.14.0 includes breaking changes in it which caused issues in discovery upgrade process.
# elastic search changelog: https://www.elastic.co/guide/en/enterprise-search/master/release-notes-7.14.0.html
# See https://github.com/openedx/edx-platform/issues/35126 for more info
elasticsearch<7.14.0

# django-simple-history>3.0.0 adds indexing and causes a lot of migrations to be affected
django-simple-history==3.0.0

# opentelemetry requires version 6.x at the moment:
# https://github.com/open-telemetry/opentelemetry-python/issues/3570
# Normally this could be added as a constraint in edx-django-utils, where we're
# adding the opentelemetry dependency. However, when we compile pip-tools.txt,
# that uses version 7.x, and then there's no undoing that when compiling base.txt.
# So we need to pin it globally, for now.
# Ticket for unpinning: https://github.com/openedx/edx-lint/issues/407
importlib-metadata<7
# Cause: https://github.com/openedx/edx-lint/issues/458
# This can be unpinned once https://github.com/openedx/edx-lint/issues/459 has been resolved.
pip<24.3

# Cause: https://github.com/openedx/edx-lint/issues/475
# This can be unpinned once https://github.com/openedx/edx-lint/issues/476 has been resolved.
urllib3<2.3.0
Loading
Loading