HOME | DD

Published: 2013-10-26 17:42:36 +0000 UTC; Views: 11921; Favourites: 227; Downloads: 0
Redirect to original
Description
With this userscript, you can search within your notes.After indexed, searching is finished within seconds.
How to install:
Link: phi.pf-control.de/userscripts/…
This script will work in
- Firefox + Greasemonkey
- Chrome + Tampermoneky
- Opera + Violentmonkey
- Safari + Tampermonkey
For a detailed instruction, see my manual:
dediggefedde.deviantart.com/jo…
How to use
After you installed the script, the "Search"-Tab should appear within your Notes-menu.
Clicking it will make the search form appear.
On the first time there should be the text
'No notes fetched so far! Press "Index Notes"! '
on the far right.
Click "Index Notes" for a full scan of the currently selected folder! This may take a little time (Firefox: around 70 Notes/s, Chrome around 90 Notes/s; e.g. 380 Notes in Firefox takes around 5s)
You can break indexing by leaving the site any time! The script will ask you on your next visit, if it should continue indexing.
If you already have your Notes indexed, you can click on "Check Notes" to add all notes cou got since the last scan.
Now you are ready to search by inserting text into the search fields and press enter or the "Search" button.
For a more detailed explaination how to search, so the "How to search" section!
Clicking on a search result will show you the regarding Note! If you want to mark or delete it, please use the buttons at the bottom of the note!
You can also click on the result's header to sort through the results! Another click will revert the order.
Please Note that the Date will be displayed according to your computer's language-setting (for me that's German, so I got a Mittwoch instead of Wednesday).
How to search
Searching Title/Author and Text works slightly different:
Title/Author:
If you type single words, they will be searched OR connected. That means
Title: contest help
Will search all Notes where there is contest OR help within the Title.
Capital letters are treated like smaller ones.
The words themselves are a CONTAIN request: Notes like flowercontest or contesthelp will also match.
Text:
Searching in Text is a FULLWORD search: contest will only match my little contest here and not contesthelp or "flowercontest".
To change that, there are a couple of operators: - + " *.
To make it a CONTAIN-Search, you can simple add a * at the end or the beginning of a word:
contest* will match contest as well as contesthelp. *test* will match contest as well as testresult or contestresult.
Making a group of words AND connected, just prepend a + before the word:
+contest +result will only match Notes that contain contest AND result
Adding words without a + will add their matches to the AND-result:
+contest flower +result will match notes that only contain contest AND result, but also Notes with flower
The NOT-Operator is easy to understand: prepend a - and matching results won't be shown.
contest -flower will show all Notes with contest but only if they don't contain flower!
Quotes can be used to protect spaces/word groups.
"flower contest" will match only Notes that actually contain flower contest.
This will internally first search without quotes and then make a fulltext-check to remove unwanted notes.
That's why you some results for quote-searches will vanish after a second.
Combining will work like this:
+"flower *test*" +*result -help "no concern"
This will match Notes that have something like flower contesthelp AND testresult within them, but not help! contesthelp is fine as the help is not alone here. additionally Notes where no concern is part of will also be shown.
But I guess in most cases, single word searches or using + and * will be fine for you.
Thanks goes to
- You of course! I keep wanting to use my scripts and I keep on getting requests to repair the old version of this script!
- zio-san had a really nice idea how to improve the data-structure to index notes! As Browsers are limitting stored values to 5 Mbyte, I had to think of a ncie solution here. With making a list of words pointing to the containing note-ids, 500 Notes only take around 200 kbyte, increasing better than linear...
- ChinZaPep and NightsCrimson for spontan beta-testing: I wrote the script within 3 days and had another 5 days beta-testing with a lot of updates.^^
Update-Log
2013-10-26, v1.00: script published
Related content
Comments: 221
Dediggefedde In reply to ??? [2013-10-27 00:19:19 +0000 UTC]
mmh... well, actually a lot of people tried it already... I even had some beta testers for 5 days...
How did you notice it gave up? did it just stop?
Still it's a strange error that it works properly for a part your notes and stops afterwards...
Have you tried to index them new again after that?
👍: 0 ⏩: 1
deviant-garde In reply to Dediggefedde [2013-10-27 00:54:44 +0000 UTC]
I did. I still only got some of the notes indexed. It increased by maybe 10%.
👍: 0 ⏩: 1
Dediggefedde In reply to deviant-garde [2013-10-27 11:35:05 +0000 UTC]
Mmh... I'm sorry it doesn't work for you...
I indexed my notes (380) a number of times in chrome, Opera and firefox and couldn't reproduce the bug...
Maybe there is some racing condition or the script get's stopped after working too long...
Did you see an javascript error when the script stops working?
At least you should be able to search within the notes that got indexed successfully...
👍: 0 ⏩: 1
deviant-garde In reply to Dediggefedde [2013-10-27 17:25:17 +0000 UTC]
One time I got a JavaScript error, and other times I didn't. I wanted to look through the code to see if I could get an idea of what's going on but it's a hell of a lot to parse when you're just taking a quick peek at the source from the userscripts.org link. I'll look into it some more. This IS an interesting script and I'd like to see it work. I don't have as many notes as some people but I could still find this useful.
👍: 0 ⏩: 1
Dediggefedde In reply to deviant-garde [2013-10-27 17:43:37 +0000 UTC]
Great... I noticed, dA and its adserver are also producing errors now and then...
The function that should index the notes is getnotes(folder,offset,neu).
it calls itself semi-recursive, actually it's loop-wise: every 10th time the difi calls the function to call another 10 difi calls of which the 10th is again calling untill a list is empty. This list contains all offsets (note-pages with 10 notes) and when checking one, the offset gets removed from the list. I tried that first with a direkt loop, which also worked, but you could only check 10 notes at a time or you had no real control about racing conditons when having multiple pages checked. Also no problem if I didn't want to make it pausable...
Well, I made a little update now, but I guess it won't help much^^
I will try to comment the script more, so you can take a look later on.
👍: 0 ⏩: 3
deviant-garde In reply to Dediggefedde [2013-10-27 18:00:45 +0000 UTC]
Sorry, that's like 311.
👍: 0 ⏩: 1
Dediggefedde In reply to deviant-garde [2013-10-27 18:25:24 +0000 UTC]
Thank you so much for your input!
I guess the error is, that some note is missing an element...
I made a new version, where the script is skipping the note and logs the note's offset and jquery-element.
Does this help your case? Can you tell if there's something special about that note?
👍: 0 ⏩: 1
deviant-garde In reply to Dediggefedde [2013-10-27 18:32:55 +0000 UTC]
This time the indexing process appears to finish, and without errors, but everything isn't working exactly. I search the username of one person who's sent me several notes by now and I get an error from line 657:
TypeError: notedata[aktfolder][b] is undefined
...esarr.sort(function(a,b){return notedata[aktfolder][a][2]>=notedata[aktfolder][b...
Also, there are several duplicates of notes. I see multiple results (2 to 3, apparently) for the same exact note come up in the search. Do note that I did clear all of the settings before I tried indexing again.
👍: 0 ⏩: 1
Dediggefedde In reply to deviant-garde [2013-10-27 19:33:17 +0000 UTC]
I really wonder if this is a problem with the storage...
I made a attempt for indexedDB which seems to work!
I don't really like to distribute in the main branch it just now, as that's the first time I used indexedDB here^^
phi.pf-control.de/userscripts/…
👍: 0 ⏩: 1
deviant-garde In reply to Dediggefedde [2013-10-27 19:42:08 +0000 UTC]
Merely changing the storage method doesn't seem to have fixed anything. Must be something else.
👍: 0 ⏩: 1
Dediggefedde In reply to deviant-garde [2013-10-27 21:50:23 +0000 UTC]
I still think I'm kind of cursed with user-luck^^
I made a new version and commented a lot of things. There are also some smaller changes that might solve the bug you encountered last...
Also removed all unnecessary comments to make reading easier...
phi.pf-control.de/userscripts/…
👍: 0 ⏩: 0
deviant-garde In reply to Dediggefedde [2013-10-27 17:59:56 +0000 UTC]
Okay, I noticed I wasn't deleting all the settings and I tried again. It stops caching at the same place as before and I eventually get an error like this:
TypeError: message is undefined
var elements=message.replace(/[\W\s]/g," ").replace(/ {2,}/," ").split(" ");
👍: 0 ⏩: 0
deviant-garde In reply to Dediggefedde [2013-10-27 17:53:11 +0000 UTC]
I gave it a shot and it still didn't index everything. I cleared the settings for dev_note_2 inside of about:config just to make sure that it got to start over clean but it still didn't work. This time, it didn't show any progress bar, or any other indication the notes were being indexed. Some of them WERE indexed as I could search for some of my notes by username, despite it not pulling up everything that it should have. I also didn't see any of the console.log messages you expected to be there. I'll see if it perhaps works after clearing the settings again and restarting the browser.
👍: 0 ⏩: 0
DesireeU In reply to ??? [2013-10-26 18:33:43 +0000 UTC]
First of all, thanks for the time to telling me of the update, it's much appreciated <3
I really like the new layout of this! Especially how it has its own tab for it >w<
It works wonderfully, my only remark is that if I try to index folders with many notes (like my inbox, 1400+ notes) it indexes only the latest 10 notes >:
With folders that have only a 20-ish notes it works perfectly though!
Thanks a lot for taking the time to make such a wonderful app that everyone on dA always wanted <333333
👍: 0 ⏩: 1
Dediggefedde In reply to DesireeU [2013-10-26 22:22:26 +0000 UTC]
Thanks, but it's not that nice if it's not working for you^^
For me it is working for my inbox (380 Notes) and my sent-folder (320 Notes).
When you go to your notes, wait a moment, click then on "search" and then on "Index Notes" (not "Check Notes"), does the text on the far right changes, too? Does the "Index Notes"-button becomes a progress-bar?
👍: 0 ⏩: 1
DesireeU In reply to Dediggefedde [2013-10-26 22:25:44 +0000 UTC]
Thanks a lot for advice dear ^^
Actually, the problem fixed by itself upon closing and then re-opening my browser, and waiting a bit before clicking on index notes, so it's 100% working now and I LOVE IT! <3
Once again, thanks a lot for this! You' ve just saved the life of a busy and forgetful artist <33333
👍: 0 ⏩: 1
Dediggefedde In reply to DesireeU [2013-10-26 22:33:55 +0000 UTC]
You could also... like... delete notes^^
I mean, I'm a nobody that gets around 400 Notes since Feb 2008, but why are you hoarding so many notes?^^
👍: 0 ⏩: 1
DesireeU In reply to Dediggefedde [2013-10-26 22:38:14 +0000 UTC]
I know, that's what I'm doing right now xD I used to keep them to re-read conversations with friends, etc.
Got down to 100-ish, mainly to keep commissions references and stuff...gah I hate being so busy
But anyway, even without deleting them, it's working just fine c:
So thanks once again <3333
👍: 0 ⏩: 1
Dediggefedde In reply to DesireeU [2013-10-26 22:54:48 +0000 UTC]
I usually have that with my email-adresses... I use an external program, mailstore home, to backup and search within old mails, while my thunderbird loads quicker for only the current mails.
Deviantart needs a note-export function^^
👍: 0 ⏩: 0
ChinZaPep In reply to ??? [2013-10-26 18:08:36 +0000 UTC]
Nice job, thank you for crediting us! We'd be happy to beta test for anything that you have in store!
👍: 0 ⏩: 0
<= Prev |