Compare commits

...

7 Commits

6 changed files with 54 additions and 176 deletions

View File

@ -1,30 +0,0 @@
# Hostname Candidates
| name | relation | special field |
| ---- | -------- | ------------- |
| ayu | <https://anidb.net/character/7909> | |
| maaa | <https://madeinabyss.fandom.com/wiki/Maaa> | |
| mayushii | <https://anidb.net/ch23268> | |
| sakura | <https://anidb.net/ch96818> | |
| shibazaki | <https://anidb.net/character/67927> | |
| yuzuru | <https://anidb.net/ch84230> | |
## In use
These once were candidates and are now in use. Might be recycled once the
system is no longer in use.
| name | relation | special field |
| ---- | -------- | ------------- |
| fuuko | <https://anidb.net/ch1120> | |
| kanna | <https://anidb.net/ch85811> | |
| renge | <https://anidb.net/character/57473> | |
| sayuri | <https://anidb.net/ch7914> | |
| violet | <https://anidb.net/ch89959> | |
| vueko | <https://madeinabyss.fandom.com/wiki/Vueko> | |
## Host Group names
| name | relation | special field |
| ---- | -------- | ------------- |
| shinonome | Shinonome Labs from [Nichijou](https://anidb.net/anime/8168) | lab |

View File

@ -22,6 +22,13 @@
:::shell
parec [ -d DEVICE ] | flac --endian=little --channels=2 --bps=16 --sample-rate=48000 --sign=signed -o foo.flac -
### Copy Matroska Chapters to Opus
Requires the metadata to fit in one ogg page (so no cover art :().
:::shell
mkvextract file.mka chapters | xq -r 'def pad: tostring | (3 - length) as $l | ("0" * $l)[:$l] + .; [[.Chapters.EditionEntry.ChapterAtom[] | {start: .ChapterTimeStart, name: .ChapterDisplay.ChapterString}] | to_entries[] | "CHAPTER\(.key|pad)=\(.value.start)\nCHAPTER\(.key|pad)NAME=\(.value.name)"] | join("\n")' | opustags -i -S file.opus
## Video
### Copy DVD stream to file [with dvd already copied to local directory]

View File

@ -27,9 +27,35 @@
:::js
[...document.querySelectorAll('#track_table .track_row_view')].map(el => `${el.querySelector('.track_number').innerText} ${el.querySelector('.track-title').innerText} (${el.querySelector('.time').innerText})`).join("\n")
### Show total purchase value
Works on https://bandcamp.com/USERNAME/purchases
The result needs to be feeded into an intelligent calculator like qalc.
:::js
Array.from(document.querySelectorAll(".col.purchases-item-total div")).map(el => {const raw = el.children[1].innerText.replace("\n", " ").replace(",", ""); return raw.substr(1, raw.len)}).join(" + ")
## Ototoy
### Get title listing (for MusicBrainz)
:::js
Array.from(document.querySelectorAll('#tracklist tr:not(:nth-child(1))')).map(el => el.querySelector('span[id^="title-"]').innerText + " " + el.querySelector('td:nth-child(3)').innerText).join("\n")
## SteamDB
### Get stats as json
:::js
console.log(JSON.stringify(Array.from(document.querySelectorAll('#js-achievements table tbody tr')).map(row => { const cols = row.querySelectorAll('td'); return { name: cols[0].innerText, description: cols[1].querySelector('p.i').innerText, displayName: cols[1].childNodes[0].textContent.replace(/\n/g, ''), hidden: "0", icon: "achievements/" + cols[0].innerText + ".jpg", icongray: "achievements/" + cols[0].innerText + "_gray.jpg" } })))
## YouTube
### Convert takeout playlists to Invidious format
Incredibly ugly, but it works™.
If you want the import to succeed remove the liked video playlist before importing.
:::shell
(echo '{"playlists":['; (for i in *.csv; do echo '{"title": "'"${i%%.csv}"'", "description": "", "privacy": "private", "videos": ["'"$(tail -n +5 "$i" | head -n -1 | cut -d',' -f1| perl -p -e 's/\n/","/' | head -c -3)"'"]},'; done)|head -c -2; echo ']}') > playlists.json

6
docs/windows.md Normal file
View File

@ -0,0 +1,6 @@
# Windows
## Mapped network drive does not show up in save/open dialogue
In `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System`,
add the new registry key `EnableLinkedConnections` of type `DWORD` with a value of 1.

View File

@ -2,11 +2,11 @@
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1619345332,
"narHash": "sha256-qHnQkEp1uklKTpx3MvKtY6xzgcqXDsz5nLilbbuL+3A=",
"lastModified": 1653893745,
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "2ebf2558e5bf978c7fb8ea927dfaed8fefab2e28",
"rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1",
"type": "github"
},
"original": {
@ -17,11 +17,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1619796933,
"narHash": "sha256-Tw9QyuOL8ROhMKkpYBmj8r8h9ehEn9JKhZ+VyK4OfMI=",
"lastModified": 1654694478,
"narHash": "sha256-nFAMETXEhIrqnBe28u6vqy4ixSRr0BRrlZLlS0e7eoM=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "c8dff328e51f62760bf646bc345e3aabcfd82046",
"rev": "18de53ca965bd0678aaf09e5ce0daae05c58355a",
"type": "github"
},
"original": {

149
flake.nix
View File

@ -7,144 +7,22 @@
outputs = { self, flake-utils, nixpkgs }: flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
pkgs = import nixpkgs { inherit system; };
in
rec {
packages = nixpkgs.lib.mapAttrs
(name: value: pkgs.python3Packages.callPackage value { })
{
lunr =
{ buildPythonPackage, fetchPypi, future, six, mock, pytest }:
buildPythonPackage rec {
pname = "lunr";
version = "0.5.8";
src = fetchPypi {
inherit pname version;
sha256 = "0vn2j5iyy40sv0f4v8nin5n5xs4a020g6gcbcgfpbxzgk0xhdyy4";
};
propagatedBuildInputs = [
future
six
];
checkInputs = [
mock
pytest
];
};
# FIXME: use nixpkgss mkdocs once it is ≥1.1
mkdocs =
{ buildPythonPackage
, fetchPypi
, backports_tempfile
, click
, jinja2
, livereload
, markdown
, nltk
, pyyaml
, tornado
}:
buildPythonPackage rec {
pname = "mkdocs";
version = "1.1.2";
src = fetchPypi {
inherit pname version;
sha256 = "0fgv5zawpyyv0vd4j5y8m4h058lh9jkwfcm0xy4pg7dr09a1xdph";
};
propagatedBuildInputs = [
backports_tempfile
click
jinja2
livereload
markdown
nltk
pyyaml
tornado
packages.lunr
];
doCheck = false; # circular depdendency
};
pymdown-extensions =
{ buildPythonPackage, fetchPypi, markdown }:
buildPythonPackage rec {
pname = "pymdown-extensions";
version = "8.0.1";
src = fetchPypi {
inherit pname version;
sha256 = "07p5xks6qf73nbv0qb7jrspkpmxdyr7dpxv3rnkh9p2b5l2h99wv";
};
propagatedBuildInputs = [
markdown
];
doCheck = false; # they fail?
};
mkdocs-material-extensions =
{ buildPythonPackage, fetchPypi }:
buildPythonPackage rec {
pname = "mkdocs-material-extensions";
version = "1.0.1";
src = fetchPypi {
inherit pname version;
sha256 = "13y617sql4hqs376c3dfcb6v7q41km9x7fh52k3f74a2brzzniv9";
};
# circular dependency
doCheck = false;
postPatch = ''
sed -i 's/mkdocs-material>=5.0.0//' requirements/project.txt
'';
};
mkdocs-material =
{ buildPythonPackage, fetchPypi, markdown, pygments }:
buildPythonPackage rec {
pname = "mkdocs-material";
version = "6.1.2";
src = fetchPypi {
inherit pname version;
sha256 = "0yifc1df94rsaxy72hqnhjkv4c50c30j5kg0yxybkxy07p7kafic";
};
propagatedBuildInputs = [
markdown
pygments
packages.mkdocs
packages.mkdocs-material-extensions
packages.pymdown-extensions
];
};
iosevka-web =
{ stdenv, fetchzip }:
stdenv.mkDerivation rec {
pname = "iosevka-web";
version = "3.7.1";
version = "15.5.0";
src = fetchzip {
url = "https://github.com/be5invis/Iosevka/releases/download/v${version}/pkg-iosevka-${version}.zip";
sha256 = "0d012aqfnyqlpl4smfa2x2qz2qmbbfxb6jr4awv8gp6r359rc9k1";
url = "https://github.com/be5invis/Iosevka/releases/download/v15.5.0/webfont-iosevka-15.5.0.zip";
sha256 = "sha256-o7JHLs/E6oJGx0WxdHczK65Is7SZ9HdMXef/Am29OoA=";
stripRoot = false;
};
@ -152,7 +30,8 @@
installPhase = ''
mkdir -p $out
cp -r woff woff2 ttf *.css $out
sed -e "s/url('ttf\/iosevka-.*.ttf') format('truetype'), //" iosevka.css > $out/iosevka.css
cp -r woff2 $out
'';
};
@ -166,8 +45,6 @@
buildPhase = ''
mkdocs build -d $out
mkdir -p $out/nix-support
echo "doc wiki $out" >> $out/nix-support/hydra-build-products
'';
installPhase = ''
@ -175,9 +52,9 @@
ln -s ${packages.iosevka-web} $out/assets/fonts/iosevka
'';
nativeBuildInputs = [
packages.mkdocs
packages.mkdocs-material
nativeBuildInputs = with pkgs; [
mkdocs
python3Packages.mkdocs-material
];
};
};
@ -192,13 +69,5 @@
'');
};
};
# My hydra only has x86_64-linux builders
hydraJobs =
if builtins.elem system [ "x86_64-linux" ]
then {
build = packages.wiki;
}
else { };
});
}