Skip to content

Instantly share code, notes, and snippets.

View Tamriel's full-sized avatar

Jan Tamriel

  • Germany
View GitHub Profile
@Tamriel
Tamriel / change_path.py
Created November 19, 2022 13:48
Change the path of your quod libet library
import os
import quodlibet.library
library_path = os.path.join(quodlibet.get_user_dir(), "songs")
library = quodlibet.library.init(library_path)
print(library.masked_mount_points)
print(library.unmask('/run/media/tamriel/HDD'))
for song in library:
# before:
@Tamriel
Tamriel / convert_to_opus.md
Last active November 25, 2018 19:35
Convert quod libet library to opus

Convert your music library (in this case quod libet) to the opus file format

  1. In quod libet, check for files with low bitrates and replace them with better ones: &(#(bitrate < 192), encoding != VBR)
  2. Convert + delete your music files: dir2opus --recursive --verbose --delete-input --bitrate 128 --convert-all MyFolder
  1. Close quod libet
  2. Backup ~/.config/quodlibet
  3. Run this python3 script to update the library file paths:
  • Installiere Ruby 2.4.3:
    • gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
    • \curl -sSL https://get.rvm.io | bash -s stable
    • rvm install 2.4.3
  • git clone https://github.com/foodcoops/foodsoft.git
  • cd foodsoft
  • rvm 2.4.3 do gem install bundle
  • echo gem \'unicorn\' >> Gemfile (Server-Software für den Betrieb Quelle)
  • rvm 2.4.3 do bundle install --without test
    • Falls du einen Fehler missing required library to compile this module für ruby-filemagic bekommst:
Error during failsafe response: No config for this environment (f) available!
/home/foodcool/foodsoft-2017/lib/foodsoft_config.rb:212:in `set_config'
/home/foodcool/foodsoft-2017/lib/foodsoft_config.rb:79:in `select_foodcoop'
/home/foodcool/foodsoft-2017/lib/foodsoft_config.rb:85:in `select_default_foodcoop'
/home/foodcool/foodsoft-2017/app/controllers/errors_controller.rb:19:in `select_foodcoop'
/home/foodcool/foodsoft-2017/vendor/bundle/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:432:in `block in make_lambda'
/home/foodcool/foodsoft-2017/vendor/bundle/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:164:in `block in halting'
/home/foodcool/foodsoft-2017/vendor/bundle/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:504:in `block in call'
/home/foodcool/foodsoft-2017/vendor/bundle/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:504:in `each'
/home/foodcool/foodsoft-2017/vendor/bundle/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:504:in `
import buffer.Buffer
import org.scalajs.dom
import dom.document
import eu.timepit.crjdt.circe.RegNodeConflictResolver.LWW
import eu.timepit.crjdt.circe.syntax._
import eu.timepit.crjdt.core.{Operation, Replica}
import eu.timepit.crjdt.core.syntax._
import upickle.default._
import scala.scalajs.js
@Tamriel
Tamriel / sync_to_device.py
Last active December 2, 2016 13:00
Quod Libet Plugin to sync saved searches to a device
import os
import cPickle
from gi.repository import Gtk
from quodlibet import get_user_dir
from quodlibet import qltk
from quodlibet.plugins.events import EventPlugin
from quodlibet.qltk.ccb import ConfigCheckButton
from quodlibet.query import Query
from quodlibet.plugins import PluginConfigMixin
from quodlibet import config
Started GET "/f/login" for 127.0.0.1 at 2016-06-08 16:51:49 +0200
Processing by SessionsController#new as HTML
Parameters: {"foodcoop"=>"f"}
RailsSettings::CachedSettings Load (0.1ms) SELECT "settings".* FROM "settings" WHERE (thing_type is NULL and thing_id is NULL) AND "settings"."var" = ? ORDER BY "settings"."id" ASC LIMIT 1 [["var", "foodcoop.f.ignore_browser_locale"]]
CACHE (0ms) SELECT "settings".* FROM "settings" WHERE (thing_type is NULL and thing_id is NULL) AND "settings"."var" = ? ORDER BY "settings"."id" ASC LIMIT 1 [["var", "foodcoop.f.ignore_browser_locale"]]
Set locale to en
RailsSettings::CachedSettings Load (0.1ms) SELECT "settings".* FROM "settings" WHERE (thing_type is NULL and thing_id is NULL) AND "settings"."var" = ? ORDER BY "settings"."id" ASC LIMIT 1 [["var", "foodcoop.f.time_zone"]]
RailsSettings::CachedSettings Load (0.1ms) SELECT "settings".* FROM "settings" WHERE (thing_type is NULL and thing_id is NULL) AND "settings"."var" = ? ORDER BY "settings"."id" AS
Cannot find ('pyi_rth_qt5', '/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/PyInstaller/loader/rthooks/pyi_rth_qt5.py', 1, 's')
Traceback (most recent call last):
File "/usr/local/bin/pyinstaller", line 11, in <module>
sys.exit(run())
File "/usr/local/lib/python3.5/site-packages/PyInstaller/__main__.py", line 90, in run
run_build(pyi_config, spec_file, **vars(args))
File "/usr/local/lib/python3.5/site-packages/PyInstaller/__main__.py", line 46, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "/usr/local/lib/python3.5/site-packages/PyInstaller/building/build_main.py", line 755, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
@Tamriel
Tamriel / gist:7107521081f2f26cdd22
Created August 5, 2015 17:16
windows pygs install error
C:\Users\Jan>pip3 install PyGlobalShortcut
You are using pip version 6.0.8, however version 7.1.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting PyGlobalShortcut
Using cached PyGlobalShortcut-0.2.3.zip
Installing collected packages: PyGlobalShortcut
Running setup.py install for PyGlobalShortcut
building 'QxtGlobalShortcut' library
Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
@Tamriel
Tamriel / gist:5effe03e81ba94d2975b
Created August 5, 2015 15:52
linux pygs install error
osboxes@osboxes:~$ pip3 install PyGlobalShortcut
Downloading/unpacking PyGlobalShortcut
Downloading PyGlobalShortcut-0.2.3.zip (44kB): 44kB downloaded
Running setup.py (path:/tmp/pip-build-vj_d61f6/PyGlobalShortcut/setup.py) egg_info for package PyGlobalShortcut
Installing collected packages: PyGlobalShortcut
Running setup.py install for PyGlobalShortcut
building 'QxtGlobalShortcut' library
Project MESSAGE: This project is using private headers and will therefore be tied to this specific Qt module build version.
Project MESSAGE: Running this project against other versions of the Qt modules may crash at any arbitrary point.