Skip to content

Commit

Permalink
Fix YAML duplicate keys, add credit and parsing tip
Browse files Browse the repository at this point in the history
  • Loading branch information
brunchboy committed Aug 30, 2024
1 parent f601597 commit 83144fa
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ This change log follows the conventions of

## [Unreleased][unreleased]

### Added

- Thanks to [Dominik Stolz (@voidc)](https://github.com/voidc), we can now
parse `exportExt.pdb` files for the tag information they contain.

### Fixed

- An error in interpreting a value in the database export file format could lead to some rows that were actually present in tables not being found. Thanks to [@IvanOnishchenko](https://github.com/IvanOnishchenko) for [pointing this out](https://github.com/Deep-Symmetry/crate-digger/issues/32), and [Jan Holthuis (@Holzhaus)](https://github.com/Holzhaus) for identifying a flaw in the first attempt at correcting it.
Expand Down
14 changes: 14 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,20 @@ line of the listing, then tell your browser to save it to disk. Be
sure to keep the `.ksy` extension. Then you can upload it to the
Kaitai Struct Web IDE.

If you want to look at an `exportExt.pdb` file, follow the procedure above but then also put the following content into an auxiliary file (named
something like `redkordboxExt_pdb.ksy`) and drag it into the web IDE before
you drag in the database, that will tell the web IDE which variant of the
file it is working with:

```yaml
meta:
id: rekordbox_pdb_ext
imports:
- rekordbox_pdb
seq:
- id: root
type: rekordbox_pdb(true)
```

== ANLZ Data

Expand Down
6 changes: 2 additions & 4 deletions src/main/kaitai/rekordbox_pdb.ksy
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ types:
-webide-parse-mode: eager
body:
pos: row_base
if: not _root.is_ext
if: present and not _root.is_ext
type:
switch-on: _parent._parent.type
cases:
Expand All @@ -360,19 +360,17 @@ types:
'page_type::history_playlists': history_playlist_row
'page_type::history_entries': history_entry_row
'page_type::tracks': track_row
if: present
doc: |
The actual content of the row, as long as it is present.
-webide-parse-mode: eager
body_ext:
pos: row_base
if: _root.is_ext
if: present and _root.is_ext
type:
switch-on: _parent._parent.type_ext
cases:
'page_type_ext::tags': tag_row
'page_type_ext::tag_tracks': tag_track_row
if: present
doc: |
The actual content of the row, as long as it is present.
-webide-parse-mode: eager
Expand Down

0 comments on commit 83144fa

Please sign in to comment.