- Raspberry Pi 3 only (due to optimization option)
- OS: Raspbian stretch (2017-11-29)
- Music format: mp3, m4a, flac (no dsd)
- Play music stored in a NAS via wired lan (no usb)
- Scrobble to last.fm
- I2S DAC: Hifiberry DAC+ Pro compatible board
- For Japanese (NTP, timezone and language setting)
- Network: dhcp, wired lan
- Write the raspbian image on Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import toml | |
import logging | |
# なんとなくloggingで出力する | |
logging.basicConfig(level=logging.DEBUG, format="{message}", style="{") | |
# 文字列としてパスを与えると読み込める | |
# pathlib.Pathクラスでも可 | |
params = toml.load("./parameter/nominal.toml") | |
# dictクラスとしてロードされる |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 既定値を上書きするには、このファイル内にキー バインドを挿入しますauto[] | |
[ | |
{ | |
"key": "ctrl+f9", | |
"command": "python.execInTerminal", | |
"when": "editorLangId == 'python'" | |
}, | |
{ | |
"key": "ctrl+;", | |
"command": "workbench.action.terminal.focus", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"python.linting.pylintEnabled": false, | |
"python.linting.flake8Enabled": true, | |
"python.linting.lintOnSave": true, | |
"python.linting.flake8Args": [ | |
"--max-line-length", | |
"88", | |
"--ignore=E203,W503,W504" | |
], | |
"python.formatting.provider": "black", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime, timezone | |
import os | |
from pathlib import Path | |
import subprocess | |
from urllib import request | |
from zipfile import ZipFile | |
from bs4 import BeautifulSoup | |
import pytz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -eu | |
OPENSSL_VER=1.1.0g | |
mkdir openssl | |
cd openssl | |
wget https://www.openssl.org/source/openssl-${OPENSSL_VER}.tar.gz | |
tar xf openssl-${OPENSSL_VER}.tar.gz | |
cd openssl-${OPENSSL_VER} | |
./config zlib shared no-ssl3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir ~/setup | |
cd ~/setup | |
wget https://raw.githubusercontent.com/estshorter/raspi-autosetup/master/setup.sh -O ./setup.sh | |
chmod u+x ./setup.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -eu | |
# Specify software version | |
MPD_MAJOR_VER=0.20 | |
MPD_MINOR_VER=.15 | |
MPD_VER="${MPD_MAJOR_VER}${MPD_MINOR_VER}" | |
ALSA_VER=1.1.5 | |
FLAC_VER=1.3.2 | |
MPG123_VER=1.25.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Files and directories ####################################################### | |
music_directory "/var/lib/mpd/music" | |
playlist_directory "/var/lib/mpd/playlists" | |
db_file "/var/lib/mpd/tag_cache" | |
#log_file "/var/log/mpd/mpd.log" | |
pid_file "/var/run/mpd/pid" | |
#state_file "/var/lib/mpd/state" | |
#sticker_file "/var/lib/mpd/sticker.sql" | |
############################################################################### |
NewerOlder