Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
henkvancann committed Oct 6, 2023
2 parents a28c08b + 5617e66 commit 8f8377a
Show file tree
Hide file tree
Showing 15 changed files with 434 additions and 122 deletions.
5 changes: 4 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,7 @@ TERMS_WOT_MANAGE_JSON_FILE_NAME="overview.json"

# CARBON COPIES DIRECTORY
CARBON_COPIES_INPUT_DIR="./static/json/externalContentMetaData.json"
CARBON_COPIES_OUTPUT_DIR="./docs/08_carbon-copies/"
CARBON_COPIES_OUTPUT_DIR="./docs/08_carbon-copies/"

# OVERVIEW DIRECTORY
OVERVIEW_DIR="./docs/02_overview/"
70 changes: 55 additions & 15 deletions docs/02_overview/indexed-in-KERISSE.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/02_overview/overview-and-context.mdx

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions docs/06_concepts/how-to/create-a-basic-acdc-graph.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Create a basic ACDC graph

Lorem ipsum
3 changes: 3 additions & 0 deletions docs/06_concepts/how-to/current-open-issues.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Current open issues

Lorem ipsum
3 changes: 3 additions & 0 deletions docs/06_concepts/how-to/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Intro

Lorem ipsum
3 changes: 3 additions & 0 deletions docs/06_concepts/how-to/issue-a-credential.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Issue a credential

Lorem ipsum
3 changes: 3 additions & 0 deletions docs/06_concepts/how-to/make-a-schema.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Make a schema

Lorem ipsum
3 changes: 3 additions & 0 deletions docs/06_concepts/how-to/present-a-credential.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Present a credential

Lorem ipsum
3 changes: 3 additions & 0 deletions docs/06_concepts/how-to/set-up-basic-keri-network.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Set up a basic KERI network

Lorem ipsum
3 changes: 3 additions & 0 deletions docs/06_concepts/how-to/verify-a-credential.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Verify a credential

Lorem ipsum
53 changes: 32 additions & 21 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,29 +110,40 @@ const config = {
label: 'For contributors to this website',
},
{
type: 'doc',
docId: 'concepts/how-to',
to: 'docs/concepts/how-to/intro',
label: 'How to',
position: 'left',
label: 'How-to',
items: [
{
to: 'docs/concepts/how-to/set-up-basic-keri-network',
label: 'Set up a basic KERI network'
},
{
to: 'docs/concepts/how-to/create-a-basic-acdc-graph',
label: 'Create a basic ACDC graph'
},
{
to: 'docs/concepts/how-to/make-a-schema',
label: 'Make a schema'
},
{
to: 'docs/concepts/how-to/issue-a-credential',
label: 'Issue a credential'
},
{
to: 'docs/concepts/how-to/present-a-credential',
label: 'Present a credential'
},
{
to: 'docs/concepts/how-to/verify-a-credential',
label: 'Verify a credential'
},
{
to: 'docs/concepts/how-to/current-open-issues',
label: 'Current open issues'
}
],
},
// {
// to: '/visualisations',
// label: 'Visualisations',
// position: 'left',
// items: [
// {
// to: 'https://weboftrust.github.io/WOT-terms/visualisations/WebOfTrust/index.htm',
// label: 'Connections in repo`s of WebOfTrust',
// target: '_self',
// }
// ],
// },
// {
// href: 'https://weboftrust.github.io/WOT-terms/glossary.html',
// label: 'Glossary',
// position: 'left',
// target: '_self',
// },
{
href: '/feedback',
label: 'Feedback',
Expand Down
15 changes: 6 additions & 9 deletions search-index-typesense/backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
# Author: Kor Dwarshuis
# Created: 2023-08-11
# Updated: -
# Description: This script backups three directories from the search-index-typesense directory to a timestamped directory in the KERISSE_BACKUPS_DIR directory. It also empties the original directories. The name of the directory containing the backups is the timestamp of the backup.

# Logger generates a log file with a timestamp and from which file the message comes from.
source ./search-index-typesense/logger.sh
# Description: This script backups directories related to scraping and indexing in Typesense to a timestamped directory in the KERISSE_BACKUPS_DIR directory. The name of the directory containing the backups is the timestamp of the backup.

# Load environment variables from .env file
source .env

# Logger generates a log file with a timestamp and from which file the message comes from.
source ./${SEARCH_INDEX_DIR}/logger.sh

# Check if KERISSE_BACKUPS_DIR is set
if [ -z "$KERISSE_BACKUPS_DIR" ]; then
setLogFile "error.log"
Expand All @@ -28,13 +28,10 @@ BACKUP_DIR="${KERISSE_BACKUPS_DIR}${TIMESTAMP}"
mkdir -p "$BACKUP_DIR"

# List of directories to backup
declare -a dirsToBackup=("logs" "search-index-entries" "sitemaps")

# Base directory
BASE_DIR="search-index-typesense"
declare -a dirsToBackup=("${SEARCH_INDEX_DIR}/logs" "${SEARCH_INDEX_DIR}/search-index-entries" "${SEARCH_INDEX_DIR}/sitemaps" "docs/${OVERVIEW_DIR}")

for dir in "${dirsToBackup[@]}"; do
SOURCE_DIR="${BASE_DIR}/${dir}"
SOURCE_DIR="${dir}"
if [ -d "$SOURCE_DIR" ]; then
# Copy directory to backup location
cp -r "$SOURCE_DIR" "$BACKUP_DIR"
Expand Down
134 changes: 67 additions & 67 deletions search-index-typesense/scrape-start-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,72 +11,72 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"



#########################
# PREPARING
#########################
# #########################
# # PREPARING
# #########################

# Prepare file system.
source "$SCRIPT_DIR/prepare_file_system.sh"
setLogFile "success.log"
log "Preparing file system finished"
# # Prepare file system.
# source "$SCRIPT_DIR/prepare_file_system.sh"
# setLogFile "success.log"
# log "Preparing file system finished"

# Copy handmade stuff.
source "$SCRIPT_DIR/copy_manual_files.sh"
setLogFile "success.log"
log "Copying manual files finished"
# # Copy handmade stuff.
# source "$SCRIPT_DIR/copy_manual_files.sh"
# setLogFile "success.log"
# log "Copying manual files finished"

# Create sitemaps.
source "$SCRIPT_DIR/create_sitemaps-test.sh"
setLogFile "success.log"
log "Creating sitemaps finished"
# # Create sitemaps.
# source "$SCRIPT_DIR/create_sitemaps-test.sh"
# setLogFile "success.log"
# log "Creating sitemaps finished"

# Remove unwanted urls from the sitemaps (new sitemaps generated or not)
node "$SCRIPT_DIR/removeURLsFromSitemap.mjs"
setLogFile "success.log"
log "Extracting data finished"
# # Remove unwanted urls from the sitemaps (new sitemaps generated or not)
# node "$SCRIPT_DIR/removeURLsFromSitemap.mjs"
# setLogFile "success.log"
# log "Extracting data finished"


# Filenames to lowercase.
node "$SCRIPT_DIR/renameFilesToLowerCase.mjs" search-index-typesense/sitemaps
setLogFile "success.log"
log "Renaming files to lowercase finished"
# # Filenames to lowercase.
# node "$SCRIPT_DIR/renameFilesToLowerCase.mjs" search-index-typesense/sitemaps
# setLogFile "success.log"
# log "Renaming files to lowercase finished"



#########################
# START SCRAPING
#########################
# #########################
# # START SCRAPING
# #########################

# Scrape the websites.
node "$SCRIPT_DIR/extractData-test.mjs"
setLogFile "success.log"
log "Extracting data finished"
# # Scrape the websites.
# node "$SCRIPT_DIR/extractData-test.mjs"
# setLogFile "success.log"
# log "Extracting data finished"

# Split the content.jsonl file into multiple files so the size is optimal for Typesense.
node "$SCRIPT_DIR/splitContentJSONL.mjs"
setLogFile "success.log"
log "Splitting content finished"
# # Split the content.jsonl file into multiple files so the size is optimal for Typesense.
# node "$SCRIPT_DIR/splitContentJSONL.mjs"
# setLogFile "success.log"
# log "Splitting content finished"

# Count the total number of lines in all .jsonl files and write it to log dir.
node "$SCRIPT_DIR/countLinesInJsonlFiles.mjs"
setLogFile "success.log"
log "Counting number of lines finished"
# # Count the total number of lines in all .jsonl files and write it to log dir.
# node "$SCRIPT_DIR/countLinesInJsonlFiles.mjs"
# setLogFile "success.log"
# log "Counting number of lines finished"

# Sort and style the index file.
node "$SCRIPT_DIR/sortAndStyleScrapedIndex.mjs" "$INDEX_OVERVIEW_FILE"
setLogFile "success.log"
log "Sorting and styling index file finished"
# # Sort and style the index file.
# node "$SCRIPT_DIR/sortAndStyleScrapedIndex.mjs" "$INDEX_OVERVIEW_FILE"
# setLogFile "success.log"
# log "Sorting and styling index file finished"



#########################
# BACKING UP
#########################
# #########################
# # BACKING UP
# #########################

# # Export the data from Typesense to the downloads dir.
# source "$SCRIPT_DIR/export.sh"
# setLogFile "success.log"
# log "Exporting data finished"
# # # Export the data from Typesense to the downloads dir.
# # source "$SCRIPT_DIR/export.sh"
# # setLogFile "success.log"
# # log "Exporting data finished"

# Backup output (scrape results, handmade stuff, sitemaps etc).
source "$SCRIPT_DIR/backup.sh"
Expand All @@ -85,25 +85,25 @@ log "Backup finished"



# #########################
# # IMPORTING INTO TYPESENSE CLOUD Open Source Search
# #########################
# # #########################
# # # IMPORTING INTO TYPESENSE CLOUD Open Source Search
# # #########################

# # Make collection in Typesense empty.
# source "$SCRIPT_DIR/make_collection_empty.sh"
# setLogFile "success.log"
# log "Making collection empty finished"
# # # Make collection in Typesense empty.
# # source "$SCRIPT_DIR/make_collection_empty.sh"
# # setLogFile "success.log"
# # log "Making collection empty finished"

# # Import the data into Typesense.
# source "$SCRIPT_DIR/import.sh"
# setLogFile "success.log"
# log "Importing data finished"
# # # Import the data into Typesense.
# # source "$SCRIPT_DIR/import.sh"
# # setLogFile "success.log"
# # log "Importing data finished"

# # Import overrides into Typesense.
# source "$SCRIPT_DIR/overrides.sh"
# setLogFile "success.log"
# log "Importing overrides finished"
# # # Import overrides into Typesense.
# # source "$SCRIPT_DIR/overrides.sh"
# # setLogFile "success.log"
# # log "Importing overrides finished"

# #########################
# # END
# #########################
# # #########################
# # # END
# # #########################
Loading

0 comments on commit 8f8377a

Please sign in to comment.