Discuss Scratch

breakfast_for_dinner
Scratcher
1000+ posts

ocular - scratch forum info

am i hallucinating, or is ocular search working right now?

edit: it appears i'm late to the party….

Last edited by breakfast_for_dinner (Aug. 9, 2024 06:54:30)

DifferentDance8
Scratcher
1000+ posts

ocular - scratch forum info

Maximouse wrote:

han614698 wrote:

Is there any way for me to show all of my posts that were edited by the ST in general (not a specific user)?
This seems to work:
username = "han614698" AND last_edited_by IS NOT NULL AND NOT last_edited_by = "han614698"
I want to do the opposite, as I want to get all my posts that have been edited by any given ST member. This is the best I could do, but for some reason it's just giving me old posts from WAY before I even joined
username = "DifferentDance8" AND last_edited_by != "DifferentDance8" OR last_edited_by IS NULL
My other attempts just give me errors
mybearworld
Scratcher
1000+ posts

ocular - scratch forum info

DifferentDance8 wrote:

(#3722)
username = "DifferentDance8" AND last_edited_by != "DifferentDance8" OR last_edited_by IS NULL
I think it's “IS NOT”, not “!=” – no idea if that's the problem though
DifferentDance8
Scratcher
1000+ posts

ocular - scratch forum info

mybearworld wrote:

DifferentDance8 wrote:

(#3722)
username = "DifferentDance8" AND last_edited_by != "DifferentDance8" OR last_edited_by IS NULL
I think it's “IS NOT”, not “!=” – no idea if that's the problem though
“IS NOT” doesn't even exist
Mrcomputer1
Scratcher
500+ posts

ocular - scratch forum info

DifferentDance8 wrote:

Maximouse wrote:

han614698 wrote:

Is there any way for me to show all of my posts that were edited by the ST in general (not a specific user)?
This seems to work:
username = "han614698" AND last_edited_by IS NOT NULL AND NOT last_edited_by = "han614698"
I want to do the opposite, as I want to get all my posts that have been edited by any given ST member. This is the best I could do, but for some reason it's just giving me old posts from WAY before I even joined
username = "DifferentDance8" AND last_edited_by != "DifferentDance8" OR last_edited_by IS NULL
My other attempts just give me errors
Try this:
username = "DifferentDance8" AND last_edited_by != "DifferentDance8" AND last_edited_by IS NOT NULL
DifferentDance8
Scratcher
1000+ posts

ocular - scratch forum info

Mrcomputer1 wrote:

DifferentDance8 wrote:

Maximouse wrote:

han614698 wrote:

Is there any way for me to show all of my posts that were edited by the ST in general (not a specific user)?
This seems to work:
username = "han614698" AND last_edited_by IS NOT NULL AND NOT last_edited_by = "han614698"
I want to do the opposite, as I want to get all my posts that have been edited by any given ST member. This is the best I could do, but for some reason it's just giving me old posts from WAY before I even joined
username = "DifferentDance8" AND last_edited_by != "DifferentDance8" OR last_edited_by IS NULL
My other attempts just give me errors
Try this:
username = "DifferentDance8" AND last_edited_by != "DifferentDance8" AND last_edited_by IS NOT NULL
OH
THE WHOLE ISSUE WAS CAUSED BY A MISSING “NOT”
I CANT BELIEVE I DIDN'T CHECK THAT FIRST OF ALL
mybearworld
Scratcher
1000+ posts

ocular - scratch forum info

DifferentDance8 wrote:

(#3724)
“IS NOT” doesn't even exist
Ah, that's only for null checks I think? Sorry
han614698
Scratcher
1000+ posts

ocular - scratch forum info

is there anyway to search just for text in titles?
Maximouse
Scratcher
1000+ posts

ocular - scratch forum info

han614698 wrote:

is there anyway to search just for text in titles?
I don't think there's an option for that in ocular itself, but the ScratchDB API supports it. You can search normally, then run the following code in the console on the search results page:
// Modified code from https://github.com/jeffalo/ocular/blob/d8f89bb/pages/search.vue
const search = document.querySelector(".container").__vue__ ;
search.page = 0;
search.showLoadMore = false;
search.data = await fetch(
  `https://scratchdb.lefty.one/search/indexes/forum_posts/search?attributesToSearchOn=topic.title&hitsPerPage=50&q=${search.search}${search.sort}${search.filter}`,
  {
    headers: {
      authorization:
        "Bearer 3396f61ef5b02abf801096be5f0b0ee620de304dd92fc6045aeb99539cd0bec4",
    },
  }
)
  .then((res) => res.json())
  .catch((err) => {
    search.error = {
      title: "Network Error",
      details: "Failed to connect to ScratchDB.",
    };
    return { posts: [] };
  });
if (search.data.message) {
  search.error = {
    title: "Search error",
    details: search.data.message,
  };
} else search.showLoadMore = true;
search.loadMore = async function() {
  this.showLoadMore = false;
  this.page++;
  var res = await fetch(
    `https://scratchdb.lefty.one/search/indexes/forum_posts/search?attributesToSearchOn=topic.title&hitsPerPage=50&q=${
      this.search
    }&page=${this.page + 1}${this.sort}${this.filter}`,
    {
      headers: {
        authorization:
          "Bearer 3396f61ef5b02abf801096be5f0b0ee620de304dd92fc6045aeb99539cd0bec4",
      },
    }
  ).catch((err) => {
    this.error = {
      title: "Network Error",
      details: "Failed to connect to ScratchDB.",
    };
  });
  var data = await res.json();
  this.data.hits.push(...data.hits);
  this.showLoadMore = true;
}
han614698
Scratcher
1000+ posts

ocular - scratch forum info

Maximouse wrote:

(#3730)

han614698 wrote:

is there anyway to search just for text in titles?
I don't think there's an option for that in ocular itself.
After farther testing, it looks like the old way, “+title:”abcdefg“” works.

Last edited by han614698 (Aug. 11, 2024 12:41:14)

Maximouse
Scratcher
1000+ posts

ocular - scratch forum info

han614698 wrote:

After farther testing, it looks like the old way, “+title:”abcdefg“” works.
+title:“ocular” shows posts containing the words “title” and “ocular” in topics whose titles don't mention ocular.

Last edited by Maximouse (Aug. 11, 2024 14:24:12)

A-MARIO-PLAYER
Scratcher
1000+ posts

ocular - scratch forum info

bump
DifferentDance8
Scratcher
1000+ posts

ocular - scratch forum info

“Failed to connect to ScratchDB.”
PyraEthan12
Scratcher
1000+ posts

ocular - scratch forum info

DifferentDance8 wrote:

“Failed to connect to ScratchDB.”
ScratchDB kinda ded rn

(read here)
gilbert_given_189
Scratcher
1000+ posts

ocular - scratch forum info

PyraEthan12 wrote:

DifferentDance8 wrote:

“Failed to connect to ScratchDB.”
ScratchDB kinda ded rn

(read here)
It was working enough for ocular (not everything else though)

Last edited by gilbert_given_189 (Sept. 24, 2024 11:29:11)

CST1229
Scratcher
1000+ posts

ocular - scratch forum info

gilbert_given_189 wrote:

(#3736)
It was working enough for ocular (not everything else though)
there basically is a new scratchdb that ocular uses
Jeffalo
Scratcher
1000+ posts

ocular - scratch forum info

ocular 2024:


ocular all time:


pretty cool! the huge dip is when scratchdb broke.
Game_master117
Scratcher
14 posts

ocular - scratch forum info

WOW thats actually really dang cool man… You should totally give us insider information and stuff like that :3 btw keep us updated on the works!
when I receive [SCRATCH ON v]
say [DIDDO]
Jeffalo
Scratcher
1000+ posts

ocular - scratch forum info

hijacking the ocular topic again to announce that my last scratch updates have landed, you may notice the scratch forums now use 3.0 scratchblocks, no longer immediately die whenever someone uses unicode emoji, and are also very slightly faster!

when green flag clicked
say [yay!]

i ripped out thousands of lines of code from the scratch codebase, so i'm surprised more stuff didn't break. - you may notice that signatures are gone at the moment.. oops!

Powered by DjangoBB