<commit_before>#!/usr/bin/env bash

# Userscripts extractor
# * Extract *.user.js from Firefox profile directory

FXPROFILE="${USERPROFILE//\\/\/}/AppData/Roaming/Mozilla/Firefox/Profiles"
USERJSEXT=.user.js


# Change directory to the same level as this script
cd `dirname "${0}"`


# Remove current user.js
rm -fv *"${USERJSEXT}"


# Copy userscripts from Firefox's user profile directory
find "${FXPROFILE}" -type f -iname "*${USERJSEXT}" -ipath "*/*_scripts/*" -exec cp {} . \;

# Remove userscripts not developed by me
rm -fv autopagerize*.user.js


# Change linefeed code to LF only
for file in `ls -1 *"${USERJSEXT}"`; do
  echo Processing "${file}"...

  tr -d "\r" < "${file}" | sed -e 's/ \+$//' > "${file}.lf"
  mv "${file}.lf" "${file}"
done

# Update mode
chmod 0644 *"${USERJSEXT}"
<commit_msg>Autopagerize on Greasemonkey is no longer used<commit_after>#!/usr/bin/env bash

# Userscripts extractor
# * Extract *.user.js from Firefox profile directory

FXPROFILE="${USERPROFILE//\\/\/}/AppData/Roaming/Mozilla/Firefox/Profiles"
USERJSEXT=.user.js


# Change directory to the same level as this script
cd `dirname "${0}"`


# Remove current user.js
rm -fv *"${USERJSEXT}"


# Copy userscripts from Firefox's user profile directory
find "${FXPROFILE}" -type f -iname "*${USERJSEXT}" -ipath "*/*_scripts/*" -exec cp {} . \;


# Change linefeed code to LF only
for file in `ls -1 *"${USERJSEXT}"`; do
  echo Processing "${file}"...

  tr -d "\r" < "${file}" | sed -e 's/ \+$//' > "${file}.lf"
  mv "${file}.lf" "${file}"
done

# Update mode
chmod 0644 *"${USERJSEXT}"

{'fraction_non_alphanumeric': 0.18694550063371357, 'fraction_numerical': 0.0076045627376425855, 'mean_word_length': 3.770392749244713, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2421597', 'n_tokens_mistral': 601, 'n_tokens_neox': 551, 'n_words': 175}