Contributing
Setup
git clone https://github.com/YOUR_USERNAME/url2ref.git
cd url2ref
cargo build
cargo test
For web interface:
cd url2ref-web/npm && npm install && ./build.sh
Workflow
- Create branch:
git checkout -b feature/your-feature - Make changes
- Run
cargo fmtandcargo clippy - Run
cargo test - Commit with clear message
- Open PR
Commit Format
type(scope): description
feat(parser): add Dublin Core support
fix(cli): handle URLs with special characters
docs: update installation guide
Project Structure
url2ref/ # Core library
├── src/
│ ├── lib.rs # Public API
│ ├── generator.rs # Reference generation
│ ├── parser.rs # Metadata parsing
│ ├── opengraph.rs # Open Graph parser
│ ├── schema_org.rs # Schema.org parser
│ ├── doi.rs # DOI resolution
│ ├── zotero.rs # Zotero/Citoid
│ ├── ai_extractor.rs # AI extraction
│ └── citation.rs # Citation formatters
url2ref-cli/ # CLI application
url2ref-web/ # Web interface
docs/ # This documentation
Adding a Metadata Source
- Create parser in
url2ref/src/ - Add to
MetadataTypeenum - Add tests
- Update docs
Adding a Citation Format
- Add formatter in
citation.rs - Add method to
Reference - Update CLI and web interface
- Add tests