From 0cdb5aeed3e7747c9d41bb24e7e8868b5d82ae35 Mon Sep 17 00:00:00 2001
From: David Ashby <delta.mu.alpha@gmail.com>
Date: Sat, 21 Dec 2024 14:52:57 -0500
Subject: [PATCH] begin writing meta tags

---
 index.js    |  5 ++++-
 stores.json | 34 +++++++++++++++++-----------------
 2 files changed, 21 insertions(+), 18 deletions(-)

diff --git a/index.js b/index.js
index c1c90bd..f22ee96 100644
--- a/index.js
+++ b/index.js
@@ -40,7 +40,10 @@ function cleanWebsite(str) {
     .replace(/\/$/g, "");
 }
 
-function metaDescription({meta, description}) {
+function metaDescription({ name, meta, description }) {
+  if (meta.length > 155) {
+    console.log(`warning: meta tag for ${name} is too long: ${meta.length}`)
+  }
   return meta || description.length > 155 ? description.slice(0, 153) + "..." : description || "A guide to and map of every independent bookstore in New York City. We have a complete list of community bookstores in NYC with locations and descriptions."
 }
 
diff --git a/stores.json b/stores.json
index 28ffc7c..fe12210 100644
--- a/stores.json
+++ b/stores.json
@@ -12,7 +12,7 @@
     "website": "https://www.housingworks.org/locations/bookstore-cafe",
     "events": "Yes",
     "cafe": "Yes",
-    "meta": ""
+    "meta": "Housing Works Bookstore Café, in SoHo, Manhattan, is a well-known used bookstore and cafe that funds charity work for unhoused New Yorkers with HIV/AIDS."
   },
   {
     "name": "McNally Jackson Books",
@@ -27,7 +27,7 @@
     "website": "https://www.mcnallyjackson.com/",
     "events": "Yes",
     "cafe": "No",
-    "meta": ""
+    "meta": "McNally Jackson Books, in Soho, Manhattan, is an indie bookstore with broad selection of genres, including international and small-press titles."
   },
   {
     "name": "Word Bookstore",
@@ -42,7 +42,7 @@
     "website": "https://www.wordbookstores.com/",
     "events": "Yes",
     "cafe": "No",
-    "meta": ""
+    "meta": "Word Bookstore, in Greenpoint, Brooklyn, is a classic community bookstore, stocking fiction and non-fiction and hosting events in the basement."
   },
   {
     "name": "Astoria Bookshop",
@@ -57,7 +57,7 @@
     "website": "https://www.astoriabookshop.com/",
     "events": "Yes",
     "cafe": "No",
-    "meta": ""
+    "meta": "Astoria Bookshop, in Astoria, Queens, is a general-interest bookstore with a large children's department. It also hosts book clubs and signings."
   },
   {
     "name": "POWERHOUSE Arena",
@@ -72,7 +72,7 @@
     "website": "https://www.powerhousebookstores.com/",
     "events": "Yes",
     "cafe": "No",
-    "meta": ""
+    "meta": "POWERHOUSE Arena, in Dumbo, Brooklyn, is a combination event space/bookstore. It stocks a selection of current fiction and non-fiction and hosts signings."
   },
   {
     "name": "Mercer Street Books & Records",
@@ -87,7 +87,7 @@
     "website": "http://www.mercerstreetbooks.com/",
     "events": "No",
     "cafe": "No",
-    "meta": ""
+    "meta": "Mercer Street Books & Records, near NYU in Manhattan, is a small but crowded used bookseller with an eclectic selection of books, including textbooks."
   },
   {
     "name": "Mast Books",
@@ -102,7 +102,7 @@
     "website": "https://www.mastbooks.com/",
     "events": "No",
     "cafe": "No",
-    "meta": ""
+    "meta": "Mast Books, in the East Village in Manhattan, focuses on selling used copies of art, music, photography, and fiction. Also exhibits punk ephemera."
   },
   {
     "name": "The Mysterious Bookshop",
@@ -110,14 +110,14 @@
     "city": "New York",
     "state": "NY",
     "postcode": "10007",
-    "description": "Mysterious Bookshop sells new, used, and vintage mysteries and thrillers, and has done so for over 35 years, although it's only been in its current location for the last eight. The entire back wall of the space is devoted to Sir Arthur Conan Doyle, while the sides are filled with paperbacks and hardcovers. The store also has a small publishing arm and a children's section, reportedly very popular.",
+    "description": "Mysterious Bookshop sells new, used, and vintage mysteries and thrillers, and has done so for over 45 years. The entire back wall of the space is devoted to Sir Arthur Conan Doyle, while the sides are filled with paperbacks and hardcovers. The store also has a small publishing arm and a children's section, reportedly very popular.",
     "lat": "40.714924",
     "long": "-74.009211",
     "country": "USA",
     "website": "https://www.mysteriousbookshop.com/",
     "events": "Yes",
     "cafe": "No",
-    "meta": ""
+    "meta": "The Mysterious Bookshop, in Tribeca, Manhattan, sells new, used, and vintage mysteries and thrillers; it is the oldest mystery book store in America."
   },
   {
     "name": "Bookmarc",
@@ -132,7 +132,7 @@
     "website": "https://www.instagram.com/thebookmarc/",
     "events": "No",
     "cafe": "No",
-    "meta": ""
+    "meta": "Bookmarc, in the West Village, Manhattan, is owned by the designer Marc Jacobs. It stocks a collection of his stationary and a variety of art books."
   },
   {
     "name": "Ursus Books",
@@ -140,14 +140,14 @@
     "city": "New York",
     "state": "NY",
     "postcode": "10065",
-    "description": "To access Ursus, enter the main lobby of the building (past the doorman) and head back and to the left.",
+    "description": "Ursus Books, on the Upper East Side of Manhattan, is a rare book, map, and print dealer. To access the store, enter the main lobby of the building (past the doorman) and head back and to the left.",
     "lat": "40.775248",
     "long": "-73.962207",
     "country": "USA",
     "website": "https://www.ursusbooks.com/",
     "events": "No",
     "cafe": "No",
-    "meta": ""
+    "meta": "Ursus Books, on the Upper East Side of Manhattan, is a vintage and rare book, map, and print dealer."
   },
   {
     "name": "Alabaster Bookshop",
@@ -155,14 +155,14 @@
     "city": "New York",
     "state": "NY",
     "postcode": "10003",
-    "description": "Situated just around the corner from the Strand bookstore, this small rare bookseller is stuffed to the gills with books. The areas of emphasis include art, fiction, and philosophy (both eastern and western).",
+    "description": "Situated just around the corner from the Strand bookstore, this small used bookseller is stuffed to the gills with books. The areas of emphasis include art, fiction, and philosophy (both eastern and western).",
     "lat": "40.733032",
     "long": "-73.98996",
     "country": "USA",
     "website": "https://www.instagram.com/alabasterbookshop/",
     "events": "No",
     "cafe": "No",
-    "meta": ""
+    "meta": "Alabaster Bookshop, south of Union Square in Manhattan, is a small used bookshop jammed with books. Areas of emphasis include art, fiction, and philosophy."
   },
   {
     "name": "Unnameable Books",
@@ -177,7 +177,7 @@
     "website": "https://unnameablebooks.square.site/",
     "events": "No",
     "cafe": "No",
-    "meta": ""
+    "meta": "Unnameable Books, in Prospect Heights, Brooklyn, specializes in new and used poetry and fiction, with a selection of philosophical and left-wing writing."
   },
   {
     "name": "Community Bookstore",
@@ -185,14 +185,14 @@
     "city": "Brooklyn",
     "state": "NY",
     "postcode": "11215",
-    "description": "",
+    "description": "Community Bookstore, in Park Slope, Brooklyn, is a medium-sized general-interest bookstore that claims to be Brooklyn's oldest operating bookstore.",
     "lat": "40.672668",
     "long": "-73.976436",
     "country": "USA",
     "website": "https://www.communitybookstore.net/",
     "events": "",
     "cafe": "No",
-    "meta": ""
+    "meta": "Community Bookstore, in Park Slope, Brooklyn, is a medium-sized general-interest bookstore that claims to be Brooklyn's oldest operating bookstore."
   },
   {
     "name": "Greenlight Bookstore",