├── swh └── web │ ├── api │ ├── __init__.py │ ├── tests │ │ ├── __init__.py │ │ └── views │ │ │ ├── __init__.py │ │ │ └── test_ping.py │ └── views │ │ ├── __init__.py │ │ └── ping.py │ ├── alter │ ├── __init__.py │ ├── tests │ │ └── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── templatetags │ │ └── __init__.py │ ├── assets │ │ ├── index.js │ │ └── alter.css │ ├── apps.py │ └── templates │ │ ├── alter_common.html │ │ ├── emails │ │ ├── admin_message_notification.txt │ │ ├── admin_alteration_notification.txt │ │ ├── email_magic_link.txt │ │ ├── message_notification.txt │ │ ├── alteration_magic_link.txt │ │ └── alteration_confirmation.txt │ │ └── includes │ │ └── reasons_outcome.html │ ├── banners │ ├── __init__.py │ ├── tests │ │ └── __init__.py │ ├── urls.py │ └── templates │ │ └── hiring-banner.html │ ├── browse │ ├── __init__.py │ ├── tests │ │ ├── __init__.py │ │ ├── views │ │ │ ├── __init__.py │ │ │ └── conftest.py │ │ └── data │ │ │ └── content_iso-8859-7_encoded │ ├── views │ │ └── __init__.py │ ├── assets │ │ ├── origin_visits │ │ │ ├── index.js │ │ │ └── utils.js │ │ ├── revision │ │ │ └── index.js │ │ ├── browse │ │ │ ├── breadcrumbs.css │ │ │ └── index.js │ │ ├── guided_tour │ │ │ └── swh-introjs.css │ │ └── mathjax │ │ │ └── index.js │ ├── templates │ │ ├── browse-content.html │ │ ├── browse-directory.html │ │ └── includes │ │ │ ├── branch-search.html │ │ │ ├── empty-snapshot.html │ │ │ └── breadcrumbs.html │ └── identifiers.py │ ├── deposit │ ├── __init__.py │ └── tests │ │ └── __init__.py │ ├── metrics │ ├── __init__.py │ ├── tests │ │ ├── __init__.py │ │ └── test_app.py │ ├── urls.py │ └── views.py │ ├── settings │ ├── __init__.py │ └── development.py │ ├── tests │ ├── __init__.py │ ├── resources │ │ ├── repos │ │ │ ├── libtess2.zip │ │ │ ├── repo_with_cff_file.zip │ │ │ ├── repo_with_submodules.tgz │ │ │ ├── repo_with_metadata_file.zip │ │ │ ├── highlightjs-line-numbers.js.zip │ │ │ └── highlightjs-line-numbers.js_visit2.zip │ │ └── contents │ │ │ ├── code │ │ │ ├── extensions │ │ │ │ ├── test.dust │ │ │ │ ├── test.hbs │ │ │ │ ├── test.kt │ │ │ │ ├── test.ini │ │ │ │ ├── test.rb │ │ │ │ ├── test.lsl │ │ │ │ ├── test.properties │ │ │ │ ├── test.ceylon │ │ │ │ ├── test.go │ │ │ │ ├── test.golo │ │ │ │ ├── test.py │ │ │ │ ├── test.sh │ │ │ │ ├── test.json │ │ │ │ ├── test.erb │ │ │ │ ├── test.scad │ │ │ │ ├── test.wl │ │ │ │ ├── test.css │ │ │ │ ├── test.html │ │ │ │ ├── test.clj │ │ │ │ ├── test.applescript │ │ │ │ ├── test.coffee │ │ │ │ ├── test.sci │ │ │ │ ├── test.rs │ │ │ │ ├── test.swift │ │ │ │ ├── test.ts │ │ │ │ ├── test.haml │ │ │ │ ├── test.java │ │ │ │ ├── test.pde │ │ │ │ ├── test.leaf │ │ │ │ ├── test.cs │ │ │ │ ├── test.vim │ │ │ │ ├── test.au3 │ │ │ │ ├── test.hsp │ │ │ │ ├── test.ps1 │ │ │ │ ├── test.pony │ │ │ │ ├── test.cpp │ │ │ │ ├── test.adb │ │ │ │ ├── test.md │ │ │ │ ├── test.sqf │ │ │ │ ├── test.q │ │ │ │ ├── test.bf │ │ │ │ ├── test.sl │ │ │ │ ├── test.tex │ │ │ │ ├── test.elm │ │ │ │ ├── test.bas │ │ │ │ ├── test.bat │ │ │ │ ├── test.nim │ │ │ │ ├── test.nix │ │ │ │ ├── test.js │ │ │ │ ├── test.awk │ │ │ │ ├── test.ebnf │ │ │ │ ├── test.gml │ │ │ │ ├── test.bnf │ │ │ │ ├── test.cr │ │ │ │ ├── test.styl │ │ │ │ ├── test.f90 │ │ │ │ ├── test.ahk │ │ │ │ ├── test.sml │ │ │ │ ├── test.mel │ │ │ │ ├── test.cmake │ │ │ │ ├── test.abnf │ │ │ │ ├── test.gss │ │ │ │ ├── test.yml │ │ │ │ ├── test.as │ │ │ │ ├── test.gcode │ │ │ │ ├── test.cls │ │ │ │ ├── test.lc │ │ │ │ ├── test.proto │ │ │ │ ├── test.ldif │ │ │ │ ├── test.lisp │ │ │ │ ├── test.tcl │ │ │ │ ├── test.rsc │ │ │ │ ├── test.lua │ │ │ │ ├── test.ep │ │ │ │ ├── test.ml │ │ │ │ ├── test.p │ │ │ │ ├── test.thrift │ │ │ │ ├── test.rib │ │ │ │ ├── test.diff │ │ │ │ ├── test.glsl │ │ │ │ ├── test.moon │ │ │ │ ├── test.feature │ │ │ │ ├── test.ino │ │ │ │ ├── test.dcl │ │ │ │ ├── test.scm │ │ │ │ ├── test.tap │ │ │ │ ├── test.less │ │ │ │ ├── test.dfm │ │ │ │ ├── test.dts │ │ │ │ ├── test.ls │ │ │ │ ├── test.pbi │ │ │ │ ├── test.mk │ │ │ │ ├── test.nsi │ │ │ │ ├── test.cal │ │ │ │ ├── test.dart │ │ │ │ ├── test.do │ │ │ │ ├── test.xqy │ │ │ │ ├── test.subunit │ │ │ │ └── test.pl │ │ │ └── filenames │ │ │ │ ├── access.log │ │ │ │ ├── Makefile │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── .htaccess │ │ │ │ ├── httpd.conf │ │ │ │ └── pf.conf │ │ │ └── other │ │ │ └── extensions │ │ │ ├── swh-logo.jpeg │ │ │ ├── swh-logo.png │ │ │ ├── swh-logo.webp │ │ │ ├── swh-spinner.gif │ │ │ └── bash-cheatsheet.pdf │ ├── django_asserts.py │ ├── pytest_plugin.py │ └── test_create_users.py │ ├── vault │ ├── __init__.py │ ├── tests │ │ ├── __init__.py │ │ └── test_views.py │ └── assets │ │ ├── index.js │ │ └── vault.css │ ├── webapp │ ├── __init__.py │ ├── tests │ │ └── __init__.py │ ├── assets │ │ ├── webapp │ │ │ ├── heading-anchors.css │ │ │ ├── heading-anchors.js │ │ │ ├── history-counters.css │ │ │ ├── breadcrumbs.css │ │ │ ├── index.js │ │ │ └── status-widget.css │ │ └── vendors │ │ │ └── bootstrap.scss │ └── templates │ │ ├── includes │ │ ├── http-error.html │ │ └── favicon.html │ │ ├── error.html │ │ └── masked.html │ ├── admin │ ├── tests │ │ ├── __init__.py │ │ └── test_app.py │ ├── __init__.py │ └── apps.py │ ├── auth │ ├── tests │ │ └── __init__.py │ ├── migrations │ │ ├── __init__.py │ │ ├── 0003_delete_oidcuser.py │ │ ├── 0002_remove_stored_tokens.py │ │ └── 0009_create_provenance_permission.py │ ├── __init__.py │ ├── apps.py │ ├── assets │ │ └── auth.css │ ├── models.py │ └── templates │ │ └── login.html │ ├── badges │ ├── tests │ │ └── __init__.py │ ├── assets │ │ └── badges.css │ └── urls.py │ ├── jslicenses │ ├── __init__.py │ ├── tests │ │ ├── __init__.py │ │ └── test_jslicenses.py │ └── urls.py │ ├── mailmap │ ├── tests │ │ ├── __init__.py │ │ └── test_migrations.py │ ├── management │ │ ├── __init__.py │ │ └── commands │ │ │ └── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── __init__.py │ └── apps.py │ ├── utils │ ├── tests │ │ └── __init__.py │ └── management │ │ ├── __init__.py │ │ └── commands │ │ └── __init__.py │ ├── archive_coverage │ ├── __init__.py │ ├── tests │ │ └── __init__.py │ ├── assets │ │ └── index.js │ └── urls.py │ ├── save_bulk │ ├── tests │ │ └── __init__.py │ ├── migrations │ │ ├── __init__.py │ │ └── 0002_alter_savebulkorigin_origin_url.py │ ├── __init__.py │ ├── apps.py │ └── urls.py │ ├── add_forge_now │ ├── tests │ │ └── __init__.py │ ├── migrations │ │ ├── __init__.py │ │ ├── 0008_turn_request_forge_url_into_url_field.py │ │ ├── 0003_request_submitter_forward_username.py │ │ ├── 0004_rename_tables.py │ │ ├── 0010_alter_request_forge_contact_comment.py │ │ ├── 0005_prepare_inbound_email.py │ │ └── 0002_authorized_null_comment.py │ ├── __init__.py │ ├── assets │ │ ├── forge-success-email.ejs │ │ └── add-forge.css │ ├── apps.py │ └── templates │ │ └── add-forge-list.html │ ├── inbound_email │ ├── tests │ │ ├── __init__.py │ │ └── resources │ │ │ ├── __init__.py │ │ │ ├── plaintext.eml │ │ │ ├── multipart_mixed.eml │ │ │ ├── multipart_alternative_text_only.eml │ │ │ ├── multipart_mixed2.eml │ │ │ └── multipart_alternative.eml │ ├── management │ │ ├── __init__.py │ │ └── commands │ │ │ ├── __init__.py │ │ │ └── process_inbound_email.py │ ├── __init__.py │ ├── apps.py │ └── urls.py │ ├── save_code_now │ ├── tests │ │ └── __init__.py │ ├── management │ │ ├── __init__.py │ │ └── commands │ │ │ └── __init__.py │ ├── migrations │ │ ├── __init__.py │ │ ├── 0012_saveoriginrequest_note.py │ │ ├── 0014_saveoriginrequest_snapshot_swhid.py │ │ ├── 0002_saveoriginrequest_visit_date.py │ │ ├── 0006_rename_origin_type.py │ │ ├── 0016_alter_saveoriginrequest_origin_url.py │ │ ├── 0010_saveoriginrequest_user_id.py │ │ ├── 0011_saveoriginrequest_user_ids.py │ │ ├── 0013_saveoriginrequest_webhook_info.py │ │ ├── 0005_remove_duplicated_authorized_origins.py │ │ └── 0008_save-code-now_indexes_20210106_1327.py │ ├── __init__.py │ ├── assets │ │ └── index.js │ └── apps.py │ ├── save_origin_webhooks │ ├── __init__.py │ ├── tests │ │ ├── __init__.py │ │ └── data │ │ │ └── sourceforge_webhook_payload_svn.json │ └── urls.py │ ├── py.typed │ ├── static │ ├── img │ │ ├── logos │ │ │ ├── bitbucket-hg.png │ │ │ ├── arch.png │ │ │ ├── aur.png │ │ │ ├── bower.png │ │ │ ├── cgit.png │ │ │ ├── conda.png │ │ │ ├── cpan.png │ │ │ ├── cran.png │ │ │ ├── dlang.png │ │ │ ├── elife.png │ │ │ ├── gitea.png │ │ │ ├── gnu.png │ │ │ ├── gogs.png │ │ │ ├── guix.png │ │ │ ├── hal.png │ │ │ ├── inria.jpg │ │ │ ├── ipol.png │ │ │ ├── maven.png │ │ │ ├── nixos.png │ │ │ ├── npm.png │ │ │ ├── opam.png │ │ │ ├── osdn.png │ │ │ ├── pypi.png │ │ │ ├── rpm.png │ │ │ ├── crates.png │ │ │ ├── debian.png │ │ │ ├── github.png │ │ │ ├── gitlab.png │ │ │ ├── gitweb.png │ │ │ ├── golang.png │ │ │ ├── hackage.png │ │ │ ├── pagure.png │ │ │ ├── pubdev.png │ │ │ ├── puppet.png │ │ │ ├── zenodo.png │ │ │ ├── bitbucket.png │ │ │ ├── gitorious.png │ │ │ ├── googlecode.png │ │ │ ├── heptapod.png │ │ │ ├── launchpad.png │ │ │ ├── packagist.png │ │ │ ├── rubygems.png │ │ │ ├── bioconductor.png │ │ │ ├── phabricator.png │ │ │ └── sourceforge.png │ │ ├── swh-logo.png │ │ ├── swh-donor.png │ │ ├── swh-mirror.png │ │ ├── swh-spinner.gif │ │ ├── swh-vault.png │ │ ├── arrow-up-small.png │ │ ├── swh-spinner-small.gif │ │ └── icons │ │ │ ├── swh-logo-32x32.png │ │ │ ├── swh-logo-archive-180x180.png │ │ │ ├── swh-logo-archive-192x192.png │ │ │ └── swh-logo-archive-270x270.png │ ├── security.txt │ └── xml │ │ └── swh-opensearch.xml │ ├── __init__.py │ ├── provenance │ ├── __init__.py │ ├── urls.py │ ├── apps.py │ └── tests │ │ └── test_apps.py │ └── gunicorn_config.py ├── docs ├── _static │ └── .placeholder ├── _templates │ └── .placeholder ├── .gitignore ├── conf.py ├── uri-scheme-api-graph.rst ├── Makefile ├── uri-scheme-api-release.rst ├── uri-scheme-api-snapshot.rst ├── uri-scheme-api-directory.rst ├── uri-scheme-api-stat.rst ├── uri-scheme-api-extid.rst ├── uri-scheme-api-provenance.rst ├── uri-scheme-api-revision.rst ├── uri-scheme-api-swhids.rst ├── index.rst ├── uri-scheme-api-content.rst ├── uri-scheme-api-origin.rst ├── uri-scheme-api-vault.rst ├── uri-scheme-api.rst └── uri-scheme-browse-release.rst ├── MANIFEST.in ├── cypress ├── fixtures │ ├── swh-logo.png │ ├── example.json │ ├── swh_1_dir_cd19126d815470b28919d64b2a8e6a3e37f900dd.tar.gz │ ├── swh_1_rev_1c480a4573d2a003fc2630c21c2b25829de49972.git.tar │ └── save-task-info.json └── e2e │ ├── statics.js │ └── back-to-top.cy.js ├── conftest.py ├── mirror_demo ├── static │ └── partner_logo.png ├── templates │ ├── mirror-homepage.html │ └── mirror-footer.html └── config.yml ├── AUTHORS ├── Makefile ├── CONTRIBUTORS ├── requirements-swh.txt ├── assets └── src │ └── utils │ ├── mathjax.js │ ├── org.js │ ├── showdown.js │ ├── requests-filter-checkbox.ejs │ ├── showdown.css │ ├── constants.js │ └── highlightjs.css ├── .git-blame-ignore-revs ├── .copier-answers.yml ├── nyc.config.js ├── requirements-test.txt ├── requirements.txt └── .gitignore /swh/web/api/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/_static/.placeholder: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/_templates/.placeholder: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/alter/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/banners/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/browse/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/deposit/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/metrics/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/settings/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/vault/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/webapp/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/admin/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/alter/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/api/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/api/views/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/auth/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/badges/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/banners/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/browse/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/browse/views/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/deposit/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/jslicenses/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/mailmap/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/metrics/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/utils/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/vault/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/webapp/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/alter/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/alter/templatetags/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/api/tests/views/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/archive_coverage/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/auth/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/browse/tests/views/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/jslicenses/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/mailmap/management/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/mailmap/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/save_bulk/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/utils/management/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/add_forge_now/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/archive_coverage/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/inbound_email/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/save_bulk/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/save_code_now/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/save_origin_webhooks/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | recursive-include swh/web/static * -------------------------------------------------------------------------------- /swh/web/add_forge_now/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/inbound_email/management/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/mailmap/management/commands/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/py.typed: -------------------------------------------------------------------------------- 1 | # Marker file for PEP 561. 2 | -------------------------------------------------------------------------------- /swh/web/save_code_now/management/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/save_code_now/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/save_origin_webhooks/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/utils/management/commands/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | _build/ 2 | apidoc/ 3 | *-stamp 4 | -------------------------------------------------------------------------------- /swh/web/inbound_email/management/commands/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/inbound_email/tests/resources/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/save_code_now/management/commands/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swh/web/static/img/logos/bitbucket-hg.png: -------------------------------------------------------------------------------- 1 | bitbucket.png -------------------------------------------------------------------------------- /docs/conf.py: -------------------------------------------------------------------------------- 1 | from swh.docs.sphinx.conf import * # noqa 2 | -------------------------------------------------------------------------------- /cypress/fixtures/swh-logo.png: -------------------------------------------------------------------------------- 1 | ../../swh/web/static/img/swh-logo.png -------------------------------------------------------------------------------- /conftest.py: -------------------------------------------------------------------------------- 1 | pytest_plugins = ["swh.auth.pytest_plugin", "swh.scheduler.pytest_plugin"] 2 | -------------------------------------------------------------------------------- /docs/uri-scheme-api-graph.rst: -------------------------------------------------------------------------------- 1 | Graph 2 | ----- 3 | 4 | .. autosimple:: swh.web.api.views.graph.api_graph 5 | -------------------------------------------------------------------------------- /swh/web/__init__.py: -------------------------------------------------------------------------------- 1 | from pkgutil import extend_path 2 | 3 | __path__ = extend_path(__path__, __name__) 4 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | include Makefile.sphinx 2 | APIDOC_EXCLUDES += ../assets ../cypress ../swh/web/static ../swh/*/settings 3 | -------------------------------------------------------------------------------- /docs/uri-scheme-api-release.rst: -------------------------------------------------------------------------------- 1 | Release 2 | ------- 3 | 4 | .. autosimple:: swh.web.api.views.release.api_release 5 | 6 | -------------------------------------------------------------------------------- /docs/uri-scheme-api-snapshot.rst: -------------------------------------------------------------------------------- 1 | Snapshot 2 | -------- 3 | 4 | .. autosimple:: swh.web.api.views.snapshot.api_snapshot 5 | -------------------------------------------------------------------------------- /swh/web/static/img/swh-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/swh-logo.png -------------------------------------------------------------------------------- /docs/uri-scheme-api-directory.rst: -------------------------------------------------------------------------------- 1 | Directory 2 | --------- 3 | 4 | .. autosimple:: swh.web.api.views.directory.api_directory 5 | -------------------------------------------------------------------------------- /swh/web/static/img/logos/arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/arch.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/aur.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/aur.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/bower.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/bower.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/cgit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/cgit.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/conda.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/conda.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/cpan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/cpan.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/cran.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/cran.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/dlang.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/dlang.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/elife.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/elife.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/gitea.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/gitea.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/gnu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/gnu.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/gogs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/gogs.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/guix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/guix.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/hal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/hal.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/inria.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/inria.jpg -------------------------------------------------------------------------------- /swh/web/static/img/logos/ipol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/ipol.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/maven.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/maven.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/nixos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/nixos.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/npm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/npm.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/opam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/opam.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/osdn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/osdn.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/pypi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/pypi.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/rpm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/rpm.png -------------------------------------------------------------------------------- /swh/web/static/img/swh-donor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/swh-donor.png -------------------------------------------------------------------------------- /swh/web/static/img/swh-mirror.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/swh-mirror.png -------------------------------------------------------------------------------- /swh/web/static/img/swh-spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/swh-spinner.gif -------------------------------------------------------------------------------- /swh/web/static/img/swh-vault.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/swh-vault.png -------------------------------------------------------------------------------- /docs/uri-scheme-api-stat.rst: -------------------------------------------------------------------------------- 1 | Archive statistics 2 | ------------------ 3 | 4 | .. autosimple:: swh.web.api.views.stat.api_stats 5 | -------------------------------------------------------------------------------- /mirror_demo/static/partner_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/mirror_demo/static/partner_logo.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/crates.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/crates.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/debian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/debian.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/github.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/gitlab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/gitlab.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/gitweb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/gitweb.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/golang.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/golang.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/hackage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/hackage.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/pagure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/pagure.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/pubdev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/pubdev.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/puppet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/puppet.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/zenodo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/zenodo.png -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Copyright (C) 2015-2019 The Software Heritage developers 2 | 3 | See http://www.softwareheritage.org/ for more information. 4 | -------------------------------------------------------------------------------- /swh/web/static/img/arrow-up-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/arrow-up-small.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/bitbucket.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/bitbucket.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/gitorious.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/gitorious.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/googlecode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/googlecode.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/heptapod.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/heptapod.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/launchpad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/launchpad.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/packagist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/packagist.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/rubygems.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/rubygems.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/bioconductor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/bioconductor.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/phabricator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/phabricator.png -------------------------------------------------------------------------------- /swh/web/static/img/logos/sourceforge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/logos/sourceforge.png -------------------------------------------------------------------------------- /swh/web/static/img/swh-spinner-small.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/swh-spinner-small.gif -------------------------------------------------------------------------------- /swh/web/static/security.txt: -------------------------------------------------------------------------------- 1 | Contact: mailto:security@softwareheritage.org 2 | Expires: 2026-11-30T23:00:00.000Z 3 | Preferred-Languages: en,fr -------------------------------------------------------------------------------- /swh/web/static/img/icons/swh-logo-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/icons/swh-logo-32x32.png -------------------------------------------------------------------------------- /swh/web/tests/resources/repos/libtess2.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/tests/resources/repos/libtess2.zip -------------------------------------------------------------------------------- /swh/web/browse/tests/data/content_iso-8859-7_encoded: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/browse/tests/data/content_iso-8859-7_encoded -------------------------------------------------------------------------------- /swh/web/static/img/icons/swh-logo-archive-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/icons/swh-logo-archive-180x180.png -------------------------------------------------------------------------------- /swh/web/static/img/icons/swh-logo-archive-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/icons/swh-logo-archive-192x192.png -------------------------------------------------------------------------------- /swh/web/static/img/icons/swh-logo-archive-270x270.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/static/img/icons/swh-logo-archive-270x270.png -------------------------------------------------------------------------------- /swh/web/tests/resources/repos/repo_with_cff_file.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/tests/resources/repos/repo_with_cff_file.zip -------------------------------------------------------------------------------- /swh/web/tests/resources/repos/repo_with_submodules.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoftwareHeritage/swh-web/HEAD/swh/web/tests/resources/repos/repo_with_submodules.tgz -------------------------------------------------------------------------------- /swh/web/tests/resources/contents/code/extensions/test.dust: -------------------------------------------------------------------------------- 1 |
<%= link_to post.title, post %>
5 | <% end %> 6 | 7 | <%- available_things = things.select(&:available?) -%> 8 | <%%- x = 1 + 2 -%%> 9 | <%% value = 'real string #{@value}' %%> 10 | <%%= available_things.inspect %%> 11 | -------------------------------------------------------------------------------- /swh/web/tests/resources/contents/code/extensions/test.scad: -------------------------------------------------------------------------------- 1 | useTitle
12 | 13 | 14 | -------------------------------------------------------------------------------- /swh/web/tests/resources/contents/code/extensions/test.clj: -------------------------------------------------------------------------------- 1 | (def ^:dynamic chunk-size 17) 2 | 3 | (defn next-chunk [rdr] 4 | (let [buf (char-array chunk-size) 5 | s (.read rdr buf)] 6 | (when (pos? s) 7 | (java.nio.CharBuffer/wrap buf 0 s)))) 8 | 9 | (defn chunk-seq [rdr] 10 | (when-let [chunk (next-chunk rdr)] 11 | (cons chunk (lazy-seq (chunk-seq rdr))))) -------------------------------------------------------------------------------- /swh/web/save_code_now/assets/index.js: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2022 The Software Heritage developers 2 | * See the AUTHORS file at the top-level directory of this distribution 3 | * License: GNU Affero General Public License version 3, or any later version 4 | * See top-level LICENSE file for more information 5 | */ 6 | 7 | export * from './origin-save'; 8 | export * from './origin-save-admin'; 9 | -------------------------------------------------------------------------------- /swh/web/tests/resources/contents/code/extensions/test.applescript: -------------------------------------------------------------------------------- 1 | repeat 5 times 2 | if foo is greater than bar then 3 | display dialog "Hello there" 4 | else 5 | beep 6 | end if 7 | end repeat 8 | 9 | (* comment (*nested comment*) *) 10 | on do_something(s, y) 11 | return {s + pi, y mod 4} 12 | end do_something 13 | 14 | do shell script "/bin/echo 'hello'" -------------------------------------------------------------------------------- /.copier-answers.yml: -------------------------------------------------------------------------------- 1 | # Changes here will be overwritten by Copier 2 | _commit: v0.3.5 3 | _src_path: https://gitlab.softwareheritage.org/swh/devel/swh-py-template.git 4 | description: Software Heritage web UI 5 | distribution_name: swh-web 6 | have_cli: false 7 | have_workers: false 8 | package_root: swh/web 9 | project_name: swh.web 10 | python_minimal_version: '3.10' 11 | readme_format: rst 12 | -------------------------------------------------------------------------------- /swh/web/alter/assets/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2025 The Software Heritage developers 3 | * See the AUTHORS file at the top-level directory of this distribution 4 | * License: GNU Affero General Public License version 3, or any later version 5 | * See top-level LICENSE file for more information 6 | */ 7 | 8 | // bundle for add forge views 9 | 10 | export * from './alter.css'; 11 | -------------------------------------------------------------------------------- /swh/web/tests/resources/contents/code/extensions/test.coffee: -------------------------------------------------------------------------------- 1 | grade = (student, period=(if b? then 7 else 6)) -> 2 | if student.excellentWork 3 | "A+" 4 | else if student.okayStuff 5 | if student.triedHard then "B" else "B-" 6 | else 7 | "C" 8 | 9 | class Animal extends Being 10 | constructor: (@name) -> 11 | 12 | move: (meters) -> 13 | alert @name + " moved #{meters}m." -------------------------------------------------------------------------------- /swh/web/tests/resources/contents/code/extensions/test.sci: -------------------------------------------------------------------------------- 1 | // A comment 2 | function I = foo(dims, varargin) 3 | d=[1; matrix(dims(1:$-1),-1,1)] 4 | for i=1:size(varargin) 5 | if varargin(i)==[] then 6 | I=[], 7 | return; 8 | end 9 | end 10 | endfunction 11 | 12 | b = cos(a) + cosh(a); 13 | bar_matrix = [ "Hello", "world" ]; 14 | foo_matrix = [1, 2, 3; 4, 5, 6]; 15 | -------------------------------------------------------------------------------- /swh/web/add_forge_now/assets/forge-success-email.ejs: -------------------------------------------------------------------------------- 1 | Dear forge administrator, 2 | 3 | We are happy to announce to you that your forge is now successfully 4 | archived. 5 | 6 | The forge repositories are now available in the archive : 7 | https://archive.softwareheritage.org/browse/search/?q=<%= forgeUrl %>&with_visit=true&with_content=true 8 | 9 | Kind regards, 10 | 11 | The Software Heritage team -------------------------------------------------------------------------------- /swh/web/tests/resources/contents/code/extensions/test.rs: -------------------------------------------------------------------------------- 1 | #[derive(Debug)] 2 | pub enum State { 3 | Start, 4 | Transient, 5 | Closed, 6 | } 7 | 8 | impl From<&'a str> for State { 9 | fn from(s: &'a str) -> Self { 10 | match s { 11 | "start" => State::Start, 12 | "closed" => State::Closed, 13 | _ => unreachable!(), 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /swh/web/auth/migrations/0003_delete_oidcuser.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.2.19 on 2021-03-22 15:41 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("swh_web_auth", "0002_remove_stored_tokens"), 9 | ] 10 | 11 | operations = [ 12 | migrations.DeleteModel( 13 | name="OIDCUser", 14 | ), 15 | ] 16 | -------------------------------------------------------------------------------- /swh/web/provenance/urls.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 The Software Heritage developers 2 | # See the AUTHORS file at the top-level directory of this distribution 3 | # License: GNU Affero General Public License version 3, or any later version 4 | # See top-level LICENSE file for more information 5 | 6 | from swh.web.provenance.api_views import provenance_api_urls 7 | 8 | urlpatterns = provenance_api_urls.get_url_patterns() 9 | -------------------------------------------------------------------------------- /swh/web/tests/resources/contents/code/extensions/test.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | @objc class Person: Entity { 4 | var name: String! 5 | var age: Int! 6 | 7 | init(name: String, age: Int) { 8 | /* /* ... */ */ 9 | } 10 | 11 | // Return a descriptive string for this person 12 | func description(offset: Int = 0) -> String { 13 | return "\(name) is \(age + offset) years old" 14 | } 15 | } -------------------------------------------------------------------------------- /swh/web/tests/resources/contents/code/extensions/test.ts: -------------------------------------------------------------------------------- 1 | class MyClass { 2 | public static myValue: string; 3 | constructor(init: string) { 4 | this.myValue = init; 5 | } 6 | } 7 | import fs = require("fs"); 8 | module MyModule { 9 | export interface MyInterface extends Other { 10 | myProperty: any; 11 | } 12 | } 13 | declare magicNumber number; 14 | myArray.forEach(() => { }); // fat arrow syntax -------------------------------------------------------------------------------- /assets/src/utils/org.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2018 The Software Heritage developers 3 | * See the AUTHORS file at the top-level directory of this distribution 4 | * License: GNU Affero General Public License version 3, or any later version 5 | * See top-level LICENSE file for more information 6 | */ 7 | 8 | // org-js chunk that will be lazily loaded 9 | 10 | import './org.css'; 11 | export * from 'org'; 12 | -------------------------------------------------------------------------------- /swh/web/browse/assets/origin_visits/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2018 The Software Heritage developers 3 | * See the AUTHORS file at the top-level directory of this distribution 4 | * License: GNU Affero General Public License version 3, or any later version 5 | * See top-level LICENSE file for more information 6 | */ 7 | 8 | // origin visits reporting bundle 9 | 10 | export * from './visits-reporting'; 11 | -------------------------------------------------------------------------------- /swh/web/tests/resources/contents/code/extensions/test.haml: -------------------------------------------------------------------------------- 1 | !!! XML 2 | %html 3 | %body 4 | %h1.jumbo{:id=>"a", :style=>'font-weight: normal', :title=>title} highlight.js 5 | /html comment 6 | -# ignore this line 7 | %ul(style='margin: 0') 8 | -items.each do |i| 9 | %i= i 10 | = variable 11 | =variable2 12 | ~ variable3 13 | ~variable4 14 | The current year is #{DataTime.now.year}. -------------------------------------------------------------------------------- /assets/src/utils/showdown.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2018 The Software Heritage developers 3 | * See the AUTHORS file at the top-level directory of this distribution 4 | * License: GNU Affero General Public License version 3, or any later version 5 | * See top-level LICENSE file for more information 6 | */ 7 | 8 | // showdown chunk that will be lazily loaded 9 | 10 | import './showdown.css'; 11 | export * from 'showdown'; 12 | -------------------------------------------------------------------------------- /mirror_demo/templates/mirror-homepage.html: -------------------------------------------------------------------------------- 1 |4 | [mirror partner] has provided this mirror as part of their commitment 5 | to preserving and promoting open-source software, allowing the Software 6 | Heritage international network of mirrors to ensure accessibility and 7 | preservation of such software for future generations. 8 |
9 |{{ error_description }}
15 | ^eval($i+10)
15 | ^connect[mysql://host/database]{ 16 | $tab[^table::sql{select * from `table` where a='1'}] 17 | $var_Name[some${value}] 18 | } 19 | } 20 | 21 | ^rem{ 22 | Multiline comment with code: $var 23 | ^while(true){ 24 | ^for[i](1;10){ 25 | ^sleep[] 26 | } 27 | } 28 | } 29 | ^taint[^#0A] 30 | 31 | @GET_base[] 32 | ## Comment for code 33 | # Isn't comment 34 | $result[$.hash_item1[one] $.hash_item2[two]] -------------------------------------------------------------------------------- /swh/web/settings/development.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2017-2022 The Software Heritage developers 2 | # See the AUTHORS file at the top-level directory of this distribution 3 | # License: GNU Affero General Public License version 3, or any later version 4 | # See top-level LICENSE file for more information 5 | 6 | """ 7 | Django development settings for swh-web. 8 | """ 9 | 10 | from django.core.cache import cache 11 | 12 | from swh.web.config import get_config 13 | 14 | swh_web_config = get_config() 15 | 16 | swh_web_config.update( 17 | { 18 | "show_corner_ribbon": True, 19 | "corner_ribbon_text": "Development", 20 | } 21 | ) 22 | 23 | from .common import * # noqa 24 | 25 | AUTH_PASSWORD_VALIDATORS = [] # disable any pwd validation mechanism 26 | 27 | cache.clear() 28 | -------------------------------------------------------------------------------- /swh/web/tests/resources/contents/code/extensions/test.thrift: -------------------------------------------------------------------------------- 1 | namespace * thrift.test 2 | 3 | /** 4 | * Docstring! 5 | */ 6 | enum Numberz 7 | { 8 | ONE = 1, 9 | TWO, 10 | THREE, 11 | FIVE = 5, 12 | SIX, 13 | EIGHT = 8 14 | } 15 | 16 | const Numberz myNumberz = Numberz.ONE; 17 | // the following is expected to fail: 18 | // const Numberz urNumberz = ONE; 19 | 20 | typedef i64 UserId 21 | 22 | struct Msg 23 | { 24 | 1: string message, 25 | 2: i32 type 26 | } 27 | struct NestedListsI32x2 28 | { 29 | 1: list11 |21 | -------------------------------------------------------------------------------- /swh/web/save_code_now/migrations/0016_alter_saveoriginrequest_origin_url.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 The Software Heritage developers 2 | # See the AUTHORS file at the top-level directory of this distribution 3 | # License: GNU Affero General Public License version 3, or any later version 4 | # See top-level LICENSE file for more information 5 | 6 | from django.db import migrations, models 7 | 8 | 9 | class Migration(migrations.Migration): 10 | 11 | dependencies = [ 12 | ("swh_web_save_code_now", "0015_alter_saveoriginrequest_loading_task_status"), 13 | ] 14 | 15 | operations = [ 16 | migrations.AlterField( 17 | model_name="saveoriginrequest", 18 | name="origin_url", 19 | field=models.CharField(max_length=4096, null=False), 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /swh/web/tests/resources/contents/code/extensions/test.diff: -------------------------------------------------------------------------------- 1 | Index: languages/ini.js 2 | =================================================================== 3 | --- languages/ini.js (revision 199) 4 | +++ languages/ini.js (revision 200) 5 | @@ -1,8 +1,7 @@ 6 | hljs.LANGUAGES.ini = 7 | { 8 | case_insensitive: true, 9 | - defaultMode: 10 | - { 11 | + defaultMode: { 12 | contains: ['comment', 'title', 'setting'], 13 | illegal: '[^\\s]' 14 | }, 15 | 16 | *** /path/to/original timestamp 17 | --- /path/to/new timestamp 18 | *************** 19 | *** 1,3 **** 20 | --- 1,9 ---- 21 | + This is an important 22 | + notice! It should 23 | + therefore be located at 24 | + the beginning of this 25 | + document! 26 | 27 | ! compress the size of the 28 | ! changes. 29 | 30 | It is important to spell 31 | -------------------------------------------------------------------------------- /swh/web/badges/urls.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022-2024 The Software Heritage developers 2 | # See the AUTHORS file at the top-level directory of this distribution 3 | # License: GNU Affero General Public License version 3, or any later version 4 | # See top-level LICENSE file for more information 5 | 6 | from django.urls import path as url 7 | 8 | from swh.web.badges import swh_badge, swh_badge_swhid 9 | from swh.web.utils.url_path_converters import register_url_path_converters 10 | 11 | register_url_path_converters() 12 | 13 | urlpatterns = [ 14 | url( 15 | "badge/12 | {% if snapshot_context and snapshot_context.origin_info %} 13 |
14 | The snapshot associated to the visit of origin {{ snapshot_context.origin_info.url }} 15 | on {{ snapshot_context.timestamp }} is empty ! 16 |
17 | {% else %} 18 |The snapshot is empty !
19 | {% endif %} 20 |