Skip to content

web search done right

Added license to source code files

Mikkel Denker7eb4ea84dce7
diff --git a/README.md b/README.md
new file mode 100644
index 00000000..d48dfe64
--- /dev/null
+++ b/README.md
@@ -0,0 +1,8 @@
+# Cuely
+Work in progress.
+
+## License
+Cuely is offered under the terms defined under the [LICENSE.md](LICENES.md) file.
+
+## Contact
+You can contact us at [[email protected]](mailto:[email protected]) or in our [Discord server](https://discord.gg/BmzKHffWJM).
\ No newline at end of file
diff --git a/src/bin/cuely.rs b/src/bin/cuely.rs
index bf329a5f..a0812962 100644
--- a/src/bin/cuely.rs
+++ b/src/bin/cuely.rs
@@ -1,3 +1,20 @@
+/*
+ * Cuely is an open source web search engine.
+ * Copyright (C) 2022 Cuely ApS
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
use cuely::{Config, Indexer, Mode};
use std::fs;
diff --git a/src/indexer.rs b/src/indexer.rs
index 366cb8d3..14cf0a2f 100644
--- a/src/indexer.rs
+++ b/src/indexer.rs
@@ -1,3 +1,20 @@
+/*
+ * Cuely is an open source web search engine.
+ * Copyright (C) 2022 Cuely ApS
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
use futures::prelude::*;
use indicatif::{ProgressBar, ProgressIterator, ProgressStyle};
use rusoto_core::Region;
@@ -6,7 +23,7 @@ use std::fs::File;
use std::io::{self, BufRead};
use tokio::io::AsyncReadExt;
-use crate::warc::{WarcFile};
+use crate::warc::WarcFile;
use crate::webpage::Html;
use crate::{Config, Error, Result, WarcSource};
diff --git a/src/lib.rs b/src/lib.rs
index 22130caf..7588386f 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,3 +1,20 @@
+/*
+ * Cuely is an open source web search engine.
+ * Copyright (C) 2022 Cuely ApS
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
use serde::Deserialize;
use std::io;
use std::num::ParseIntError;
diff --git a/src/query.rs b/src/query.rs
index a0d80dda..4be3a5b2 100644
--- a/src/query.rs
+++ b/src/query.rs
@@ -1,3 +1,20 @@
+/*
+ * Cuely is an open source web search engine.
+ * Copyright (C) 2022 Cuely ApS
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
use crate::{Error, Result};
use nom::{
bytes::complete::{tag, take_while},
diff --git a/src/ranking.rs b/src/ranking.rs
index b414e9f7..2d26c8f7 100644
--- a/src/ranking.rs
+++ b/src/ranking.rs
@@ -1,3 +1,20 @@
+/*
+ * Cuely is an open source web search engine.
+ * Copyright (C) 2022 Cuely ApS
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
use crate::schema::Field;
use tantivy::fastfield::FastFieldReader;
use tantivy::{
@@ -25,7 +42,7 @@ pub(crate) fn initial_collector() -> impl Collector<Fruit = Vec<(f64, tantivy::D
#[cfg(test)]
mod tests {
-
+
use crate::{
query::Query,
search_index::Index,
diff --git a/src/schema.rs b/src/schema.rs
index df31d75f..f13f2cbe 100644
--- a/src/schema.rs
+++ b/src/schema.rs
@@ -1,3 +1,20 @@
+/*
+ * Cuely is an open source web search engine.
+ * Copyright (C) 2022 Cuely ApS
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
use tantivy::schema::{
Cardinality, IndexRecordOption, NumericOptions, TextFieldIndexing, TextOptions,
};
diff --git a/src/search_index.rs b/src/search_index.rs
index 9fe533f9..a27b6721 100644
--- a/src/search_index.rs
+++ b/src/search_index.rs
@@ -1,3 +1,20 @@
+/*
+ * Cuely is an open source web search engine.
+ * Copyright (C) 2022 Cuely ApS
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
use tantivy::collector::Count;
use tantivy::{DocAddress, Document, LeasedItem, Searcher};
diff --git a/src/warc.rs b/src/warc.rs
index 1cd376e3..37b62a6f 100644
--- a/src/warc.rs
+++ b/src/warc.rs
@@ -1,3 +1,20 @@
+/*
+ * Cuely is an open source web search engine.
+ * Copyright (C) 2022 Cuely ApS
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
use crate::{Error, Result};
use std::collections::BTreeMap;
use std::io::{BufRead, BufReader, Read};
diff --git a/src/webpage.rs b/src/webpage.rs
index a26d9f32..2a515ba8 100644
--- a/src/webpage.rs
+++ b/src/webpage.rs
@@ -1,3 +1,20 @@
+/*
+ * Cuely is an open source web search engine.
+ * Copyright (C) 2022 Cuely ApS
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
use crate::{Error, Result};
use itertools::Itertools;
use scraper::Html as ScraperHtml;