Skip to content

Commit

Permalink
🔖 Release v0.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ewen-lbh committed Apr 12, 2024
1 parent fb7628d commit d2b2e0f
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 152 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.3.1] - 2024-04-13

### Fixed

- invalid json schema for database
Expand All @@ -25,7 +27,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Initial release

[Unreleased]: https://github.com/ortfo/db/compare/v0.3.0...HEAD
[0.3.1]: https://github.com/ortfo/db/-/releases/tag/v0.3.1
[0.3.0]: https://github.com/ortfo/db/compare/v0.2.0...v0.3.0
[0.2.0]: https://github.com/ortfo/db/releases/tag/v0.2.0

[//]: # (C3-2-DKAC:GGH:Rortfo/db:Tv{t})

[unreleased]: https://github.com/ortfo/db/-/compare/v0.3.1...main
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ See [Compiling](#compiling) for instructions on how to compile this yourself
## Usage

```docopt
ortfo/db v0.3.0
ortfo/db v0.3.1
Usage:
ortfodb [options] <database> build to <to-filepath> [--config=FILEPATH] [-msS] [--]
Expand Down
2 changes: 1 addition & 1 deletion meta.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package ortfodb

const Version = "0.3.0"
const Version = "0.3.1"
2 changes: 1 addition & 1 deletion packages/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "ortfodb"
version = "0.3.0"
version = "0.3.1"
description = "ortfodb client library"
authors = ["Ewen Le Bihan <hey@ewen.works>"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion packages/rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ortfodb"
version = "0.3.0"
version = "0.3.1"
edition = "2021"

[dependencies]
Expand Down
147 changes: 6 additions & 141 deletions packages/rust/src/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,150 +12,15 @@
// }

use serde::{Serialize, Deserialize};
use std::collections::HashMap;

pub type Database = HashMap<String, Meta>;

#[derive(Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Meta {
#[serde(rename = "Partial")]
pub partial: Option<bool>,

pub built_at: Option<String>,

pub content: Option<HashMap<String, ContentValue>>,

pub description_hash: Option<String>,

pub id: Option<String>,

pub metadata: Option<Metadata>,
}

#[derive(Serialize, Deserialize)]
pub struct ContentValue {
pub blocks: Vec<BlockElement>,

pub footnotes: HashMap<String, String>,

pub layout: Vec<Vec<String>>,

pub title: String,
}

#[derive(Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct BlockElement {
pub alt: String,

pub analyzed: bool,

pub anchor: String,

pub attributes: Attributes,

pub caption: String,

pub colors: Colors,

pub content: String,

pub content_type: String,

pub dimensions: Dimensions,

pub dist_source: String,

pub duration: f64,

pub has_sound: bool,

pub id: String,

pub index: i64,

pub online: bool,

pub relative_source: String,

pub size: i64,

pub text: String,

pub thumbnails: Thumbnails,

pub thumbnails_built_at: String,

pub title: String,

#[serde(rename = "type")]
pub database_schema_type: String,

pub url: String,
}

#[derive(Serialize, Deserialize)]
pub struct Attributes {
pub autoplay: bool,

pub controls: bool,

#[serde(rename = "loop")]
pub attributes_loop: bool,

pub muted: bool,

pub playsinline: bool,
}

#[derive(Serialize, Deserialize)]
pub struct Colors {
pub primary: String,

pub secondary: String,

pub tertiary: String,
}

#[derive(Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Dimensions {
pub aspect_ratio: f64,

pub height: i64,

pub width: i64,
}

#[derive(Serialize, Deserialize)]
pub struct Thumbnails {
pub struct Database {
#[serde(rename = "#meta")]
pub meta: Option<Meta>,
}

#[derive(Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Metadata {
pub additional_metadata: HashMap<String, Option<serde_json::Value>>,

pub aliases: Vec<String>,

pub colors: Colors,

pub finished: String,

pub made_with: Vec<String>,

pub page_background: String,

pub private: bool,

pub started: String,

pub tags: Vec<String>,

pub thumbnail: String,

pub title_style: String,

pub wip: bool,
#[serde(rename_all = "PascalCase")]
pub struct Meta {
pub partial: Option<bool>,
}
2 changes: 1 addition & 1 deletion packages/typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ortfo/db",
"version": "0.3.0-1",
"version": "0.3.1",
"description": "ortfodb client library",
"scripts": {
"build": "tsc -p tsconfig.json --declaration --outDir dist"
Expand Down
2 changes: 1 addition & 1 deletion schemas/configuration.schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/ortfo/db/v0.3.0/schemas/configuration.schema.json",
"$id": "https://raw.githubusercontent.com/ortfo/db/v0.3.1/schemas/configuration.schema.json",
"$ref": "#/$defs/Configuration",
"$defs": {
"Configuration": {
Expand Down
8 changes: 5 additions & 3 deletions schemas/database.schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/ortfo/db/v0.3.0/schemas/database.schema.json",
"$id": "https://raw.githubusercontent.com/ortfo/db/v0.3.1/schemas/database.schema.json",
"$ref": "#/$defs/DatabaseWithMetaWork",
"$defs": {
"AnalyzedWork": {
Expand Down Expand Up @@ -167,8 +167,10 @@
"$ref": "#/$defs/MetaWork"
}
},
"additionalProperties": {
"$ref": "#/$defs/AnalyzedWork"
"patternProperties": {
"^(?!#meta).*$": {
"$ref": "#/$defs/AnalyzedWork"
}
},
"type": "object"
},
Expand Down
2 changes: 1 addition & 1 deletion schemas/tags.schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/ortfo/db/v0.3.0/schemas/tags.schema.json",
"$id": "https://raw.githubusercontent.com/ortfo/db/v0.3.1/schemas/tags.schema.json",
"$ref": "#/$defs/tags",
"$defs": {
"Tag": {
Expand Down
2 changes: 1 addition & 1 deletion schemas/technologies.schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/ortfo/db/v0.3.0/schemas/technologies.schema.json",
"$id": "https://raw.githubusercontent.com/ortfo/db/v0.3.1/schemas/technologies.schema.json",
"$ref": "#/$defs/technologies",
"$defs": {
"Technology": {
Expand Down

0 comments on commit d2b2e0f

Please sign in to comment.