Adds an emoji to the beginning of each line in a file. Cross-platform version of teemoji.
Requires ollama installed. By default uses model
llama3.2:3b.
A different model can be specified in MODEL_NAME
environment variable.
Example usage:
time ./emoji.sh tests/test.txt
π« ---
π title: CommonMark Spec
π author: John MacFarlane
π¦ version: '0.31.2'
π date: '2024-01-28'
π license: '[CC-BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)'
β ...
πΏ
π # Introduction
πΏ
π ## What is Markdown?
πΏ
π Markdown is a plain text format for writing structured documents,
π§ based on conventions for indicating formatting in email
π° and usenet posts. It was developed by John Gruber (with
π€ help from Aaron Swartz) and released in 2004 in the form of a
π [syntax description](https://daringfireball.net/projects/markdown/syntax)
π and a Perl script (`Markdown.pl`) for converting Markdown to
π HTML. In the next decade, dozens of implementations were
π developed in many languages. Some extended the original
π Markdown syntax with conventions for footnotes, tables, and
π other document elements. Some allowed Markdown documents to be
πΊ rendered in formats other than HTML. Websites like Reddit,
π€ StackOverflow, and GitHub had millions of people using Markdown.
π And Markdown started to be used beyond the web, to author books,
π articles, slide shows, letters, and lecture notes.
πΏ
π What distinguishes Markdown from many other lightweight markup
π syntaxes, which are often easier to write, is its readability.
π As Gruber writes:
πΏ
> > The overriding design goal for Markdown's formatting syntax is
> > to make it as readable as possible. The idea is that a
π > Markdown-formatted document should be publishable as-is, as
> > plain text, without looking like it's been marked up with tags
πΈ > or formatting instructions.
π > (<https://daringfireball.net/projects/markdown/>)
πΏ
real 0m7.658s
user 0m0.682s
sys 0m0.780s
If you want to save it to a file, you can do ./emoji.sh tests/test.txt | tee > output.txt