{"id":13904901,"url":"https://github.com/oduwsdl/MementoEmbed","last_synced_at":"2025-07-18T02:32:37.981Z","repository":{"id":46096341,"uuid":"123660296","full_name":"oduwsdl/MementoEmbed","owner":"oduwsdl","description":"A service that provides archive-aware oEmbed-compatible embeddable surrogates (social cards, thumbnails, etc.) for archived web pages (mementos).","archived":false,"fork":false,"pushed_at":"2021-11-15T01:52:38.000Z","size":34238,"stargazers_count":14,"open_issues_count":32,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-06-20T10:01:18.796Z","etag":null,"topics":["docker","embed","flask","memento","social-cards","surrogate","thumbnails","web-archives"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oduwsdl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-03-03T04:54:14.000Z","updated_at":"2025-03-22T11:04:30.000Z","dependencies_parsed_at":"2022-08-30T21:21:58.684Z","dependency_job_id":null,"html_url":"https://github.com/oduwsdl/MementoEmbed","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/oduwsdl/MementoEmbed","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oduwsdl%2FMementoEmbed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oduwsdl%2FMementoEmbed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oduwsdl%2FMementoEmbed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oduwsdl%2FMementoEmbed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oduwsdl","download_url":"https://codeload.github.com/oduwsdl/MementoEmbed/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oduwsdl%2FMementoEmbed/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265692348,"owners_count":23812196,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","embed","flask","memento","social-cards","surrogate","thumbnails","web-archives"],"created_at":"2024-08-06T23:01:05.844Z","updated_at":"2025-07-18T02:32:32.965Z","avatar_url":"https://github.com/oduwsdl.png","language":"HTML","funding_links":[],"categories":["HTML"],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/oduwsdl/MementoEmbed.svg?branch=master)](https://travis-ci.org/oduwsdl/MementoEmbed)\n[![Doc Status](https://readthedocs.org/projects/mementoembed/badge/?version=latest\u0026style=flat)](https://mementoembed.readthedocs.io/en/latest/)\n\n# MementoEmbed\n\n![Image of a Social Card](docs/source/images/socialcard-example.png?raw=true \"Social Card Example for http://arquivo.pt/wayback/19980205082901/http://www.caleida.pt/saramago/\")\n\nMementoEmbed is a tool to create archive-aware embeddable **surrogates** for archived web pages (mementos), like the **social card** above. MementoEmbed is different from other surrogate-generation systems in that it provides access to archive-specific information, such as the original domain of the URI-M, its memento-datetime, and to which collection a memento belongs.\n\nMementoEmbed can also create **browser thumbnails** like the one below.\n\n![Image of a Browser Thumbnail](docs/source/images/thumbnail-example.png?raw=true \"Thumbnail Example for http://arquivo.pt/wayback/19980205082901/http://www.caleida.pt/saramago/\")\n\nIn addition, MementoEmbed can create **imagereels**, animated GIFs of the best five images from the memento, as seen below.\n\n![Image of an Imagereel](docs/source/images/imagereel-example.gif?raw=true \"Imagereel example for https://wayback.archive-it.org/2358/20110211072257/http://news.blogs.cnn.com/category/world/egypt-world-latest-news/\")\n\nFor more information on this application, please visit our [Documentation Page](https://mementoembed.readthedocs.io/en/latest/) and read the [original blog post describing the reasons behind MementoEmbed](https://ws-dl.blogspot.com/2018/08/2018-08-01-preview-of-mementoembed.html).\n\n## Installation and Execution\n\nMementoEmbed relies on Redis for caching. Install Redis first and then follow the directions for your applicable Linux/Unix system below.\n\n### Installing on a CentOS 8 System\n\nIf you would like to use the RPM installer for RHEL 8 and CentOS 8 systems:\n\n1. download the RPM and save it to the Linux server (e.g., `MementoEmbed-0.20211106041644-1.el8.x86_64.rpm`)\n2. type `dnf install MementoEmbed-0.20211106041644-1.el8.x86_64.rpm`\n3. type `systemctl start mementoembed.service`\n\nIf the service does not work at first, you may need to run `systemctl start redis`.\n\nTo remove MementoEmbed, type `dnf remove MementoEmbed` (it is case sensitive). The uninstall process will create a tarball of the `/opt/mementoembed/var` directory. This contains the thumbnail cache, imagereel cache, and logs. It is left in case the system administrator needs this data.\n\nMementoEmbed can now be accessed from http://localhost:5550/.\n\n### Installing on an Ubuntu 21.04+ System\n\nIf you would like to use the deb installer for RHEL 8 and CentOS 8 systems:\n\n1. download the DEB and save it to the Linux server (e.g., `MementoEmbed-0.20211112212747.deb`)\n2. type `apt-get update` \u003c-- this may not be necessary, but is needed in some cases to make sure dependencies are loaded\n3. type `apt-get install ./MementoEmbed-0.20211112212747.deb` \u003c-- the ./ is important, do not leave it off\n4. type `systemctl start mementoembed.service`\n\nIf the service does not work at first, you may need to run `systemctl start redis`.\n\nTo remove MementoEmbed, type `apt-get remove mementoembed` (it is case sensitive). The uninstall process will create a tarball of the `/opt/mementoembed/var` directory. This contains the thumbnail cache, imagereel cache, and logs. It is left in case the system administrator needs this data.\n\nHeadless Chromium has a problem on Ubuntu. [The issue](https://bugs.chromium.org/p/chromium/issues/detail?id=1221905\u0026q=Passthrough%20is%20not%20supported%2C%20GL%20is%20swiftshader\u0026can=1) is known to Google. This may manifest in a log with a message such as `ERROR:gpu_init.cc(441) Passthrough is not supported, GL is disabled`.  MementoEmbed still appears to generate thumbnails, so we are waiting for Google to address the issue.\n\nMementoEmbed can now be accessed from http://localhost:5550/.\n\n### Installing on a generic Unix System\n\nIf you would like to use the generic installer for Unix (including macOS):\n\n1. download the generic installer (e.g., `install-mementoembed-0.20211112212747.sh`)\n2. type `sudo ./install-mementoembed-0.20211112212747.sh`\n3. start MementoEmbed using either `systemctl start mementoembed.service` (if your Unix/Linux supports systemd) or `/opt/mementoembed/start-mementoembed.sh` if not\n\nMementoEmbed can now be accessed from http://localhost:5550/.\n\n### Installing and Running the Latest Docker Build\n\nTo run the latest Docker build use the following commands.\n\n```\n$ docker pull oduwsdl/mementoembed\n$ docker run -d -p 5550:5550 oduwsdl/mementoembed\n```\n\nMementoEmbed can now be accessed from http://localhost:5550/.\n\n### Installing and Running From Source Using Docker\n\nDownload the code and build an image as following:\n\n```\n$ git clone https://github.com/oduwsdl/MementoEmbed.git\n$ cd MementoEmbed\n$ docker build -t mementoembed .\n```\n\nThen run a container from this image:\n\n```\n$ docker run -it --rm -p 5550:5550 mementoembed\n```\n\nFlags `-it` and `--rm` will make the container connect to the host TTY in interactive mode and remove the container once the process is killed or terminated.\nTo run the container in detached mode, run the following command instead:\n\n```\n$ docker run -d -p 5550:5550 mementoembed\n```\n\nIn either case, the application should be accessible at http://localhost:5550/.\n\n### Installing and Running Locally From Source With PIP\n\nDownload the code and install it within your Python environment.\n\n```\n$ git clone https://github.com/oduwsdl/MementoEmbed.git\n$ cd MementoEmbed\n$ pip install .\n```\n\nThen set it up to run locally using Flask.\n\n```\n$ export FLASK_APP=mementoembed\n$ flask run\n```\n\n### Loading a Desired Configuration\n\nThe configuration options for MementoEmbed are documented in `sample_appconfig.cfg`.\n\nThe defaults are stored in `config/default.py`.\n\nTo use your own configuration file, copy `sample_appconfig.cfg`, make modifications, and place it in `/etc/mementoembed.cfg`. Then run the application locally as described above.\n\nTo use your own configuration file stored at `/path/to/my/config.cfg` with a Docker image, use the `-v` Docker option:\n`docker run -it --rm -v /path/to/my/config.cfg:/etc/mementoembed.cfg  -p 5550:5550 oduwsdl/mementoembed`\n\n## Directory Layout\n\nThe following directory structure exists for organizing MementoEmbed:\n* /config/ - default Flask configuration for MementoEmbed\n* /docs/ - source for documentation of MementoEmbed, products can be viewed at the project [Documentation Page](https://mementoembed.readthedocs.io/en/latest/).\n* /githooks/ - hooks for use with Git in development (was an experiment, not currently used)\n* /mementoembed/ - main MementoEmbed application\n* /mementoembed/services/ - code containing source code for the machine-accessible MementoEmbed endpoints\n* /mementoembed/static/ - JavaScript and CSS used for the MementoEmbed application\n* /mementoembed/templates/ - Jinja2 templates for the MementoEmbed application\n* /mementoembed/ui/ - code for the user interface MementoEmbed endpoints\n* /tests/unit - automated unit tests for core MementoEmbed functionality\n* /tests/integration - automated integration tests to run against a running MementoEmbed container\n* .dockerignore - used to indicate which files Docker should ignore when building an image\n* .gitignore - used to indicate which files Git should not commit during development\n* .travis.yml - configuration for executing unit tests and testing build of MementoEmbed\n* CONTRIBUTING.md - instructions for contributing to this project\n* Dockerfile - used to build the docker image\n* LICENSE - the license for this project\n* MANIFEST.in - used to ensure additional files are installed on the system when pip is run\n* Makefile - used to build install packages\n* README.md - this file\n* dockerstart.sh - the script run by Docker to start MementoEmbed once a container is started\n* mementoembed-install-script.sh - script included in the generic Unix install package\n* mementembed.control - DEB installer information file\n* mementoembed.postinst - DEB installer post-install script\n* mementoembed.postun - DEB installer post-uninstall script\n* mementoembed.presint - DEB installer pre-install script\n* mementoembed.spec - RPM installer configuration file\n* package-lock.json - pakcage version information used by npm for thumbnail generation\n* raiseversion.sh - a script run to raise the version of MementoEmbed in both documentation and source code\n* release.sh - script planned for use when releasing MementoEmbed (not currently used, may be removed at some point)\n* requirements.txt - listing of requirements used in the Docker container's Python environment\n* sample_appconfig.cfg - MementoEmbed configuration used by the Docker container\n* setup.py - standard Python installation configuration file\n* tagversion.sh - a script run to raise the version of MementoEmbed and tag it for release\n* template_appconfig.cfg - a template of a MementoEmbed configuration used by the generic Unix, DEB, and RPM installers\n\n## Run unit tests\n\nThe unit tests are designed to be easily run from the setup.py file.\n\n```\n$ pip install .\n$ python ./setup.py test\n```\n\n## Run integration tests\n\nWith a fully operational MementoEmbed, integration tests are possible.\n\n```\npython -m unittest discover -s tests/integration\n```\n\nIntegration tests, by default, assume that the instance to be tested is running at port 5550. This can be altered with the `TESTPORT` environment variable, like so: `export TESTPORT=9000`.\n\nIntegration tests are heavily dependent on environmental factors such as the current state of web archive playback systems. The favicon detection appears to be especially unpredictable. Because of this, we recommend that integration tests be reviewed by humans and not executed automatically on build.\n\n## Run CentOS 8 test environment\n\n```\n$ docker build --rm -t local/c8-systemd -f tests/installer/centos8/centos8-systemd-Dockerfile .\n$ docker run --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro -d -p 5550:5550 local/c8-systemd\n```\n\nFrom here use common docker commands (e.g., `docker cp`, `docker exec`) to interact with the container.\n\n## Run Ubuntu 21.04 test environment\n\n```\n$ docker build --rm -t local/u2104-systemd -f tests/installer/ubuntu2104/ubuntu2104-systemd-Dockerfile .\n$ docker run --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro -d -p 5550:5550 local/u2104-systemd\n```\n\nFrom here use common docker commands (e.g., `docker cp`, `docker exec`) to interact with the container.\n\n# Contributing\n\nPlease consult the Contribution Guidelines in [CONTRIBUTING.md](https://github.com/oduwsdl/MementoEmbed/blob/master/CONTRIBUTING.md) for submitting bug reports, pull requests, etc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foduwsdl%2FMementoEmbed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foduwsdl%2FMementoEmbed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foduwsdl%2FMementoEmbed/lists"}