Files
Medios-Macina/docs/tutorial.md

77 lines
3.0 KiB
Markdown
Raw Normal View History

2025-12-24 22:15:54 -08:00
# 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.
<figure>
<figcaption>config.conf</figcaption>
<pre><code class="language-powershell">[store=folder]
name="tutorial"
path="C:\Users\Admin\Downloads\tutorial"
</code></pre>
</figure>
after your done save the file and restart the cli.py
# Downloading from youtube
### cookies.txt required - [cookies.txt guide](cookies.md)
start up the cli and enter this at prompt, you can copy and paste
<figure>
<figcaption><🜂🜄|🜁🜃></figcaption>
<pre><code class="language-powershell">download-media "https://www.youtube.com/watch?v=_23dFb50Z2Y" | add-file -store tutorial
</code></pre>
</figure>
![Available formats](<img/Available formats.svg>)
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
<figure>
<figcaption><🜂🜄|🜁🜃></figcaption>
<pre><code class="language-powershell">@8
</code></pre>
</figure>
![add-file](<img/add-file.svg>)
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.
<figure>
<figcaption><🜂🜄|🜁🜃></figcaption>
<pre><code class="language-powershell">@1 | get-tag
</code></pre>
</figure>
![get-tag](<img/get-tag.svg>)
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
<figure>
<figcaption><🜂🜄|🜁🜃></figcaption>
<pre><code class="language-powershell">@ | add-tag "cli,ubuntu,desktop"
</code></pre>
</figure>
![add-tag](<img/add-tag.svg>)
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.
<figure>
<figcaption><🜂🜄|🜁🜃></figcaption>
<pre><code class="language-powershell">search-store "ubuntu"
</code></pre>
</figure>
![search-store](<img/search-store.svg>)
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)
@1 | .pipe