aboutsummaryrefslogtreecommitdiff
path: root/lib/csv_exporter.rb
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <msabate@suse.com>2024-03-20 11:30:20 +0100
committerMiquel Sabaté Solà <msabate@suse.com>2024-03-20 11:30:20 +0100
commitc0646186c2049e75ae932966aa0604d712b4f4c6 (patch)
tree823483153c8c8b783d9837d767d1fe157fd9eb22 /lib/csv_exporter.rb
parent2cf0ffbffc8442efaba12364a07fc0f5e58b7432 (diff)
downloadoperum-c0646186c2049e75ae932966aa0604d712b4f4c6.tar.gz
operum-c0646186c2049e75ae932966aa0604d712b4f4c6.zip
csv: don't export underscores on "authors"
It does not make sense on this context. Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
Diffstat (limited to 'lib/csv_exporter.rb')
-rw-r--r--lib/csv_exporter.rb9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/csv_exporter.rb b/lib/csv_exporter.rb
index 0463ba6..3cab092 100644
--- a/lib/csv_exporter.rb
+++ b/lib/csv_exporter.rb
@@ -16,14 +16,9 @@ class CsvExporter < BaseExporter
# Generate a new CSV line from the given `thing`.
def thing_to_csv(thing:)
- CSV.generate_line([thing.target, thing.authors, thing.editors, thing.year,
- clean_title(title: thing.title), thing.note, thing.insideof,
+ CSV.generate_line([thing.target, thing.authors.delete('_'), thing.editors, thing.year,
+ thing.title.delete('_'), thing.note, thing.insideof,
thing.url, thing.publisher, thing.kind, thing.access, thing.bought_at],
quote_empty: false)
end
-
- # Clean the given title from underscores and other such characters.
- def clean_title(title:)
- title.delete('_')
- end
end