A citation generator tool for Wikipedia. Currently accessible from:
https://citer.toolforge.org/ (the English version)
https://yadfa.toolforge.org/ (the Persian version)
Citer is especially useful for generating citations from Google Books URLs, DOIs (Any Digital object Identifiers) and ISBNs (International Standard Book Numbers). Additionally, any URL, including the URL of many major news websites can be processed to generate a citation.
URLs of Wayback Machine and archive.today are also supported and generate a citation template with archive parameters filled.
To run Citer on your local computer:
- Clone the project (use
--depth=1to reduce size) - Copy
config.py.exampletoconfig.py(You might want to get an NCBI API key and add it to the config file if you're going to use its services) - Install uv. (
curl -LsSf https://astral.sh/uv/install.sh | sh) - Run
uv run app.py
If everything goes fine, the main page will be accessible from:
http://localhost:5000/
If you experience any problems or have questions, please open an issue on this repo.
The default language is English and can be changed to Persian using the setting in the config.py file.
- The bookmarklet does not work on archive.org (issue #26) or any other website that does not allow opening external links. One needs to use Citer directly in such cases.
Citer uses pytest for testing. To run the test suite, execute:
uv run pytestBy default, tests run in offline mode using cached responses from tests/testdata. To allow network access when a cached response is unavailable, use --online:
uv run pytest --onlineOther useful options:
--force-overwrite-testdata: Regenerate cached responses, even when cached versions already exist.--remove-unused-testdata: Remove unused test data files after the test run.--print-test-filename: Print the filenames of cached responses used by tests.
For example, to regenerate cached responses using the network:
uv run pytest --online --force-overwrite-testdataWarning: --remove-unused-testdata deletes cache files that were not used during the test run. Use it with care.