Comments (38)
@jobcurtis @colagrosso Can you two coordinate via this issue and submit PRs to the new covers
branch?
I'm going to be fairly hands off here as I'm extremely busy. But, please feel free to ask me anything. Since we're using a small custom templating system and a not-quite-MVC pattern, some things might not be obvious or well documented.
from web.
Yep, understood. Thanks for the write-up.
from web.
I have a PR for an initial database schema and PHP classes. Still a lot to do on them, but enough for any early feedback.
Not in the PR, but I've been using this test script:
#!/usr/bin/php
<?
require_once('/standardebooks.org/web/lib/Core.php');
use Safe\DateTime;
$artist = new Artist('John McLure Hamilton', new DateTime('1936-01-01'));
$artist->Create();
$artwork = new Artwork($artist, 'Edward Horner Coates, 10th President of the P.A.F.A.', '1913', 'images/covers/filename.jpg', ['man', 'portrait', 'profile']);
$artwork->Create();
which has an example that I took from the first row of this spreadsheet: Standard Ebooks PD Art Research. It works fine, and produces these rows:
MariaDB [se]> select * from Artworks;
+-----------+----------+------------------------------------------------------+-----------------------------------------------------------------------------------+---------------+----------------------------+---------------------+------------+
| ArtworkId | ArtistId | Name | UrlName | CompletedYear | ImageFilesystemPath | Created | Status |
+-----------+----------+------------------------------------------------------+-----------------------------------------------------------------------------------+---------------+----------------------------+---------------------+------------+
| 1 | 1 | Edward Horner Coates, 10th President of the P.A.F.A. | /artworks/john-mclure-hamilton/edward-horner-coates-10th-president-of-the-p-a-f-a | 1913 | images/covers/filename.jpg | 2023-06-11 04:00:49 | unverified |
+-----------+----------+------------------------------------------------------+-----------------------------------------------------------------------------------+---------------+----------------------------+---------------------+------------+
1 row in set (0.00 sec)
MariaDB [se]> select * from Artists;
+----------+----------------------+---------------------+
| ArtistId | Name | DeathYear |
+----------+----------------------+---------------------+
| 1 | John McLure Hamilton | 1936-01-01 00:00:00 |
+----------+----------------------+---------------------+
1 row in set (0.00 sec)
MariaDB [se]> select * from ArtworkTags;
+-----------+------------+
| ArtworkId | SubjectTag |
+-----------+------------+
| 1 | man |
| 1 | portrait |
| 1 | profile |
+-----------+------------+
3 rows in set (0.00 sec)
Obvious shortcomings:
- I didn't add the 5 PD fields to the
Artworks
table yet - Static functions on
Artwork
andArtist
classes to load them from the database. That might also require new indices. - A few more test examples in the script before moving onto a minimal upload form
from web.
Hi @colagrosso, as Alex said I've also been working on this a bit. I started with the upload form which is getting pretty close to complete (I should think I'll have a PR ready for tomorrow).
Your PR #235 looks pretty good to me. I'll rebase what I've got onto that so we can keep all our PRs working together. I'm not sure if @acabal wants to merge stuff as it gets done or wait for everything to be complete before reviewing it.
Since I'm almost done with the initial upload form, do you think it would make sense for you to work on loading the artwork from existing books into the database? Or alternatively, the page for admins to review submissions.
from web.
Great to hear from you, Job! Looking forward to working with you. Thanks for your comments on #235 already.
Will your work on the initial upload form cover these two URLs?
GET <root>/artworks/new
-- artwork submission formPOST <root>/artworks
-- create new artwork
If so, great. That would let us get an initial milestone working end-to-end where we can use the form and it will insert rows into the database.
In the meantime, I'll work on these two admin URLs so that we don't duplicate work:
GET <root>/admin/artworks
-- view the queue of unapproved artworkPOST <root>/admin/artworks/<artwork-id>
-- approve or reject artwork with status=<approved,declined>. Restfully this would be a PATCH request
from web.
Yeah that's right. I've also added a very basic page at GET /artworks
(pretty much just hello world) so that submitting the form doesn't redirect you to a 404 until we get the real page done.
We should probably agree on how we store PD proof. The simplest way would just be 5 columns on the Artwork
table. I think they will all have to be nullable as any given artwork might not have a particular field (and I guess artwork already in use won't have PD proof at all).
Clarifying question about validation; the issue says PD proof should have book publication date plus (link to museum page OR links to pages in books). I was under the impression that a link to a museum page meant it wasn't necessary to find the painting printed in a book. Is that correct?
from web.
Clarifying question about validation; the issue says PD proof should have book publication date plus (link to museum page OR links to pages in books). I was under the impression that a link to a museum page meant it wasn't necessary to find the painting printed in a book. Is that correct?
Yes, I made a mistake. Book pub year is not necessary if we have a museum URL.
Do note that if a museum URL is supplied, we should do a simple check on the museum domain to make sure it's on the approved list. So we might need another table, Museums
? That could store the base domain for us to check against, and, for implementation at some future date, some kind of URL regex to see if we can normalize museum URLs a little (they often come with search queries and other stuff attached in the query string that are just clutter).
from web.
Related Issues (20)
- Order of scan sites HOT 1
- Are find-* changes editorial? HOT 1
- Documentation on downloading in paperwhite/voyage/oasis browser HOT 3
- Suggested alternative to GitHub HOT 2
- RSS feed for new releases promoting to a Patreon email address HOT 1
- CSS Bug when hovering 3D Book HOT 9
- List of Authors HOT 5
- allow sorting by first publication date HOT 2
- Have web view of ebook respect color scheme HOT 5
- Default margin for figures HOT 11
- Donation request overlays and obscures content on kindle browser HOT 1
- "mail to kindle" not supported for azw3. Switch to epub? HOT 1
- [Enhancement] `se titlecase` usage note in Step-by-Step guide HOT 2
- Kindle is now compatibe with epub HOT 2
- Duplicate repo causes sync errors HOT 1
- Book titles wrap on narrow displays HOT 2
- Step by Step historical anomalies HOT 1
- Wording in 8.7.5.3.2 (Quotation marks) HOT 1
- Cover art catalog HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from web.