mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
Added an experimental audio feedback system.
This is the first element of a new 'decoration' component which may hold switches for different external appearance parameters. The first switch in that context is decoration.audio (as usual in yacy.init). This value is set to false by default, that means the audio feedback element is switched off by default. To switch it on, set decoration.audio = true (using /ConfigProperties_p.html). You will then hear sounds for the following events: - remote searches - incoming dht transmissions - new documents from the crawler Sound clips are stored in htroot/env/soundclips/ which is done so because a future implementation will read these files using the http client and with configurable urls which will make it very easy for the user to replace the given sounds with own sounds.
This commit is contained in:
parent
d0358e568b
commit
2a052f446a
|
@ -1257,3 +1257,6 @@ crawler.userAgent.name = yacybot
|
|||
crawler.userAgent.string = yacybot ($$SYSTEM$$) http://yacy.net/bot.html
|
||||
crawler.userAgent.minimumdelta = 500
|
||||
crawler.userAgent.clienttimeout = 10000
|
||||
|
||||
# interface decorations
|
||||
decoration.audio = false
|
||||
|
|
BIN
htroot/env/soundclips/atmocrawling.wav
vendored
Normal file
BIN
htroot/env/soundclips/atmocrawling.wav
vendored
Normal file
Binary file not shown.
BIN
htroot/env/soundclips/atmomonitor.wav
vendored
Normal file
BIN
htroot/env/soundclips/atmomonitor.wav
vendored
Normal file
Binary file not shown.
BIN
htroot/env/soundclips/dhtin.wav
vendored
Normal file
BIN
htroot/env/soundclips/dhtin.wav
vendored
Normal file
Binary file not shown.
BIN
htroot/env/soundclips/newdoc.wav
vendored
Normal file
BIN
htroot/env/soundclips/newdoc.wav
vendored
Normal file
Binary file not shown.
BIN
htroot/env/soundclips/remotesearch.wav
vendored
Normal file
BIN
htroot/env/soundclips/remotesearch.wav
vendored
Normal file
Binary file not shown.
22
htroot/env/soundclips/sources.txt
vendored
Normal file
22
htroot/env/soundclips/sources.txt
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
The following sounds had been taken from https://www.freesound.org and renamed from their original name.
|
||||
Please see license, author and original download page below:
|
||||
|
||||
atmocrawling.wav
|
||||
(CC BY 3.0) by cydon, https://www.freesound.org/people/cydon/
|
||||
https://www.freesound.org/people/cydon/sounds/126178/
|
||||
|
||||
atmomonitor.wav
|
||||
(CC0) by Diboz, https://www.freesound.org/people/Diboz/
|
||||
https://www.freesound.org/people/Diboz/sounds/211683/
|
||||
|
||||
dhtin.wav (converted from mp3)
|
||||
(CC0) by Kastenfrosch, https://www.freesound.org/people/Kastenfrosch/
|
||||
https://www.freesound.org/people/Kastenfrosch/sounds/113986/
|
||||
|
||||
newdoc.wav
|
||||
(CC0) by waterboy920, https://www.freesound.org/people/waterboy920/
|
||||
https://www.freesound.org/people/waterboy920/sounds/191012/
|
||||
|
||||
remotesearch.wav
|
||||
(CC0) by GameAudio, https://www.freesound.org/people/GameAudio/
|
||||
https://www.freesound.org/people/GameAudio/sounds/220173/
|
|
@ -51,6 +51,7 @@ import net.yacy.cora.sorting.WeakPriorityBlockingQueue;
|
|||
import net.yacy.cora.storage.HandleSet;
|
||||
import net.yacy.cora.util.ByteBuffer;
|
||||
import net.yacy.cora.util.SpaceExceededException;
|
||||
import net.yacy.gui.Audio;
|
||||
import net.yacy.kelondro.data.word.WordReference;
|
||||
import net.yacy.kelondro.data.word.WordReferenceFactory;
|
||||
import net.yacy.kelondro.data.word.WordReferenceRow;
|
||||
|
@ -322,7 +323,8 @@ public final class search {
|
|||
);
|
||||
Network.log.info("INIT HASH SEARCH (query-" + abstracts + "): " + QueryParams.anonymizedQueryHashes(theQuery.getQueryGoal().getIncludeHashes()) + " - " + theQuery.itemsPerPage() + " links");
|
||||
EventChannel.channels(EventChannel.REMOTESEARCH).addMessage(new RSSMessage("Remote Search Request from " + ((remoteSeed == null) ? "unknown" : remoteSeed.getName()), QueryParams.anonymizedQueryHashes(theQuery.getQueryGoal().getIncludeHashes()), ""));
|
||||
|
||||
if (sb.getConfigBool(SwitchboardConstants.DECORATION_AUDIO, false)) Audio.Soundclip.remotesearch.play();
|
||||
|
||||
// make event
|
||||
theSearch = SearchEventCache.getEvent(theQuery, sb.peers, sb.tables, null, abstracts.length() > 0, sb.loader, count, maxtime);
|
||||
if (theSearch.rwiProcess != null && theSearch.rwiProcess.isAlive()) try {theSearch.rwiProcess.join();} catch (final InterruptedException e) {}
|
||||
|
|
|
@ -30,6 +30,7 @@ import java.io.IOException;
|
|||
import java.text.ParseException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import net.yacy.cora.date.GenericFormatter;
|
||||
import net.yacy.cora.document.encoding.ASCII;
|
||||
import net.yacy.cora.document.feed.RSSMessage;
|
||||
|
@ -37,6 +38,7 @@ import net.yacy.cora.protocol.RequestHeader;
|
|||
import net.yacy.cora.util.ConcurrentLog;
|
||||
import net.yacy.crawler.data.ResultURLs;
|
||||
import net.yacy.crawler.data.ResultURLs.EventOrigin;
|
||||
import net.yacy.gui.Audio;
|
||||
import net.yacy.kelondro.data.meta.URIMetadataNode;
|
||||
import net.yacy.peers.EventChannel;
|
||||
import net.yacy.peers.Network;
|
||||
|
@ -174,6 +176,8 @@ public final class transferURL {
|
|||
// return rewrite properties
|
||||
Network.log.info("Received " + received + " URLs from peer " + otherPeerName + " in " + (System.currentTimeMillis() - start) + " ms, blocked " + blocked + " URLs");
|
||||
EventChannel.channels(EventChannel.DHTRECEIVE).addMessage(new RSSMessage("Received " + received + ", blocked " + blocked + " URLs from peer " + otherPeerName, "", otherPeer.hash));
|
||||
if (sb.getConfigBool(SwitchboardConstants.DECORATION_AUDIO, false)) Audio.Soundclip.dhtin.play();
|
||||
|
||||
if (doublecheck > 0) {
|
||||
Network.log.warn("Received " + doublecheck + "/" + urlc + " double URLs from peer " + otherPeerName); // double should not happen because we demanded only documents which we do not have yet
|
||||
doublevalues = Integer.toString(doublecheck);
|
||||
|
|
|
@ -154,6 +154,7 @@ import net.yacy.document.importer.OAIListFriendsLoader;
|
|||
import net.yacy.document.parser.audioTagParser;
|
||||
import net.yacy.document.parser.pdfParser;
|
||||
import net.yacy.document.parser.html.Evaluation;
|
||||
import net.yacy.gui.Audio;
|
||||
import net.yacy.gui.Tray;
|
||||
import net.yacy.kelondro.blob.BEncodedHeap;
|
||||
import net.yacy.kelondro.blob.Tables;
|
||||
|
@ -2847,7 +2848,8 @@ public final class Switchboard extends serverSwitch {
|
|||
? EventChannel.LOCALINDEXING
|
||||
: EventChannel.REMOTEINDEXING);
|
||||
feed.addMessage(new RSSMessage("Indexed web page", dc_title, queueEntry.url(), ASCII.String(queueEntry.url().hash())));
|
||||
|
||||
if (this.getConfigBool(SwitchboardConstants.DECORATION_AUDIO, false)) Audio.Soundclip.newdoc.play();
|
||||
|
||||
// store rss feeds in document into rss table
|
||||
for ( final Map.Entry<DigestURL, String> rssEntry : document.getRSS().entrySet() ) {
|
||||
final Tables.Data rssRow = new Tables.Data();
|
||||
|
|
|
@ -554,4 +554,10 @@ public final class SwitchboardConstants {
|
|||
* Skins
|
||||
*/
|
||||
public static final String SKINS_PATH_DEFAULT = "DATA/SKINS";
|
||||
|
||||
/*
|
||||
* decorations
|
||||
*/
|
||||
public static final String DECORATION_AUDIO = "decoration.audio";
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user