한국어로 번역된 프로그래밍 명언 모음
A collection of programming quotes translated into Korean
유명한 프로그래머, 컴퓨터 과학자들의 명언을 한국어와 영어로 제공하는 npm 패키지입니다.
터미널 시작 메시지로 명언을 출력하고 싶어 만들었는데, 다양한 용도로 활용 가능 할 것 같아 공개합니다.
npm install programming-quotes-koyarn add programming-quotes-kopnpm add programming-quotes-koimport { getRandomQuote } from 'programming-quotes-ko';
const quote = getRandomQuote();
console.log(quote.quote_kr); // "복잡성을 통제하는 것이 컴퓨터 프로그래밍의 기초다."
console.log(quote.author_kr); // "브라이언 커니헨"
console.log(quote.quote); // "Controlling complexity is the essence of computer programming."
console.log(quote.author); // "Brian Kernighan"
console.log(quote.category); // "Complexity"const quote = getRandomQuote();
console.log(`${quote.quote_kr} - ${quote.author_kr}`);
// "디버깅은 코드를 새로 만드는 것보다 두 배 더 어렵다. - 브라이언 커니헨"const quote = getRandomQuote();
console.log(`${quote.quote} - ${quote.author}`);
// "Debugging is twice as hard as writing the code. - Brian Kernighan"import {
getQuotesByCategory,
getRandomQuoteByCategory,
} from 'programming-quotes-ko';
// 특정 카테고리의 모든 명언
const debuggingQuotes = getQuotesByCategory('Debugging');
debuggingQuotes.forEach((q) => {
console.log(q.quote_kr);
});
// 특정 카테고리의 랜덤 명언
const randomProgrammingQuote = getRandomQuoteByCategory('Programming');
console.log(randomProgrammingQuote?.quote_kr);import { getQuotesByAuthor } from 'programming-quotes-ko';
// 한국어 이름으로 검색
const gatesQuotes = getQuotesByAuthor('빌 게이츠');
// 영어 이름으로 검색
const gatesQuotes2 = getQuotesByAuthor('Bill Gates');
gatesQuotes.forEach((q) => {
console.log(`${q.quote_kr} - ${q.author_kr}`);
});import { searchQuotes } from 'programming-quotes-ko';
// 한국어 키워드
const debugQuotes = searchQuotes('디버그');
// 영어 키워드
const bugQuotes = searchQuotes('bug');
debugQuotes.forEach((q) => {
console.log(q.quote_kr);
});import { getCategories, getQuoteCountByCategory } from 'programming-quotes-ko';
// 모든 카테고리 목록
const categories = getCategories();
console.log(categories);
// ["C/C++", "Code", "Complexity", "Computers", ...]
// 카테고리별 명언 개수
const counts = getQuoteCountByCategory();
console.log(counts);
// { "Programming": 12, "Debugging": 8, "Quality": 10, ... }import { getAllQuotes, getQuoteCount } from 'programming-quotes-ko';
// 총 명언 개수
console.log(getQuoteCount()); // 100+
// 모든 명언
const allQuotes = getAllQuotes();
allQuotes.forEach((q) => {
console.log(`${q.quote_kr} - ${q.author_kr}`);
});interface Quote {
quote: string; // 영어 원문
author: string; // 영어 저자명
quote_kr: string; // 한국어 번역
author_kr: string; // 한국어 저자명
category?: string; // 카테고리
}랜덤으로 명언 하나를 반환합니다.
const quote = getRandomQuote();모든 명언을 배열로 반환합니다.
const quotes = getAllQuotes();특정 저자의 명언들을 반환합니다. 한국어/영어 이름 모두 지원합니다.
const quotes = getQuotesByAuthor('Linus Torvalds');
const quotes2 = getQuotesByAuthor('리누스 토발즈');특정 카테고리의 모든 명언을 반환합니다.
const quotes = getQuotesByCategory('Programming');특정 카테고리에서 랜덤으로 명언 하나를 반환합니다.
const quote = getRandomQuoteByCategory('Debugging');키워드로 명언을 검색합니다. 명언 내용과 저자명 모두에서 검색하며, 한국어/영어 모두 지원합니다.
const quotes = searchQuotes('complexity');
const quotes2 = searchQuotes('복잡성');모든 카테고리 목록을 반환합니다.
const categories = getCategories();전체 명언 개수를 반환합니다.
const count = getQuoteCount();카테고리별 명언 개수를 객체로 반환합니다.
const counts = getQuoteCountByCategory();TODO: 추후 더 좋은 카테고리 분류로 개선
- Computers - 컴퓨터에 관한 명언
- Computer Intelligence - 컴퓨터 지능과 AI
- Trust - 신뢰와 보안
- Hardware - 하드웨어
- Software - 소프트웨어
- Operating Systems - 운영체제
- Internet - 인터넷
- Software Industry - 소프트웨어 산업
- Software Demos - 소프트웨어 데모
- Software Patents - 소프트웨어 특허
- Complexity - 복잡성
- Ease of Use - 사용성
- Users - 사용자
- Programmers - 프로그래머
- Programming - 프로그래밍
- Programming Languages - 프로그래밍 언어
- C/C++ - C/C++ 언어
- Java - Java 언어
- Open Source - 오픈소스
- Code - 코드
- Software Development - 소프트웨어 개발
- Debugging - 디버깅
- Quality - 품질
- Predictions - 예측
// 원하는 경로/start-message.js
import { getRandomQuote } from 'programming-quotes-ko';
const quote = getRandomQuote();
console.log('--- Welcome back, 000 ---');
console.log(`\"${quote.quote}\"`);
console.log(`- ${quote.author}`);
console.log('-----------------------------');터미널 설정 파일에 다음 줄을 추가하세요:
# 예시) ~/.zshrc
if command -v node &> /dev/null; then
node ~/scripts/start-message.js
finpm run build# 의존성 설치
npm install
# 테스트 실행
npm test
# Watch 모드로 테스트
npm run test:watch
# 커버리지 확인
npm run test:coverage명언 추가나 번역 개선에 기여하고 싶으시다면:
- 이 저장소를 Fork 하세요
- Feature 브랜치를 만드세요 (
git checkout -b feature/amazing-quote) - 변경사항을 커밋하세요 (
git commit -m 'Add some amazing quote') - 브랜치에 Push 하세요 (
git push origin feature/amazing-quote) - Pull Request를 열어주세요
quotes.json 파일에 다음 형식으로 추가해주세요:
{
"quote": "영어 원문",
"author": "영어 저자명",
"quote_kr": "한국어 번역",
"author_kr": "한국어 저자명",
"category": "카테고리"
}