sondakika 1.0.1 → 1.0.3

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 (3) hide show
  1. package/README.md +14 -0
  2. package/index.js +23 -6
  3. package/package.json +6 -2
package/README.md CHANGED
@@ -41,6 +41,18 @@ sondakika cumhuriyet
41
41
 
42
42
  # Show Cumhuriyet news with custom count
43
43
  sondakika cumhuriyet 20
44
+
45
+ # Show TRT Haber news
46
+ sondakika trt
47
+
48
+ # Show TRT Haber news with custom count
49
+ sondakika trt 15
50
+
51
+ # Show Mynet news
52
+ sondakika mynet
53
+
54
+ # Show Mynet news with custom count
55
+ sondakika mynet 15
44
56
  ```
45
57
 
46
58
  ### Available Sources
@@ -49,6 +61,8 @@ sondakika cumhuriyet 20
49
61
  |---------|--------|
50
62
  | `ntv` | NTV Son Dakika |
51
63
  | `cumhuriyet` | Cumhuriyet |
64
+ | `trt` | TRT Haber |
65
+ | `mynet` | Mynet |
52
66
 
53
67
  ### Help
54
68
 
package/index.js CHANGED
@@ -4,7 +4,9 @@ const Parser = require('rss-parser');
4
4
 
5
5
  const sources = {
6
6
  ntv: 'https://www.ntv.com.tr/son-dakika.rss',
7
- cumhuriyet: 'http://www.cumhuriyet.com.tr/rss/son_dakika.xml'
7
+ cumhuriyet: 'http://www.cumhuriyet.com.tr/rss/son_dakika.xml',
8
+ trt: 'https://www.trthaber.com/sondakika.rss',
9
+ mynet: 'https://www.mynet.com/haber/rss/sondakika'
8
10
  };
9
11
 
10
12
  const parser = new Parser();
@@ -87,11 +89,26 @@ async function fetchNews(source, count) {
87
89
 
88
90
  const args = process.argv.slice(2);
89
91
 
90
- if (args.length === 0) {
91
- console.log('Usage: sondakika <source> [count]');
92
- console.log(`Available sources: ${Object.keys(sources).join(', ')}`);
93
- console.log('Example: sondakika ntv 15');
94
- process.exit(1);
92
+ if (args.length === 0 || args[0] === '--help') {
93
+ console.log(`
94
+ 📰 Sondakika - Son dakika haberleri CLI
95
+
96
+ Usage:
97
+ sondakika <source> [count]
98
+
99
+ Sources:
100
+ ntv NTV Son Dakika
101
+ cumhuriyet Cumhuriyet
102
+ trt TRT Haber
103
+ mynet Mynet
104
+
105
+ Examples:
106
+ sondakika ntv # NTV haberleri (varsayilan 10 adet)
107
+ sondakika ntv 15 # NTV 15 haber
108
+ sondakika trt # TRT Haber
109
+ sondakika mynet 5 # Mynet 5 haber
110
+ `);
111
+ process.exit(0);
95
112
  }
96
113
 
97
114
  const source = args[0];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sondakika",
3
- "version": "1.0.1",
4
- "description": "Son dakika haberlerine komut satiri uzerinden ulasin.",
3
+ "version": "1.0.3",
4
+ "description": "Farkli kanallarin son dakika haberlerine komut satiri uzerinden kolayca ulasin.",
5
5
  "main": "index.js",
6
6
  "bin": {
7
7
  "sondakika": "index.js"
@@ -14,6 +14,10 @@
14
14
  "rss",
15
15
  "cli"
16
16
  ],
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "https://github.com/eaeoz/sondakika.git"
20
+ },
17
21
  "author": "Sedat ERGOZ",
18
22
  "license": "ISC",
19
23
  "dependencies": {