Skip to content

Commit

Permalink
Merge branch 'typst:main' into fix-disambiguation
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxGietl authored Nov 20, 2024
2 parents ba087cd + 67f4f88 commit 57db229
Show file tree
Hide file tree
Showing 167 changed files with 3,733 additions and 1,705 deletions.
1 change: 1 addition & 0 deletions .github/.well-known/funding-manifest-urls
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://typst.app/funding.json
21 changes: 19 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,32 @@
name: Continuous integration
on: [push, pull_request]

env:
RUSTFLAGS: "-Dwarnings"
RUSTDOCFLAGS: "-Dwarnings"

jobs:
ci:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Check out CSL styles
run: |
cd ..
git clone --depth 1 https://github.com/citation-style-language/styles
- run: cargo build
- run: cargo test --features csl-json

checks:
name: Check clippy, formatting, and documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/[email protected]
with:
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --workspace --all-targets --all-features
- run: cargo fmt --check --all
- run: cargo doc --workspace --no-deps
52 changes: 52 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,55 @@
# 0.8.0

- **Breaking change:** Fixed deserialization of page ranges,
removing `From<u64> for PageRanges`
- Added support for disambiguation to alphanumeric citation style
- Raised limit for disambiguation resolving in complex cases
- The year 0 will now render as 1BC for CSL

# 0.7.0

- **Breaking change:** `Entry::page_range` now returns
`Option<&MaybeTyped<PageRanges>>` instead of `Option<&PageRanges>`. This fixes
a panic that occurred when a page range had an unknown format
- `MaybeTyped` now has an `as_typed` method

# 0.6.0

- **Breaking change:** Fix that the page range labels were not pluralized,
`NumericValue::Range` now returns an inclusive range (#142)
- **Breaking change:** The field `publisher` can now accept a dictionary with a
`location`. The top-level `location` key is now primarily for event and item
locations.
- **Breaking change:** The field `annote` has been removed
- Allow multiple page ranges with prefixes and suffixes
- Fixes with sorting bibliography entries
- Fix sorting citations by their number (#115)
- Fix how citation number ranges collapse (#154)
- `BibliographyItem` is now exported (#157)
- Fix when the short form of a title was used (#173)
- Bumped the `biblatex` crate to 0.10.0 to fix a BibLaTeX parsing bug
(https://github.com/typst/biblatex/issues/53) and allow the Unknown and
Director editor types (https://github.com/typst/biblatex/issues/52).

We also updated our collection of Citation Styles.

# 0.5.3

- Fixed a bug with initials (#150)
- Fixed suppression of title when no author was provided (#144)
- Fixed et al handling on subsequent citations by [bumping citationberg](https://github.com/typst/citationberg/releases/tag/v0.3.1)

# 0.5.2

- Allow the `abstract`, `annote`, and `genre` fields to Hayagriva files and process them from BibTeX files.
- Fix retrieval of an item's editor (#94)
- Fixed issue with pulling punctuation into quotation marks (#85)
- Allow non-range values in the `pages` field (#103)
- Fix multiple subsequent prose citations to the same item (#122)
- Interpret the `eprint` BibTeX key as `serial-number.arxiv` if the `eprinttype` is set to `arxiv`
- Fixed issue with multiple subsequent citations (#122)
- Improved handling of empty CSL objects

# 0.5.1

- Fixed spacing around math blocks
Expand Down
14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hayagriva"
version = "0.5.1"
version = "0.8.0"
authors = ["Martin Haug <[email protected]>"]
edition = "2021"
license = "MIT OR Apache-2.0"
Expand All @@ -17,7 +17,7 @@ archive = ["ciborium"]
csl-json = ["citationberg/json"]

[dependencies]
citationberg = "0.1.1"
citationberg = "0.4.0"
indexmap = { version = "2.0.2", features = ["serde"] }
numerals = "0.1.4"
paste = "1.0.14"
Expand All @@ -27,14 +27,14 @@ thiserror = "1.0.48"
unic-langid = { version = "0.9.0", features = ["serde"] }
unicode-segmentation = "1.6.0"
unscanny = "0.1.0"
url = { version = "2.4", features = ["serde"] }
biblatex = { version = "0.9", optional = true }
url = { version = "2.4", features = ["serde"] }
biblatex = { version = "0.10.0", optional = true }
ciborium = { version = "0.2.1", optional = true }
clap = { version = "3.1", optional = true, features = ["cargo"] }
strum = { version = "0.25", features = ["derive"], optional = true }
clap = { version = "4", optional = true, features = ["cargo"] }
strum = { version = "0.26", features = ["derive"], optional = true }

[dev-dependencies]
heck = "0.4"
heck = "0.5"
serde_json = "1"

[[bin]]
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Rusty bibliography management.

Hayagriva is a tool that can help your or your apps deal with literature and
Hayagriva is a tool that can help you or your apps deal with literature and
other media. Its features include:

- Data structures for literature collections
Expand Down Expand Up @@ -105,7 +105,7 @@ default features by writing this in your `Cargo.toml`:

```toml
[dependencies]
hayagriva = { version = "0.2", default-features = false }
hayagriva = { version = "0.8", default-features = false }
```

### Selectors
Expand Down Expand Up @@ -245,10 +245,10 @@ you only want to obtain a list of matching keys, use the `--keys` flag.

If you are working with BibTeX, you can use your `.bib` file with Hayagriva just
like you would use a `.yml` file. If you want to convert your `.bib` file to a
`.yml` file, you can the CLI without any additional arguments. It will then
show the YAML-formatted bibliography with key and selector filters applied on
standard output. If you therefore want to convert your `.bib` file and save the
result somewhere, you can just use `>`:
`.yml` file, you can simply pass the `.bib` file to the CLI without any additional
arguments. It will then show the YAML-formatted bibliography with key and selector
filters applied on standard output. If you therefore want to convert your `.bib`
file and save the result somewhere, you can just use `>`:
```bash
hayagriva literature.bib > converted.yml
```
Expand Down
Loading

0 comments on commit 57db229

Please sign in to comment.