Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

124 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stable Dev Build Status Coverage License: MIT

Bibliography.jl

Bibliography.jl is the high-level bibliography interface used by the Humans of Julia bibliography stack.

It ties together BibParser.jl and BibInternal.jl and exposes convenient helpers for importing, validating, filtering, sorting, and exporting bibliographic data.

The document API keeps the original source alongside its canonical entries. Use mode=:preserved for an unchanged, same-format import/export when comments, unknown fields, or source-specific structures must survive exactly; use mode=:normalized after semantic edits or for cross-format conversion.

document = read_bibliography("references.ris")
write_bibliography("references.copy.ris", document;
                   format=document.format, mode=:preserved)

Organization

This package comes as a set of 3 packages to convert bibliographies. This tool was split into three for the sake of the precompilation times.

  • Bibliography.jl: The interface to import/export bibliographic items.
  • BibInternal.jl: A Julia internal format to translate from and into.
  • BibParser.jl: A container for different bibliographic format parsers (such as BibTeX).

The dedicated documentation site will eventually gather these packages in one place, but each package keeps its own reference docs for now.

Packages using Bibliography

  • StaticWebPages.jl: a black-box generator for static websites oriented towards personal and/or academic pages. No knowledge of Julia nor any other programming language is required.
  • DocumenterCitations.jl: adds support for BibTeX citations and references in documentation pages generated by Documenter.jl. BibliographyStudio.jl and academic publishing tools use the normalized API and its lightweight web projection.

Contributions are welcome

  • Write new or integrate existing parsers to BibParser.jl.
  • Add import/export from existing bibliographic formats to Bibliography.jl.
  • Add projections for non-bibliographic consumers.

Short documentation

# Import a BibTeX file to the internal bib structure
imported_bib = import_bibtex(source_path::AbstractString)


# Select a part of a bibliography
selection = ["key1", "key2"]
selected_bib = select(imported_bib, selection) # select the intersection between the bibliography and `selection`
diff_bib = select(imported_bib, selection; complementary = true) # select the difference between the bibliography and `selection`

# Export from internal to BibTeX format
export_bibtex(target_path::AbstractString, bibliography)

# Check BibTeX rules, entry validity, clean and sort a bibtex file
export_bibtex(target_path::AbstractString, import_bibtex(path_to_file::AbstractString))

# Export from internal to the lightweight web projection
export_web(bibliography)

# Import BibTeX and return the same web projection
bibtex_to_web(source_path::AbstractString)

Releases

Packages

Used by

Contributors

Languages