<commit_before># Generate Markdown-Version of Publications
#!/usr/bin/env ruby'
require 'bibtex'
require 'citeproc'
require 'csl/styles'
require 'date'

module Jekyll
  class Scholar
    class Latex2 < BibTeX::Filter
      def apply(value)
        value.to_s.gsub(/\\enquote|\\emph|\\-/, "")
      end
    end
  end
end

# Open bibliography
bib = BibTeX.open('sgroth-bibliography.en.bib').convert(:latex2,:latex)

CSL::Style.root = "csl/"

# Create a new processor with the desired style, # format, and locale.
cp = CiteProc::Processor.new style: 'unknown', format: 'text', locale: 'en'

# sortorder = cp.engine.style.bibliography > 'sort' > 'key'
# puts sortorder
# sortorder[:macro] = 'issued'
# sortorder[:sort] = 'descending'
# puts sortorder

cp.import bib.to_citeproc
<commit_msg>updated bib data<commit_after># Generate Markdown-Version of Publications
#!/usr/bin/env ruby'
require 'bibtex'
require 'citeproc'
require 'csl/styles'
require 'date'

module Jekyll
  class Scholar
    class Latex2 < BibTeX::Filter
      def apply(value)
        value.to_s.gsub(/\\enquote|\\emph|\\-/, "")
      end
    end
  end
end

# Open bibliography
bib = BibTeX.open('sgroth-bibliography.en.bib').convert(:latex2,:latex)

CSL::Style.root = "csl/"

# Create a new processor with the desired style, # format, and locale.
cp = CiteProc::Processor.new style: 'chicago-notitlecase', format: 'text', locale: 'en'

# sortorder = cp.engine.style.bibliography > 'sort' > 'key'
# puts sortorder
# sortorder[:macro] = 'issued'
# sortorder[:sort] = 'descending'
# puts sortorder

cp.import bib.to_citeproc

{'fraction_non_alphanumeric': 0.14555765595463138, 'fraction_numerical': 0.002520478890989288, 'mean_word_length': 4.089743589743589, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '6842948', 'n_tokens_mistral': 581, 'n_tokens_neox': 547, 'n_words': 138}