Loading...
dotfiles
Plaque
default-project
dotfiles
Create New Project
dotfiles
Plaque
default-project
dotfiles
Create New Project
/
Read-Only
Read-Only Mode
Visitor Mode
readonly-visitor
Read-only mode. You can browse and navigate but editing is disabled. Sign up for full access.
2 CPU
8 GB
1 hour
Sign Up (Free)
Sign In
End Visitor Session
Sign in
Sign up
Toggle Theme
Server Status
Keyboard Shortcuts
Read-Only Mode
Workspace
Chat
Console
Files
Profile
Settings
Sign Out
SciTeX
dotfiles
Ask anything about Scientific Research
Write
Analyze
Code
Literature
Console
Console
Chat
Ask anything about Scientific Research.
I can take actions: stats, plots, literature, and your current work.
LLM Model
STT Model
MCP Tools
--
Loading...
MCP Settings
AI Providers
Claude Code Auto-Accept Mode
Interval
1s (fast)
1.5s
2s
3s (slow)
Safety
Conservative (read-only)
Normal (most commands)
Aggressive (all commands)
Auto-Response Commands
Waiting
Y/N
1 (Allow)
2 (Deny)
Y/Y/N
1 (Allow once)
2 (Allow always)
3 (Deny)
Agent Sources
Loading...
Files
readonly-visitor/dotfiles
Recent
Viewer
Viewer
No file selected
Open a file from the Files tab to view it here
readonly-visitor
/
Plaque
/
scitex
/
writer
/
tests
/
shell
/
modules
/
test_merge_bibliographies.sh
Edit test_merge_bibliographies.sh
#!/bin/bash # -*- coding: utf-8 -*- # Test file for: merge_bibliographies.sh THIS_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" ROOT_DIR="$(realpath "$THIS_DIR/../..")" # Test counter TESTS_RUN=0 TESTS_PASSED=0 TESTS_FAILED=0 # Colors GREEN='\033[0;32m' RED='\033[0;31m' NC='\033[0m' assert_success() { local cmd="$1" local desc="${2:-$cmd}" ((TESTS_RUN++)) if eval "$cmd" > /dev/null 2>&1; then echo -e "${GREEN}✓${NC} $desc" ((TESTS_PASSED++)) else echo -e "${RED}✗${NC} $desc" ((TESTS_FAILED++)) fi } assert_file_exists() { local file="$1" ((TESTS_RUN++)) if [ -f "$file" ]; then echo -e "${GREEN}✓${NC} File exists: $file" ((TESTS_PASSED++)) else echo -e "${RED}✗${NC} File missing: $file" ((TESTS_FAILED++)) fi } # Add your tests here test_placeholder() { echo "TODO: Add tests for merge_bibliographies.sh" } # Run tests main() { echo "Testing: merge_bibliographies.sh" echo "========================================" test_placeholder echo "========================================" echo "Results: $TESTS_PASSED/$TESTS_RUN passed" [ $TESTS_FAILED -gt 0 ] && exit 1 exit 0 } main "$@" # -------------------------------------------------------------------------------- # Start of Source Code from: /home/ywatanabe/proj/scitex-writer/scripts/shell/modules/merge_bibliographies.sh # -------------------------------------------------------------------------------- # #!/bin/bash # # -*- coding: utf-8 -*- # # Timestamp: "2025-11-10 00:00:00 (ywatanabe)" # # File: ./scripts/shell/modules/merge_bibliographies.sh # # # ============================================================================ # # Merge Multiple Bibliography Files # # ============================================================================ # # This script checks if multiple .bib files exist in 00_shared/bib_files/ # # and merges them into a single bibliography.bib file with deduplication. # # # # Features: # # - Smart deduplication by DOI and title+year # # - Hash-based caching (skips merge if files unchanged) # # - Automatic during compilation # # # # Usage: # # source ./scripts/shell/modules/merge_bibliographies.sh # # ============================================================================ # # BIB_DIR="./00_shared/bib_files" # BIB_OUTPUT="bibliography.bib" # MERGE_SCRIPT="./scripts/python/merge_bibliographies.py" # # # Count .bib files excluding the output file # bib_file_count=$(find "$BIB_DIR" -maxdepth 1 -name "*.bib" ! -name "$BIB_OUTPUT" -type f 2>/dev/null | wc -l) # # if [ "$bib_file_count" -gt 0 ]; then # # Multiple .bib files exist - merge them # if [ -f "$MERGE_SCRIPT" ]; then # python3 "$MERGE_SCRIPT" "$BIB_DIR" -o "$BIB_OUTPUT" -q # else # echo_warning "Multiple .bib files found but merge script missing: $MERGE_SCRIPT" # echo_warning "Skipping bibliography merge" # fi # elif [ "$bib_file_count" -eq 0 ]; then # # No separate .bib files, check if main bibliography.bib exists # if [ ! -f "$BIB_DIR/$BIB_OUTPUT" ]; then # echo_warning "No bibliography files found in $BIB_DIR" # fi # fi # # # EOF # -------------------------------------------------------------------------------- # End of Source Code from: /home/ywatanabe/proj/scitex-writer/scripts/shell/modules/merge_bibliographies.sh # --------------------------------------------------------------------------------