gqgamerss 0.0.1

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.
package/README.md ADDED
@@ -0,0 +1,62 @@
1
+ # Project Title
2
+
3
+ Simple overview of use/purpose.
4
+
5
+ ## Description
6
+
7
+ An in-depth paragraph about your project and overview of use.
8
+
9
+ ## Getting Started
10
+
11
+ ### Dependencies
12
+
13
+ * Describe any prerequisites, libraries, OS version, etc., needed before installing program.
14
+ * ex. Windows 10
15
+
16
+ ### Installing
17
+
18
+ * How/where to download your program
19
+ * Any modifications needed to be made to files/folders
20
+
21
+ ### Executing program
22
+
23
+ * How to run the program
24
+ * Step-by-step bullets
25
+ ```
26
+ code blocks for commands
27
+ ```
28
+
29
+ ## Help
30
+
31
+ Any advise for common problems or issues.
32
+ ```
33
+ command to run if program contains helper info
34
+ ```
35
+
36
+ ## Authors
37
+
38
+ Contributors names and contact info
39
+
40
+ ex. Dominique Pizzie
41
+ ex. [@DomPizzie](https://twitter.com/dompizzie)
42
+
43
+ ## Version History
44
+
45
+ * 0.2
46
+ * Various bug fixes and optimizations
47
+ * See [commit change]() or See [release history]()
48
+ * 0.1
49
+ * Initial Release
50
+
51
+ ## License
52
+
53
+ This project is licensed under the [NAME HERE] License - see the LICENSE.md file for details
54
+
55
+ ## Acknowledgments
56
+
57
+ Inspiration, code snippets, etc.
58
+ * [awesome-readme](https://github.com/matiassingers/awesome-readme)
59
+ * [PurpleBooth](https://gist.github.com/PurpleBooth/109311bb0361f32d87a2)
60
+ * [dbader](https://github.com/dbader/readme-template)
61
+ * [zenorocha](https://gist.github.com/zenorocha/4526327)
62
+ * [fvcproductions](https://gist.github.com/fvcproductions/1bfc2d4aecb01a834b46)
package/app.coffee ADDED
@@ -0,0 +1,39 @@
1
+ l=console.log
2
+ Parser = require 'rss-parser'
3
+ parser = new Parser()
4
+ a = require 'async'
5
+ _=require 'underscore'
6
+
7
+ feeds=['http://www.pcgamer.com/rss',
8
+ 'https://feedx.net/rss/3dmgame.xml',
9
+ 'http://feeds.feedburner.com/gameranx',
10
+ 'http://www.techradar.com/rss/news/gaming',
11
+ 'http://www.techradar.com/rss/news/gaming']
12
+
13
+ len=100
14
+
15
+ getFeed=(feeds,cb) =>
16
+ a.mapLimit feeds,10,(url,cb1)->
17
+ feed = await parser.parseURL(url)
18
+ #l feed
19
+ #l(feed.title)
20
+
21
+ a.mapLimit feed.items,10,(item,cb2) =>
22
+ #console.log(item.title + ':' + item.link)
23
+ item.content=item.title.slice(0,len)+" ("+feed.title+")"
24
+ #l content
25
+ cb2(null,item)
26
+ ,cb1
27
+ ,(e,result)->
28
+ #l _.flatten(result)
29
+ cb e,_.flatten(result,true)
30
+
31
+ @getFeed=getFeed
32
+ @feeds=feeds
33
+
34
+ #getFeed feeds,(e,result)->
35
+ # a.eachLimit result,10,(item,cb)->
36
+ # l item.content
37
+ # cb(null)
38
+ # ,(e,r)->
39
+ # process.exit()
package/feedly.coffee ADDED
@@ -0,0 +1,27 @@
1
+ Feedly = require('feedly');
2
+
3
+ #// Configure with your client ID and secret (if using OAuth flow)
4
+ #// or directly with your API token for simpler use cases.
5
+ f = new Feedly({
6
+ #// For simpler use with a generated API token:
7
+ #accessToken: 'YOUR_FEEDLY_API_TOKEN'
8
+ #// Or for OAuth flow:
9
+ client_id: 'MY_CLIENT_ID'
10
+ client_secret: 'MY_CLIENT_SECRET'
11
+ port: 8080
12
+ })
13
+
14
+ #// Example: Get user subscriptions
15
+ f.subscriptions (error, subscriptions)->
16
+ if (error)
17
+ console.error('Error fetching subscriptions:', error);
18
+ else
19
+ console.log('Feedly Subscriptions:', subscriptions);
20
+
21
+ #// Example using promises (if no callback is provided)
22
+ f.profile()
23
+ .then (profile) =>
24
+ console.log('Feedly Profile:', profile);
25
+ .catch (error) =>
26
+ console.error('Error fetching profile:', error);
27
+
package/manifest.js ADDED
@@ -0,0 +1 @@
1
+ // what is my plan for this project
package/nodemon.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "restartable": "rs",
3
+ "ignore": [
4
+ ".git",
5
+ "node_modules/**/node_modules"
6
+ ],
7
+ "verbose": false,
8
+ "watch": [
9
+ "test/",
10
+ "*.coffee",
11
+ "*.js",
12
+ "*.json"
13
+ ],
14
+ "env": {
15
+ "NODE_ENV": "development"
16
+ },
17
+ "ext": "coffee,json",
18
+ "events": {
19
+ "restart": "echo \"App restarted due to:\n'$FILENAME'\" with title \"nodemon\""
20
+ }
21
+ }
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "gqgamerss",
3
+ "version": "0.0.1",
4
+ "description": "A tool for retrieving serveral game rss feeds.",
5
+ "repository": "git@github.com:goldfiction/gqgamerss.git",
6
+ "private": false,
7
+ "main": "web.coffee",
8
+ "node_version": "18.20.2",
9
+ "dependencies": {
10
+ "feedly": "",
11
+ "rss-parser": "",
12
+ "async": "",
13
+ "underscore": ""
14
+ },
15
+ "devDependencies": {
16
+ "gqtest": ">=0.0.17",
17
+ "coffeescript": "2.7.0",
18
+ "nodemon": "3.1.10"
19
+ },
20
+ "scripts": {
21
+ "start": "coffee web.coffee",
22
+ "test": "coffee test.coffee",
23
+ "test:watch": "nodemon --delay 2 -q -x \"npm test\"",
24
+ "test:slow": "mocha --openssl-legacy-provider --require coffeescript/register --no-color --reporter min -t 20000 test/test.slow.coffee",
25
+ "inst": "npm install --no-bin-links --no-optional --omit=optional --ignore-scripts",
26
+ "install:prod": "npm install --production",
27
+ "install:prod2": "npm install --omit=dev --no-bin-links",
28
+ "git": "git add .; git commit -m \"update\"; echo gitted...",
29
+ "git:push": "git push scm; echo pushed...",
30
+ "git:setup": "git config --global user.name \"username\";git config --global user.email \"username@gmail.com\";git branch --set-upstream-to=origin/master master;"
31
+ },
32
+ "author": "glidev5@gmail.com",
33
+ "license": "Apache-2"
34
+ }
package/test.coffee ADDED
@@ -0,0 +1,12 @@
1
+ app=require './app.coffee'
2
+ assert=require 'assert'
3
+ tests=require 'gqtest'
4
+
5
+ it=tests.it
6
+ run=tests.doRun
7
+
8
+ # dummy test for code integrity
9
+ it "should be able to run",(done)->
10
+ done()
11
+
12
+ run()
package/todo.js ADDED
@@ -0,0 +1,4 @@
1
+ return {
2
+ "todo1":"do first thing",
3
+ "todo2":"do 2nd thing"
4
+ }
package/web.coffee ADDED
@@ -0,0 +1,22 @@
1
+ l= console.log
2
+ a=require "async"
3
+ http = require 'http'
4
+ fs = require 'fs'
5
+ path = require 'path'
6
+ app=require "./app.coffee"
7
+
8
+ hostname = '0.0.0.0'
9
+ port = 80
10
+
11
+ server = http.createServer (req, res) =>
12
+ app.getFeed app.feeds,(e,result)->
13
+ a.mapLimit result,10,(item,cb)->
14
+ #l item.content
15
+ cb(null,item.content)
16
+ ,(e,result2)->
17
+ res.writeHead(200, { 'Content-Type': 'application/json' })
18
+ res.write(JSON.stringify(result2,null,2))
19
+ res.end()
20
+
21
+ server.listen port,hostname,() =>
22
+ l "Server running at http://"+hostname+":"+port+"/"