Updated documentation

This commit is contained in:
krateng 2022-03-27 05:57:58 +02:00
parent c8ed894efb
commit e22ef4d268
3 changed files with 10 additions and 8 deletions

View File

@ -137,11 +137,12 @@ If you need to run the server in the foreground, use
### Data
* If you would like to import all your previous last.fm scrobbles, use [benfoxall's website](https://benjaminbenben.com/lastfm-to-csv/) ([GitHub page](https://github.com/benfoxall/lastfm-to-csv)). Use the command `maloja import *filename*` to import the downloaded file into Maloja.
If you would like to import your previous scrobbles, use the command `maloja import *filename*`. This works on:
* To backup your data, run `maloja backup` or, to only backup essential data (no artwork etc), `maloja backup -l minimal`.
* a Last.fm export generated by [benfoxall's website](https://benjaminbenben.com/lastfm-to-csv/) ([GitHub page](https://github.com/benfoxall/lastfm-to-csv))
* an official [Spotify data export file](https://www.spotify.com/us/account/privacy/)
* To fix your database (e.g. after you've added new rules), use `maloja fix`.
To backup your data, run `maloja backup`, optional with `--include_images`.
### Customization

View File

@ -117,9 +117,9 @@ def main(*args,**kwargs):
"debug":debug,
"setup":onlysetup,
# admin scripts
"import":tasks.import_scrobbles,
"backup":tasks.backup, # maloja backup --folder x/y --include_images
"generate":tasks.generate,
"import":tasks.import_scrobbles, # maloja import /x/y.csv
"backup":tasks.backup, # maloja backup --targetfolder /x/y --include_images
"generate":tasks.generate, # maloja generate 400
# aux
"info":print_info
}

View File

@ -67,10 +67,11 @@ def generate_track():
def generate():
def generate(n=200):
n = int(n)
scrobbles = []
for _ in range(200):
for _ in range(n):
track = generate_track()
print("Generated",track)
for _ in range(random.randint(1, 50)):