This commit is contained in:
Doug Hoyte
2024-12-10 22:23:48 -05:00
parent f89f311759
commit 32cd48ac5e
2 changed files with 8 additions and 5 deletions

View File

@ -38,7 +38,8 @@ void cmd_stories(const std::vector<std::string> &subArgs) {
if (args["--days"]) days = args["--days"].asLong(); if (args["--days"]) days = args["--days"].asLong();
bool oddbeanOnly = args["--oddbean"].asBool(); bool oddbeanOnly = args["--oddbean"].asBool();
uint64_t limit = 10000; uint64_t eventLimit = 1000;
uint64_t scanLimit = 100000;
uint64_t timeWindow = 86400*days; uint64_t timeWindow = 86400*days;
uint64_t threshold = 10; uint64_t threshold = 10;
@ -51,7 +52,9 @@ void cmd_stories(const std::vector<std::string> &subArgs) {
uint64_t now = hoytech::curr_time_s(); uint64_t now = hoytech::curr_time_s();
env.generic_foreachFull(txn, env.dbi_Event__created_at, lmdb::to_sv<uint64_t>(MAX_U64), lmdb::to_sv<uint64_t>(MAX_U64), [&](auto k, auto v) { env.generic_foreachFull(txn, env.dbi_Event__created_at, lmdb::to_sv<uint64_t>(MAX_U64), lmdb::to_sv<uint64_t>(MAX_U64), [&](auto k, auto v) {
if (output.size() > limit) return false; if (output.size() > eventLimit) return false;
if (scanLimit == 0) return false;
scanLimit--;
auto ev = lookupEventByLevId(txn, lmdb::from_sv<uint64_t>(v)); auto ev = lookupEventByLevId(txn, lmdb::from_sv<uint64_t>(v));
PackedEventView packed(ev.buf); PackedEventView packed(ev.buf);

View File

@ -8,7 +8,7 @@
</p> </p>
<p> <p>
<b>No crap.</b> I just want to build a great distraction-free discussion site. No elements bouncing around as the page loads. No cookie pop-ups. In fact, no cookies, period. No tracking analytics. No "sign-up to our newsletter" modals that appear half way down. No dark patterns to boost engagement numbers. Javascript is optional (only needed for posting). <b>No crap.</b> I just want a fast, distraction-free discussion site. No elements bouncing around as the page loads. No cookie pop-ups. In fact, no cookies, period. No tracking analytics. No "sign-up to our newsletter" modals that appear half way down. No dark patterns to boost engagement numbers. Javascript is optional (only needed for posting).
</p> </p>
<p> <p>
@ -16,11 +16,11 @@
</p> </p>
<p> <p>
<b>How do I login?</b> You don't. If you want to post or vote, I recommend using a browser extension such as nos2x (<a href="https://chrome.google.com/webstore/detail/nos2x/kpgefcfmnafjgpblomihpgmejjdanjjp">chrome</a>, <a href="https://addons.mozilla.org/en-US/firefox/addon/nos2x-fox/">firefox</a>), or one of <a href="https://github.com/aljazceru/awesome-nostr#browser-extensions">several others.</a> <b>How do I login?</b> You don't. If you want to post or vote, I recommend using a browser extension such as nos2x (<a href="https://chrome.google.com/webstore/detail/nos2x/kpgefcfmnafjgpblomihpgmejjdanjjp">chrome</a>, <a href="https://addons.mozilla.org/en-US/firefox/addon/nos2x-fox/">firefox</a>), or one of <a href="https://github.com/aljazceru/awesome-nostr#browser-extensions">several others.</a> After installing, click "login" in the top-right and allow Oddbean to read your public key.
</p> </p>
<p> <p>
<b>Feeds.</b> Oddbean is built around the concept of a "feeds", which are lists of nostr events. Feeds can be curated by people, by algorithms, or both (<a href="https://www.tbray.org/ongoing/When/202x/2022/11/28/On-Algorithms">computers don't work without algorithms</a>). The goal of Oddbean is to let you publish your own feeds according to whatever policies you or a community decide -- similar to a subreddit. A specification on how to create your own feeds is coming soon. The homepage is just a feed like any other, except one that I control. Don't like it? Don't use it. <b>Feeds.</b> Oddbean is built around the concept of "feeds", which are lists of nostr events. Feeds can be curated by people, algorithms, or both (<a href="https://www.tbray.org/ongoing/When/202x/2022/11/28/On-Algorithms">computers don't work without algorithms</a>). The goal is to let you publish or read feeds according to whatever policies you or a community decide, similar to a subreddit or an RSS feed. A specification on how to create your own feeds is coming soon. For now the full source code of Oddbean is available <a href="https://github.com/hoytech/strfry/tree/oddbean/src/apps/web">here</a>. The homepage is a feed like any other, except one that I control. Don't like it? Don't use it.
</p> </p>
<p> <p>