diff --git a/README.md b/README.md index 5f083f9..6a82797 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/maloja/proccontrol/control.py b/maloja/proccontrol/control.py index ab70a80..e95acb5 100644 --- a/maloja/proccontrol/control.py +++ b/maloja/proccontrol/control.py @@ -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 } diff --git a/maloja/proccontrol/tasks/generate.py b/maloja/proccontrol/tasks/generate.py index 0184897..44bb4da 100644 --- a/maloja/proccontrol/tasks/generate.py +++ b/maloja/proccontrol/tasks/generate.py @@ -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)):