Skip to content

Commit fbe6db5

Browse files
committed
Removed logic that checks whether the file name contains Korean characters
1 parent 9944047 commit fbe6db5

File tree

7 files changed

+11
-89
lines changed

7 files changed

+11
-89
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ A Node.js-based tool for generating Excel files from SQL query results.
1616
- 🖥️ **CLI Interface**: Simple command-line tool execution
1717
- 🪟 **Windows Batch Files**: Interactive batch files for Windows users
1818
- 📄 **XML/JSON Support**: Flexible configuration file format support
19-
- 🔍 **File Validation**: Automatic filename validation and Korean character warnings
2019
- 🎯 **Sheet-specific Styling**: Apply different styles to individual sheets
2120
- 📦 **Standalone Executable**: Generate standalone .exe files for distribution without Node.js dependency
2221
- 🌐 **Multi-language Support**: Korean and English release packages

README_KR.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ SQL 쿼리 결과를 엑셀 파일로 생성하는 Node.js 기반 도구입니
1616
- 🖥️ **CLI 인터페이스**: 간단한 명령줄 도구 실행
1717
- 🪟 **Windows 배치 파일**: Windows 사용자를 위한 대화형 배치 파일
1818
- 📄 **XML/JSON 지원**: 유연한 구성 파일 형식 지원
19-
- 🔍 **파일 유효성 검사**: 자동 파일명 유효성 검사 및 한글 문자 경고
2019
- 🎯 **시트별 스타일링**: 개별 시트에 다른 스타일 적용
2120
- 📦 **독립 실행 파일**: Node.js 의존성 없이 배포할 수 있는 독립 실행 파일(.exe) 생성
2221
- 🌐 **다국어 지원**: 한국어 및 영어 릴리스 패키지

USER_MANUAL.md

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ SQL2Excel is a powerful Node.js-based tool for generating Excel files from SQL q
3333
- 🖥️ **CLI Interface**: Simple command-line tool execution
3434
- 🪟 **Windows Batch Files**: Interactive batch files for Windows users
3535
- 📄 **XML/JSON Support**: Flexible configuration file format support
36-
- 🔍 **File Validation**: Automatic filename validation and Korean character warnings
3736
- 🎯 **Sheet-specific Styling**: Apply different styles to individual sheets
3837
- 📦 **Standalone Executable**: Generate standalone .exe files for distribution without Node.js dependency
3938
- 🌐 **Multi-language Support**: Korean and English release packages
@@ -736,17 +735,7 @@ Generate a standalone TOC file:
736735
node src/excel-cli.js export --xml queries.xml
737736
```
738737

739-
### 4. File Validation
740-
741-
The tool automatically validates filenames and warns about Korean characters:
742-
743-
```
744-
⚠️ 경고: 파일명에 한글이 포함되어 있습니다: 샘플쿼리.xml
745-
💡 권장사항: 파일명을 영문으로 변경하세요.
746-
💡 예시: "샘플쿼리.xml" → "sample-query.xml"
747-
```
748-
749-
### 5. Database Source Information
738+
### 4. Database Source Information
750739

751740
Each sheet includes database source information:
752741

@@ -1099,35 +1088,28 @@ sql2excel.bat
10991088
- Process data in smaller chunks
11001089
- Increase Node.js memory limit
11011090

1102-
#### 6. Korean Filename Warnings
1103-
**Problem**: Filename contains Korean characters
1104-
**Solution**:
1105-
- Rename files to use English characters only
1106-
- Use descriptive English names
1107-
- Avoid special characters in filenames
1108-
1109-
#### 7. Template Style Not Found
1091+
#### 6. Template Style Not Found
11101092
**Problem**: Template style not loading
11111093
**Solution**:
11121094
- Check `templates/excel-styles.xml` file exists
11131095
- Verify style ID spelling
11141096
- Use `list-styles` command to see available styles
11151097

1116-
#### 8. Executable Not Found (Standalone)
1098+
#### 7. Executable Not Found (Standalone)
11171099
**Problem**: `sql2excel-v*.exe file not found` error
11181100
**Solution**:
11191101
- Ensure the executable file is in the same directory as `sql2excel.bat`
11201102
- Check that the executable name matches the version (e.g., `sql2excel.exe`)
11211103
- Re-extract the release package if files are missing
11221104

1123-
#### 9. PowerShell Execution Policy (Windows)
1105+
#### 8. PowerShell Execution Policy (Windows)
11241106
**Problem**: PowerShell execution policy prevents batch file execution
11251107
**Solution**:
11261108
- Run Command Prompt as Administrator
11271109
- Use `cmd` instead of PowerShell
11281110
- Or set PowerShell execution policy: `Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser`
11291111

1130-
#### 10. Missing Dependencies (Development)
1112+
#### 9. Missing Dependencies (Development)
11311113
**Problem**: Module not found errors during development
11321114
**Solution**:
11331115
- Run `npm install` to install dependencies

USER_MANUAL_KR.md

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ SQL2Excel은 고급 스타일링, 템플릿 지원, 독립 실행 파일 배포
3333
- 🖥️ **CLI 인터페이스**: 간단한 명령줄 도구 실행
3434
- 🪟 **Windows 배치 파일**: Windows 사용자를 위한 대화형 배치 파일
3535
- 📄 **XML/JSON 지원**: 유연한 구성 파일 형식 지원
36-
- 🔍 **파일 유효성 검사**: 자동 파일명 유효성 검사 및 한글 문자 경고
3736
- 🎯 **시트별 스타일링**: 개별 시트에 다른 스타일 적용
3837
- 📦 **독립 실행 파일**: Node.js 의존성 없이 배포할 수 있는 독립 실행 파일(.exe) 생성
3938
- 🌐 **다국어 지원**: 한국어 및 영어 릴리스 패키지
@@ -736,17 +735,7 @@ SQL2Excel은 생성된 각 엑셀 시트에 자동으로 생성 타임스탬프
736735
node src/excel-cli.js export --xml queries.xml
737736
```
738737

739-
### 4. 파일 유효성 검사
740-
741-
도구는 파일 이름을 자동으로 유효성 검사하고 한글 문자에 대해 경고합니다:
742-
743-
```
744-
⚠️ 경고: 파일명에 한글이 포함되어 있습니다: 샘플쿼리.xml
745-
💡 권장사항: 파일명을 영문으로 변경하세요.
746-
💡 예시: "샘플쿼리.xml" → "sample-query.xml"
747-
```
748-
749-
### 5. 데이터베이스 소스 정보
738+
### 4. 데이터베이스 소스 정보
750739

751740
각 시트에는 데이터베이스 소스 정보가 포함됩니다:
752741

@@ -1099,35 +1088,28 @@ sql2excel.bat
10991088
- 더 작은 청크로 데이터 처리
11001089
- Node.js 메모리 제한 증가
11011090

1102-
#### 6. 한글 파일 이름 경고
1103-
**문제**: 파일 이름에 한글 문자 포함
1104-
**해결 방법**:
1105-
- 파일 이름을 영어 문자만 사용하도록 변경
1106-
- 설명적인 영어 이름 사용
1107-
- 파일 이름에 특수 문자 사용 금지
1108-
1109-
#### 7. 템플릿 스타일을 찾을 수 없음
1091+
#### 6. 템플릿 스타일을 찾을 수 없음
11101092
**문제**: 템플릿 스타일이 로드되지 않음
11111093
**해결 방법**:
11121094
- `templates/excel-styles.xml` 파일이 존재하는지 확인
11131095
- 스타일 ID 철자 확인
11141096
- `list-styles` 명령을 사용하여 사용 가능한 스타일 확인
11151097

1116-
#### 8. 실행 파일을 찾을 수 없음 (독립 실행)
1098+
#### 7. 실행 파일을 찾을 수 없음 (독립 실행)
11171099
**문제**: `sql2excel-v*.exe 파일을 찾을 수 없음` 오류
11181100
**해결 방법**:
11191101
- 실행 파일이 `sql2excel.bat`와 동일한 디렉토리에 있는지 확인
11201102
- 실행 파일 이름이 버전과 일치하는지 확인 (예: `sql2excel.exe`)
11211103
- 파일이 누락된 경우 릴리스 패키지를 다시 압축 해제
11221104

1123-
#### 9. PowerShell 실행 정책 (Windows)
1105+
#### 8. PowerShell 실행 정책 (Windows)
11241106
**문제**: PowerShell 실행 정책이 배치 파일 실행을 방지함
11251107
**해결 방법**:
11261108
- 관리자 권한으로 명령 프롬프트 실행
11271109
- PowerShell 대신 `cmd` 사용
11281110
- 또는 PowerShell 실행 정책 설정: `Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser`
11291111

1130-
#### 10. 의존성 누락 (개발)
1112+
#### 9. 의존성 누락 (개발)
11311113
**문제**: 개발 중 모듈을 찾을 수 없음 오류
11321114
**해결 방법**:
11331115
- `npm install`을 실행하여 의존성 설치

src/file-utils.js

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,6 @@ const APP_ROOT = process.pkg ? path.dirname(process.execPath) : process.cwd();
88
* 파일 관련 유틸리티 함수들을 담당하는 모듈
99
*/
1010
class FileUtils {
11-
/**
12-
* 파일명에 한글이 포함되어 있는지 확인
13-
* @param {string} filepath - 파일 경로
14-
* @returns {boolean} 한글 포함 여부
15-
*/
16-
static hasKoreanInFilename(filepath) {
17-
const filename = path.basename(filepath);
18-
const koreanRegex = /[-]/;
19-
return koreanRegex.test(filename);
20-
}
21-
22-
/**
23-
* 파일명 검증 및 경고
24-
* @param {string} filepath - 파일 경로
25-
* @returns {boolean} 유효성 여부
26-
*/
27-
static validateFilename(filepath) {
28-
if (this.hasKoreanInFilename(filepath)) {
29-
console.warn(`⚠️ 경고: 파일명에 한글이 포함되어 있습니다: ${path.basename(filepath)}`);
30-
console.warn(` 💡 권장사항: 파일명을 영문으로 변경하세요.`);
31-
console.warn(` 💡 예시: "${path.basename(filepath)}" → "${path.basename(filepath).replace(/[-]/g, '')}"`);
32-
return false;
33-
}
34-
return true;
35-
}
36-
3711
/**
3812
* 안전한 파일 읽기 (인코딩 문제 해결)
3913
* @param {string} filepath - 파일 경로
@@ -46,9 +20,7 @@ class FileUtils {
4620
} catch (error) {
4721
console.warn(`⚠️ 파일 읽기 실패: ${filepath}`);
4822
console.warn(` 오류: ${error.message}`);
49-
console.warn(` 💡 해결방법: 파일명에 한글이 포함되어 있다면 영문으로 변경해주세요.`);
50-
console.warn(` 💡 예시: "queries-sample - 복사본.xml" → "queries-sample-copy.xml"`);
51-
throw new Error(`파일을 읽을 수 없습니다: ${filepath}\n파일명에 한글이 포함되어 있으면 영문으로 변경해주세요.`);
23+
throw new Error(`파일을 읽을 수 없습니다: ${filepath}`);
5224
}
5325
}
5426

src/index.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ async function main() {
4040

4141
// 쿼리 파일 로드
4242
if (argv.xml && FileUtils.exists(FileUtils.resolvePath(argv.xml))) {
43-
// 파일명 검증
44-
queryParser.validateQueryFile(argv.xml);
4543
const xmlResult = await queryParser.loadQueriesFromXML(FileUtils.resolvePath(argv.xml));
4644
globalVars = xmlResult.globalVars;
4745
sheets = xmlResult.sheets;
@@ -50,8 +48,6 @@ async function main() {
5048
queryDefs = xmlResult.queryDefs || {};
5149
dynamicVars = xmlResult.dynamicVars || [];
5250
} else if (argv.query && FileUtils.exists(FileUtils.resolvePath(argv.query))) {
53-
// 파일명 검증
54-
queryParser.validateQueryFile(argv.query);
5551
const jsonResult = queryParser.loadQueriesFromJSON(FileUtils.resolvePath(argv.query));
5652
globalVars = jsonResult.globalVars;
5753
sheets = jsonResult.sheets;

src/query-parser.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -513,14 +513,6 @@ class QueryParser {
513513
return FileUtils.getExtension(filePath);
514514
}
515515

516-
/**
517-
* 쿼리 파일 검증
518-
* @param {string} filePath - 파일 경로
519-
* @returns {boolean} 유효성 여부
520-
*/
521-
validateQueryFile(filePath) {
522-
return FileUtils.validateFilename(filePath);
523-
}
524516
}
525517

526518
module.exports = QueryParser;

0 commit comments

Comments
 (0)