<commit_before>function(head, row, req, row_info) {
  // !json templates.links
  // !code helpers/ejs/ejs.js
  // !code helpers/template.js
  // !code vendor/couchapp/path.js
  // !code vendor/couchapp/date.js
  // !code vendor/couchapp/json2.js
 
 var feedPath = listPath('links','news',{descending:true, limit:25,  format:"atom"});
 
 return respondWith(req, {
   html: function() {
       if (head) {
         return template(templates.links.head, {
           username: req.userCtx.name,
           feedPath: feedPath
         });
       } else if (row) {
         if (row_info.row_number > 9)
              return {stop: true}

         var item_url = row.value.url || showPath("item", row.id);
         var fcreated_at = new Date().setRFC3339(row.value.created_at).toLocaleString();
         if (row.value['url'])
           row.value['domain'] =  parseUri(row.value['url']).domain;
         else
           row.value['domain'] = "";

         return template(templates.links.row, {
           doc: row.value,
           author: toJSON(row.value.author.username),
           fcreated_at: fcreated_at,
           item_url: item_url
         });
       } else {
         if (row_info.row_number == 10) {
            next = listPath('links','news', {
               descending:true, 
               limit:11,
               startkey: row_info.prev_key
             })
          } else {
            next = false;
          }
         return template(templates.links.tail, {
           username: req.userCtx.name,
           next:next,
           first_key: toJSON(row_info.first_key)
         });<commit_msg>links next<commit_after>function(head, row, req, row_info) {
  // !json templates.links
  // !code helpers/ejs/ejs.js
  // !code helpers/template.js
  // !code vendor/couchapp/path.js
  // !code vendor/couchapp/date.js
  // !code vendor/couchapp/json2.js
 
 var feedPath = listPath('links','news',{descending:true, limit:25,  format:"atom"});
 
 return respondWith(req, {
   html: function() {
       if (head) {
         return template(templates.links.head, {
           username: req.userCtx.name,
           feedPath: feedPath
         });
       } else if (row) {
         if (row_info.row_number > 9)
              return {stop: true}

         var item_url = row.value.url || showPath("item", row.id);
         var fcreated_at = new Date().setRFC3339(row.value.created_at).toLocaleString();
         if (row.value['url'])
           row.value['domain'] =  parseUri(row.value['url']).domain;
         else
           row.value['domain'] = "";

         return template(templates.links.row, {
           doc: row.value,
           author: toJSON(row.value.author.username),
           fcreated_at: fcreated_at,
           item_url: item_url
         });
       } else {
         if (row_info.row_number == 11) {
            next = listPath('links','news', {
               descending:true, 
               limit:11,
               startkey: row_info.prev_key
             })
          } else {
            next = false;
          }
         return template(templates.links.tail, {
           username: req.userCtx.name,
           next:next,
           first_key: toJSON(row_info.first_key)
         });
{'fraction_non_alphanumeric': 0.13606710158434296, 'fraction_numerical': 0.007455731593662628, 'mean_word_length': 1.8097731239092496, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7099010', 'n_tokens_mistral': 1012, 'n_tokens_neox': 985, 'n_words': 175}