diff --git a/CHANGELOG.md b/CHANGELOG.md
index a792d9e..614d940 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,6 +15,10 @@ Procedure when bumping the version number:
## Unreleased
+### Changed
+- Renamed `json-stream` export format to `json-lines` (see )
+- Changed `json-lines` file extension from `.json` to `.jsonl`
+
### Fixed
- Crash when window is too small while empty message editor is visible
- Mistakes in output and docs
diff --git a/cove/src/export.rs b/cove/src/export.rs
index 9d9c60b..0ad9414 100644
--- a/cove/src/export.rs
+++ b/cove/src/export.rs
@@ -14,8 +14,9 @@ pub enum Format {
Text,
/// Array of message objects in the same format as the euphoria API uses.
Json,
- /// Message objects in the same format as the euphoria API uses, one per line.
- JsonStream,
+ /// Message objects in the same format as the euphoria API uses, one per
+ /// line (https://jsonlines.org/).
+ JsonLines,
}
impl Format {
@@ -23,14 +24,15 @@ impl Format {
match self {
Self::Text => "text",
Self::Json => "json",
- Self::JsonStream => "json stream",
+ Self::JsonLines => "json lines",
}
}
fn extension(&self) -> &'static str {
match self {
Self::Text => "txt",
- Self::Json | Self::JsonStream => "json",
+ Self::Json => "json",
+ Self::JsonLines => "jsonl",
}
}
}
@@ -78,7 +80,7 @@ async fn export_room(
match format {
Format::Text => text::export(vault, out).await?,
Format::Json => json::export(vault, out).await?,
- Format::JsonStream => json::export_stream(vault, out).await?,
+ Format::JsonLines => json::export_lines(vault, out).await?,
}
Ok(())
}
diff --git a/cove/src/export/json.rs b/cove/src/export/json.rs
index e72a0b8..9c16e46 100644
--- a/cove/src/export/json.rs
+++ b/cove/src/export/json.rs
@@ -37,7 +37,7 @@ pub async fn export(vault: &EuphRoomVault, file: &mut W) -> anyhow::Re
Ok(())
}
-pub async fn export_stream(vault: &EuphRoomVault, file: &mut W) -> anyhow::Result<()> {
+pub async fn export_lines(vault: &EuphRoomVault, file: &mut W) -> anyhow::Result<()> {
let mut total = 0;
let mut last_msg_id = None;
loop {