Skip to content

Instantly share code, notes, and snippets.

View norandom's full-sized avatar
💭
/dev/norandom

Marius Ciepluch norandom

💭
/dev/norandom
View GitHub Profile
@norandom
norandom / upload_single_batch_of_pdfs_to_ragflow.sh
Last active July 8, 2025 11:02
Upload a batch of PDFs to RAGflow via Bash
#!/bin/bash
# Check for jq and install if not found
if ! command -v jq &> /dev/null
then
echo "jq could not be found, attempting to install."
if [ -f /etc/os-release ]; then
. /etc/os-release
if [ "$ID" = "ubuntu" ] || [ "$ID" = "debian" ]; then
sudo apt-get update && sudo apt-get install -y jq
@norandom
norandom / upload_multiple_batches_of_pdfs_to_ragflow.sh
Last active July 8, 2025 11:01
Upload multiple batches of PDFs to RAGflow via Bash
#!/bin/bash
# Check for jq and install if not found
if ! command -v jq &> /dev/null
then
echo "jq could not be found, attempting to install."
if [ -f /etc/os-release ]; then
. /etc/os-release
if [ "$ID" = "ubuntu" ] || [ "$ID" = "debian" ]; then
sudo apt-get update && sudo apt-get install -y jq
@norandom
norandom / crawl_documentation_zscaler.py
Created July 8, 2025 10:51
Crawl4AI Markdown scraper for documentation dataset generation (Zscaler)
import asyncio
import os
from urllib.parse import urlparse
from pathlib import Path
from crawl4ai import AsyncWebCrawler, CrawlerRunConfig
from crawl4ai.deep_crawling import BestFirstCrawlingStrategy
from crawl4ai.deep_crawling.scorers import KeywordRelevanceScorer
from crawl4ai.markdown_generation_strategy import DefaultMarkdownGenerator
from crawl4ai.deep_crawling.filters import FilterChain
#!/bin/bash
# Script to combine all markdown files in each folder into one file per folder
# Usage: ./combine_markdown.sh [base_directory]
BASE_DIR="${1:-crawled_docs}"
OUTPUT_DIR="combined_docs"
if [ ! -d "$BASE_DIR" ]; then
echo "Error: Directory $BASE_DIR does not exist"
@norandom
norandom / upload_markdown_to_ragflow.sh
Created July 8, 2025 10:56
Upload Markdown files to RAGflow for parsing (Collection)
#!/bin/bash
# Check for jq and install if not found
if ! command -v jq &> /dev/null
then
echo "jq could not be found, attempting to install."
if [ -f /etc/os-release ]; then
. /etc/os-release
if [ "$ID" = "ubuntu" ] || [ "$ID" = "debian" ]; then
sudo apt-get update && sudo apt-get install -y jq