fabio / ntfy-browser-import-export

0 gustos
0 bifurcaciones
1 archivos
Última actividad 1769045220
A set of scripts to backup and restore your ntfy subscriptions, settings, users and messages from a browser session
1 /**
2 * ntfy exporter
3 *
4 * This saves the ntfy state in your current browser session to a JSON file that
5 * can be imported by another browser session or (only partly tested) the Android app.
6 *
7 * Save the following one-liner to your bookmarks to run it on the fly:
8
9 javascript:(async()=>{async function dumpStore(dbName,storeName){const db=await new Promise((resolve,reject)=>{const r=indexedDB.open(dbName);r.onsuccess=()=>resolve(r.result);r.onerror=()=>reject(r.error);});const tx=db.transaction(storeName,"readonly");const store=tx.objectStore(storeName);const all=await new Promise((resolve,reject)=>{const r=store.getAll();r.onsuccess=()=>resolve(r.result);r.onerror=()=>reject(r.error);});db.close();return all;}const [subscriptions,users,notifications,settings]=await Promise.all([dumpStore("ntfy","subscriptions"),dumpStore("ntfy","users"),dumpStore("ntfy","notifications"),dumpStore("ntfy","prefs")]);const data={subscriptions,users,notifications,settings};const json=JSON.stringify(data,null,2);const blob=new Blob([json],{type:"application/json"});const url=URL.createObjectURL(blob);const a=document.createElement("a");a.href=url;a.download=`ntfy-backup-${location.host}-${new Date().toISOString().replace(/[:.]/g,"-")}.json`;document.body.appendChild(a);a.click();a.remove();URL.revokeObjectURL(url);})().catch(e=>alert(e&&e.message?e.message:String(e)));

fabio / Platypush+Mopidy+Termux configuration

0 gustos
0 bifurcaciones
4 archivos
Última actividad 1765754500
Platypush configuration for a Termux setup on Android with a local Mopidy music server and support for notifications and music commands over ntfy
1 #!~/.config/platypush/config.yaml
2
3 # Platypush configuration file for Termux Mopidy Notifier
4
5 # A name for your device
6 device_id: phone
7
8 # Enable the Web server
9 backend.http:
10 # port: 8008
Siguiente Anterior