Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
hoytech committed Dec 11, 2024
1 parent d41eaa9 commit 2ab242f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions src/apps/web/cmd_stories.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ void cmd_stories(const std::vector<std::string> &subArgs) {
if (args["--days"]) days = args["--days"].asLong();
bool oddbeanOnly = args["--oddbean"].asBool();

uint64_t limit = 10000;
uint64_t eventLimit = 1000;
uint64_t scanLimit = 100000;
uint64_t timeWindow = 86400*days;
uint64_t threshold = 10;

Expand All @@ -51,7 +52,9 @@ void cmd_stories(const std::vector<std::string> &subArgs) {
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) {
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));
PackedEventView packed(ev.buf);
Expand Down
6 changes: 3 additions & 3 deletions src/apps/web/tmpls/about.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@
</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>
<b>No images.</b> The written word is one of the greatest achievements of civilisation. They say "a picture is worth a thousand words", but consider this: If you give me a picture, I can describe it in exquisite detail using a thousand words. But if I give you a thousand words, can you draw a picture that conveys all this information?
</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>
<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>
Expand Down

0 comments on commit 2ab242f

Please sign in to comment.