by Patrick ➕follow (61) 💰tip ignore
« First « Previous Comments 256 - 295 of 510 Next » Last » Search these comments
Can you think of any improvement on that?
Given the new micropayment Jourmalism idea, it would be convenient if you could have a way for people to save a draft of their post until it's ready to be submitted. I'm working on a few longer pieces that (I hope) are worth the price of admission. Draft feature would be useful.
it would be convenient if you could have a way for people to save a draft of their post until it's ready to be submitted
What should I do about that? I guess I could allow new users to create posts and let users mark them as spam, but that's kind of annoying for users too.
The "flag" link is supposed to do that for comments. I know "flag" is generic, but it would get very busy to have multiple flag options.
Brand new users have their posts in quarantine for 24 hours.
richwicks says
Brand new users have their posts in quarantine for 24 hours.
Thanks for the suggestion. This is probably the best solution so far.
I was just thinking that. I could show them their own post, but not show it to others for 24 hours.
That seems OK as long as I tell them what's going on.
I've heard that idea before somewhere. I think people won't go for it because they prefer instant gratification, but you never know.
What happened to the image post thread? I liked that.
richwicks says
What happened to the image post thread? I liked that.
It's in the footer as "latest images".
@Blue I remember you wanted the ability to edit or delete your own comments which are more than two weeks old.
Now you can do that.
I had blocked that in the past because it seemed like altering history, but maybe it's too restrictive of a policy.
Patrick, can't you just set it up so that one post replaces the original, but a button can be clicked to see the previous post?
If any text is selected, the quote link assumes you want to quote that text.
So if you want to quote two people, make sure you unselect before making the second quote. Or maybe I can do that automatically...
Trolls do well not to piss off admins. This must be a new species of troll: suiciders.
Finally got image upload progress indicator working as well. Just text percentage uploaded, but good enough for now.
// npm install tesseract
// fyi I used node 18.12.0
const Tesseract = require('tesseract.js')
let filename = 'npr.png'
Tesseract.recognize(filename)
.catch(err => console.error(err))
.then(function (result) {
console.log(result)
console.log(result.data.text)
process.exit(0)
})
m K@su L SIGNIN i NPR SHOP
[E] NEWS X CULTURE J MUSIC () PODCASTS & SHOWS Q SEARCH >
TECHNOLOGY
4] . .
Elon Musk said Twitter wouldn't become
v a 'hellscape.’ It's already changing
E October 31}, 2022 - 4:'?9 PMET
‘v‘ gs Considered
fl SHANNON BOND
CREATE TABLE image_words (
post_id INT,
file_name VARCHAR(255) NOT NULL,
words VARCHAR(20000),
created_at DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL,
most_recent_ocr_attempt DATETIME,
most_recent_ocr_success DATETIME,
FULLTEXT KEY (words),
-- I'm not sure which of the following indexes would work best w/ mysql for the query, but one of them should work well I think.
INDEX dates1 (most_recent_ocr_success, most_recent_ocr_attempt, created_at),
INDEX dates2 (most_recent_ocr_attempt, created_at)
);
-- Have a background worker run this query and process the results every X minutes.
-- Find rows that have not been successfully processed yet.
-- If an attempt was made on a row, but it failed, we try to process it again but not for at least a week.
-- The reason we process newest first is a similar reason for why we wait 1 week before reattempting
-- a failed row - this query+table is basically a queue, and we want to make sure we don't eventually clog the head of the queue up
-- with stuff that keeps failing over and over, which might prevent the worker from ever consuming fresh work that it
-- can succeed with. Let it try the new stuff first, and then if it has spare time, it can reattempt failed stuff.
select *
from image_words
where most_recent_ocr_success is null
and (
most_recent_ocr_attempt < CURRENT_TIMESTAMP - interval 1 week
or
most_recent_ocr_attempt is null
)
order
by created_at desc
limit 100
« First « Previous Comments 256 - 295 of 510 Next » Last » Search these comments
patrick.net
An Antidote to Corporate Media
1,252,079 comments by 14,932 users - Rin online now