Commit graph

2354 commits

Author SHA1 Message Date
Alex Cabal
8641c57dbf Correct border of blog post editor's note in dark mode 2025-05-08 16:49:48 -05:00
Alex Cabal
f15180fa6c Add blog post 2025-05-08 16:43:51 -05:00
Alex Cabal
6805a13522 Remove query strings from GitHub URLs when creating a project 2025-05-08 13:47:52 -05:00
Alex Cabal
afab78af46 PHPStan corrections 2025-05-07 22:02:27 -05:00
EmmaSweeney
30cd00dbb7 Add John Buchan spreadsheet to spreadsheets page 2025-05-07 11:43:50 -05:00
MagisterAdamus
ec1f35fa6c Capitalize 'Library' in 'HathiTrust Digital Library' in the Step by Step Guide 2025-05-05 11:21:08 -05:00
Alex Cabal
97c2fbeb61 Catch file too large error in artworks 2025-05-04 22:33:52 -05:00
Alex Cabal
7e3566ec93 Use INI value for max artwork upload size 2025-05-04 22:33:44 -05:00
Alex Cabal
6fd557c2df Update Verne note in wanted list 2025-05-03 21:20:41 -05:00
Alex Cabal
d12cd5207a Add line height to web CSS 2025-05-03 14:39:03 -05:00
Alex Cabal
06096fa7dd Correctly process matching donations from funds 2025-05-02 15:28:46 -05:00
Alex Cabal
daee86b919 Don't re-throw after logging them when ingesting FA payments 2025-04-29 12:48:17 -05:00
Alex Cabal
6c5caa2642 Catch Curl error when updating projects 2025-04-29 12:42:31 -05:00
Mike Colagrosso
0490ba2951 Remove Content-Disposition config for downloads
It's necessary to remove these headers now that the file download
redirects to `www/ebooks/download.php`. If not, the browser raises an
error about the header set twice.
2025-04-25 14:31:44 -05:00
Mike Colagrosso
03ed3c2257 Add Ebook::DownloadUrl for web and feed downloads
This commit adds a rewrite rule for ebook downloads of the form:

```
/ebooks/some-author/some-book/downloads/some-filename.epub
```

to `www/ebooks/download.php`. That file handles the logic of whether to
show a thank you page before beginning the download.

Download URLs in RSS, Atom, and OPDS feeds follow the same pattern, but
they have a query string parameter `?source=feed` to always skip the
thank you page.
2025-04-25 14:31:44 -05:00
Alex Cabal
1f41eb1e55 Don't remind editors about stalled or abandoned projects 2025-04-23 22:56:37 -05:00
Alex Cabal
de99d1869f Set placeholder to in progress when creating a project for an existing placeholder 2025-04-22 22:30:42 -05:00
Alex Cabal
c4c65b9181 Add Robert Frost spreadsheet to spreadsheets page 2025-04-20 23:13:15 -05:00
David
90d7ea4183 Update producing guide to point to obscured dashes para in manual 2025-04-18 11:22:07 -05:00
Alex Cabal
5d3419e209 Disable next spring drive and clean up some comments 2025-04-17 21:02:11 -05:00
Alex Cabal
4a999ebcec Reveal blog post 2025-04-15 10:57:56 -05:00
Alex Cabal
b74d7361a1 In deploy-ebook-to-www, only check for tsp if it's installed 2025-04-14 22:25:54 -05:00
Alex Cabal
ac7a9f3725 Update README with new site installation instructions, and use venvs in scripts 2025-04-14 10:47:15 -05:00
Alex Cabal
8c81e5b9d2 Catch exceptions if files don't exist 2025-04-14 10:46:54 -05:00
erin
3a2778cd77 Tweak wording in blog post 2025-04-11 20:48:42 -05:00
erin
f4230aeca4 Fix typos in blog post 2025-04-11 20:48:42 -05:00
Alex Cabal
93b55d2da2 Add Authors index 2025-04-09 21:33:59 -05:00
Alex Cabal
0e92b3acc8 Add text-wrap: pretty to core CSS 2025-04-09 20:42:41 -05:00
Alex Cabal
be256550ec Fix typos in blog post 2025-04-09 18:48:49 -05:00
Alex Cabal
fbfd4321e4 Fix height of tag select box in responsive ebook search form 2025-04-09 14:32:23 -05:00
Alex Cabal
48818ef928 Add blog post 2025-04-09 14:18:18 -05:00
Alex Cabal
2ac2cc3de2 Remove unneeded PHPStan ignore line 2025-04-07 22:51:35 -05:00
Alex Cabal
ee18651732 Fix new patron count in donation progress bar 2025-04-07 16:07:48 -05:00
Alex Cabal
ec4826bb41 Fix margin in donation banner for public domain day blog posts 2025-04-07 11:10:39 -05:00
Alex Cabal
c12e93b4e2 Tweak wording in blog post 2025-04-07 11:10:27 -05:00
Alex Cabal
b70f500847 Decrease minimum token count to 2 in InnoDB fulltext search 2025-04-02 15:46:36 -05:00
Alex Cabal
810087ccf9 Update OpenSearch features to current standards 2025-03-31 13:28:26 -05:00
Alex Cabal
7da87bf9e2 Use enums for HTTP methods in search forms 2025-03-31 12:05:32 -05:00
Alex Cabal
849276736e Move donwload rewrite rule after legacy ebook URL rewrites 2025-03-30 14:35:03 -05:00
Alex Cabal
fbcafb8f1d Improve type hints 2025-03-27 16:46:05 -05:00
Alex Cabal
f21783d1f8 PHPStan updates 2025-03-27 14:13:00 -05:00
Alex Cabal
613d035ebe Round border radius on ebook thumbnail link focus 2025-03-26 21:01:08 -05:00
Alex Cabal
de96695ac7 Add rewrite for The Giant Raft by Jules Verne 2025-03-26 14:50:12 -05:00
Mike Colagrosso
9202717a6b Add a special case for hyphens: Replace with space
See #484 for details. By adding a special case for hyphens, users can
search for these terms:

`beta` to match `Alpha-Beta`
`queen` to match `Haycraft-Queen`

These searches also work as expected:

`Alpha-Beta`
`Alpha`
`Haycraft-Queen`
`Haycraft`

I don't think these queries should work, and they do not:

`AlphaBeta`
`HaycraftQueen`

This commit changes `IndexableText`, `IndexableAuthors`, and
`IndexableCollections`, so existing DBs need an update. This will update
all published books:

```
cd /standardebooks.org/ebooks
for BOOK in $(find /standardebooks.org/ebooks -maxdepth 1 -type d)
do
  tsp nice /standardebooks.org/web/scripts/deploy-ebook-to-www --verbose --no-build --no-images --no-recompose --no-epubcheck --no-feeds --no-bulk-downloads "$BOOK"
done
```

And this PHP code will update placeholders:

```
<?
require_once('/standardebooks.org/web/lib/Core.php');

$ebooks = Ebook::GetAll();

foreach($ebooks as $ebook){
        if($ebook->IsPlaceholder()){
                print('Saving ' . $ebook->Identifier . "\n");

                // Need to force `Ebook::GetAllContributors()` to be called before `Ebook::Save()`. Otherwise, authors and translators will be deleted.
                $ebook->Authors;

                $ebook->Save();
        }
}
```
2025-03-25 13:16:25 -05:00
Mike Colagrosso
8a4da08a66 Remove non-alphanumerics (except quotes) from search query
That is, don't replace non-alphanumerics with a space. This matches the
behavior of Formatter::RemoveDiacriticsAndNonalphanumerics(), which
would be used here except that function would also remove quotes.  We
actually discussed not introducing spaces previously, but I made a
mistake and didn't apply the same change to the user's search query:

https://github.com/standardebooks/web/pull/470#discussion_r1929591492

This change fixes queries with compound words like:

`Haycraft-Queen`

and also fixes queries for authors with apostrophes:

`O'Neill`

No changes to existing DBs are necessary because they already have terms
like `haycraftqueen` and `oneill` stored in `IndexableCollections` and
`IndexableAuthors`.
2025-03-25 13:16:25 -05:00
Mike Colagrosso
dab857d127 Cast WordCount to string to fix PHPStan error 2025-03-25 13:10:53 -05:00
Alex Cabal
8a3a05a264 Ban ChatGPT user agents 2025-03-24 13:59:13 -05:00
Alex Cabal
ceccd1431e Fail quietly when updating projects with broken URLs instead of logging 2025-03-15 14:18:48 -05:00
Alex Cabal
ba22538659 Add new schema.org wordCount property to ebook view 2025-03-14 12:10:05 -05:00
Alex Cabal
18b462bb52 Fix typo in blog post 2025-03-12 15:01:22 -05:00