Skip to content

Commit ef1f289

Browse files
committed
feat: Add cobol-source folder in root and update all references
- Create cobol-source/ directory in root as static folder for COBOL files - Add cobol-source/.gitkeep to preserve directory in git - Update all documentation to reference cobol-source/ instead of source/ - Update doctor.sh commands to use ./cobol-source - Update .gitignore to ignore cobol-source/* (except .gitkeep) - Update default COBOL_SOURCE_FOLDER config to 'cobol-source' - Keep backward compatibility with source/ folder
1 parent 284c5e6 commit ef1f289

File tree

6 files changed

+22
-18
lines changed

6 files changed

+22
-18
lines changed

.devcontainer/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,10 @@ Once running, access these URLs:
152152
├── Data/ # SQLite database
153153
│ └── migration.db # Migration metadata
154154
├── Logs/ # Migration logs
155-
├── cobol-source/ # Input COBOL files
156-
├── java-output/ # Generated Java code
155+
├── cobol-source/ # Input COBOL files (YOUR COBOL FILES GO HERE)
156+
├── output/
157+
│ ├── java-output/ # Generated Java code
158+
│ └── dotnet-output/ # Generated .NET code
157159
├── McpChatWeb/ # Web portal project
158160
│ └── wwwroot/ # Frontend files
159161
├── Config/ # Configuration files

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ Config/appsettings.secrets.json
8181
# =============================================================================
8282

8383
# COBOL Source Files (Contains proprietary business logic)
84+
cobol-source/*
85+
!cobol-source/.gitkeep
8486
source/*
8587
!source/.gitkeep
8688
cobol-files/

QUICK_START.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ Now that you're set up, explore these areas:
308308

309309
1. **Run a Full Migration:**
310310
```bash
311-
# Place COBOL files in source/
311+
# Place COBOL files in cobol-source/
312312
./doctor.sh run
313313
```
314314

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ dotnet run conversation
622622
## Step-by-Step Guide
623623

624624
1. **Configure:** `cp Config/ai-config.local.env.example Config/ai-config.local.env` → Add Azure OpenAI endpoint, API key, deployment name
625-
2. **Add COBOL files:** `cp your-files/* ./source/`
625+
2. **Add COBOL files:** `cp your-files/* ./cobol-source/`
626626
3. **Run:** `./doctor.sh run` - Analyzes, converts, launches portal at http://localhost:5250
627627
4. **Explore:** Use portal UI (chat, graph) or connect MCP clients (Claude, Cursor)
628628
5. **Query data:** SQLite (`Data/migration.db`), Neo4j (http://localhost:7474), or MCP API

cobol-source/.gitkeep

Whitespace-only changes.

doctor.sh

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -610,8 +610,8 @@ run_test() {
610610
# Check source folders
611611
echo ""
612612
echo "Checking source folders..."
613-
cobol_files=$(find "$REPO_ROOT/source" -name "*.cbl" 2>/dev/null | wc -l)
614-
copybook_files=$(find "$REPO_ROOT/source" -name "*.cpy" 2>/dev/null | wc -l)
613+
cobol_files=$(find "$REPO_ROOT/cobol-source" -name "*.cbl" 2>/dev/null | wc -l)
614+
copybook_files=$(find "$REPO_ROOT/cobol-source" -name "*.cpy" 2>/dev/null | wc -l)
615615
total_files=$((cobol_files + copybook_files))
616616

617617
if [ "$total_files" -gt 0 ]; then
@@ -623,7 +623,7 @@ run_test() {
623623
fi
624624
else
625625
echo -e "${YELLOW}⚠️ No COBOL files or copybooks found in source directory${NC}"
626-
echo " Add your COBOL files to ./source/ to test migration"
626+
echo " Add your COBOL files to ./cobol-source/ to test migration"
627627
fi
628628

629629
# Check output directories
@@ -681,14 +681,14 @@ run_test() {
681681
echo ""
682682
echo "Migration Options:"
683683
echo " Standard: ./doctor.sh run"
684-
echo " Reverse Engineer: dotnet run reverse-engineer --source ./source"
685-
echo " Full Migration: dotnet run -- --source ./source"
684+
echo " Reverse Engineer: dotnet run reverse-engineer --source ./cobol-source"
685+
echo " Full Migration: dotnet run -- --source ./cobol-source"
686686
echo ""
687687
if [ $re_components -eq $re_components_total ]; then
688688
echo "Reverse Engineering Available:"
689689
echo " Extract business logic from COBOL before migration"
690690
echo " Generate documentation in markdown format"
691-
echo " Run: dotnet run reverse-engineer --source ./source"
691+
echo " Run: dotnet run reverse-engineer --source ./cobol-source"
692692
echo ""
693693
fi
694694
if [ "$total_files" -gt 0 ]; then
@@ -750,7 +750,7 @@ run_migration() {
750750
fi
751751

752752
# Run the application with updated folder structure
753-
"$DOTNET_CMD" run -- --source ./source $skip_reverse_eng
753+
"$DOTNET_CMD" run -- --source ./cobol-source $skip_reverse_eng
754754
local migration_exit=$?
755755

756756
if [[ $migration_exit -ne 0 ]]; then
@@ -802,7 +802,7 @@ run_resume() {
802802
fi
803803

804804
# Run with resume logic
805-
"$DOTNET_CMD" run -- --source ./source --resume
805+
"$DOTNET_CMD" run -- --source ./cobol-source --resume
806806
}
807807

808808
# Function to monitor migration
@@ -969,12 +969,12 @@ run_reverse_engineering() {
969969
echo ""
970970

971971
# Check for COBOL files
972-
cobol_count=$(find "$REPO_ROOT/source" -name "*.cbl" 2>/dev/null | wc -l)
973-
copybook_count=$(find "$REPO_ROOT/source" -name "*.cpy" 2>/dev/null | wc -l)
972+
cobol_count=$(find "$REPO_ROOT/cobol-source" -name "*.cbl" 2>/dev/null | wc -l)
973+
copybook_count=$(find "$REPO_ROOT/cobol-source" -name "*.cpy" 2>/dev/null | wc -l)
974974
total_count=$((cobol_count + copybook_count))
975975

976976
if [ "$total_count" -eq 0 ]; then
977-
echo -e "${YELLOW}⚠️ No COBOL files or copybooks found in ./source/${NC}"
977+
echo -e "${YELLOW}⚠️ No COBOL files or copybooks found in ./cobol-source/${NC}"
978978
echo "Add COBOL files to analyze and try again."
979979
return 1
980980
fi
@@ -988,7 +988,7 @@ run_reverse_engineering() {
988988
echo ""
989989

990990
# Run the reverse engineering command
991-
"$DOTNET_CMD" run reverse-engineer --source ./source
991+
"$DOTNET_CMD" run reverse-engineer --source ./cobol-source
992992

993993
local exit_code=$?
994994

@@ -1040,7 +1040,7 @@ run_conversion_only() {
10401040
echo ""
10411041

10421042
# Run the application with skip-reverse-engineering flag
1043-
"$DOTNET_CMD" run -- --source ./source --skip-reverse-engineering
1043+
"$DOTNET_CMD" run -- --source ./cobol-source --skip-reverse-engineering
10441044
local migration_exit=$?
10451045

10461046
if [[ $migration_exit -ne 0 ]]; then
@@ -1069,7 +1069,7 @@ run_conversion_only() {
10691069
# Main command routing
10701070
main() {
10711071
# Create required directories if they don't exist
1072-
mkdir -p "$REPO_ROOT/source" "$REPO_ROOT/output" "$REPO_ROOT/Logs"
1072+
mkdir -p "$REPO_ROOT/cobol-source" "$REPO_ROOT/source" "$REPO_ROOT/output" "$REPO_ROOT/Logs"
10731073

10741074
case "${1:-doctor}" in
10751075
"setup")

0 commit comments

Comments
 (0)