mirror of
https://github.com/simon987/sist2.git
synced 2025-04-19 18:26:43 +00:00
User scripts, bug fixes, docker image
This commit is contained in:
parent
6931d320a2
commit
ebfd7e03ce
@ -122,10 +122,10 @@ if (WITH_SIST2)
|
|||||||
|
|
||||||
target_compile_options(sist2
|
target_compile_options(sist2
|
||||||
PRIVATE
|
PRIVATE
|
||||||
-Ofast
|
# -Ofast
|
||||||
# -march=native
|
# -march=native
|
||||||
-fno-stack-protector
|
# -fno-stack-protector
|
||||||
-fomit-frame-pointer
|
# -fomit-frame-pointer
|
||||||
)
|
)
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES(
|
TARGET_LINK_LIBRARIES(
|
||||||
|
9
Docker/Dockerfile
Normal file
9
Docker/Dockerfile
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
FROM ubuntu:19.10
|
||||||
|
MAINTAINER simon987 <me@simon987.net>
|
||||||
|
|
||||||
|
RUN apt update
|
||||||
|
RUN apt install -y libglib2.0-0 libcurl4 libmagic1 libharfbuzz-bin libopenjp2-7
|
||||||
|
|
||||||
|
ADD sist2 /root/sist2
|
||||||
|
|
||||||
|
ENTRYPOINT ["/root/sist2"]
|
8
Docker/build.sh
Executable file
8
Docker/build.sh
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
cp ../sist2 .
|
||||||
|
|
||||||
|
version=$(./sist2 --version)
|
||||||
|
|
||||||
|
echo "Version ${version}"
|
||||||
|
docker build . -t simon987/sist2:${version} -t simon987/sist2:latest
|
||||||
|
docker push simon987/sist2:${version}
|
||||||
|
docker push simon987/sist2:latest
|
35
README.md
35
README.md
@ -14,6 +14,7 @@ sist2 (Simple incremental search tool)
|
|||||||
* Extracts text from common file types\*
|
* Extracts text from common file types\*
|
||||||
* Generates thumbnails\*
|
* Generates thumbnails\*
|
||||||
* Incremental scanning
|
* Incremental scanning
|
||||||
|
* Automatic tagging from file attributes via [user scripts](scripting/README.md)
|
||||||
|
|
||||||
|
|
||||||
\* See [format support](#format-support)
|
\* See [format support](#format-support)
|
||||||
@ -21,11 +22,13 @@ sist2 (Simple incremental search tool)
|
|||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
1. Have an [Elasticsearch](https://www.elastic.co/downloads/elasticsearch) instance running
|
1. Have an [Elasticsearch](https://www.elastic.co/downloads/elasticsearch) instance running
|
||||||
1. Download the [latest sist2 release](https://github.com/simon987/sist2/releases)
|
1.
|
||||||
|
1. Download the [latest sist2 release](https://github.com/simon987/sist2/releases) *
|
||||||
|
1. *(or)* `docker pull simon987/sist2:latest`
|
||||||
|
|
||||||
*Windows users*: `sist2` runs under [WSL](https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux)
|
|
||||||
|
|
||||||
*Mac users*: See [#1](https://github.com/simon987/sist2/issues/1)
|
\* *Windows users*: **sist2** runs under [WSL](https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux)
|
||||||
|
\* *Mac users*: See [#1](https://github.com/simon987/sist2/issues/1)
|
||||||
|
|
||||||
|
|
||||||
## Example usage
|
## Example usage
|
||||||
@ -52,6 +55,32 @@ sist2 index --print ./my_idx > raw_documents.ndjson
|
|||||||
sist2 web --bind 0.0.0.0 --port 4321 ./my_idx1 ./my_idx2 ./my_idx3
|
sist2 web --bind 0.0.0.0 --port 4321 ./my_idx1 ./my_idx2 ./my_idx3
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Use sist2 with docker
|
||||||
|
|
||||||
|
**scan**
|
||||||
|
```bash
|
||||||
|
docker run -it \
|
||||||
|
-v /path/to/files/:/files \
|
||||||
|
-v $PWD/out/:/out \
|
||||||
|
simon987/sist2 scan -t 4 /files -o /out/my_idx1
|
||||||
|
```
|
||||||
|
**index**
|
||||||
|
```bash
|
||||||
|
docker run -it --network host\
|
||||||
|
-v $PWD/out/:/out \
|
||||||
|
simon987/sist2 index /out/my_idx1
|
||||||
|
```
|
||||||
|
|
||||||
|
**web**
|
||||||
|
```bash
|
||||||
|
docker run --rm --network host -d --name sist2\
|
||||||
|
-v $PWD/out/my_idx:/idx \
|
||||||
|
-v $PWD/my/files:/files
|
||||||
|
simon987/sist2 web --bind 0.0.0.0 /idx
|
||||||
|
docker stop sist2
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Format support
|
## Format support
|
||||||
|
|
||||||
File type | Library | Content | Thumbnail | Metadata
|
File type | Library | Content | Thumbnail | Metadata
|
||||||
|
@ -80,6 +80,9 @@
|
|||||||
"analyzer": "my_nGram"
|
"analyzer": "my_nGram"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"tag": {
|
||||||
|
"type": "keyword"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
117
scripting/README.md
Normal file
117
scripting/README.md
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
## User scripts
|
||||||
|
|
||||||
|
*This document is under construction, more in-depth guide coming soon*
|
||||||
|
|
||||||
|
During the `index` step, you can use the `--script-file <script>` option to
|
||||||
|
modify documents or add user tags. This option is mainly used to
|
||||||
|
implement automatic tagging based on file attributes.
|
||||||
|
|
||||||
|
The scripting language used
|
||||||
|
([Painless Scripting Language](https://www.elastic.co/guide/en/elasticsearch/painless/7.4/index.html))
|
||||||
|
is very similar to Java, but you should be able to create user scripts
|
||||||
|
without programming experience at all if you're somewhat familiar with
|
||||||
|
regex.
|
||||||
|
|
||||||
|
This is the base structure of the documents we're working with:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"_id": "e171405c-fdb5-4feb-bb32-82637bc32084",
|
||||||
|
"_index": "sist2",
|
||||||
|
"_type": "_doc",
|
||||||
|
"_source": {
|
||||||
|
"index": "206b3050-e821-421a-891d-12fcf6c2db0d",
|
||||||
|
"mime": "application/json",
|
||||||
|
"size": 1799,
|
||||||
|
"mtime": 1545443685,
|
||||||
|
"extension": "md",
|
||||||
|
"name": "README",
|
||||||
|
"path": "sist2/scripting",
|
||||||
|
"content": "..."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Example script**
|
||||||
|
|
||||||
|
This script checks if the `genre` attribute exists, if it does
|
||||||
|
it adds the `genre.<genre>` tag.
|
||||||
|
```Java
|
||||||
|
ArrayList tags = ctx._source.tag = new ArrayList();
|
||||||
|
|
||||||
|
if (ctx._source?.genre != null) {
|
||||||
|
tags.add("genre." + ctx._source.genre.toLowerCase())
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
You can use `.` to create a hierarchical tag tree:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
To use regular expressions, you need to add this line in `/etc/elasticsearch/elasticsearch.yml`
|
||||||
|
```yaml
|
||||||
|
script.painless.regex.enabled: true
|
||||||
|
```
|
||||||
|
Or, if you're using docker add `-e "script.painless.regex.enabled=true"`
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
If `(20XX)` is in the file name, add the `year.<year>` tag:
|
||||||
|
```Java
|
||||||
|
ArrayList tags = ctx._source.tag = new ArrayList();
|
||||||
|
|
||||||
|
Matcher m = /[\(\.+](20[0-9]{2})[\)\.+]/.matcher(ctx._source.name);
|
||||||
|
if (m.find()) {
|
||||||
|
tags.add("year." + m.group(1))
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Use default *Calibre* folder structure to infer author.
|
||||||
|
```Java
|
||||||
|
ArrayList tags = ctx._source.tag = new ArrayList();
|
||||||
|
|
||||||
|
// We expect the book path to look like this:
|
||||||
|
// /path/to/Calibre Library/Author/Title/Title - Author.pdf
|
||||||
|
|
||||||
|
if (ctx._source.name.contains("-") && ctx._source.extension == "pdf") {
|
||||||
|
String[] names = ctx._source.name.splitOnToken('-');
|
||||||
|
tags.add("author." + names[1].strip());
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
If the file matches a specific pattern `AAAA-000 fName1 lName1, <fName2 lName2>...`, add the `actress.<actress>` and
|
||||||
|
`studio.<studio>` tag:
|
||||||
|
```Java
|
||||||
|
ArrayList tags = ctx._source.tag = new ArrayList();
|
||||||
|
|
||||||
|
Matcher m = /([A-Z]{4})-[0-9]{3} (.*)/.matcher(ctx._source.name);
|
||||||
|
if (m.find()) {
|
||||||
|
tags.add("studio." + m.group(1));
|
||||||
|
|
||||||
|
// Take the matched group (.*), and add a tag for
|
||||||
|
// each name, separated by comma
|
||||||
|
for (String name : m.group(2).splitOnToken(',')) {
|
||||||
|
tags.add("actress." + name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Set the name of the last folder (`/path/to/<studio>/file.mp4`) to `studio.<studio>` tag
|
||||||
|
```Java
|
||||||
|
ArrayList tags = ctx._source.tag = new ArrayList();
|
||||||
|
|
||||||
|
if (ctx._source.path != "") {
|
||||||
|
String[] names = ctx._source.path.splitOnToken('/');
|
||||||
|
tags.add("studio." + names[names.length-1]);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Set the name of the last folder (`/path/to/<studio>/file.mp4`) to `studio.<studio>` tag
|
||||||
|
```Java
|
||||||
|
ArrayList tags = ctx._source.tag = new ArrayList();
|
||||||
|
|
||||||
|
if (ctx._source.path != "") {
|
||||||
|
String[] names = ctx._source.path.splitOnToken('/');
|
||||||
|
tags.add("studio." + names[names.length-1]);
|
||||||
|
}
|
||||||
|
```
|
BIN
scripting/genre_example.png
Normal file
BIN
scripting/genre_example.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 26 KiB |
33
src/cli.c
33
src/cli.c
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
#define DEFAULT_OUTPUT "index.sist2/"
|
#define DEFAULT_OUTPUT "index.sist2/"
|
||||||
#define DEFAULT_CONTENT_SIZE 4096
|
#define DEFAULT_CONTENT_SIZE 4096
|
||||||
#define DEFAULT_QUALITY 15
|
#define DEFAULT_QUALITY 5
|
||||||
#define DEFAULT_SIZE 200
|
#define DEFAULT_SIZE 500
|
||||||
#define DEFAULT_REWRITE_URL ""
|
#define DEFAULT_REWRITE_URL ""
|
||||||
|
|
||||||
#define DEFAULT_ES_URL "http://localhost:9200"
|
#define DEFAULT_ES_URL "http://localhost:9200"
|
||||||
@ -25,7 +25,7 @@ int scan_args_validate(scan_args_t *args, int argc, const char **argv) {
|
|||||||
|
|
||||||
char *abs_path = abspath(argv[1]);
|
char *abs_path = abspath(argv[1]);
|
||||||
if (abs_path == NULL) {
|
if (abs_path == NULL) {
|
||||||
fprintf(stderr, "File not found: %s", argv[1]);
|
fprintf(stderr, "File not found: %s\n", argv[1]);
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
args->path = abs_path;
|
args->path = abs_path;
|
||||||
@ -34,7 +34,7 @@ int scan_args_validate(scan_args_t *args, int argc, const char **argv) {
|
|||||||
if (args->incremental != NULL) {
|
if (args->incremental != NULL) {
|
||||||
abs_path = abspath(args->incremental);
|
abs_path = abspath(args->incremental);
|
||||||
if (abs_path == NULL) {
|
if (abs_path == NULL) {
|
||||||
fprintf(stderr, "File not found: %s", args->incremental);
|
fprintf(stderr, "File not found: %s\n", args->incremental);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -100,7 +100,7 @@ int index_args_validate(index_args_t *args, int argc, const char **argv) {
|
|||||||
|
|
||||||
char *index_path = abspath(argv[1]);
|
char *index_path = abspath(argv[1]);
|
||||||
if (index_path == NULL) {
|
if (index_path == NULL) {
|
||||||
fprintf(stderr, "File not found: %s", argv[1]);
|
fprintf(stderr, "File not found: %s\n", argv[1]);
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
args->index_path = argv[1];
|
args->index_path = argv[1];
|
||||||
@ -109,6 +109,27 @@ int index_args_validate(index_args_t *args, int argc, const char **argv) {
|
|||||||
if (args->es_url == NULL) {
|
if (args->es_url == NULL) {
|
||||||
args->es_url = DEFAULT_ES_URL;
|
args->es_url = DEFAULT_ES_URL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (args->script_path != NULL) {
|
||||||
|
struct stat info;
|
||||||
|
int res = stat(args->script_path, &info);
|
||||||
|
|
||||||
|
if (res == -1) {
|
||||||
|
fprintf(stderr, "Error opening script file '%s': %s\n", args->script_path, strerror(errno));
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int fd = open(args->script_path, O_RDONLY);
|
||||||
|
if (fd == -1) {
|
||||||
|
fprintf(stderr, "Error opening script file '%s': %s\n", args->script_path, strerror(errno));
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
args->script = malloc(info.st_size + 1);
|
||||||
|
read(fd, args->script, info.st_size);
|
||||||
|
*(args->script + info.st_size) = '\0';
|
||||||
|
close(fd);
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -137,7 +158,7 @@ int web_args_validate(web_args_t *args, int argc, const char **argv) {
|
|||||||
for (int i = 0; i < args->index_count; i++) {
|
for (int i = 0; i < args->index_count; i++) {
|
||||||
char *abs_path = abspath(args->indices[i]);
|
char *abs_path = abspath(args->indices[i]);
|
||||||
if (abs_path == NULL) {
|
if (abs_path == NULL) {
|
||||||
fprintf(stderr, "File not found: %s", abs_path);
|
fprintf(stderr, "File not found: %s\n", abs_path);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,8 @@ int scan_args_validate(scan_args_t *args, int argc, const char **argv);
|
|||||||
typedef struct index_args {
|
typedef struct index_args {
|
||||||
char *es_url;
|
char *es_url;
|
||||||
const char *index_path;
|
const char *index_path;
|
||||||
|
const char *script_path;
|
||||||
|
char *script;
|
||||||
int print;
|
int print;
|
||||||
int force_reset;
|
int force_reset;
|
||||||
} index_args_t;
|
} index_args_t;
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <cJSON/cJSON.h>
|
#include <cJSON/cJSON.h>
|
||||||
#include <src/ctx.h>
|
|
||||||
|
|
||||||
#include "static_generated.c"
|
#include "static_generated.c"
|
||||||
|
|
||||||
@ -54,6 +53,40 @@ void index_json(cJSON *document, const char uuid_str[UUID_STR_LEN]) {
|
|||||||
elastic_index_line(bulk_line);
|
elastic_index_line(bulk_line);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void execute_update_script(const char *script, const char index_id[UUID_STR_LEN]) {
|
||||||
|
|
||||||
|
cJSON *body = cJSON_CreateObject();
|
||||||
|
cJSON *script_obj = cJSON_AddObjectToObject(body, "script");
|
||||||
|
cJSON_AddStringToObject(script_obj, "lang", "painless");
|
||||||
|
cJSON_AddStringToObject(script_obj, "source", script);
|
||||||
|
|
||||||
|
cJSON *query = cJSON_AddObjectToObject(body, "query");
|
||||||
|
cJSON *term_obj = cJSON_AddObjectToObject(query, "term");
|
||||||
|
cJSON_AddStringToObject(term_obj, "index", index_id);
|
||||||
|
|
||||||
|
char * str = cJSON_Print(body);
|
||||||
|
|
||||||
|
char bulk_url[4096];
|
||||||
|
snprintf(bulk_url, 4096, "%s/sist2/_update_by_query?pretty", Indexer->es_url);
|
||||||
|
response_t *r = web_post(bulk_url, str, "Content-Type: application/json");
|
||||||
|
printf("Executed user script <%d>\n", r->status_code);
|
||||||
|
cJSON *resp = cJSON_Parse(r->body);
|
||||||
|
|
||||||
|
cJSON_free(str);
|
||||||
|
cJSON_Delete(body);
|
||||||
|
free_response(r);
|
||||||
|
|
||||||
|
cJSON *error = cJSON_GetObjectItem(resp, "error");
|
||||||
|
if (error != NULL) {
|
||||||
|
char *error_str = cJSON_Print(error);
|
||||||
|
|
||||||
|
fprintf(stderr, "User script error: \n%s\n", error_str);
|
||||||
|
cJSON_free(error_str);
|
||||||
|
}
|
||||||
|
|
||||||
|
cJSON_Delete(resp);
|
||||||
|
}
|
||||||
|
|
||||||
void elastic_flush() {
|
void elastic_flush() {
|
||||||
|
|
||||||
if (Indexer == NULL) {
|
if (Indexer == NULL) {
|
||||||
@ -115,6 +148,7 @@ void elastic_flush() {
|
|||||||
cJSON_Delete(ret_json);
|
cJSON_Delete(ret_json);
|
||||||
|
|
||||||
free_response(r);
|
free_response(r);
|
||||||
|
free(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
void elastic_index_line(es_bulk_line_t *line) {
|
void elastic_index_line(es_bulk_line_t *line) {
|
||||||
@ -140,8 +174,7 @@ void elastic_index_line(es_bulk_line_t *line) {
|
|||||||
|
|
||||||
es_indexer_t *create_indexer(const char *url) {
|
es_indexer_t *create_indexer(const char *url) {
|
||||||
|
|
||||||
size_t url_len = strlen(url);
|
char *es_url = malloc(strlen(url) + 1);
|
||||||
char *es_url = malloc(url_len);
|
|
||||||
strcpy(es_url, url);
|
strcpy(es_url, url);
|
||||||
|
|
||||||
es_indexer_t *indexer = malloc(sizeof(es_indexer_t));
|
es_indexer_t *indexer = malloc(sizeof(es_indexer_t));
|
||||||
@ -154,7 +187,7 @@ es_indexer_t *create_indexer(const char *url) {
|
|||||||
return indexer;
|
return indexer;
|
||||||
}
|
}
|
||||||
|
|
||||||
void destroy_indexer() {
|
void destroy_indexer(char * script, char index_id[UUID_STR_LEN]) {
|
||||||
|
|
||||||
char url[4096];
|
char url[4096];
|
||||||
|
|
||||||
@ -163,6 +196,15 @@ void destroy_indexer() {
|
|||||||
printf("Refresh index <%d>\n", r->status_code);
|
printf("Refresh index <%d>\n", r->status_code);
|
||||||
free_response(r);
|
free_response(r);
|
||||||
|
|
||||||
|
if (script != NULL) {
|
||||||
|
execute_update_script(script, index_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
snprintf(url, sizeof(url), "%s/sist2/_refresh", IndexCtx.es_url);
|
||||||
|
r = web_post(url, "", NULL);
|
||||||
|
printf("Refresh index <%d>\n", r->status_code);
|
||||||
|
free_response(r);
|
||||||
|
|
||||||
snprintf(url, sizeof(url), "%s/sist2/_forcemerge", IndexCtx.es_url);
|
snprintf(url, sizeof(url), "%s/sist2/_forcemerge", IndexCtx.es_url);
|
||||||
r = web_post(url, "", NULL);
|
r = web_post(url, "", NULL);
|
||||||
printf("Merge index <%d>\n", r->status_code);
|
printf("Merge index <%d>\n", r->status_code);
|
||||||
|
@ -24,7 +24,7 @@ void index_json(cJSON *document, const char uuid_str[UUID_STR_LEN]);
|
|||||||
|
|
||||||
es_indexer_t *create_indexer(const char* es_url);
|
es_indexer_t *create_indexer(const char* es_url);
|
||||||
|
|
||||||
void destroy_indexer();
|
void destroy_indexer(char *script, char index_id[UUID_STR_LEN]);
|
||||||
|
|
||||||
void elastic_init(int force_reset);
|
void elastic_init(int force_reset);
|
||||||
|
|
||||||
|
File diff suppressed because one or more lines are too long
@ -56,7 +56,7 @@ index_descriptor_t read_index_descriptor(char *path) {
|
|||||||
int fd = open(path, O_RDONLY);
|
int fd = open(path, O_RDONLY);
|
||||||
|
|
||||||
if (fd == -1) {
|
if (fd == -1) {
|
||||||
fprintf(stderr, "Invalid/corrupt index (Could not find descriptor)");
|
fprintf(stderr, "Invalid/corrupt index (Could not find descriptor)\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -264,8 +264,9 @@ void read_index(const char *path, const char index_id[UUID_STR_LEN], index_func
|
|||||||
}
|
}
|
||||||
|
|
||||||
func(document, uuid_str);
|
func(document, uuid_str);
|
||||||
cJSON_free(document);
|
cJSON_Delete(document);
|
||||||
}
|
}
|
||||||
|
dyn_buffer_destroy(&buf);
|
||||||
fclose(file);
|
fclose(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
19
src/main.c
19
src/main.c
@ -10,7 +10,7 @@
|
|||||||
#define EPILOG "Made by simon987 <me@simon987.net>. Released under GPL-3.0"
|
#define EPILOG "Made by simon987 <me@simon987.net>. Released under GPL-3.0"
|
||||||
|
|
||||||
|
|
||||||
static const char *const Version = "1.1.4";
|
static const char *const Version = "1.1.5";
|
||||||
static const char *const usage[] = {
|
static const char *const usage[] = {
|
||||||
"sist2 scan [OPTION]... PATH",
|
"sist2 scan [OPTION]... PATH",
|
||||||
"sist2 index [OPTION]... INDEX",
|
"sist2 index [OPTION]... INDEX",
|
||||||
@ -163,10 +163,11 @@ void sist2_index(index_args_t *args) {
|
|||||||
read_index(file_path, desc.uuid, f);
|
read_index(file_path, desc.uuid, f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
closedir(dir);
|
||||||
|
|
||||||
if (!args->print) {
|
if (!args->print) {
|
||||||
elastic_flush();
|
elastic_flush();
|
||||||
destroy_indexer();
|
destroy_indexer(args->script, desc.uuid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -208,16 +209,20 @@ int main(int argc, const char *argv[]) {
|
|||||||
web_args_t *web_args = web_args_create();
|
web_args_t *web_args = web_args_create();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
int arg_version = 0;
|
||||||
|
|
||||||
char * common_es_url = NULL;
|
char * common_es_url = NULL;
|
||||||
|
|
||||||
struct argparse_option options[] = {
|
struct argparse_option options[] = {
|
||||||
OPT_HELP(),
|
OPT_HELP(),
|
||||||
|
|
||||||
|
OPT_BOOLEAN('v', "version", &arg_version, "Show version and exit"),
|
||||||
|
|
||||||
OPT_GROUP("Scan options"),
|
OPT_GROUP("Scan options"),
|
||||||
OPT_INTEGER('t', "threads", &scan_args->threads, "Number of threads. DEFAULT=1"),
|
OPT_INTEGER('t', "threads", &scan_args->threads, "Number of threads. DEFAULT=1"),
|
||||||
OPT_FLOAT('q', "quality", &scan_args->quality,
|
OPT_FLOAT('q', "quality", &scan_args->quality,
|
||||||
"Thumbnail quality, on a scale of 1.0 to 31.0, 1.0 being the best. DEFAULT=15"),
|
"Thumbnail quality, on a scale of 1.0 to 31.0, 1.0 being the best. DEFAULT=5"),
|
||||||
OPT_INTEGER(0, "size", &scan_args->size, "Thumbnail size, in pixels. DEFAULT=200"),
|
OPT_INTEGER(0, "size", &scan_args->size, "Thumbnail size, in pixels. DEFAULT=500"),
|
||||||
OPT_INTEGER(0, "content-size", &scan_args->content_size,
|
OPT_INTEGER(0, "content-size", &scan_args->content_size,
|
||||||
"Number of bytes to be extracted from text documents. DEFAULT=4096"),
|
"Number of bytes to be extracted from text documents. DEFAULT=4096"),
|
||||||
OPT_STRING(0, "incremental", &scan_args->incremental,
|
OPT_STRING(0, "incremental", &scan_args->incremental,
|
||||||
@ -230,6 +235,7 @@ int main(int argc, const char *argv[]) {
|
|||||||
OPT_GROUP("Index options"),
|
OPT_GROUP("Index options"),
|
||||||
OPT_STRING(0, "es-url", &common_es_url, "Elasticsearch url. DEFAULT=http://localhost:9200"),
|
OPT_STRING(0, "es-url", &common_es_url, "Elasticsearch url. DEFAULT=http://localhost:9200"),
|
||||||
OPT_BOOLEAN('p', "print", &index_args->print, "Just print JSON documents to stdout."),
|
OPT_BOOLEAN('p', "print", &index_args->print, "Just print JSON documents to stdout."),
|
||||||
|
OPT_STRING(0, "script-file", &index_args->script_path, "Path to user script."),
|
||||||
OPT_BOOLEAN('f', "force-reset", &index_args->force_reset, "Reset Elasticsearch mappings and settings. "
|
OPT_BOOLEAN('f', "force-reset", &index_args->force_reset, "Reset Elasticsearch mappings and settings. "
|
||||||
"(You must use this option the first time you use the index command)"),
|
"(You must use this option the first time you use the index command)"),
|
||||||
|
|
||||||
@ -247,6 +253,11 @@ int main(int argc, const char *argv[]) {
|
|||||||
argparse_describe(&argparse, DESCRIPTION, EPILOG);
|
argparse_describe(&argparse, DESCRIPTION, EPILOG);
|
||||||
argc = argparse_parse(&argparse, argc, argv);
|
argc = argparse_parse(&argparse, argc, argv);
|
||||||
|
|
||||||
|
if (arg_version) {
|
||||||
|
printf(Version);
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef SIST_SCAN_ONLY
|
#ifndef SIST_SCAN_ONLY
|
||||||
web_args->es_url = common_es_url;
|
web_args->es_url = common_es_url;
|
||||||
index_args->es_url = common_es_url;
|
index_args->es_url = common_es_url;
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1,3 +1,7 @@
|
|||||||
|
*:focus {
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: #00BCD4;
|
color: #00BCD4;
|
||||||
}
|
}
|
||||||
@ -95,6 +99,11 @@ body {
|
|||||||
margin-right: 3px;
|
margin-right: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.badge-user {
|
||||||
|
color: #212529;
|
||||||
|
background-color: #e0e0e0;
|
||||||
|
}
|
||||||
|
|
||||||
.fit {
|
.fit {
|
||||||
display: block;
|
display: block;
|
||||||
min-width: 64px;
|
min-width: 64px;
|
||||||
@ -164,6 +173,7 @@ mark {
|
|||||||
margin-top: 1em;
|
margin-top: 1em;
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-select {
|
.custom-select {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
background-color: #37474F;
|
background-color: #37474F;
|
||||||
@ -240,3 +250,37 @@ option {
|
|||||||
.btn {
|
.btn {
|
||||||
color: #eee;
|
color: #eee;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nav-tabs .nav-link {
|
||||||
|
color: #e0e0e0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-tabs .nav-item.show .nav-link, .nav-tabs .nav-link.active {
|
||||||
|
background-color: #212121;
|
||||||
|
border-color: #616161 #616161 #212121;
|
||||||
|
color: #e0e0e0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-tabs .nav-link:focus, .nav-tabs .nav-link:focus {
|
||||||
|
border-color: #616161 #616161 #212121;
|
||||||
|
color: #e0e0e0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-tabs .nav-link:focus, .nav-tabs .nav-link:hover {
|
||||||
|
border-color: #e0e0e0 #e0e0e0 #212121;
|
||||||
|
color: #e0e0e0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-tabs {
|
||||||
|
border-bottom: #616161;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav {
|
||||||
|
margin-top: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 800px) {
|
||||||
|
.nav {
|
||||||
|
min-width: 800px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
*:focus {
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
|
||||||
body {overflow-y:scroll;}
|
body {overflow-y:scroll;}
|
||||||
|
|
||||||
.progress {
|
.progress {
|
||||||
@ -47,6 +51,11 @@ body {overflow-y:scroll;}
|
|||||||
background-color: #FFC107;
|
background-color: #FFC107;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.badge-user {
|
||||||
|
color: #212529;
|
||||||
|
background-color: #e0e0e0;
|
||||||
|
}
|
||||||
|
|
||||||
.badge-text {
|
.badge-text {
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
background-color: #FAAB3C;
|
background-color: #FAAB3C;
|
||||||
@ -169,3 +178,13 @@ mark {
|
|||||||
font-size: .875rem;
|
font-size: .875rem;
|
||||||
border-radius: .2rem;
|
border-radius: .2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nav {
|
||||||
|
margin-top: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 800px) {
|
||||||
|
.nav {
|
||||||
|
min-width: 800px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -76,8 +76,8 @@ function shouldPlayVideo(hit) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function makePlaceholder(w, h) {
|
function makePlaceholder(w, h) {
|
||||||
const calc = w > h
|
const calc = w > h
|
||||||
? (175 / w / h) >= 272
|
? (175 / w / h) >= 272
|
||||||
? (175 * w / h)
|
? (175 * w / h)
|
||||||
: 175
|
: 175
|
||||||
: 175;
|
: 175;
|
||||||
@ -195,7 +195,7 @@ function createDocCard(hit) {
|
|||||||
if (hit["_source"].hasOwnProperty("duration")) {
|
if (hit["_source"].hasOwnProperty("duration")) {
|
||||||
thumbnailOverlay = document.createElement("div");
|
thumbnailOverlay = document.createElement("div");
|
||||||
thumbnailOverlay.setAttribute("class", "card-img-overlay");
|
thumbnailOverlay.setAttribute("class", "card-img-overlay");
|
||||||
let durationBadge = document.createElement("span");
|
const durationBadge = document.createElement("span");
|
||||||
durationBadge.setAttribute("class", "badge badge-resolution");
|
durationBadge.setAttribute("class", "badge badge-resolution");
|
||||||
durationBadge.appendChild(document.createTextNode(humanTime(hit["_source"]["duration"])));
|
durationBadge.appendChild(document.createTextNode(humanTime(hit["_source"]["duration"])));
|
||||||
thumbnailOverlay.appendChild(durationBadge);
|
thumbnailOverlay.appendChild(durationBadge);
|
||||||
@ -207,7 +207,7 @@ function createDocCard(hit) {
|
|||||||
case "video":
|
case "video":
|
||||||
case "image":
|
case "image":
|
||||||
if (hit["_source"].hasOwnProperty("videoc")) {
|
if (hit["_source"].hasOwnProperty("videoc")) {
|
||||||
let formatTag = document.createElement("span");
|
const formatTag = document.createElement("span");
|
||||||
formatTag.setAttribute("class", "badge badge-pill badge-video");
|
formatTag.setAttribute("class", "badge badge-pill badge-video");
|
||||||
formatTag.appendChild(document.createTextNode(hit["_source"]["videoc"].replace(" ", "")));
|
formatTag.appendChild(document.createTextNode(hit["_source"]["videoc"].replace(" ", "")));
|
||||||
tags.push(formatTag);
|
tags.push(formatTag);
|
||||||
@ -227,7 +227,7 @@ function createDocCard(hit) {
|
|||||||
//Content
|
//Content
|
||||||
let contentHl = getContentHighlight(hit);
|
let contentHl = getContentHighlight(hit);
|
||||||
if (contentHl !== undefined) {
|
if (contentHl !== undefined) {
|
||||||
let contentDiv = document.createElement("div");
|
const contentDiv = document.createElement("div");
|
||||||
contentDiv.setAttribute("class", "content-div");
|
contentDiv.setAttribute("class", "content-div");
|
||||||
contentDiv.insertAdjacentHTML('afterbegin', contentHl);
|
contentDiv.insertAdjacentHTML('afterbegin', contentHl);
|
||||||
docCard.appendChild(contentDiv);
|
docCard.appendChild(contentDiv);
|
||||||
@ -254,6 +254,26 @@ function createDocCard(hit) {
|
|||||||
imgWrapper.appendChild(thumbnailOverlay);
|
imgWrapper.appendChild(thumbnailOverlay);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// User tags
|
||||||
|
if (hit["_source"].hasOwnProperty("tag")) {
|
||||||
|
hit["_source"]["tag"].forEach(tag => {
|
||||||
|
const userTag = document.createElement("span");
|
||||||
|
userTag.setAttribute("class", "badge badge-pill badge-user");
|
||||||
|
|
||||||
|
const tokens = tag.split("#");
|
||||||
|
|
||||||
|
if (tokens.length > 1) {
|
||||||
|
const bg = "#" + tokens[1];
|
||||||
|
const fg = lum(tokens[1]) > 40 ? "#000" : "#fff";
|
||||||
|
userTag.setAttribute("style", `background-color: ${bg}; color: ${fg}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
const name = tokens[0].split(".")[tokens[0].split(".").length - 1];
|
||||||
|
userTag.appendChild(document.createTextNode(name));
|
||||||
|
tags.push(userTag);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
for (let i = 0; i < tags.length; i++) {
|
for (let i = 0; i < tags.length; i++) {
|
||||||
tagContainer.appendChild(tags[i]);
|
tagContainer.appendChild(tags[i]);
|
||||||
}
|
}
|
||||||
|
118
web/js/search.js
118
web/js/search.js
@ -1,6 +1,8 @@
|
|||||||
const SIZE = 40;
|
const SIZE = 40;
|
||||||
let mimeMap = [];
|
let mimeMap = [];
|
||||||
let tree;
|
let tagMap = [];
|
||||||
|
let mimeTree;
|
||||||
|
let tagTree;
|
||||||
|
|
||||||
let searchBar = document.getElementById("searchBar");
|
let searchBar = document.getElementById("searchBar");
|
||||||
let pathBar = document.getElementById("pathBar");
|
let pathBar = document.getElementById("pathBar");
|
||||||
@ -49,6 +51,23 @@ $.jsonPost("i").then(resp => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function handleTreeClick (tree) {
|
||||||
|
return (event, node, handler) => {
|
||||||
|
event.preventTreeDefault();
|
||||||
|
|
||||||
|
if (node.id === "any") {
|
||||||
|
if (!node.itree.state.checked) {
|
||||||
|
tree.deselect();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
tree.node("any").deselect();
|
||||||
|
}
|
||||||
|
|
||||||
|
handler();
|
||||||
|
searchDebounced();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$.jsonPost("es", {
|
$.jsonPost("es", {
|
||||||
aggs: {
|
aggs: {
|
||||||
mimeTypes: {
|
mimeTypes: {
|
||||||
@ -85,34 +104,86 @@ $.jsonPost("es", {
|
|||||||
});
|
});
|
||||||
mimeMap.push({"text": "All", "id": "any"});
|
mimeMap.push({"text": "All", "id": "any"});
|
||||||
|
|
||||||
tree = new InspireTree({
|
mimeTree = new InspireTree({
|
||||||
selection: {
|
selection: {
|
||||||
mode: 'checkbox'
|
mode: 'checkbox'
|
||||||
},
|
},
|
||||||
data: mimeMap
|
data: mimeMap
|
||||||
});
|
});
|
||||||
new InspireTreeDOM(tree, {
|
new InspireTreeDOM(mimeTree, {
|
||||||
target: '.tree'
|
target: '#mimeTree'
|
||||||
});
|
});
|
||||||
tree.on("node.click", function (event, node, handler) {
|
mimeTree.on("node.click", handleTreeClick(mimeTree));
|
||||||
event.preventTreeDefault();
|
mimeTree.select();
|
||||||
|
mimeTree.node("any").deselect();
|
||||||
|
});
|
||||||
|
|
||||||
if (node.id === "any") {
|
function leafTag(tag) {
|
||||||
if (!node.itree.state.checked) {
|
const tokens = tag.split(".");
|
||||||
tree.deselect();
|
return tokens[tokens.length-1]
|
||||||
|
}
|
||||||
|
|
||||||
|
// Tags tree
|
||||||
|
$.jsonPost("es", {
|
||||||
|
aggs: {
|
||||||
|
tags: {
|
||||||
|
terms: {
|
||||||
|
field: "tag",
|
||||||
|
size: 10000
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
tree.node("any").deselect();
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
handler();
|
size: 0,
|
||||||
searchDebounced();
|
}).then(resp => {
|
||||||
|
resp["aggregations"]["tags"]["buckets"]
|
||||||
|
.sort((a, b) => a["key"].localeCompare(b["key"]))
|
||||||
|
.forEach(bucket => {
|
||||||
|
addTag(tagMap, bucket["key"], bucket["key"], bucket["doc_count"])
|
||||||
});
|
});
|
||||||
tree.select();
|
|
||||||
tree.node("any").deselect();
|
tagMap.push({"text": "All", "id": "any"});
|
||||||
|
tagTree = new InspireTree({
|
||||||
|
selection: {
|
||||||
|
mode: 'checkbox'
|
||||||
|
},
|
||||||
|
data: tagMap
|
||||||
|
});
|
||||||
|
new InspireTreeDOM(tagTree, {
|
||||||
|
target: '#tagTree'
|
||||||
|
});
|
||||||
|
tagTree.on("node.click", handleTreeClick(tagTree));
|
||||||
|
tagTree.node("any").select();
|
||||||
searchBusy = false;
|
searchBusy = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function addTag(map, tag, id, count) {
|
||||||
|
let tags = tag.split("#")[0].split(".");
|
||||||
|
|
||||||
|
let child = {
|
||||||
|
id: id,
|
||||||
|
text: tags.length !== 1 ? tags[0] : `${tags[0]} (${count})`,
|
||||||
|
children: []
|
||||||
|
};
|
||||||
|
|
||||||
|
let found = false;
|
||||||
|
map.forEach(node => {
|
||||||
|
if (node.text === child.text) {
|
||||||
|
found = true;
|
||||||
|
if (tags.length !== 1) {
|
||||||
|
addTag(node.children, tags.slice(1).join("."), id, count);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (!found) {
|
||||||
|
if (tags.length !== 1) {
|
||||||
|
addTag(child.children, tags.slice(1).join("."), id, count);
|
||||||
|
map.push(child);
|
||||||
|
} else {
|
||||||
|
map.push(child);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
new autoComplete({
|
new autoComplete({
|
||||||
selector: '#pathBar',
|
selector: '#pathBar',
|
||||||
minChars: 1,
|
minChars: 1,
|
||||||
@ -181,8 +252,8 @@ function doScroll() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSelectedMimeTypes() {
|
function getSelectedNodes(tree) {
|
||||||
let mimeTypes = [];
|
let selectedNodes = [];
|
||||||
|
|
||||||
let selected = tree.selected();
|
let selected = tree.selected();
|
||||||
|
|
||||||
@ -194,11 +265,11 @@ function getSelectedMimeTypes() {
|
|||||||
|
|
||||||
//Only get children
|
//Only get children
|
||||||
if (selected[i].text.indexOf("(") !== -1) {
|
if (selected[i].text.indexOf("(") !== -1) {
|
||||||
mimeTypes.push(selected[i].id);
|
selectedNodes.push(selected[i].id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return mimeTypes
|
return selectedNodes
|
||||||
}
|
}
|
||||||
|
|
||||||
function search() {
|
function search() {
|
||||||
@ -239,11 +310,16 @@ function search() {
|
|||||||
if (path !== "") {
|
if (path !== "") {
|
||||||
filters.push([{term: {path: path}}])
|
filters.push([{term: {path: path}}])
|
||||||
}
|
}
|
||||||
let mimeTypes = getSelectedMimeTypes();
|
let mimeTypes = getSelectedNodes(mimeTree);
|
||||||
if (!mimeTypes.includes("any")) {
|
if (!mimeTypes.includes("any")) {
|
||||||
filters.push([{terms: {"mime": mimeTypes}}]);
|
filters.push([{terms: {"mime": mimeTypes}}]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let tags = getSelectedNodes(tagTree);
|
||||||
|
if (!tags.includes("any")) {
|
||||||
|
filters.push([{terms: {"tag": tags}}]);
|
||||||
|
}
|
||||||
|
|
||||||
$.jsonPost("es?scroll=1", {
|
$.jsonPost("es?scroll=1", {
|
||||||
"_source": {
|
"_source": {
|
||||||
excludes: ["content"]
|
excludes: ["content"]
|
||||||
|
@ -43,9 +43,9 @@ function humanTime(sec_num) {
|
|||||||
|
|
||||||
function debounce(func, wait) {
|
function debounce(func, wait) {
|
||||||
let timeout;
|
let timeout;
|
||||||
return function() {
|
return function () {
|
||||||
let context = this, args = arguments;
|
let context = this, args = arguments;
|
||||||
let later = function() {
|
let later = function () {
|
||||||
timeout = null;
|
timeout = null;
|
||||||
func.apply(context, args);
|
func.apply(context, args);
|
||||||
};
|
};
|
||||||
@ -54,3 +54,13 @@ function debounce(func, wait) {
|
|||||||
func.apply(context, args);
|
func.apply(context, args);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function lum(c) {
|
||||||
|
c = c.substring(1);
|
||||||
|
let rgb = parseInt(c, 16);
|
||||||
|
let r = (rgb >> 16) & 0xff;
|
||||||
|
let g = (rgb >> 8) & 0xff;
|
||||||
|
let b = (rgb >> 0) & 0xff;
|
||||||
|
|
||||||
|
return 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
||||||
|
}
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<div class="input-group-text">
|
<div class="input-group-text">
|
||||||
<span onclick="document.getElementById('fuzzyToggle').click()">Fuzzy </span>
|
<span title="Toggle fuzzy searching" onclick="document.getElementById('fuzzyToggle').click()">Fuzzy </span>
|
||||||
<input title="Toggle fuzzy searching" type="checkbox" id="fuzzyToggle"
|
<input title="Toggle fuzzy searching" type="checkbox" id="fuzzyToggle"
|
||||||
onclick="toggleFuzzy()" checked>
|
onclick="toggleFuzzy()" checked>
|
||||||
</div>
|
</div>
|
||||||
@ -42,10 +42,24 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<label>Mime types</label>
|
<ul class="nav nav-tabs" role="tablist">
|
||||||
|
<li class="nav-item">
|
||||||
<div class="tree"></div>
|
<a class="nav-link active" data-toggle="tab" href="#mime" role="tab" aria-controls="home" aria-selected="true">Mime Types</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" data-toggle="tab" href="#tag" role="tab" aria-controls="profile" aria-selected="false" title="User-defined tags">Tags</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="tab-content" id="myTabContent">
|
||||||
|
<div class="tab-pane fade show active" id="mime" role="tabpanel" aria-labelledby="home-tab">
|
||||||
|
<div id="mimeTree" class="tree"></div>
|
||||||
|
</div>
|
||||||
|
<div class="tab-pane fade" id="tag" role="tabpanel" aria-labelledby="profile-tab">
|
||||||
|
<div id="tagTree" class="tree"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user