8.5 KiB
set up config.conf
the config file is meant to be modular, you only need to put in what you want. technically you do not need a file store, but you will miss out on a bunch features. For this tutorial we are going to make an example folderstore. Add the below to your config.conf, pick a path for you that is a blank folder non-system folder.
[store=folder]
name="tutorial"
path="C:\Users\Admin\Downloads\tutorial"
after your done save the file and restart the cli.py
Downloading from youtube
cookies.txt required - cookies.txt guide
start up the cli and enter this at prompt, you can copy and paste
download-media "https://www.youtube.com/watch?v=_23dFb50Z2Y" | add-file -store tutorial
this shows the available formats you can download, the audio is audio only, and the video will automatically merge audio so you only need to pick the video if you want video and audio. it is ordered best quality at the lowest/highest number down.
the # column is how you select what you want to pick, run this next
@8
files inside of stores are renamed as their hash, you will only be able to find your file by searching for it, the title: tag acts as a psuedo filename, if you search "terry" then the file will be brought up, if you search "archeroflusitania" the file will not come up, you need to prepend the namespace first, "channel:archeroflusitania"; you can also use wild card "channel:arch*" and that will pull it up. lets see what tags the file has, run this.
@1 | get-tag
these tags are scraped from the youtube video using yt-dlp, they are stored in your store's database, this is how you will actually find your files so make sure it has either a title: tag that you can look up or you add your custom tags
now lets add more tags, run this
@ | add-tag "cli,ubuntu,desktop"
we added freeform tags, freeform tags are tags that dont have colons in them, these tags show up in searches without any special prepends. run the following below to search for our new tags added to the file.
search-file "ubuntu"
to access your file and view it, you can run either
@1 | get-file
or if you have mpv installed (the preferred way for video files)
(Tip: the bootstrap/setup scripts will try to install mpv for you if it's not found on PATH. If it isn't available, install mpv manually and ensure mpv is on your PATH.)
@1 | .pipe
Bandcamp downloading (provider method)
search-file -provider bandcamp -query "artist:altrusian grace media"
this brings up special scraper for bandcamp on the artist page, the query syntax of "artist:" is how we parse args for some cmdlets. next run the following
@1
this shows a list of bandcamp album links, go ahead and enter this below
@8
this shows a list of bandcamp album link, if you look at the title of the table, download-media -url "https://altrusiangrace.bandcamp.com/album/zetetic-astronomy-earth-not-a-globe-full-audiobook" , you could just copy the url from webpage and paste it as this command to get the table without going through the provider search. In this table, all these are playlist items, each item is its own file but in this case its connected and they are in an album. if you wanted to only download a couple you could do @1,5,7 and that would only download those items, you can also do a range @1-6 and that will download 1 through 6. For this tutorial, run this below.
@* | merge-file | add-file -store tutorial
this will download the entire playlist, merge them into one file while putting chapter markers for the file merge points.
screenshot
medios can take screenshots of pages and output them as pdf, jpg, png, and webp. the default is webp as its the smallest format. the screenshot is fullscreen and scrolls. run this below
screen-shot "https://www.timecube.net/" | add-tag "title:timecube homepage" | add-file -store tutorial
@1 | get-file
this opens up a webrowser with your media file embedded, you can copy and paste or if you want to share on a public hoster, you can do this
@1 | add-file -provider 0x0
this will upload your media file to 0x0.com and at the end provide you a link, you dont need to worry about saving it, you can always retrieve the link where you downloaded the file by running
@1 | get-url
soul seek
soul-seek requires a psuedo account
to make an account in soulseek, simple enter in random username and password and put in your config.conf. you do not need to create an account on the website just put in random name that isint taken with random password, dont user special symbols or spaces.
[provider=soulseek]
username="putinrandomusername"
password="putinrandompassword"
restart the cli and check the startup table, if soulseek says ENABLED then you are good to go, run this.
search-file -provider soulseek "erika herms niel"
next run
@13 | add-file -store tutorial
this will download and inject into your tutorial store, keep in mind that soulseek is p2p, so download speeds will vary and it may take a minute to connect.
Open Library
OPENLIBRARY/ARCHIVE.ORG ACCOUNT REQUIRED
Open Library throw away account is fine to create.
[provider=OpenLibrary]
email=""
password=""
openlibrary allows us to borrow books, merge them into a permement pdf, then return the book. run this below
download-file "https://archive.org/details/powerofsatiremag0000elli_h4h9" | add-file -store tutorial
we could have use the search-file -provider openlibrary, but to show the versatile of the app, we able to use download-file and medios will be able to intelligently direct it the correct provider (with exception of download-media, download-media is just the frontend for yt-dlp).
Libgen
libgen is self-explanatory,
download-file "https://libgen.gl/ads.php?md5=5c258cc177c1d735c7acfb60fbdb14bf&downloadname=10.1515/9781400870080-009" | add-file -store tutorial