mirror of
https://github.com/foo-dogsquared/wiki.git
synced 2025-02-07 12:19:31 +00:00
Update formatting on the command line notes
Along with some extra updates for a note about GitHub Actions.
This commit is contained in:
parent
376182f4a4
commit
92a8179dd0
@ -3,7 +3,7 @@
|
|||||||
:END:
|
:END:
|
||||||
#+title: Command line: BorgBackup
|
#+title: Command line: BorgBackup
|
||||||
#+date: "2021-05-30 21:40:24 +08:00"
|
#+date: "2021-05-30 21:40:24 +08:00"
|
||||||
#+date_modified: "2021-06-20 10:02:15 +08:00"
|
#+date_modified: "2021-07-08 17:56:25 +08:00"
|
||||||
#+language: en
|
#+language: en
|
||||||
#+property: header_args :eval no
|
#+property: header_args :eval no
|
||||||
#+property: header_args:bash :results silent :exports code
|
#+property: header_args:bash :results silent :exports code
|
||||||
@ -36,9 +36,9 @@ It can be picky with certain subcommands output being affected from the order of
|
|||||||
|
|
||||||
Borg uses a Git-style command-line interface with subcommands and some common options to choose from.
|
Borg uses a Git-style command-line interface with subcommands and some common options to choose from.
|
||||||
|
|
||||||
- You can set the log level of the program with ~--debug~, ~--info~, ~--warning~, ~--error~, and ~--critical~.
|
- You can set the log level of the program with =--debug=, =--info=, =--warning=, =--error=, and =--critical=.
|
||||||
- ~-v, --verbose~ - alias for ~--info~
|
- =-v, --verbose= - alias for =--info=
|
||||||
- ~-p, --progress~ - show progress information; will be slower on certain operations due to additional passing of the metadata
|
- =-p, --progress= - show progress information; will be slower on certain operations due to additional passing of the metadata
|
||||||
|
|
||||||
Keep in mind, Borg doesn't have global configuration files, only per-repo configurations.
|
Keep in mind, Borg doesn't have global configuration files, only per-repo configurations.
|
||||||
You can create configurations with a little hard work and shell scripts.
|
You can create configurations with a little hard work and shell scripts.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#+title: Command line: FFmpeg
|
#+title: Command line: FFmpeg
|
||||||
#+date: "2021-05-09 16:40:50 +08:00"
|
#+date: "2021-05-09 16:40:50 +08:00"
|
||||||
#+date_modified: "2021-06-19 17:43:07 +08:00"
|
#+date_modified: "2021-07-08 17:52:54 +08:00"
|
||||||
#+language: en
|
#+language: en
|
||||||
#+property: header-args :eval no
|
#+property: header-args :eval no
|
||||||
|
|
||||||
@ -15,17 +15,17 @@ The swiss army knife for interacting with multimedia files (except images becaus
|
|||||||
The FFmpeg command line interface is mostly picky because of order.
|
The FFmpeg command line interface is mostly picky because of order.
|
||||||
Whatever options are given will be processed with those options in order.
|
Whatever options are given will be processed with those options in order.
|
||||||
|
|
||||||
- ~-hide_banner~ - hide the annoying banner
|
- =-hide_banner= - hide the annoying banner
|
||||||
- ~-loglevel [level] | -v [level]~ - set the verbosity level
|
- =-loglevel [level] | -v [level]= - set the verbosity level
|
||||||
- ~-codecs~ - list all codecs
|
- =-codecs= - list all codecs
|
||||||
- ~-devices~ - list all devices
|
- =-devices= - list all devices
|
||||||
- ~-i [file]~ - the input file
|
- =-i [file]= - the input file
|
||||||
- ~c [codec]~ - set the codec
|
- =c [codec]= - set the codec
|
||||||
- ~-b [rate]~ - set the bitrate
|
- =-b [rate]= - set the bitrate
|
||||||
- ~-o [file]~ - set the output
|
- =-o [file]= - set the output
|
||||||
|
|
||||||
Certain options have the option of specifying whether you're interacting with the audio or video track.
|
Certain options have the option of specifying whether you're interacting with the audio or video track.
|
||||||
For example, ~-codec:audio~ (~-c:a~) to set the audio codec.
|
For example, =-codec:audio= (=-c:a=) to set the audio codec.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#+title: Command line: journalctl
|
#+title: Command line: journalctl
|
||||||
#+date: "2021-05-20 23:07:39 +08:00"
|
#+date: "2021-05-20 23:07:39 +08:00"
|
||||||
#+date_modified: "2021-06-19 17:43:20 +08:00"
|
#+date_modified: "2021-07-10 22:19:08 +08:00"
|
||||||
#+language: en
|
#+language: en
|
||||||
#+property: header-args :results none
|
#+property: header-args :results none
|
||||||
|
|
||||||
@ -16,13 +16,13 @@ For more information, see =journalctl.1= manual page.
|
|||||||
|
|
||||||
* Options
|
* Options
|
||||||
|
|
||||||
- ~-b, --boot~ - show the logs starting from boot time
|
- =-b, --boot= - show the logs starting from boot time
|
||||||
- ~-e, --pager-end~ - go to the end of the logs
|
- =-e, --pager-end= - go to the end of the logs
|
||||||
- ~-f, --follow~ - watch the logs
|
- =-f, --follow= - watch the logs
|
||||||
- ~--user-unit~ - show logs from a user unit
|
- =--user-unit= - show logs from a user unit
|
||||||
- ~-u, --unit [UNIT]~ - show the logs of a system unit
|
- =-u, --unit [UNIT]= - show the logs of a system unit
|
||||||
- ~--vacuum-time=[TIMESPAN]~ - delete logs older than the specified timespan [fn:: View =systemd.time.5= for more information.]
|
- =--vacuum-time [TIMESPAN]= - delete logs older than the specified timespan [fn:: View =systemd.time.5= for more information.]
|
||||||
- ~-x, --catalog~ - prints helpful messages such as the documentation URIs
|
- =-x, --catalog= - prints helpful messages such as the documentation URIs
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
74
structured/cli.youtube-dl.org
Normal file
74
structured/cli.youtube-dl.org
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
#+title: Command-line: youtube-dl
|
||||||
|
#+date: "2021-07-08 17:36:26 +08:00"
|
||||||
|
#+date_modified: "2021-07-08 19:02:10 +08:00"
|
||||||
|
#+language: en
|
||||||
|
#+property: header-args :eval no
|
||||||
|
|
||||||
|
|
||||||
|
One of the archivists' best friends.
|
||||||
|
At least you don't have to go to those shady YouTube conversion sites anymore when you have a [[https://ytdl-org.github.io/youtube-dl/supportedsites.html][complete list of other video sites]] you can download from.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
* Synopsis
|
||||||
|
|
||||||
|
#+begin_src shell
|
||||||
|
youtube-dl [OPTIONS...] [URLS...]
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
* Options
|
||||||
|
|
||||||
|
- =--add-metadata= - add metadata to the resulting file
|
||||||
|
- =--audio-format [EXTENSION]= - download the video with the select format of "opus", "mp3", "opus", and "vorbis"; but there is also the convenient "best" option
|
||||||
|
- =--audio-quality [QUALITY]= - quality of the audio from 0 to 9, best to worst respectively; bitrates are also accepted (e.g., =320K=, =1M=)
|
||||||
|
- =--config-location [PATH]= - set the config to be used; useful for local configs with specific options
|
||||||
|
- =-F, --list-format= - prints a list of format available for downloading
|
||||||
|
- =--format [QUALITY]= - download the video with the format shown in =--list-format=; there are convenient options such as =bestaudio= and =bestvideo= referring to the best quality it could find
|
||||||
|
- =-j, --dump-json= - dry-run and prints in JSON format
|
||||||
|
- =--no-overwrite= - error if the file already exists which is handy for scripts
|
||||||
|
- =--write-sub= - writes the subtitle file into disk
|
||||||
|
- =-x, --extract-audio= - extract only the audio track
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
* Examples
|
||||||
|
|
||||||
|
Here is an entryway into your newfound archiving habit.
|
||||||
|
Enjoy! :)
|
||||||
|
|
||||||
|
|
||||||
|
** Download the thumbnail and the audio of the video
|
||||||
|
|
||||||
|
Very simple.
|
||||||
|
Very useful as most of the thumbnails can go to high resolution and if you need them for some reason.
|
||||||
|
|
||||||
|
#+begin_src shell
|
||||||
|
youtube-dl --write-thumbnail --extract-audio https://www.youtube.com/watch?v=wy9VvdaLuSs
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
|
** Download an entire album
|
||||||
|
|
||||||
|
Though, you should look at the supported sites if it supports downloading an album out of the URL.
|
||||||
|
In this example, we have Bandcamp.
|
||||||
|
|
||||||
|
#+begin_src shell
|
||||||
|
youtube-dl --output '%(title)s.%(ext)s' --format bestaudio https://gametal.bandcamp.com/album/side-quests-vol-3
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
|
** Specific video download requirements
|
||||||
|
|
||||||
|
In this example, I want to download a video with a width of 1080px and the best video and audio at 320Kbit/s.
|
||||||
|
Oh, and the video should be in MP4 and the audio in Opus.
|
||||||
|
|
||||||
|
This is will only succeed if the format is available to download which you can do with =--list-format=.
|
||||||
|
|
||||||
|
#+begin_src shell
|
||||||
|
youtube-dl --format 'bestvideo[width=1080,ext=mp4]+bestaudio[abr=320K,ext=opus]' https://www.youtube.com/watch?v=wy9VvdaLuSs
|
||||||
|
#+end_src
|
@ -3,7 +3,7 @@
|
|||||||
:END:
|
:END:
|
||||||
#+title: GitHub Actions
|
#+title: GitHub Actions
|
||||||
#+date: "2021-06-20 18:58:48 +08:00"
|
#+date: "2021-06-20 18:58:48 +08:00"
|
||||||
#+date_modified: "2021-07-05 01:46:35 +08:00"
|
#+date_modified: "2021-07-07 16:43:41 +08:00"
|
||||||
#+language: en
|
#+language: en
|
||||||
|
|
||||||
|
|
||||||
@ -19,6 +19,7 @@
|
|||||||
- each step make uses an action which is basically a script;
|
- each step make uses an action which is basically a script;
|
||||||
it can interact with the repo or do something else entirely without ever touching it
|
it can interact with the repo or do something else entirely without ever touching it
|
||||||
- you can use already defined actions or with your own
|
- you can use already defined actions or with your own
|
||||||
|
- if you want to explore other options, the [[https://github.com/marketplace][GitHub marketplace]] allows searching for various third-party actions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user