crossref-local 0.4.0__tar.gz → 0.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- crossref_local-0.5.0/.env.example +57 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/.github/workflows/test.yml +2 -2
- {crossref_local-0.4.0 → crossref_local-0.5.0}/.gitignore +1 -0
- crossref_local-0.5.0/.readthedocs.yaml +31 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/CHANGELOG.md +21 -2
- {crossref_local-0.4.0 → crossref_local-0.5.0}/Makefile +4 -36
- {crossref_local-0.4.0 → crossref_local-0.5.0}/PKG-INFO +36 -11
- {crossref_local-0.4.0 → crossref_local-0.5.0}/README.md +34 -10
- {crossref_local-0.4.0 → crossref_local-0.5.0}/docs/remote-deployment.md +1 -1
- crossref_local-0.5.0/docs/sphinx/api/crossref_local.rst +34 -0
- crossref_local-0.5.0/docs/sphinx/cli_reference.rst +142 -0
- crossref_local-0.5.0/docs/sphinx/conf.py +135 -0
- crossref_local-0.5.0/docs/sphinx/http_api.rst +174 -0
- crossref_local-0.5.0/docs/sphinx/index.rst +85 -0
- crossref_local-0.5.0/docs/sphinx/installation.rst +80 -0
- crossref_local-0.5.0/docs/sphinx/quickstart.rst +113 -0
- crossref_local-0.5.0/docs/sphinx/requirements.txt +5 -0
- crossref_local-0.5.0/examples/00_run_all.sh +28 -0
- crossref_local-0.5.0/examples/02_demo_mcp.org +31 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/pyproject.toml +3 -2
- crossref_local-0.5.0/scripts/deployment/mcp/docker.sh +176 -0
- {crossref_local-0.4.0/scripts → crossref_local-0.5.0/scripts/deployment}/mcp/install.sh +2 -2
- crossref_local-0.5.0/scripts/status.sh +199 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/src/crossref_local/__init__.py +18 -10
- crossref_local-0.5.0/src/crossref_local/_aio/__init__.py +30 -0
- crossref_local-0.4.0/src/crossref_local/aio.py → crossref_local-0.5.0/src/crossref_local/_aio/_impl.py +35 -33
- crossref_local-0.5.0/src/crossref_local/_cache/__init__.py +15 -0
- crossref_local-0.4.0/src/crossref_local/cache_export.py → crossref_local-0.5.0/src/crossref_local/_cache/export.py +27 -10
- crossref_local-0.5.0/src/crossref_local/_cache/utils.py +93 -0
- crossref_local-0.5.0/src/crossref_local/_cli/__init__.py +9 -0
- {crossref_local-0.4.0/src/crossref_local → crossref_local-0.5.0/src/crossref_local/_cli}/cli.py +99 -105
- crossref_local-0.5.0/src/crossref_local/_cli/mcp.py +351 -0
- {crossref_local-0.4.0/src/crossref_local → crossref_local-0.5.0/src/crossref_local/_cli}/mcp_server.py +11 -11
- crossref_local-0.5.0/src/crossref_local/_core/__init__.py +58 -0
- {crossref_local-0.4.0/src/crossref_local → crossref_local-0.5.0/src/crossref_local/_core}/api.py +24 -5
- {crossref_local-0.4.0/src/crossref_local → crossref_local-0.5.0/src/crossref_local/_core}/citations.py +55 -26
- {crossref_local-0.4.0/src/crossref_local → crossref_local-0.5.0/src/crossref_local/_core}/config.py +40 -22
- {crossref_local-0.4.0/src/crossref_local → crossref_local-0.5.0/src/crossref_local/_core}/db.py +32 -26
- {crossref_local-0.4.0/src/crossref_local → crossref_local-0.5.0/src/crossref_local/_core}/fts.py +18 -14
- {crossref_local-0.4.0/src/crossref_local → crossref_local-0.5.0/src/crossref_local/_core}/models.py +11 -6
- crossref_local-0.5.0/src/crossref_local/_remote/__init__.py +56 -0
- crossref_local-0.4.0/src/crossref_local/remote.py → crossref_local-0.5.0/src/crossref_local/_remote/base.py +95 -8
- crossref_local-0.5.0/src/crossref_local/_remote/collections.py +175 -0
- crossref_local-0.5.0/src/crossref_local/_server/__init__.py +140 -0
- crossref_local-0.5.0/src/crossref_local/_server/middleware.py +25 -0
- crossref_local-0.5.0/src/crossref_local/_server/models.py +129 -0
- crossref_local-0.5.0/src/crossref_local/_server/routes_citations.py +98 -0
- crossref_local-0.5.0/src/crossref_local/_server/routes_collections.py +282 -0
- crossref_local-0.5.0/src/crossref_local/_server/routes_compat.py +102 -0
- crossref_local-0.5.0/src/crossref_local/_server/routes_works.py +128 -0
- crossref_local-0.5.0/src/crossref_local/_server/server.py +19 -0
- crossref_local-0.5.0/src/crossref_local/aio.py +60 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/src/crossref_local/cache.py +100 -100
- crossref_local-0.5.0/src/crossref_local/cli.py +8 -0
- crossref_local-0.5.0/src/crossref_local/jobs.py +169 -0
- crossref_local-0.5.0/src/crossref_local/mcp_server.py +8 -0
- crossref_local-0.5.0/src/crossref_local/remote.py +8 -0
- crossref_local-0.5.0/src/crossref_local/server.py +8 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/tests/conftest.py +1 -1
- {crossref_local-0.4.0 → crossref_local-0.5.0}/tests/crossref_local/test_aio.py +1 -1
- {crossref_local-0.4.0 → crossref_local-0.5.0}/tests/crossref_local/test_api.py +1 -1
- {crossref_local-0.4.0 → crossref_local-0.5.0}/tests/crossref_local/test_cache.py +9 -9
- {crossref_local-0.4.0 → crossref_local-0.5.0}/tests/crossref_local/test_citations.py +1 -1
- {crossref_local-0.4.0 → crossref_local-0.5.0}/tests/crossref_local/test_cli_completion.py +9 -9
- {crossref_local-0.4.0 → crossref_local-0.5.0}/tests/crossref_local/test_config.py +2 -2
- {crossref_local-0.4.0 → crossref_local-0.5.0}/tests/crossref_local/test_db.py +1 -1
- {crossref_local-0.4.0 → crossref_local-0.5.0}/tests/crossref_local/test_fts.py +3 -3
- crossref_local-0.5.0/tests/crossref_local/test_jobs.py +132 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/tests/crossref_local/test_models.py +1 -1
- {crossref_local-0.4.0 → crossref_local-0.5.0}/tests/crossref_local/test_remote.py +1 -1
- {crossref_local-0.4.0 → crossref_local-0.5.0}/tests/crossref_local/test_server.py +57 -0
- crossref_local-0.4.0/.env.example +0 -51
- crossref_local-0.4.0/examples/00_run_all.sh +0 -96
- crossref_local-0.4.0/src/crossref_local/cli_mcp.py +0 -275
- crossref_local-0.4.0/src/crossref_local/server.py +0 -352
- {crossref_local-0.4.0 → crossref_local-0.5.0}/docs/to_claude/examples/example-python-project-scitex/data/.gitkeep +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/examples/01_quickstart.py +0 -0
- /crossref_local-0.4.0/examples/02_citation_network/generate_visualization.py → /crossref_local-0.5.0/examples/02_citation_network/01_generate_visualization.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/examples/02_citation_network/citation_network.html +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/examples/02_citation_network/citation_network.yaml +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/examples/03_impact_factor/00_calculate_impact_factor.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/examples/03_impact_factor/01_compare_jcr.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/examples/03_impact_factor/01_compare_jcr_out/all_combined.json +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/examples/03_impact_factor/01_compare_jcr_out/biomedical_engineering.json +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/examples/03_impact_factor/01_compare_jcr_out/high_impact.json +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/examples/03_impact_factor/01_compare_jcr_out/neuroscience.json +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/examples/03_impact_factor/02_compare_jcr_plot.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/examples/03_impact_factor/02_compare_jcr_plot_out/scatter_calc_vs_jcr.yaml +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/examples/03_impact_factor/run_all_demos.sh +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/examples/04_mcp_demo.org +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/examples/04_mcp_demo_out/demo_mcp.tex +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/examples/04_mcp_demo_out/evolution.mmd +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/examples/04_mcp_demo_out/pipeline.mmd +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/examples/04_mcp_demo_out/states.mmd +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/examples/04_mcp_demo_out/tradeoff.mmd +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/examples/compose_readme.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/examples/readme_figure.yaml +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/scripts/README.md +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/scripts/create_test_db.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/scripts/database/00_rebuild_all.sh +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/scripts/database/02_create_missing_indexes.sh +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/scripts/database/03_rebuild_citations_table.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/scripts/database/03_rebuild_citations_table_optimized.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/scripts/database/04a_download_openalex_journals.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/scripts/database/04b_build_issn_table.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/scripts/database/04c_build_journals_table.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/scripts/database/04d_build_from_issn_list.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/scripts/database/05_build_fts5_index.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/scripts/database/06_calculate_abstract_ratio.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/scripts/database/99_check_db_connections.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/scripts/database/99_db_info.sh +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/scripts/database/99_maintain_indexes.sh +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/scripts/database/99_switch_to_optimized.sh +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/scripts/database/README.md +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/scripts/deployment/build_apptainer.sh +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/scripts/deployment/install_apptainer.sh +0 -0
- {crossref_local-0.4.0/examples → crossref_local-0.5.0/scripts/deployment/mcp}/Dockerfile.mcp +0 -0
- {crossref_local-0.4.0/examples → crossref_local-0.5.0/scripts/deployment/mcp}/crossref-mcp.service +0 -0
- {crossref_local-0.4.0/examples → crossref_local-0.5.0/scripts/deployment/mcp}/docker-compose.mcp.yml +0 -0
- {crossref_local-0.4.0/scripts → crossref_local-0.5.0/scripts/deployment}/mcp/status.sh +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/scripts/deployment/run_apptainer.sh +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/scripts/deployment/run_docker.sh +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/scripts/nfs/check.sh +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/scripts/nfs/setup_nfs.sh +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/scripts/nfs/status.sh +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/scripts/nfs/stop.sh +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/src/crossref_local/__main__.py +0 -0
- /crossref_local-0.4.0/src/crossref_local/cache_viz.py → /crossref_local-0.5.0/src/crossref_local/_cache/viz.py +0 -0
- /crossref_local-0.4.0/src/crossref_local/cli_cache.py → /crossref_local-0.5.0/src/crossref_local/_cli/cache.py +0 -0
- /crossref_local-0.4.0/src/crossref_local/cli_completion.py → /crossref_local-0.5.0/src/crossref_local/_cli/completion.py +0 -0
- /crossref_local-0.4.0/src/crossref_local/cli_main.py → /crossref_local-0.5.0/src/crossref_local/_cli/main.py +0 -0
- {crossref_local-0.4.0/src/crossref_local/impact_factor → crossref_local-0.5.0/src/crossref_local/_impact_factor}/__init__.py +0 -0
- {crossref_local-0.4.0/src/crossref_local/impact_factor → crossref_local-0.5.0/src/crossref_local/_impact_factor}/calculator.py +0 -0
- {crossref_local-0.4.0/src/crossref_local/impact_factor → crossref_local-0.5.0/src/crossref_local/_impact_factor}/journal_lookup.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/tests/crossref_local/impact_factor/test_calculator.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/tests/crossref_local/impact_factor/test_journal_lookup.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/tests/crossref_local/test_cli.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/tests/crossref_local/test_mcp_server.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/tests/fixtures/.gitkeep +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/tests/sync_tests_with_source.sh +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/dois2sqlite/.gitignore +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/dois2sqlite/LICENSE +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/dois2sqlite/NOTES.md +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/dois2sqlite/README.md +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/dois2sqlite/dois2sqlite/__init__.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/dois2sqlite/dois2sqlite/cli.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/dois2sqlite/dois2sqlite/database.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/dois2sqlite/dois2sqlite/file_handlers.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/dois2sqlite/dois2sqlite/models.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/dois2sqlite/dois2sqlite/representations.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/dois2sqlite/dois2sqlite/utils.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/dois2sqlite/examples/cnserver/NOTES.md +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/dois2sqlite/examples/cnserver/README.md +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/dois2sqlite/examples/cnserver/app.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/dois2sqlite/examples/cnserver/cn-quick-test.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/dois2sqlite/examples/cnserver/cnserver/__init__.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/dois2sqlite/examples/cnserver/cnserver/accept_header_utils.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/dois2sqlite/examples/cnserver/cnserver/cslutils.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/dois2sqlite/examples/cnserver/cnserver/settings.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/dois2sqlite/pyproject.toml +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/dois2sqlite/quick_convert.sh +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/dois2sqlite/quick_no_convert.sh +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/dois2sqlite/utils/create-rnd-tar-subset.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/dois2sqlite/utils/select-rnd-dois-from-db.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/labs-data-file-api/.gitignore +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/labs-data-file-api/LICENSE.md +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/labs-data-file-api/README.md +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/labs-data-file-api/crossrefDataFile/__init__.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/labs-data-file-api/crossrefDataFile/api.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/labs-data-file-api/crossrefDataFile/app_urls.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/labs-data-file-api/crossrefDataFile/asgi.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/labs-data-file-api/crossrefDataFile/migrations/0001_initial.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/labs-data-file-api/crossrefDataFile/migrations/0002_dataindexwithlocation.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/labs-data-file-api/crossrefDataFile/migrations/__init__.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/labs-data-file-api/crossrefDataFile/models.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/labs-data-file-api/crossrefDataFile/urls.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/labs-data-file-api/crossrefDataFile/views.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/labs-data-file-api/crossrefDataFile/wsgi.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/labs-data-file-api/main.py +0 -0
- {crossref_local-0.4.0 → crossref_local-0.5.0}/vendor/labs-data-file-api/manage.py +0 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# CrossRef Local Configuration
|
|
2
|
+
# Copy this file to .env and customize as needed
|
|
3
|
+
|
|
4
|
+
# =============================================================================
|
|
5
|
+
# LOCAL MODE - Direct database access
|
|
6
|
+
# =============================================================================
|
|
7
|
+
|
|
8
|
+
# Path to CrossRef SQLite database (optional - auto-detected if not set)
|
|
9
|
+
# CROSSREF_LOCAL_DB=/path/to/crossref.db
|
|
10
|
+
|
|
11
|
+
# =============================================================================
|
|
12
|
+
# DEVELOPMENT / DEBUGGING
|
|
13
|
+
# =============================================================================
|
|
14
|
+
|
|
15
|
+
# Enable debug mode for verbose logging
|
|
16
|
+
# CROSSREF_LOCAL_DEBUG_MODE=1
|
|
17
|
+
|
|
18
|
+
# Cache directory (default: ~/.cache/crossref-local)
|
|
19
|
+
# CROSSREF_LOCAL_CACHE_DIR=/path/to/cache
|
|
20
|
+
|
|
21
|
+
# =============================================================================
|
|
22
|
+
# REMOTE MODE - HTTP API access (via SSH tunnel or direct connection)
|
|
23
|
+
# =============================================================================
|
|
24
|
+
|
|
25
|
+
# Force remote mode (set to "remote" or "local")
|
|
26
|
+
# CROSSREF_LOCAL_MODE=remote
|
|
27
|
+
|
|
28
|
+
# API URL for remote mode (default: http://localhost:31291)
|
|
29
|
+
# CROSSREF_LOCAL_API_URL=http://localhost:31291
|
|
30
|
+
|
|
31
|
+
# Server host/port (for run-server-http)
|
|
32
|
+
# CROSSREF_LOCAL_HOST=0.0.0.0
|
|
33
|
+
# CROSSREF_LOCAL_PORT=31291
|
|
34
|
+
|
|
35
|
+
# =============================================================================
|
|
36
|
+
# SCITEX INTEGRATION (takes priority over CROSSREF_LOCAL_* variables)
|
|
37
|
+
# =============================================================================
|
|
38
|
+
# Port scheme: 3129X (31290: scitex-cloud, 31291: crossref, 31292: openalex)
|
|
39
|
+
#
|
|
40
|
+
# SCITEX_SCHOLAR_CROSSREF_DB=/path/to/crossref.db
|
|
41
|
+
# SCITEX_SCHOLAR_CROSSREF_MODE=remote
|
|
42
|
+
# SCITEX_SCHOLAR_CROSSREF_HOST=0.0.0.0
|
|
43
|
+
# SCITEX_SCHOLAR_CROSSREF_PORT=31291
|
|
44
|
+
|
|
45
|
+
# =============================================================================
|
|
46
|
+
# TYPICAL SSH TUNNEL SETUP
|
|
47
|
+
# =============================================================================
|
|
48
|
+
# 1. Create SSH tunnel to your database server:
|
|
49
|
+
# ssh -L 31291:127.0.0.1:31291 your-nas-server
|
|
50
|
+
#
|
|
51
|
+
# 2. Set environment variables:
|
|
52
|
+
# export CROSSREF_LOCAL_MODE=remote
|
|
53
|
+
# export CROSSREF_LOCAL_API_URL=http://localhost:31291
|
|
54
|
+
#
|
|
55
|
+
# 3. Or use CLI flags:
|
|
56
|
+
# crossref-local --http search "machine learning"
|
|
57
|
+
# crossref-local --api-url http://localhost:31291 search "query"
|
|
@@ -35,10 +35,10 @@ jobs:
|
|
|
35
35
|
pytest tests/ -v --tb=short --cov=crossref_local --cov-report=term-missing --cov-report=xml
|
|
36
36
|
|
|
37
37
|
- name: Upload coverage to Codecov
|
|
38
|
-
uses: codecov/codecov-action@v4
|
|
39
38
|
if: matrix.python-version == '3.11'
|
|
39
|
+
uses: codecov/codecov-action@v4
|
|
40
40
|
with:
|
|
41
|
-
|
|
41
|
+
files: ./coverage.xml
|
|
42
42
|
fail_ci_if_error: false
|
|
43
43
|
|
|
44
44
|
- name: Test CLI
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Read the Docs configuration file
|
|
2
|
+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
|
3
|
+
|
|
4
|
+
version: 2
|
|
5
|
+
|
|
6
|
+
# Set the OS, Python version and other tools you might need
|
|
7
|
+
build:
|
|
8
|
+
os: ubuntu-22.04
|
|
9
|
+
tools:
|
|
10
|
+
python: "3.11"
|
|
11
|
+
|
|
12
|
+
# Build documentation in the "docs/sphinx" directory with Sphinx
|
|
13
|
+
sphinx:
|
|
14
|
+
configuration: docs/sphinx/conf.py
|
|
15
|
+
fail_on_warning: false
|
|
16
|
+
|
|
17
|
+
# Optionally build your docs in additional formats such as PDF and ePub
|
|
18
|
+
formats:
|
|
19
|
+
- pdf
|
|
20
|
+
- epub
|
|
21
|
+
|
|
22
|
+
# Python configuration
|
|
23
|
+
python:
|
|
24
|
+
install:
|
|
25
|
+
# Install package with all optional dependencies
|
|
26
|
+
- method: pip
|
|
27
|
+
path: .
|
|
28
|
+
extra_requirements:
|
|
29
|
+
- all
|
|
30
|
+
# Install sphinx documentation requirements
|
|
31
|
+
- requirements: docs/sphinx/requirements.txt
|
|
@@ -5,25 +5,44 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
-
## [0.4.0] - 2026-01-
|
|
8
|
+
## [0.4.0] - 2026-01-24
|
|
9
9
|
|
|
10
10
|
### Added
|
|
11
|
+
- **Collections API** - HTTP endpoints for paper collections (`/collections/*`)
|
|
12
|
+
- CRUD operations: list, create, query, delete
|
|
13
|
+
- Download as JSON, CSV, BibTeX, or DOIs
|
|
14
|
+
- Statistics endpoint for collection analytics
|
|
15
|
+
- **Citation HTTP endpoints** - RESTful citation access
|
|
16
|
+
- `GET /citations/{doi}/citing` - Papers citing this DOI
|
|
17
|
+
- `GET /citations/{doi}/cited` - Papers cited by this DOI
|
|
18
|
+
- `GET /citations/{doi}/count` - Citation count
|
|
19
|
+
- `GET /citations/{doi}/network` - Citation network graph
|
|
20
|
+
- **Multi-tenant support** - X-User-ID header for collection scoping
|
|
21
|
+
- **Security hardening**
|
|
22
|
+
- Path traversal protection via name sanitization
|
|
23
|
+
- Input validation with field whitelist (14 allowed fields)
|
|
24
|
+
- Size limits: MAX_LIMIT=10000, MAX_DOIS=1000
|
|
11
25
|
- Shell completion command (`crossref-local completion bash/zsh/fish/install/status`)
|
|
12
|
-
- Paper cache module for efficient collection management
|
|
26
|
+
- Paper cache module for efficient collection management
|
|
13
27
|
- MCP subcommand group (`crossref-local mcp {start,doctor,installation,list-tools}`)
|
|
14
28
|
- `--help-recursive` option for complete CLI help
|
|
15
29
|
- Remote deployment docs with systemd and Docker examples
|
|
16
30
|
- Automated MCP server installation via Makefile
|
|
31
|
+
- RemoteClient collection methods mixin
|
|
17
32
|
|
|
18
33
|
### Changed
|
|
34
|
+
- Default port changed from 8333 to 31291 (SCITEX convention)
|
|
35
|
+
- Server refactored into modular package (`server/`)
|
|
19
36
|
- Reorganized CLI commands for better clarity
|
|
20
37
|
- Improved MCP tools alignment with CLI commands
|
|
38
|
+
- SCITEX environment variables supported with fallback chain
|
|
21
39
|
- Examples renamed to follow numbered convention (04_mcp_demo)
|
|
22
40
|
- Updated .env.example with all environment variables
|
|
23
41
|
|
|
24
42
|
### Fixed
|
|
25
43
|
- Remote client `get_many` batch response includes citation_count
|
|
26
44
|
- CI workflow now includes pytest-cov for coverage reporting
|
|
45
|
+
- Circular import between cache.py and cache_export.py
|
|
27
46
|
|
|
28
47
|
## [0.3.1] - 2026-01-14
|
|
29
48
|
|
|
@@ -137,39 +137,7 @@ help: ## Show this help
|
|
|
137
137
|
##@ Status & Information
|
|
138
138
|
|
|
139
139
|
status: ## Show overall system status (run this first!)
|
|
140
|
-
|
|
141
|
-
@echo "║ CROSSREF LOCAL - STATUS ║"
|
|
142
|
-
@echo "╚════════════════════════════════════════════════════════════╝"
|
|
143
|
-
@echo ""
|
|
144
|
-
@echo "=== Database ==="
|
|
145
|
-
@if [ -f "$(DB_PATH)" ]; then \
|
|
146
|
-
echo " ✓ Database exists: $(DB_PATH)"; \
|
|
147
|
-
echo " Size: $$(du -h "$(DB_PATH)" | cut -f1)"; \
|
|
148
|
-
else \
|
|
149
|
-
echo " ✗ Database NOT FOUND: $(DB_PATH)"; \
|
|
150
|
-
echo " Hint: Check data symlink or run 'make download'"; \
|
|
151
|
-
fi
|
|
152
|
-
@echo ""
|
|
153
|
-
@echo "=== MCP Server ==="
|
|
154
|
-
@$(SCRIPTS)/mcp/status.sh
|
|
155
|
-
@echo "=== NFS Server ==="
|
|
156
|
-
@$(SCRIPTS)/nfs/check.sh
|
|
157
|
-
@echo ""
|
|
158
|
-
@echo "=== Running Processes ==="
|
|
159
|
-
@ps aux | grep -E "(rebuild_citations|build_fts|sqlite3)" | grep -v grep | head -5 || echo " No database processes running"
|
|
160
|
-
@echo ""
|
|
161
|
-
@echo "=== Screen Sessions ==="
|
|
162
|
-
@screen -ls 2>/dev/null | grep -E "(citations|fts|rebuild)" || echo " No relevant screen sessions"
|
|
163
|
-
@echo ""
|
|
164
|
-
@echo "=== Quick Stats ==="
|
|
165
|
-
@if [ -f "$(DB_PATH)" ]; then \
|
|
166
|
-
echo " Works: $$(sqlite3 "$(DB_PATH)" "SELECT stat FROM sqlite_stat1 WHERE tbl='works' LIMIT 1;" 2>/dev/null | cut -d' ' -f1 || echo '?')"; \
|
|
167
|
-
echo " Citations: $$(sqlite3 "$(DB_PATH)" "SELECT MAX(rowid) FROM citations;" 2>/dev/null || echo '?')"; \
|
|
168
|
-
fi
|
|
169
|
-
@echo ""
|
|
170
|
-
@echo "For detailed database info: make db-info"
|
|
171
|
-
@echo "For MCP server: make mcp-status"
|
|
172
|
-
@echo "For NFS details: make nfs-status"
|
|
140
|
+
@$(SCRIPTS)/status.sh
|
|
173
141
|
|
|
174
142
|
db-info: ## Show database tables, indices, and row counts
|
|
175
143
|
@$(SCRIPTS)/database/99_db_info.sh
|
|
@@ -264,13 +232,13 @@ maintain-indices: ## Analyze and optimize indices
|
|
|
264
232
|
##@ MCP Server (Remote Access)
|
|
265
233
|
|
|
266
234
|
mcp-install: ## Install MCP server as systemd service
|
|
267
|
-
@$(SCRIPTS)/mcp/install.sh $(if $(DB),--db $(DB),) $(if $(PORT),--port $(PORT),)
|
|
235
|
+
@$(SCRIPTS)/deployment/mcp/install.sh $(if $(DB),--db $(DB),) $(if $(PORT),--port $(PORT),)
|
|
268
236
|
|
|
269
237
|
mcp-uninstall: ## Remove MCP systemd service
|
|
270
|
-
@$(SCRIPTS)/mcp/install.sh --uninstall
|
|
238
|
+
@$(SCRIPTS)/deployment/mcp/install.sh --uninstall
|
|
271
239
|
|
|
272
240
|
mcp-status: ## Show MCP server status
|
|
273
|
-
@$(SCRIPTS)/mcp/status.sh
|
|
241
|
+
@$(SCRIPTS)/deployment/mcp/status.sh
|
|
274
242
|
|
|
275
243
|
mcp-start: ## Start MCP server
|
|
276
244
|
@sudo systemctl start crossref-mcp
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: crossref-local
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0
|
|
4
4
|
Summary: Local CrossRef database with 167M+ works and full-text search
|
|
5
5
|
Project-URL: Homepage, https://github.com/ywatanabe1989/crossref_local
|
|
6
6
|
Project-URL: Repository, https://github.com/ywatanabe1989/crossref_local
|
|
@@ -18,6 +18,7 @@ Classifier: Topic :: Database
|
|
|
18
18
|
Classifier: Topic :: Scientific/Engineering
|
|
19
19
|
Requires-Python: >=3.10
|
|
20
20
|
Requires-Dist: click>=8.0
|
|
21
|
+
Requires-Dist: rich>=13.0
|
|
21
22
|
Provides-Extra: all
|
|
22
23
|
Requires-Dist: fastapi>=0.100; extra == 'all'
|
|
23
24
|
Requires-Dist: fastmcp>=0.4; extra == 'all'
|
|
@@ -53,7 +54,10 @@ Description-Content-Type: text/markdown
|
|
|
53
54
|
|
|
54
55
|
Local CrossRef database with 167M+ scholarly works, full-text search, and impact factor calculation.
|
|
55
56
|
|
|
57
|
+
[](https://badge.fury.io/py/crossref-local)
|
|
58
|
+
[](https://crossref-local.readthedocs.io/en/latest/)
|
|
56
59
|
[](https://github.com/ywatanabe1989/crossref-local/actions/workflows/test.yml)
|
|
60
|
+
[](https://codecov.io/gh/ywatanabe1989/crossref-local)
|
|
57
61
|
[](https://www.python.org/downloads/)
|
|
58
62
|
[](LICENSE)
|
|
59
63
|
|
|
@@ -181,34 +185,46 @@ Found 4 matches in 128.4ms
|
|
|
181
185
|
|
|
182
186
|
Start the FastAPI server:
|
|
183
187
|
```bash
|
|
184
|
-
crossref-local
|
|
188
|
+
crossref-local relay --host 0.0.0.0 --port 31291
|
|
185
189
|
```
|
|
186
190
|
|
|
187
191
|
Endpoints:
|
|
188
192
|
```bash
|
|
189
193
|
# Search works (FTS5)
|
|
190
|
-
curl "http://localhost:
|
|
194
|
+
curl "http://localhost:31291/works?q=CRISPR&limit=10"
|
|
191
195
|
|
|
192
196
|
# Get by DOI
|
|
193
|
-
curl "http://localhost:
|
|
197
|
+
curl "http://localhost:31291/works/10.1038/nature12373"
|
|
194
198
|
|
|
195
199
|
# Batch DOI lookup
|
|
196
|
-
curl -X POST "http://localhost:
|
|
200
|
+
curl -X POST "http://localhost:31291/works/batch" \
|
|
197
201
|
-H "Content-Type: application/json" \
|
|
198
202
|
-d '{"dois": ["10.1038/nature12373", "10.1126/science.aax0758"]}'
|
|
199
203
|
|
|
204
|
+
# Citation endpoints
|
|
205
|
+
curl "http://localhost:31291/citations/10.1038/nature12373/citing"
|
|
206
|
+
curl "http://localhost:31291/citations/10.1038/nature12373/cited"
|
|
207
|
+
curl "http://localhost:31291/citations/10.1038/nature12373/count"
|
|
208
|
+
|
|
209
|
+
# Collection endpoints
|
|
210
|
+
curl "http://localhost:31291/collections"
|
|
211
|
+
curl -X POST "http://localhost:31291/collections" \
|
|
212
|
+
-H "Content-Type: application/json" \
|
|
213
|
+
-d '{"name": "my_papers", "query": "CRISPR", "limit": 100}'
|
|
214
|
+
curl "http://localhost:31291/collections/my_papers/download?format=bibtex"
|
|
215
|
+
|
|
200
216
|
# Database info
|
|
201
|
-
curl "http://localhost:
|
|
217
|
+
curl "http://localhost:31291/info"
|
|
202
218
|
```
|
|
203
219
|
|
|
204
220
|
HTTP mode (connect to running server):
|
|
205
221
|
```bash
|
|
206
222
|
# On local machine (if server is remote)
|
|
207
|
-
ssh -L
|
|
223
|
+
ssh -L 31291:127.0.0.1:31291 your-server
|
|
208
224
|
|
|
209
225
|
# Python client
|
|
210
226
|
from crossref_local import configure_http
|
|
211
|
-
configure_http("http://localhost:
|
|
227
|
+
configure_http("http://localhost:31291")
|
|
212
228
|
|
|
213
229
|
# Or via CLI
|
|
214
230
|
crossref-local --http search "CRISPR"
|
|
@@ -221,7 +237,7 @@ crossref-local --http search "CRISPR"
|
|
|
221
237
|
|
|
222
238
|
Run as MCP (Model Context Protocol) server:
|
|
223
239
|
```bash
|
|
224
|
-
crossref-local
|
|
240
|
+
crossref-local mcp start
|
|
225
241
|
```
|
|
226
242
|
|
|
227
243
|
Local MCP client configuration:
|
|
@@ -230,7 +246,7 @@ Local MCP client configuration:
|
|
|
230
246
|
"mcpServers": {
|
|
231
247
|
"crossref-local": {
|
|
232
248
|
"command": "crossref-local",
|
|
233
|
-
"args": ["
|
|
249
|
+
"args": ["mcp", "start"],
|
|
234
250
|
"env": {
|
|
235
251
|
"CROSSREF_LOCAL_DB": "/path/to/crossref.db"
|
|
236
252
|
}
|
|
@@ -242,7 +258,7 @@ Local MCP client configuration:
|
|
|
242
258
|
Remote MCP via HTTP (recommended):
|
|
243
259
|
```bash
|
|
244
260
|
# On server: start persistent MCP server
|
|
245
|
-
crossref-local
|
|
261
|
+
crossref-local mcp start -t http --host 0.0.0.0 --port 8082
|
|
246
262
|
```
|
|
247
263
|
```json
|
|
248
264
|
{
|
|
@@ -254,12 +270,21 @@ crossref-local run-server-mcp -t http --host 0.0.0.0 --port 8082
|
|
|
254
270
|
}
|
|
255
271
|
```
|
|
256
272
|
|
|
273
|
+
Diagnose setup:
|
|
274
|
+
```bash
|
|
275
|
+
crossref-local mcp doctor # Check dependencies and database
|
|
276
|
+
crossref-local mcp list-tools # Show available MCP tools
|
|
277
|
+
crossref-local mcp installation # Show client config examples
|
|
278
|
+
```
|
|
279
|
+
|
|
257
280
|
See [docs/remote-deployment.md](docs/remote-deployment.md) for systemd and Docker setup.
|
|
258
281
|
|
|
259
282
|
Available tools:
|
|
260
283
|
- `search` - Full-text search across 167M+ papers
|
|
261
284
|
- `search_by_doi` - Get paper by DOI
|
|
285
|
+
- `enrich_dois` - Add citation counts and references to DOIs
|
|
262
286
|
- `status` - Database statistics
|
|
287
|
+
- `cache_*` - Paper collection management
|
|
263
288
|
|
|
264
289
|
</details>
|
|
265
290
|
|
|
@@ -8,7 +8,10 @@
|
|
|
8
8
|
|
|
9
9
|
Local CrossRef database with 167M+ scholarly works, full-text search, and impact factor calculation.
|
|
10
10
|
|
|
11
|
+
[](https://badge.fury.io/py/crossref-local)
|
|
12
|
+
[](https://crossref-local.readthedocs.io/en/latest/)
|
|
11
13
|
[](https://github.com/ywatanabe1989/crossref-local/actions/workflows/test.yml)
|
|
14
|
+
[](https://codecov.io/gh/ywatanabe1989/crossref-local)
|
|
12
15
|
[](https://www.python.org/downloads/)
|
|
13
16
|
[](LICENSE)
|
|
14
17
|
|
|
@@ -136,34 +139,46 @@ Found 4 matches in 128.4ms
|
|
|
136
139
|
|
|
137
140
|
Start the FastAPI server:
|
|
138
141
|
```bash
|
|
139
|
-
crossref-local
|
|
142
|
+
crossref-local relay --host 0.0.0.0 --port 31291
|
|
140
143
|
```
|
|
141
144
|
|
|
142
145
|
Endpoints:
|
|
143
146
|
```bash
|
|
144
147
|
# Search works (FTS5)
|
|
145
|
-
curl "http://localhost:
|
|
148
|
+
curl "http://localhost:31291/works?q=CRISPR&limit=10"
|
|
146
149
|
|
|
147
150
|
# Get by DOI
|
|
148
|
-
curl "http://localhost:
|
|
151
|
+
curl "http://localhost:31291/works/10.1038/nature12373"
|
|
149
152
|
|
|
150
153
|
# Batch DOI lookup
|
|
151
|
-
curl -X POST "http://localhost:
|
|
154
|
+
curl -X POST "http://localhost:31291/works/batch" \
|
|
152
155
|
-H "Content-Type: application/json" \
|
|
153
156
|
-d '{"dois": ["10.1038/nature12373", "10.1126/science.aax0758"]}'
|
|
154
157
|
|
|
158
|
+
# Citation endpoints
|
|
159
|
+
curl "http://localhost:31291/citations/10.1038/nature12373/citing"
|
|
160
|
+
curl "http://localhost:31291/citations/10.1038/nature12373/cited"
|
|
161
|
+
curl "http://localhost:31291/citations/10.1038/nature12373/count"
|
|
162
|
+
|
|
163
|
+
# Collection endpoints
|
|
164
|
+
curl "http://localhost:31291/collections"
|
|
165
|
+
curl -X POST "http://localhost:31291/collections" \
|
|
166
|
+
-H "Content-Type: application/json" \
|
|
167
|
+
-d '{"name": "my_papers", "query": "CRISPR", "limit": 100}'
|
|
168
|
+
curl "http://localhost:31291/collections/my_papers/download?format=bibtex"
|
|
169
|
+
|
|
155
170
|
# Database info
|
|
156
|
-
curl "http://localhost:
|
|
171
|
+
curl "http://localhost:31291/info"
|
|
157
172
|
```
|
|
158
173
|
|
|
159
174
|
HTTP mode (connect to running server):
|
|
160
175
|
```bash
|
|
161
176
|
# On local machine (if server is remote)
|
|
162
|
-
ssh -L
|
|
177
|
+
ssh -L 31291:127.0.0.1:31291 your-server
|
|
163
178
|
|
|
164
179
|
# Python client
|
|
165
180
|
from crossref_local import configure_http
|
|
166
|
-
configure_http("http://localhost:
|
|
181
|
+
configure_http("http://localhost:31291")
|
|
167
182
|
|
|
168
183
|
# Or via CLI
|
|
169
184
|
crossref-local --http search "CRISPR"
|
|
@@ -176,7 +191,7 @@ crossref-local --http search "CRISPR"
|
|
|
176
191
|
|
|
177
192
|
Run as MCP (Model Context Protocol) server:
|
|
178
193
|
```bash
|
|
179
|
-
crossref-local
|
|
194
|
+
crossref-local mcp start
|
|
180
195
|
```
|
|
181
196
|
|
|
182
197
|
Local MCP client configuration:
|
|
@@ -185,7 +200,7 @@ Local MCP client configuration:
|
|
|
185
200
|
"mcpServers": {
|
|
186
201
|
"crossref-local": {
|
|
187
202
|
"command": "crossref-local",
|
|
188
|
-
"args": ["
|
|
203
|
+
"args": ["mcp", "start"],
|
|
189
204
|
"env": {
|
|
190
205
|
"CROSSREF_LOCAL_DB": "/path/to/crossref.db"
|
|
191
206
|
}
|
|
@@ -197,7 +212,7 @@ Local MCP client configuration:
|
|
|
197
212
|
Remote MCP via HTTP (recommended):
|
|
198
213
|
```bash
|
|
199
214
|
# On server: start persistent MCP server
|
|
200
|
-
crossref-local
|
|
215
|
+
crossref-local mcp start -t http --host 0.0.0.0 --port 8082
|
|
201
216
|
```
|
|
202
217
|
```json
|
|
203
218
|
{
|
|
@@ -209,12 +224,21 @@ crossref-local run-server-mcp -t http --host 0.0.0.0 --port 8082
|
|
|
209
224
|
}
|
|
210
225
|
```
|
|
211
226
|
|
|
227
|
+
Diagnose setup:
|
|
228
|
+
```bash
|
|
229
|
+
crossref-local mcp doctor # Check dependencies and database
|
|
230
|
+
crossref-local mcp list-tools # Show available MCP tools
|
|
231
|
+
crossref-local mcp installation # Show client config examples
|
|
232
|
+
```
|
|
233
|
+
|
|
212
234
|
See [docs/remote-deployment.md](docs/remote-deployment.md) for systemd and Docker setup.
|
|
213
235
|
|
|
214
236
|
Available tools:
|
|
215
237
|
- `search` - Full-text search across 167M+ papers
|
|
216
238
|
- `search_by_doi` - Get paper by DOI
|
|
239
|
+
- `enrich_dois` - Add citation counts and references to DOIs
|
|
217
240
|
- `status` - Database statistics
|
|
241
|
+
- `cache_*` - Paper collection management
|
|
218
242
|
|
|
219
243
|
</details>
|
|
220
244
|
|
|
@@ -40,7 +40,7 @@ For production deployment, use systemd to manage the service.
|
|
|
40
40
|
|
|
41
41
|
```bash
|
|
42
42
|
# Copy and customize the service file
|
|
43
|
-
sudo cp
|
|
43
|
+
sudo cp scripts/deployment/mcp/crossref-mcp.service /etc/systemd/system/
|
|
44
44
|
|
|
45
45
|
# Edit to match your setup
|
|
46
46
|
sudo nano /etc/systemd/system/crossref-mcp.service
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
crossref_local API
|
|
2
|
+
==================
|
|
3
|
+
|
|
4
|
+
Main Functions
|
|
5
|
+
--------------
|
|
6
|
+
|
|
7
|
+
.. autofunction:: crossref_local.search
|
|
8
|
+
.. autofunction:: crossref_local.get
|
|
9
|
+
.. autofunction:: crossref_local.get_many
|
|
10
|
+
.. autofunction:: crossref_local.count
|
|
11
|
+
.. autofunction:: crossref_local.exists
|
|
12
|
+
.. autofunction:: crossref_local.configure
|
|
13
|
+
.. autofunction:: crossref_local.configure_http
|
|
14
|
+
.. autofunction:: crossref_local.enrich
|
|
15
|
+
.. autofunction:: crossref_local.enrich_dois
|
|
16
|
+
.. autofunction:: crossref_local.get_mode
|
|
17
|
+
.. autofunction:: crossref_local.info
|
|
18
|
+
|
|
19
|
+
Data Classes
|
|
20
|
+
------------
|
|
21
|
+
|
|
22
|
+
Work
|
|
23
|
+
~~~~
|
|
24
|
+
|
|
25
|
+
.. autoclass:: crossref_local.Work
|
|
26
|
+
:members:
|
|
27
|
+
:undoc-members:
|
|
28
|
+
|
|
29
|
+
SearchResult
|
|
30
|
+
~~~~~~~~~~~~
|
|
31
|
+
|
|
32
|
+
.. autoclass:: crossref_local.SearchResult
|
|
33
|
+
:members:
|
|
34
|
+
:undoc-members:
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
CLI Reference
|
|
2
|
+
=============
|
|
3
|
+
|
|
4
|
+
CrossRef Local provides a comprehensive command-line interface.
|
|
5
|
+
|
|
6
|
+
Global Options
|
|
7
|
+
--------------
|
|
8
|
+
|
|
9
|
+
.. code-block:: bash
|
|
10
|
+
|
|
11
|
+
crossref-local [OPTIONS] COMMAND [ARGS]...
|
|
12
|
+
|
|
13
|
+
Options:
|
|
14
|
+
|
|
15
|
+
- ``--http``: Use HTTP API instead of direct database
|
|
16
|
+
- ``--api-url URL``: API URL for http mode (default: auto-detect)
|
|
17
|
+
- ``--version``: Show version
|
|
18
|
+
- ``-h, --help``: Show help
|
|
19
|
+
- ``--help-recursive``: Show help for all commands
|
|
20
|
+
|
|
21
|
+
Commands
|
|
22
|
+
--------
|
|
23
|
+
|
|
24
|
+
search
|
|
25
|
+
~~~~~~
|
|
26
|
+
|
|
27
|
+
Search for works by title, abstract, or authors.
|
|
28
|
+
|
|
29
|
+
.. code-block:: bash
|
|
30
|
+
|
|
31
|
+
crossref-local search [OPTIONS] QUERY
|
|
32
|
+
|
|
33
|
+
Options:
|
|
34
|
+
|
|
35
|
+
- ``-n, --number INTEGER``: Number of results (default: 10)
|
|
36
|
+
- ``-o, --offset INTEGER``: Skip first N results
|
|
37
|
+
- ``-a, --abstracts``: Show abstracts
|
|
38
|
+
- ``-A, --authors``: Show authors
|
|
39
|
+
- ``-if, --impact-factor``: Show journal impact factor
|
|
40
|
+
- ``--json``: Output as JSON
|
|
41
|
+
|
|
42
|
+
Examples:
|
|
43
|
+
|
|
44
|
+
.. code-block:: bash
|
|
45
|
+
|
|
46
|
+
crossref-local search "machine learning"
|
|
47
|
+
crossref-local search "CRISPR" -n 20 -a
|
|
48
|
+
crossref-local search "neural networks" --impact-factor
|
|
49
|
+
crossref-local search "deep learning" --json
|
|
50
|
+
|
|
51
|
+
search-by-doi
|
|
52
|
+
~~~~~~~~~~~~~
|
|
53
|
+
|
|
54
|
+
Search for a work by DOI.
|
|
55
|
+
|
|
56
|
+
.. code-block:: bash
|
|
57
|
+
|
|
58
|
+
crossref-local search-by-doi DOI [OPTIONS]
|
|
59
|
+
|
|
60
|
+
Options:
|
|
61
|
+
|
|
62
|
+
- ``--json``: Output as JSON
|
|
63
|
+
- ``--citation``: Output as citation
|
|
64
|
+
|
|
65
|
+
Examples:
|
|
66
|
+
|
|
67
|
+
.. code-block:: bash
|
|
68
|
+
|
|
69
|
+
crossref-local search-by-doi 10.1038/nature12373
|
|
70
|
+
crossref-local search-by-doi 10.1038/nature12373 --citation
|
|
71
|
+
|
|
72
|
+
status
|
|
73
|
+
~~~~~~
|
|
74
|
+
|
|
75
|
+
Show status and configuration.
|
|
76
|
+
|
|
77
|
+
.. code-block:: bash
|
|
78
|
+
|
|
79
|
+
crossref-local status
|
|
80
|
+
|
|
81
|
+
relay
|
|
82
|
+
~~~~~
|
|
83
|
+
|
|
84
|
+
Run HTTP relay server for remote database access.
|
|
85
|
+
|
|
86
|
+
.. code-block:: bash
|
|
87
|
+
|
|
88
|
+
crossref-local relay [OPTIONS]
|
|
89
|
+
|
|
90
|
+
Options:
|
|
91
|
+
|
|
92
|
+
- ``--host TEXT``: Host to bind (default: 0.0.0.0)
|
|
93
|
+
- ``--port INTEGER``: Port to listen on (default: 31291)
|
|
94
|
+
|
|
95
|
+
Examples:
|
|
96
|
+
|
|
97
|
+
.. code-block:: bash
|
|
98
|
+
|
|
99
|
+
crossref-local relay
|
|
100
|
+
crossref-local relay --port 8080
|
|
101
|
+
|
|
102
|
+
MCP Commands
|
|
103
|
+
------------
|
|
104
|
+
|
|
105
|
+
mcp start
|
|
106
|
+
~~~~~~~~~
|
|
107
|
+
|
|
108
|
+
Start the MCP server.
|
|
109
|
+
|
|
110
|
+
.. code-block:: bash
|
|
111
|
+
|
|
112
|
+
crossref-local mcp start [OPTIONS]
|
|
113
|
+
|
|
114
|
+
Options:
|
|
115
|
+
|
|
116
|
+
- ``-t, --transport [stdio|sse|http]``: Transport type (default: stdio)
|
|
117
|
+
- ``--host TEXT``: Host for SSE/HTTP transport
|
|
118
|
+
- ``--port INTEGER``: Port for SSE/HTTP transport
|
|
119
|
+
|
|
120
|
+
mcp tools
|
|
121
|
+
~~~~~~~~~
|
|
122
|
+
|
|
123
|
+
List available MCP tools.
|
|
124
|
+
|
|
125
|
+
.. code-block:: bash
|
|
126
|
+
|
|
127
|
+
crossref-local mcp tools
|
|
128
|
+
|
|
129
|
+
list-apis
|
|
130
|
+
~~~~~~~~~
|
|
131
|
+
|
|
132
|
+
List Python APIs (requires scitex).
|
|
133
|
+
|
|
134
|
+
.. code-block:: bash
|
|
135
|
+
|
|
136
|
+
crossref-local list-apis [OPTIONS]
|
|
137
|
+
|
|
138
|
+
Options:
|
|
139
|
+
|
|
140
|
+
- ``-v, --verbose``: Verbosity level (-v sig, -vv +doc, -vvv full)
|
|
141
|
+
- ``-d, --max-depth INTEGER``: Max recursion depth
|
|
142
|
+
- ``--json``: Output as JSON
|