Skip to content

Instantly share code, notes, and snippets.

@pragdave
Last active March 14, 2025 22:39
Show Gist options
  • Select an option

  • Save pragdave/390443e39bfdd002486ec85864825e96 to your computer and use it in GitHub Desktop.

Select an option

Save pragdave/390443e39bfdd002486ec85864825e96 to your computer and use it in GitHub Desktop.

Revisions

  1. pragdave revised this gist Mar 14, 2025. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions test.rb
    Original file line number Diff line number Diff line change
    @@ -1,2 +1 @@
    csv_name = "#{Time.now.strftime("%Y%m%d")}-pragprog-meta.csv"

    abc
  2. pragdave revised this gist Mar 14, 2025. 1 changed file with 1 addition and 18 deletions.
    19 changes: 1 addition & 18 deletions test.rb
    Original file line number Diff line number Diff line change
    @@ -1,19 +1,2 @@
    csv_name = "#{Time.now.strftime("%Y%m%d")}-pragprog-meta.csv"
    op = CSV.open(csv_name, "w")
    op << BUKU_COLUMNS
    imported.each do |title|
    row = [
    title['isbn13'],
    dlps[title['isbn13']],
    title['title'],
    title['subtitle'],
    title['edition'] || 1,
    title['author'],
    format_description(title),
    format_bisacs(title),
    "EPUB",
    title['pubdate'].strftime("%Y-%m-%d"),
    "English",
    title['page_count'] || 0
    ]
    op

  3. pragdave created this gist Mar 14, 2025.
    19 changes: 19 additions & 0 deletions test.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    csv_name = "#{Time.now.strftime("%Y%m%d")}-pragprog-meta.csv"
    op = CSV.open(csv_name, "w")
    op << BUKU_COLUMNS
    imported.each do |title|
    row = [
    title['isbn13'],
    dlps[title['isbn13']],
    title['title'],
    title['subtitle'],
    title['edition'] || 1,
    title['author'],
    format_description(title),
    format_bisacs(title),
    "EPUB",
    title['pubdate'].strftime("%Y-%m-%d"),
    "English",
    title['page_count'] || 0
    ]
    op