<commit_before>---
layout: post
title: raspberry pi fun
tag: [fractal, projects]
---
so i finally got my wireless dongle and in the span of 24 hours i have re-purposed
the pi to an cherry pi server which works but in an very weird way so i was following
an [tutorial online](http://fomori.org/blog/?p=687) and as usual something went wrong.
The first thing was that for the script that automatically starts up on boot it needed a cli
program called [gnu screen](https://www.gnu.org/software/screen/) but it didn't work for the terminal
so i tried a different start up script but then the folder which held the music wasn't found by the
script (i think it was because i was was pointing the dir to .local which messed it up somehow)so then
i spent the rest of the evening trying out different things in till i found a real simple method using
something called crontab which i found on the cherry music [wiki](https://github.com/devsnd/cherrymusic/wiki/Setup-guide#tips-and-tricks) using two simple commands
```
EDITOR=nano crontab -e
```      
then inside the editor:
```
@reboot cd /path/to/your/cherrymusic/installation ; python cherrymusic
```
which worked once i changed the dir where the music was. Amazingly it runs pretty well
for something that is on an low spec system. Which is interesting since i always found
the mini dnla server (which i had before this) to be really glitchy and also i could
never find a good dnla client that wouldn't glitch up after a while      
![cherry music](/images/cherrymusic.gif)<commit_msg>make code look better<commit_after>---
layout: post
title: raspberry pi fun
tag: [fractal, projects]
---
so i finally got my wireless dongle and in the span of 24 hours i have re-purposed
the pi to an cherry pi server which works but in an very weird way so i was following
an [tutorial online](http://fomori.org/blog/?p=687) and as usual something went wrong.
The first thing was that for the script that automatically starts up on boot it needed a cli
program called [gnu screen](https://www.gnu.org/software/screen/) but it didn't work for the terminal
so i tried a different start up script but then the folder which held the music wasn't found by the
script (i think it was because i was was pointing the dir to .local which messed it up somehow)so then
i spent the rest of the evening trying out different things in till i found a real simple method using
something called crontab which i found on the cherry music [wiki](https://github.com/devsnd/cherrymusic/wiki/Setup-guide#tips-and-tricks) using two simple commands

{% highlight bash %}
EDITOR=nano crontab -e
{% endhighlight %}       

then inside the editor:

{% highlight bash %}
@reboot cd /path/to/your/cherrymusic/installation ; python cherrymusic
{% endhighlight %} 

which worked once i changed the dir where the music was. Amazingly it runs pretty well
for something that is on an low spec system. Which is interesting since i always found
the mini dnla server (which i had before this) to be really glitchy and also i could
never find a good dnla client that wouldn't glitch up after a while      
![cherry music](/images/cherrymusic.gif)
{'fraction_non_alphanumeric': 0.06305732484076433, 'fraction_numerical': 0.0031847133757961785, 'mean_word_length': 4.166118421052632, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, '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': '5194054', 'n_tokens_mistral': 893, 'n_tokens_neox': 836, 'n_words': 478}