sondakika 1.0.5 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/AGENTS.md +31 -5
  2. package/README.md +35 -4
  3. package/index.js +39 -3
  4. package/package.json +1 -1
package/AGENTS.md CHANGED
@@ -7,7 +7,7 @@ This is a simple Node.js CLI application that fetches and displays news from RSS
7
7
  ## Project Structure
8
8
 
9
9
  ```
10
- haberler/
10
+ sondakika/
11
11
  ├── index.js # Main CLI entry point
12
12
  ├── package.json # Project dependencies and scripts
13
13
  └── AGENTS.md # This file - guidelines for AI agents
@@ -23,10 +23,11 @@ node index.js # Direct execution
23
23
  # With arguments
24
24
  node index.js ntv # Show NTV news (default 10 items)
25
25
  node index.js ntv 15 # Show 15 NTV news items
26
+ node index.js haberturk 5 # Show Habertürk 5 news
26
27
 
27
- # Global installation (for 'news' command)
28
+ # Global installation (for 'sondakika' command)
28
29
  npm link
29
- news ntv 15 # Run as global command
30
+ sondakika ntv 15 # Run as global command
30
31
  ```
31
32
 
32
33
  ## Adding New RSS Sources
@@ -36,8 +37,12 @@ To add a new news source, edit `index.js` and add to the `sources` object:
36
37
  ```javascript
37
38
  const sources = {
38
39
  ntv: 'https://www.ntv.com.tr/son-dakika.rss',
39
- bbc: 'https://feeds.bbci.co.uk/news/rss.xml',
40
- cnn: 'http://rss.cnn.com/rss/edition.rss'
40
+ // ...
41
+ };
42
+
43
+ const sourceInfo = {
44
+ ntv: { name: 'NTV', isSondakika: true }, // isSondakika: true for breaking news
45
+ // ...
41
46
  };
42
47
  ```
43
48
 
@@ -46,6 +51,27 @@ Then run with:
46
51
  node index.js bbc
47
52
  ```
48
53
 
54
+ ## Available News Sources
55
+
56
+ ### Son Dakika (Breaking News)
57
+ | Key | Name | Description |
58
+ |-----|------|-------------|
59
+ | ntv | NTV (Son Dakika) | NTV breaking news |
60
+ | cumhuriyet | Cumhuriyet | Cumhuriyet breaking news |
61
+ | trt | TRT Haber | TRT breaking news |
62
+ | mynet | Mynet | Mynet breaking news |
63
+
64
+ ### General News
65
+ | Key | Name | Description |
66
+ |-----|------|-------------|
67
+ | sabah | Sabah | Sabah newspaper |
68
+ | star | Star | Star newspaper |
69
+ | vatan | Gazete Vatan | Vatan newspaper |
70
+ | haberturk | Habertürk | Habertürk news |
71
+ | cnnturk | CNN Türk | CNN Türk news |
72
+ | yenisafak | Yeni Şafak | Yeni Şafak newspaper |
73
+ | aa | Anadolu Ajansı | Anadolu Agency (English) |
74
+
49
75
  ## No Test/Lint Commands
50
76
 
51
77
  This project does not currently have:
package/README.md CHANGED
@@ -27,7 +27,7 @@ npx sondakika ntv
27
27
  npm install -g sondakika
28
28
  ```
29
29
 
30
- ## Usage
30
+ ## Usage Examples
31
31
 
32
32
  ```bash
33
33
  # Show NTV news (default 10 items)
@@ -53,17 +53,47 @@ sondakika mynet
53
53
 
54
54
  # Show Mynet news with custom count
55
55
  sondakika mynet 15
56
+
57
+ # Show Sabah news
58
+ sondakika sabah
59
+
60
+ # Show Habertürk news with custom count
61
+ sondakika haberturk 5
62
+
63
+ # Show Star news
64
+ sondakika star
65
+
66
+ # Show CNN Türk news
67
+ sondakika cnnturk
68
+
69
+ # Show Yeni Şafak news
70
+ sondakika yenisafak
71
+
72
+ # Show Anadolu Ajansı news
73
+ sondakika aa
56
74
  ```
57
75
 
58
76
  ### Available Sources
59
77
 
78
+ #### Son Dakika (Breaking News)
60
79
  | Command | Source |
61
80
  |---------|--------|
62
- | `ntv` | NTV Son Dakika |
81
+ | `ntv` | NTV (Son Dakika) |
63
82
  | `cumhuriyet` | Cumhuriyet |
64
83
  | `trt` | TRT Haber |
65
84
  | `mynet` | Mynet |
66
85
 
86
+ #### Haberler (General News)
87
+ | Command | Source |
88
+ |---------|--------|
89
+ | `sabah` | Sabah |
90
+ | `star` | Star |
91
+ | `vatan` | Gazete Vatan |
92
+ | `haberturk` | Habertürk |
93
+ | `cnnturk` | CNN Türk |
94
+ | `yenisafak` | Yeni Şafak |
95
+ | `aa` | Anadolu Ajansı |
96
+
67
97
  ### Help
68
98
 
69
99
  ```bash
@@ -76,14 +106,15 @@ sondakika --help
76
106
 
77
107
  ```
78
108
  📰 ══════════════════════════════════════════════════
79
- Latest 10 News from NTV
109
+ Latest 10 News from NTV (Son Dakika)
110
+ Son guncelleme: 10.04.2026 20:02
80
111
  ══════════════════════════════════════════════════
81
112
 
82
113
  ┌─ 1. Son dakika deprem mi oldu?
83
114
 
84
115
  │ 📅 10.04.2026 20:02
85
116
 
86
- │ Son depremler...
117
+ │ Son depremler...
87
118
  └─────────────────────────────────────────────────────────────────────
88
119
  🔗 https://www.ntv.com.tr/...
89
120
  ```
package/index.js CHANGED
@@ -6,7 +6,28 @@ const sources = {
6
6
  ntv: 'https://www.ntv.com.tr/son-dakika.rss',
7
7
  cumhuriyet: 'http://www.cumhuriyet.com.tr/rss/son_dakika.xml',
8
8
  trt: 'https://www.trthaber.com/sondakika.rss',
9
- mynet: 'https://www.mynet.com/haber/rss/sondakika'
9
+ mynet: 'https://www.mynet.com/haber/rss/sondakika',
10
+ sabah: 'https://www.sabah.com.tr/rss/anasayfa.xml',
11
+ star: 'https://www.star.com.tr/rss/rss.asp?cid=124',
12
+ vatan: 'https://www.gazetevatan.com/rss/gundem.xml',
13
+ haberturk: 'https://www.haberturk.com/rss',
14
+ cnnturk: 'https://cnnturk.com/feed/rss/turkiye',
15
+ yenisafak: 'https://www.yenisafak.com/rss',
16
+ aa: 'https://www.aa.com.tr/en/rss'
17
+ };
18
+
19
+ const sourceInfo = {
20
+ ntv: { name: 'NTV', isSondakika: true },
21
+ cumhuriyet: { name: 'Cumhuriyet', isSondakika: true },
22
+ trt: { name: 'TRT Haber', isSondakika: true },
23
+ mynet: { name: 'Mynet', isSondakika: true },
24
+ sabah: { name: 'Sabah', isSondakika: false },
25
+ star: { name: 'Star', isSondakika: false },
26
+ vatan: { name: 'Gazete Vatan', isSondakika: false },
27
+ haberturk: { name: 'Habertürk', isSondakika: false },
28
+ cnnturk: { name: 'CNN Türk', isSondakika: false },
29
+ yenisafak: { name: 'Yeni Şafak', isSondakika: false },
30
+ aa: { name: 'Anadolu Ajansı', isSondakika: false }
10
31
  };
11
32
 
12
33
  const parser = new Parser();
@@ -52,8 +73,12 @@ async function fetchNews(source, count) {
52
73
  }
53
74
  }
54
75
 
76
+ const sourceKey = source.toLowerCase();
77
+ const info = sourceInfo[sourceKey] || { name: source.toUpperCase(), isSondakika: false };
78
+ const sourceName = info.isSondakika ? `${info.name} (Son Dakika)` : info.name;
79
+
55
80
  console.log('\n📰 ' + '═'.repeat(50));
56
- console.log(` Latest ${items.length} News from ${source.toUpperCase()}`);
81
+ console.log(` Latest ${items.length} News from ${sourceName}`);
57
82
  if (latestUpdate) {
58
83
  console.log(` Son guncelleme: ${latestUpdate}`);
59
84
  }
@@ -125,17 +150,28 @@ if (args.length === 0 || args[0] === '--help') {
125
150
  Usage:
126
151
  sondakika <source> [count]
127
152
 
128
- Sources:
153
+ Sources (Son Dakika):
129
154
  ntv NTV Son Dakika
130
155
  cumhuriyet Cumhuriyet
131
156
  trt TRT Haber
132
157
  mynet Mynet
133
158
 
159
+ Sources (Haberler):
160
+ sabah Sabah
161
+ star Star
162
+ vatan Gazete Vatan
163
+ haberturk Habertürk
164
+ cnnturk CNN Türk
165
+ yenisafak Yeni Şafak
166
+ aa Anadolu Ajansı
167
+
134
168
  Examples:
135
169
  sondakika ntv # NTV haberleri (varsayilan 10 adet)
136
170
  sondakika ntv 15 # NTV 15 haber
137
171
  sondakika trt # TRT Haber
138
172
  sondakika mynet 5 # Mynet 5 haber
173
+ sondakika sabah # Sabah haberleri
174
+ sondakika haberturk 5 # Habertürk 5 haber
139
175
  `);
140
176
  process.exit(0);
141
177
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sondakika",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "Farkli kanallarin son dakika haberlerine komut satiri uzerinden kolayca ulasin.",
5
5
  "main": "index.js",
6
6
  "bin": {