nodejs-news-feeder

所属分类:Node.js
开发工具:JavaScript
文件大小:0KB
下载次数:0
上传日期:2023-08-03 20:45:31
上 传 者sh-1993
说明:  Node.js新闻馈送器,
(Node.js news feeder,)

文件列表:
.nvmrc (7, 2023-12-10)
CODE_OF_CONDUCT.md (183, 2023-12-10)
CONTRIBUTING.md (2025, 2023-12-10)
LICENSE (1087, 2023-12-10)
__tests__/ (0, 2023-12-10)
__tests__/utils.test.js (376, 2023-12-10)
config.json (1150, 2023-12-10)
feed.xml (55507, 2023-12-10)
index.html (89827, 2023-12-10)
jest.config.cjs (137, 2023-12-10)
package-lock.json (288238, 2023-12-10)
package.json (1870, 2023-12-10)
scripts/ (0, 2023-12-10)
scripts/build-rss.js (620, 2023-12-10)
scripts/build-website.js (372, 2023-12-10)
scripts/collect-discussions.js (1785, 2023-12-10)
scripts/collect-issues.js (1427, 2023-12-10)
scripts/collect-releases.js (1586, 2023-12-10)
scripts/collect-retrospective.js (1388, 2023-12-10)
scripts/format-check.js (358, 2023-12-10)
scripts/format.js (258, 2023-12-10)
scripts/validate.js (817, 2023-12-10)
templates/ (0, 2023-12-10)
templates/index.html.ejs (7413, 2023-12-10)
utils/ (0, 2023-12-10)
utils/index.js (3218, 2023-12-10)

# Official Node.js News Feeder ### Usage As the Node.js organization continues to grow and expand, it becomes increasingly difficult to keep track of all the ongoing projects, teams, and working groups. We've recognized this challenge and have been actively seeking solutions to improve communication and awareness within our community. This feed was established with the intention of offering support for news sites, blogs, and other creators that aim to deliver timely updates on Node.js news, releases, and other content relevant to the Node.js community. #### Consume the feed The RSS feed is available at https://nodejs.github.io/nodejs-news-feeder/feed.xml, optionally you can subscribe to the Slack channel `#nodejs-news-feeder` to receive the latest news. #### Use your terminal to read the latest news You can also read the latest news directly from your terminal using the following command: ```bash curl -s https://nodejs.github.io/nodejs-news-feeder/feed.xml | grep -E '(|<link>|<pubDate>)' | sed 's/<[^>]*>//g' | sed 's/^[ \t]*//;s/[ \t]*$//' ``` #### Read the news on your browser You can also read the latest news on your browser using the following link: [https://nodejs.github.io/nodejs-news-feeder/](https://nodejs.github.io/nodejs-news-feeder/) In order to update the RSS feed, you need to trigger the Github Action `Populate Feed` [manually](https://github.com/nodejs/nodejs-news-feeder/actions/workflows/populate_feed.yml) or wait for the CRON job. This process will generate a PR with the latest news, so we can change the content and decide when to merge it. ### How it works ![architecture overview](https://blog.ulisesgascon.com/_next/image?url=%2Fimg%2Farch-nodejs-news-feeder.png&w=1920&q=75) 1. The community creates releases and also generates content by replying to specific issues and discussions. 2. A GitHub Action, triggered by a cron job or manual input, collects issues/releases/discussions, processes, formats, validates, and stores all the new information as feed items. 3. The changes are then presented in a pull request, which is thoroughly reviewed by curators who ensure that the content meet our expectations, before is publicly available and promoted. 4. Once the changes are approved and included in the main branch, the updated content can be accessed by readers via a feed or a specific channel on Slack. [More details](https://blog.ulisesgascon.com/nodejs-news-feeder) ### Development ```bash git clone https://github.com/nodejs/nodejs-news-feeder cd nodejs-news-feeder nvm use npm install ``` ### Scripts #### Code linter ```bash npm run lint npm run lint:fix ``` #### Testing ```bash npm run test npm run test:watch npm run test:coverage ``` #### RSS formatter Update the `feed.xml` file format ```bash npm run rss:format-check npm run rss:format ``` #### RSS Build Update the `feed.xml` file with the latest news ```bash npm run rss:build ``` #### RSS Validate Check the current `feed.xml` against the https://validator.w3.org/feed/check.cgi ```bash npm run rss:validate ``` ### License MIT License </div> <hr> <div><B>近期下载者</B>:</div> <div id="download-users"></div> <hr> <div><B>相关文件</B>:</div> <div id="relate-items"></div> <hr> <div><B>评论</B>:[<a href=/Download/comment/id/1691106732772661.html data-toggle=modal data-target="#myModal">我要评论</a>] [<a class='pop-a' href=/Download/report/id/1691106732772661.html>举报此文件</a>]</div> <div id="file-comments"></div> <hr> <div><B>收藏者</B>:</div> <div id="favor-users"></div> <p></p> </div> <div class="col-xs-12 col-md-4"> <div class="ad-sidebar text-center"> <div class="ad-300"> </div> </div> </div> </div> </div> </div> <div class="my-footer"> <div class="container"> <div class="pull-right"> </div> <div> <a href="http://www.pudn.com" target=_blank>© 联合开发网 from 2004</a> | <a href="/Index/contact.html">联系站长</a> | <a href=" https://beian.miit.gov.cn" target=_blank>湘ICP备2023001425号</a> | <a href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=43010502000604" target=_blank>网安备43010502000604</a> | </div> </div> </div> </div><!-- /wrapper--> <!-- page specific plugin scripts --> <!-- inline scripts related to this page --> <div id="myModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> </div> </div> </div><!-- /.modal-table --> </body> <script type="text/javascript"> $(document).on('click', '.list-more', function(){ var id=$(this).attr('data-id'); $('#list-'+id).css('max-height',$('#list-'+id)[0].scrollHeight); $(this).removeClass('list-more'); $(this).addClass('list-hide'); $(this).html('<i class="fa fa-angle-double-up"></i>'); //$(this).hide(); return false; }); $(document).on('click', '.list-hide', function(){ var id=$(this).attr('data-id'); $('#list-'+id).css('max-height','100px'); $(this).removeClass('list-hide'); $(this).addClass('list-more'); $(this).html('<i class="fa fa-angle-double-down"></i>'); return false; }); $("#myModal").on("hidden.bs.modal", function() { $(this).removeData(); }); $(document).on("click",".keyword",function(){ var keyword=$(this).attr("keyword"); var type_id=$(this).attr("type_id"); if(typeof(type_id) =="undefined" || type_id =="") type_id="0"; location.href="http://search.pudn.com/Download/index?keyword="+keyword; return false; }); </script> <script type="text/javascript" src="/js/time.js"></script> <script type="text/javascript" src="/js/marked.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('.hide-list').each(function(){ if ($(this)[0].offsetHeight < $(this)[0].scrollHeight){ var id=$(this).attr('id'); id =id.substring(5); $(this).after('<div style="text-align:center"><a href="" class="list-more" data-id="' + id + '"><i class="fa fa-angle-double-down"></i></a></div>'); } }); }); var g_id="1691106732772661"; var keywords =new Array(); keywords[0] ='nodejs';keywords[1] ='RSS';keywords[2] ='news';keywords[3] ='feed'; function get_download_user(){ var url ="/Download/get_download_user/id/"+g_id+".html"; $.get(url,function(ret){ if(ret.length ==0) return; var html=''; for(i in ret){ html =html + '<a href=/User/profile/id/'+ret[i].user_new_id+'.html>'+ret[i].name+'</a> '; } $('#download-users').append(html); }); } function get_relate_item(){ var url ="/Download/get_relate_item/id/"+g_id+'.html'; $.get(url,function(ret){ if(ret.length ==0) return; var html=''; var intro; for(i in ret){ intro =ret[i].intro; for(j in keywords){ var reg =new RegExp(keywords[j],'gmi'); intro =intro.replace(reg,'<font color=brown>'+keywords[j]+'</font>'); } html =html + '[<a href=/Download/item/id/'+ret[i].new_id+'.html>'+ret[i].name+'</a>]  '+intro+'<BR>'; } $('#relate-items').append(html); }); } function get_score_name(score){ switch(score){ case '100': return '很好,推荐下载'; case '85': return '还不错'; case '75': return '一般,勉强可用'; case '50': return '差'; case '3': return '纯粹是垃圾'; case '40': return '和说明完全不符'; case '20': return '文件不全'; case '10': return '不是源代码或资料'; case '5': return '文件有密码,不知道密码'; case '0': return '不能解压或下载失败'; } return ''; } function get_comment(){ var url ="/Download/get_comments/id/"+g_id+'.html'; $.get(url,function(ret){ if(ret.length ==0) return; var total_count =ret.total_count; var data =ret.data; var html=''; for(i in data){ html =html + '<a href="/User/profile/id/'+data[i].user_new_id+'.html" class="uploader">'+data[i].user_name+'</a>: <span class="comment-score">'+get_score_name(data[i].score)+'</span>, '+data[i].content+'<BR>'; } $('#file-comments').append(html); }); } function get_favor(){ var url ="/Download/get_item_favors/id/"+g_id+".html"; $.get(url,function(ret){ if(ret.length ==0) return; var html=''; for(i in ret){ html =html + '<a href=/User/profile/id/'+ret[i].user_new_id+'.html class=user>'+ret[i].name+'</a> '; } $('#favor-users').html(html); }); } // 得到下载这个的用户又下载了什么 function get_more_download(){ } // 得到下载这个的用户又搜索了什么 function get_more_keyword(){ } // 得到论坛相关问题 function get_bbs(){ } // 得到软件工场相关内容 function get_works(){ } // 得到相关聊天室 function get_chat(){ } // 得到相关软件商城信息 function get_shop(){ } // 得到job // 得到学习内容 // 数据 get_download_user(); //get_relate_item(); get_comment(); get_favor(); $('.vote-up').click(function(){ var url="/Download/vote/t/up/id/"+g_id; $.get(url,function(ret){ if(ret.status==0){ alert(ret.info); if(ret.url.length >0) location.href=ret.url; } else{ var s =$('#vote-up-count').html(); if(s =='') s="0"; var count =parseInt(s)+1; $('#vote-up-count').html(count); } }) return false; }); $('.vote-down').click(function(){ var url="/Download/vote/t/down/id/"+g_id; $.get(url,function(ret){ if(ret.status==0) alert(ret.info); else{ var s =$('#vote-down-count').html(); if(s =='') s="0"; var count =parseInt(s)+1; $('#vote-down-count').html(count); } }) return false; }); $('.favor-item').click(function(){ var url="/Favor/add/t/0/id/"+g_id; $.get(url,function(ret){ if(ret.status==0){ alert(ret.info); } else{ var s =$('#favor-count').html(); if(s =='') s="0"; var count =parseInt(s)+1; $('#favor-count').html(count); } }) return false; }); $('.pop-a').click(function(){ var url=$(this).attr('href'); $.get(url,function(ret){ alert(ret.info); //location.reload(); }) return false; }); document.getElementById('readme').innerHTML =marked.parse(document.getElementById('readme').innerHTML); </script> </html>