Skip to content

Commit 5e24c6d

Browse files
committed
Update docuemnt for v1.3.1
1 parent c86d83d commit 5e24c6d

File tree

7 files changed

+85
-1
lines changed

7 files changed

+85
-1
lines changed

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
# SQL2Excel Version History
22

3+
## v1.3.1 - Filename Variables and DATE Fixes (2025-10-30)
4+
5+
### ✨ New/Changed
6+
- Output filename variable enhancements
7+
- Support `${DB_NAME}` in `excel.output` (also normalizes custom syntax `$(DB_NAME}``${DB_NAME}`)
8+
- Support `${DATE:...}` in `excel.output` using server local time when timezone omitted
9+
- Continue to support `${DATE.TZ:...}` for explicit timezones
10+
- Lowercase token support for DATE formats
11+
- Newly supports `yyyy, yy, dd, d, hh, h, sss` in addition to existing uppercase tokens
12+
- Safe replacement order from longer to shorter tokens
13+
- Removed automatic timestamp suffix
14+
- No longer appends `_yyyymmddhhmmss` to filenames automatically; use DATE variables in `excel.output` instead
15+
16+
### 🔧 Code Changes
17+
- `src/index.js`: Apply variable substitution to `excel.output`; inject `DB_NAME`; normalize `$(VAR}``${VAR}`; removed auto timestamp append
18+
- `src/mssql-helper.js`: Extend date formatter to support lowercase tokens; added `formatDateLocal`
19+
- `src/variable-processor.js`: Use `formatDateLocal` for `${DATE:...}` (local time)
20+
21+
### 📝 Documentation
22+
- README/README_KR: Added v1.3.1 highlights and filename variable usage examples
23+
- USER_MANUAL/USER_MANUAL_KR: Documented filename variables (`DB_NAME`, DATE), lowercase tokens, and local-time behavior
24+
- CHANGELOG/CHANGELOG_KR: Added v1.3.1 entry
25+
326
## v1.3.0 - Per-sheet Export for CSV/TXT and Routing Rules (2025-10-29)
427

528
### ✨ New/Changed

CHANGELOG_KR.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
# SQL2Excel 버전 히스토리
22

3+
## v1.3.1 - 파일명 변수 및 DATE 개선 (2025-10-30)
4+
5+
### ✨ 변경 사항
6+
- 출력 파일명 변수 기능 강화
7+
- `excel.output`에서 `${DB_NAME}` 사용 지원 (커스텀 문법 `$(DB_NAME}``${DB_NAME}`로 자동 정규화)
8+
- 타임존 미지정 `${DATE:...}`는 서버 로컬 시간으로 치환
9+
- 타임존 지정 `${DATE.TZ:...}` 계속 지원
10+
- 날짜 포맷 토큰 소문자 지원
11+
- 기존 대문자 토큰 외에 `yyyy, yy, dd, d, hh, h, sss` 지원 추가
12+
- 긴 토큰 → 짧은 토큰 순서로 안전 치환
13+
- 자동 타임스탬프 접미사 제거
14+
- 파일명에 `_yyyymmddhhmmss` 자동 추가 제거; 필요 시 `excel.output`에 DATE 변수를 사용하세요
15+
16+
### 🔧 코드 변경
17+
- `src/index.js`: 출력 경로 변수 치환 적용, `DB_NAME` 주입, `$(VAR}``${VAR}` 정규화, 자동 타임스탬프 추가 제거
18+
- `src/mssql-helper.js`: 날짜 포맷터에 소문자 토큰 지원 추가, `formatDateLocal` 추가
19+
- `src/variable-processor.js`: `${DATE:...}`(로컬 시간) 처리 시 `formatDateLocal` 사용
20+
21+
### 📝 문서
22+
- README/README_KR: v1.3.1 하이라이트 및 파일명 변수 예시 추가
23+
- USER_MANUAL/USER_MANUAL_KR: 파일명 변수(`DB_NAME`, DATE), 소문자 토큰, 로컬 시간 동작 설명 추가
24+
- CHANGELOG/CHANGELOG_KR: v1.3.1 항목 추가
25+
326
## v1.3.0 - CSV/TXT 시트별 내보내기 및 라우팅 규칙 (2025-10-29)
427

528
### ✨ 변경 사항

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@ A Node.js-based tool for generating Excel files from SQL query results.
2424
-**Custom DateTime Variables**: Support for 22 timezones worldwide with custom format (`${DATE.UTC:YYYY-MM-DD}`, `${DATE.KST:YYYY년 MM월 DD일}`, `${DATE.EST:YYYY-MM-DD HH:mm}`, etc.) or use local time (`${DATE:YYYY-MM-DD}`)
2525
- 📋 **SQL Query Formatting**: Preserve original SQL formatting with line breaks in Table of Contents
2626
- 🔧 **Input Validation**: Automatic whitespace trimming for file path inputs
27+
- 🗂️ **Filename Variables**: Use `${DATE:...}`, `${DATE.TZ:...}`, and `${DB_NAME}` in `excel.output` (also supports custom `$(DB_NAME}`)
28+
29+
## v1.3.1 Highlights
30+
31+
- Filename variables in output path
32+
- Support `${DB_NAME}` (current DB key), custom syntax `$(DB_NAME}` normalized automatically
33+
- Support `${DATE:...}` (local time) and `${DATE.TZ:...}` (explicit timezone) in filenames
34+
- Lowercase date tokens supported: `yyyy, yy, dd, d, hh, h, sss`
35+
- Removed auto `_yyyymmddhhmmss` suffix; control naming via DATE variables
2736

2837
## v1.3.0 Highlights
2938

README_KR.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@ SQL 쿼리 결과를 엑셀 파일로 생성하는 Node.js 기반 도구입니
2424
-**커스텀 DateTime 변수**: 전세계 22개 타임존 지원 및 커스텀 포맷 (`${DATE.UTC:YYYY-MM-DD}`, `${DATE.KST:YYYY년 MM월 DD일}`, `${DATE.EST:YYYY-MM-DD HH:mm}` 등) 또는 로컬 시간 사용 (`${DATE:YYYY-MM-DD}`)
2525
- 📋 **SQL 쿼리 포맷팅**: 목차에서 줄바꿈을 포함한 원본 SQL 포맷 유지
2626
- 🔧 **입력 유효성 검증**: 파일 경로 입력에 대한 자동 공백 제거
27+
- 🗂️ **파일명 변수**: `excel.output`에서 `${DATE:...}`, `${DATE.TZ:...}`, `${DB_NAME}` 사용 가능 (커스텀 `$(DB_NAME}`도 지원)
28+
29+
## v1.3.1 하이라이트
30+
31+
- 출력 경로에서 파일명 변수 지원 강화
32+
- `${DB_NAME}` 지원 (현재 기본 DB 키). 커스텀 문법 `$(DB_NAME}`는 자동으로 `${DB_NAME}`로 정규화
33+
- `${DATE:...}`(로컬 시간), `${DATE.TZ:...}`(타임존 명시) 파일명에서 사용 가능
34+
- 소문자 날짜 토큰 지원: `yyyy, yy, dd, d, hh, h, sss`
35+
- 자동 `_yyyymmddhhmmss` 접미사 제거 → DATE 변수로 직접 제어
2736

2837
## v1.3.0 하이라이트
2938

USER_MANUAL.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,7 @@ ${DATE:format}
566566
| `ss` | 2-digit seconds (00-59) | `45` |
567567
| `s` | Seconds (0-59) | `45` |
568568
| `SSS` | Milliseconds (000-999) | `123` |
569+
| `yyyy, yy, dd, d, hh, h, sss` | Lowercase variants supported | `2024, 24, 09, 9, 07, 7, 123` |
569570

570571
### Common Format Examples
571572

@@ -613,6 +614,15 @@ Output: `output/report_20241021_153045.xlsx`
613614
```
614615
Output: `output/report_20241021_183045.xlsx` (using server's local time)
615616

617+
### Filename Variables (Output Path)
618+
619+
- You can use variables in `excel.output` to control file naming:
620+
- `${DB_NAME}`: Injects the current default DB key. Custom `$(DB_NAME}` is normalized to `${DB_NAME}`.
621+
- `${DATE:...}`: Local time; `${DATE.TZ:...}` for explicit timezone.
622+
- Lowercase tokens are supported: `yyyy, yy, dd, d, hh, h, sss`.
623+
- Automatic suffix removal:
624+
- The tool no longer appends `_yyyymmddhhmmss` automatically. Use DATE variables in `excel.output` instead.
625+
616626
#### 2. Use in XML Queries
617627
```xml
618628
<vars>

USER_MANUAL_KR.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,7 @@ ${DATE:format}
566566
| `ss` | 2자리 초 (00-59) | `45` |
567567
| `s` | 초 (0-59) | `45` |
568568
| `SSS` | 밀리초 (000-999) | `123` |
569+
| `yyyy, yy, dd, d, hh, h, sss` | 소문자 토큰 지원 | `2024, 24, 09, 9, 07, 7, 123` |
569570

570571
### 일반적인 형식 예시
571572

@@ -613,6 +614,15 @@ ${DATE:format}
613614
```
614615
출력: `output/report_20241021_183045.xlsx` (서버의 로컬 시간 사용)
615616

617+
### 파일명 변수 (출력 경로)
618+
619+
- `excel.output`에 변수를 사용하여 파일명을 제어할 수 있습니다:
620+
- `${DB_NAME}`: 현재 기본 DB 키 주입. 커스텀 `$(DB_NAME}`는 자동으로 `${DB_NAME}`로 정규화됩니다.
621+
- `${DATE:...}`: 로컬 시간 사용. `${DATE.TZ:...}`는 타임존을 명시합니다.
622+
- 소문자 토큰 지원: `yyyy, yy, dd, d, hh, h, sss`.
623+
- 자동 접미사 제거:
624+
- 더 이상 파일명에 `_yyyymmddhhmmss`가 자동으로 붙지 않습니다. 필요한 경우 `excel.output`에 DATE 변수를 사용하세요.
625+
616626
#### 2. XML 쿼리에서 사용
617627
```xml
618628
<vars>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sql2excel",
3-
"version": "1.3.0",
3+
"version": "1.3.1",
44
"description": "SQL 쿼리 결과를 엑셀 파일로 저장하는 도구 (시트별 쿼리, 변수, XML/JSON 지원)",
55
"main": "app.js",
66
"scripts": {

0 commit comments

Comments
 (0)