Repository: JannikHv/gydl
Branch: master
Commit: 7e939dceb80b
Files: 12
Total size: 39.0 KB
Directory structure:
gitextract_vse4exaw/
├── .gitignore
├── LICENSE
├── README.md
├── data/
│ ├── com.github.JannikHv.Gydl.appdata.xml.in
│ ├── com.github.JannikHv.Gydl.desktop.in
│ └── meson.build
├── meson.build
├── po/
│ ├── LINGUAS
│ ├── POTFILES.in
│ ├── meson.build
│ └── sv.po
└── src/
└── gydl.py
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# IPython Notebook
.ipynb_checkpoints
# pyenv
.python-version
# celery beat schedule file
celerybeat-schedule
# dotenv
.env
# virtualenv
venv/
ENV/
# Spyder project settings
.spyderproject
# Rope project settings
.ropeproject
================================================
FILE: LICENSE
================================================
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{description}
Copyright (C) {year} {fullname}
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
{signature of Ty Coon}, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
================================================
FILE: README.md
================================================
# About
Gydl (Graphical yt-dlp) is a GUI wrapper around the already existing
yt-dlp program.
It's developed with a dialog driven experience in mind. This provides a quick
and easy video or audio downloads without disturbances.
Big **thank you** to the developer(s) of yt-dlp! Check out their project:
https://github.com/yt-dlp/yt-dlp
based on youtube-dl:
https://github.com/rg3/youtube-dl
# News!
Fellow users,
Gydl is currently in a state where it is not worth enhancing/developing it in any way.
I currently don't have the resources to develop Gydl myself - thus the amount of open issues.
I plan on keeping Gydl stable for how it currently is/works and rewrite it completely in about half a year at the latest.
# Installation
## GNU/Linux Packages
* [Arch Linux](https://aur.archlinux.org/packages/gydl-git/)
(Credit: [AffeAli](https://github.com/AffeAli))
## Flatpak
[](https://repology.org/project/gydl/versions)
- [Flatpak](http://flatpak.org) packages support multiple distributions and are sandboxed.
Stable releases are hosted on [Flathub](https://flathub.org):
```
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install flathub com.github.JannikHv.Gydl
```
- [Fedora](https://apps.fedoraproject.org/packages/gydl): `sudo dnf install gydl`
## Source
Gydl is written in Python3 and uses the GTK+3 toolkit.
### Dependencies
To run it you need to have installed:
* gtk+3
* python3
* pygobject
* yt-dlp
### Build & Install
Meson installs to `/usr/local` as the default prefix.
```
meson build
cd build
ninja install
```
### Build Options
Use `meson --help` to get all build options. You may specify any option when
you initially run meson.
```
# Example
meson build --prefix=/app
```
If you already have a build directory, you must use instead use
`meson configure`, from within the build directory.
```
# Example
cd build
meson configure -Dprefix=/app
```
Meson also supports the **DESTDIR** environment variable, which is useful for
building a package.
[See Meson documentation for more](http://mesonbuild.com)
# Translation
Gydl itself is currently not translatable, but the appdata and
the desktop entry is.
Use the build system to generate a POT template file from the latest commit.
```
meson build
ninja -C build Gydl-pot
rm -rf build
```
Copy the POT file into a PO file matching your language code and translate
all strings. Alternatively follow the above steps and use a tool like Poedit.
# Usage
When using Gydl, you have the option to download your Youtube Video as a
**Video** or **Audio**.
Each of these options have a text entry, as well as 2 combo-boxes managing
quality and the format.

When clicking on **Download** there are 3 scenarios you can face:
* Download Finished - When your download has finished successfully.

* Download Unsuccessful - When a bad URL was entered or similar errors occured.

* Connection Error - When no internet connection could be established.

These dialogues will be presented to you as a little windows.
Notice that not every combination of settings will work.
Thanks for any involvement in this project, I hope you like it.
Kind regards, Jannik Hauptvogel.
================================================
FILE: data/com.github.JannikHv.Gydl.appdata.xml.in
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2017 Jannik Hauptvogel -->
<component type="desktop-application">
<id>com.github.JannikHv.Gydl.desktop</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0</project_license>
<name>Gydl</name>
<summary>Download content from sites like YouTube</summary>
<developer_name>Jannik Hauptvogel</developer_name>
<description>
<p>
Gydl (Graphical yt-dlp) is a tool that enables downloading of content from
YouTube and many other sites. It provides a minimal interface based on dialogues,
making it quick and easy to download multimedia content.
</p>
<p>
Because user needs vary, Gydl supports both audio and video downloads. If a
selected format is not available at the source, Gydl will attempt to convert it.
</p>
<p>
Gydl is based upon the popular yt-dlp program, which can be found on GitHub.
A big thank you to the developer(s).
</p>
</description>
<launchable>com.github.JannikHv.Gydl.desktop</launchable>
<url type="homepage">https://github.com/JannikHv/gydl</url>
<url type="bugtracker">https://github.com/JannikHv/gydl/issues</url>
<url type="help">https://github.com/JannikHv/gydl/blob/master/README.md</url>
<screenshots>
<screenshot type="default">
<image>https://raw.githubusercontent.com/JannikHv/gydl/master/images/screenshot-01.png</image>
</screenshot>
</screenshots>
<content_rating type="oars-1.1" />
<releases>
<release version="0.1.1" date="2017-09-13">
<description>
<ul>
<li>Includes polish and minor fixes to the data files.</li>
<li>There is now also support for translations in the build system.</li>
</ul>
</description>
</release>
<release version="0.1.0" date="2017-08-25">
<description>
<ul>
<li>This release tags the current state of Gydl so that it can be properly
packaged. Most importantly, it enables uploading to Flathub.</li>
</ul>
</description>
</release>
</releases>
<update_contact>contact_AT_hembas.se</update_contact>
<translation type="gettext">Gydl</translation>
<keywords>
<keyword>youtube downloader</keyword>
<keyword>video converter</keyword>
<keyword>audio downloader</keyword>
<keyword>online media downloader</keyword>
<keyword>content grabber</keyword>
</keywords>
</component>
================================================
FILE: data/com.github.JannikHv.Gydl.desktop.in
================================================
[Desktop Entry]
Categories=AudioVideo;
Comment=Download content from sites like YouTube
Encoding=UTF-8
Exec=gydl.py
GenericName=YouTube Downloader
# Translators: This is an icon name, don't translate!
Icon=gydl
Name=Gydl
Terminal=false
Type=Application
================================================
FILE: data/meson.build
================================================
i18n_mod.merge_file(
input: 'com.github.JannikHv.Gydl.appdata.xml.in',
output: 'com.github.JannikHv.Gydl.appdata.xml',
po_dir: '../po',
install: true,
install_dir: join_paths(datadir, 'metainfo')
)
i18n_mod.merge_file(
input: 'com.github.JannikHv.Gydl.desktop.in',
output: 'com.github.JannikHv.Gydl.desktop',
type: 'desktop',
po_dir: '../po',
install: true,
install_dir: join_paths(datadir, 'applications')
)
icondir = join_paths(datadir, 'icons/hicolor')
install_data(
'gydl.svg',
install_dir: join_paths(icondir, 'scalable/apps')
)
================================================
FILE: meson.build
================================================
project('Gydl',
version: '0.1.0'
)
py3_mod = import('python3')
i18n_mod = import('i18n')
message('Checking dependencies')
py3 = py3_mod.find_python()
gtk3 = dependency('gtk+-3.0')
pygo = dependency('pygobject-3.0')
ydl = find_program('yt-dlp')
prefix = get_option('prefix')
bindir = join_paths(prefix, get_option('bindir'))
datadir = join_paths(prefix, get_option('datadir'))
localedir = join_paths(prefix, get_option('localedir'))
message('Getting python install path')
py3_dir = py3_mod.sysconfig_path('purelib')
message('Installing Gydl')
install_data('src/gydl.py', install_dir: bindir)
message('Installing data files')
subdir('data')
subdir('po')
================================================
FILE: po/LINGUAS
================================================
sv
================================================
FILE: po/POTFILES.in
================================================
data/com.github.JannikHv.Gydl.desktop.in
data/com.github.JannikHv.Gydl.appdata.xml.in
================================================
FILE: po/meson.build
================================================
i18n_mod.gettext(meson.project_name(),
preset: 'glib'
)
================================================
FILE: po/sv.po
================================================
# Swedish localization for Gydl.
# Copyright (C) 2017
# This file is distributed under the same license as the Gydl package.
# Patrik Nilsson <translation_AT_hembas.se>, 2017.
#
msgid ""
msgstr ""
"Project-Id-Version: Gydl\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-09-13 12:21+0200\n"
"PO-Revision-Date: 2017-09-13 12:21+0200\n"
"Last-Translator: Patrik Nilsson <translation_AT_hembas.se>\n"
"Language-Team: \n"
"Language: sv\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.0.3\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: data/com.github.JannikHv.Gydl.desktop.in:4
#: data/com.github.JannikHv.Gydl.appdata.xml.in:8
msgid "Download content from sites like YouTube"
msgstr "Hämta innehåll från webbplatser som YouTube"
#: data/com.github.JannikHv.Gydl.desktop.in:7
msgid "YouTube Downloader"
msgstr "YouTube nedladdnings-program"
#. Translators: This is an icon name, don't translate!
#: data/com.github.JannikHv.Gydl.desktop.in:9
msgid "gydl"
msgstr "gydl"
#: data/com.github.JannikHv.Gydl.desktop.in:10
#: data/com.github.JannikHv.Gydl.appdata.xml.in:7
msgid "Gydl"
msgstr "Gydl"
#: data/com.github.JannikHv.Gydl.appdata.xml.in:9
msgid "Jannik Hauptvogel"
msgstr "Jannik Hauptvogel"
#: data/com.github.JannikHv.Gydl.appdata.xml.in:11
msgid ""
"Gydl (Graphical yt-dlp) is a tool that enables downloading of content "
"from YouTube and many other sites. It provides a minimal interface based on "
"dialogues, making it quick and easy to download multimedia content."
msgstr ""
"Gydl (grafisk yt-dlp) är ett verktyg som möjliggör nedladdning av "
"innehåll från YouTube samt många andra webbplatser. Det förser ett simpelt "
"gränssnitt baserat på dialoger, vilket gör det snabbt och enkelt att ladda "
"ner multimedia innehåll."
#: data/com.github.JannikHv.Gydl.appdata.xml.in:16
msgid ""
"Because user needs vary, Gydl supports both audio and video downloads. If a "
"selected format is not available at the source, Gydl will attempt to convert "
"it."
msgstr ""
"Eftersom användarbehov varierar, stödjer Gydl nedladdningar av både ljud och "
"video. Om ett valt format inte är tillgängligt hos källan, kommer Gydl att "
"försöka konvertera det."
#: data/com.github.JannikHv.Gydl.appdata.xml.in:20
msgid ""
"Gydl is based upon the popular yt-dlp program, which can be found on "
"GitHub. A big thank you to the developer(s)."
msgstr ""
"Gydl är baserat på det populära yt-dlp programmet, som ni kan hitta på "
"GitHub. Ett stort tack till till utvecklarna."
================================================
FILE: src/gydl.py
================================================
#!/usr/bin/env python3
__author__ = "Jannik Hauptvogel"
__maintainer__ = "Jannik Hauptvogel"
__email__ = "JannikHv@gmail.com"
__twitter__ = "https://twitter.com/JannikHv"
__git__ = "https://github.com/JannikHv/gydl"
__aur__ = "https://aur.archlinux.org/packages/gydl-git/"
__credits__ = "rg3"
__license__ = "GPLv2"
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import (Gtk, Gdk, GLib, Gio)
from os import system
class Gydl:
class DialogType:
NET_ERROR = 0
DL_ERROR = 1
DL_FINISH = 2
class ViewType:
AUDIO = 0
VIDEO = 1
class Downloader:
def get_can_reach(self, URL):
try:
Gio.NetworkMonitor.can_reach(Gio.NetworkMonitor.get_default(),
Gio.NetworkAddress.new(URL, 0),
Gio.Cancellable.new())
return True
except:
pass
return False
def get_audio(self, URL, FORMAT, QUALITY):
cmd = ("yt-dlp --no-playlist -x "
+ "--audio-format FFF "
+ "--audio-quality QQQ "
+ "-o \""
+ GLib.get_user_special_dir(GLib.USER_DIRECTORY_DOWNLOAD)
+ "/%(title)s.%(ext)s\" \"UUU\"")
cmd = cmd.replace("FFF", FORMAT)
cmd = cmd.replace("QQQ", QUALITY)
cmd = cmd.replace("UUU", URL)
if system(cmd) is 0:
return True
else:
return False
def get_video(self, URL, FORMAT, QUALITY):
cmd = ("yt-dlp --no-playlist "
+ "-f [ext=FFF+height=QQQ] "
+ "-o \""
+ GLib.get_user_special_dir(GLib.USER_DIRECTORY_DOWNLOAD)
+ "/%(title)s.%(ext)s\" \"UUU\"")
cmd = cmd.replace("FFF", FORMAT)
cmd = cmd.replace("QQQ", QUALITY.replace("p", ""))
cmd = cmd.replace("UUU", URL)
if system(cmd) is 0:
return True
else:
return False
class Dialog(Gtk.Window):
def __continue_button_clicked(self, widget, data):
self.disconnect_by_func(Gtk.main_quit)
self.close()
def __get_title_from_type(self, dialog_type):
if dialog_type is Gydl.DialogType.NET_ERROR:
return "Connection Error"
elif dialog_type is Gydl.DialogType.DL_ERROR:
return "Download Failed"
elif dialog_type is Gydl.DialogType.DL_FINISH:
return "Download Successful"
else:
return None
def __get_text_from_type(self, dialog_type):
if dialog_type is Gydl.DialogType.NET_ERROR:
return ("An internet connection error has occured.\n"
+ "Make sure you're connected to the internet.")
elif dialog_type is Gydl.DialogType.DL_ERROR:
return ("The download has been unsuccessful.\n"
+ "Make sure the URL you've entered is valid.")
elif dialog_type is Gydl.DialogType.DL_FINISH:
return ("The download has been successful.\n"
+ "The file has been saved in your download folder.")
else:
return None
def __init__(self, dialog_type):
Gtk.Window.__init__(self, Gtk.WindowType.TOPLEVEL)
self.hbar = Gtk.HeaderBar()
self.grid = Gtk.Grid()
self.label = Gtk.Label()
self.btn_leave = Gtk.Button.new_with_mnemonic("_Leave")
self.btn_continue = Gtk.Button.new_with_mnemonic("_Continue")
# Window
self.set_default_size(400, 200)
self.set_titlebar(self.hbar)
self.set_position(Gtk.WindowPosition.CENTER)
self.set_icon_name("gydl")
self.add(self.grid)
self.connect("destroy", Gtk.main_quit, None)
# Header bar
self.hbar.set_title(self.__get_title_from_type(dialog_type))
# Grid
self.grid.set_column_homogeneous(True)
self.grid.set_row_homogeneous(True)
# Label
self.label.set_text(self.__get_text_from_type(dialog_type))
# Buttons
self.btn_leave.connect("clicked", Gtk.main_quit, None)
self.btn_continue.connect("clicked", self.__continue_button_clicked, None)
self.btn_continue.get_style_context().add_class("suggested-action")
# Attach widgets to grid
self.grid.attach(self.label, 0, 0, 2, 3)
self.grid.attach(self.btn_leave, 0, 3, 1, 1)
self.grid.attach(self.btn_continue, 1, 3, 1, 1)
class View(Gtk.Grid):
def __build_audio(self):
for entry in ["aac", "m4a", "mp3", "vorbis", "wav"]:
self.format.append_text(entry)
for entry in ["0 (Best)", "1", "2", "3", "4", "5 (Average)", "6", "7", "8", "9 (Worst)"]:
self.quality.append_text(entry)
self.format.set_active(2)
self.quality.set_active(0)
def __build_video(self):
for entry in ["3gp", "flv", "mp4", "webm"]:
self.format.append_text(entry)
for entry in ["2160p", "1440p", "1080p", "720p",
"480p", "360p", "240p", "144p"]:
self.quality.append_text(entry)
self.format.set_active(2)
self.quality.set_active(3)
def get_url(self):
return self.entry.get_text()
def get_format(self):
return self.format.get_active_text()
def get_quality(self):
return self.quality.get_active_text()[0]
def __init__(self, view_type):
Gtk.Grid.__init__(self)
self.l_entry = Gtk.Label()
self.l_format = Gtk.Label()
self.l_quality = Gtk.Label()
self.entry = Gtk.Entry()
self.format = Gtk.ComboBoxText()
self.quality = Gtk.ComboBoxText()
# Grid
self.set_column_homogeneous(True)
self.set_border_width(10)
# Labels
self.l_entry.set_markup("<span size='15000'><u>\nEnter the URL\n</u></span>")
self.l_format.set_markup("<span size='15000'><u>\nFormat\n</u></span>")
self.l_quality.set_markup("<span size='15000'><u>\nQuality\n</u></span>")
# Entry
self.entry.set_placeholder_text("https://youtube.com/watch...")
# Combo boxes
self.format.set_border_width(5)
self.quality.set_border_width(5)
# Attach widgets to grid
self.attach(self.l_entry, 0, 0, 4, 1)
self.attach(self.entry, 0, 1, 4, 1)
self.attach(self.l_format, 0, 2, 2, 1)
self.attach(self.l_quality, 2, 2, 2, 1)
self.attach(self.format, 0, 3, 2, 1)
self.attach(self.quality, 2, 3, 2, 1)
# Check view type
if view_type is Gydl.ViewType.AUDIO:
self.__build_audio()
elif view_type is Gydl.ViewType.VIDEO:
self.__build_video()
else:
pass
class Window(Gtk.Window):
def __hide_all(self):
self.hide()
Gdk.flush()
def __show_all(self):
self.show_all()
Gdk.flush()
def __dialog_closed(self, widget, data, null):
self.__show_all()
def __download_button_clicked(self, widget, data):
self.__hide_all()
# Check internet connection
if not self.downloader.get_can_reach("youtube.com"):
dialog = Gydl.Dialog(Gydl.DialogType.NET_ERROR)
dialog.show_all()
dialog.connect("delete-event", self.__dialog_closed, None)
return
# Collect data
if self.stack.get_visible_child_name() == "Audio":
dl_exit = self.downloader.get_audio(self.view_audio.get_url(),
self.view_audio.get_format(),
self.view_audio.get_quality())
elif self.stack.get_visible_child_name() == "Video":
dl_exit = self.downloader.get_video(self.view_video.get_url(),
self.view_video.get_format(),
self.view_video.get_quality())
else:
dl_exit = False
if dl_exit:
dialog = Gydl.Dialog(Gydl.DialogType.DL_FINISH)
else:
dialog = Gydl.Dialog(Gydl.DialogType.DL_ERROR)
dialog.connect("delete-event", self.__dialog_closed, None)
dialog.show_all()
def __init__(self):
Gtk.Window.__init__(self, Gtk.WindowType.TOPLEVEL)
self.downloader = Gydl.Downloader()
self.hbar = Gtk.HeaderBar()
self.stack = Gtk.Stack()
self.view_audio = Gydl.View(Gydl.ViewType.AUDIO)
self.view_video = Gydl.View(Gydl.ViewType.VIDEO)
self.switcher = Gtk.StackSwitcher()
self.btn_lv = Gtk.Button.new_with_mnemonic("_Leave")
self.btn_dl = Gtk.Button.new_with_mnemonic("_Download")
# Window
self.set_default_size(525, 275)
self.set_titlebar(self.hbar)
self.set_position(Gtk.WindowPosition.CENTER)
self.set_icon_name("gydl")
self.add(self.stack)
# Header bar
self.hbar.pack_start(self.btn_lv)
self.hbar.pack_end(self.btn_dl)
self.hbar.set_custom_title(self.switcher)
# Stack
self.stack.set_transition_type(Gtk.StackTransitionType.SLIDE_LEFT_RIGHT)
self.stack.add_titled(self.view_audio, "Audio", "Audio")
self.stack.add_titled(self.view_video, "Video", "Video")
# Stack switcher
self.switcher.set_stack(self.stack)
# Header bar buttons
self.btn_lv.connect("clicked", Gtk.main_quit, None)
self.btn_dl.connect("clicked", self.__download_button_clicked, None)
self.btn_dl.get_style_context().add_class("suggested-action")
if __name__ == "__main__":
Window = Gydl.Window()
Window.connect("delete-event", Gtk.main_quit, None)
Window.show_all()
Gtk.main()
gitextract_vse4exaw/
├── .gitignore
├── LICENSE
├── README.md
├── data/
│ ├── com.github.JannikHv.Gydl.appdata.xml.in
│ ├── com.github.JannikHv.Gydl.desktop.in
│ └── meson.build
├── meson.build
├── po/
│ ├── LINGUAS
│ ├── POTFILES.in
│ ├── meson.build
│ └── sv.po
└── src/
└── gydl.py
SYMBOL INDEX (25 symbols across 1 files)
FILE: src/gydl.py
class Gydl (line 17) | class Gydl:
class DialogType (line 18) | class DialogType:
class ViewType (line 25) | class ViewType:
class Downloader (line 31) | class Downloader:
method get_can_reach (line 32) | def get_can_reach(self, URL):
method get_audio (line 43) | def get_audio(self, URL, FORMAT, QUALITY):
method get_video (line 60) | def get_video(self, URL, FORMAT, QUALITY):
class Dialog (line 78) | class Dialog(Gtk.Window):
method __continue_button_clicked (line 79) | def __continue_button_clicked(self, widget, data):
method __get_title_from_type (line 83) | def __get_title_from_type(self, dialog_type):
method __get_text_from_type (line 93) | def __get_text_from_type(self, dialog_type):
method __init__ (line 106) | def __init__(self, dialog_type):
class View (line 146) | class View(Gtk.Grid):
method __build_audio (line 147) | def __build_audio(self):
method __build_video (line 157) | def __build_video(self):
method get_url (line 168) | def get_url(self):
method get_format (line 171) | def get_format(self):
method get_quality (line 174) | def get_quality(self):
method __init__ (line 177) | def __init__(self, view_type):
class Window (line 222) | class Window(Gtk.Window):
method __hide_all (line 223) | def __hide_all(self):
method __show_all (line 227) | def __show_all(self):
method __dialog_closed (line 231) | def __dialog_closed(self, widget, data, null):
method __download_button_clicked (line 234) | def __download_button_clicked(self, widget, data):
method __init__ (line 264) | def __init__(self):
Condensed preview — 12 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (42K chars).
[
{
"path": ".gitignore",
"chars": 1045,
"preview": "# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n*$py.class\n\n# C extensions\n*.so\n\n# Distribution / packagi"
},
{
"path": "LICENSE",
"chars": 18046,
"preview": " GNU GENERAL PUBLIC LICENSE\n Version 2, June 1991\n\n Copyright (C) 1989, 1991 Fr"
},
{
"path": "README.md",
"chars": 3464,
"preview": "# About\n\nGydl (Graphical yt-dlp) is a GUI wrapper around the already existing\nyt-dlp program.\n\nIt's developed with a dia"
},
{
"path": "data/com.github.JannikHv.Gydl.appdata.xml.in",
"chars": 2456,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- Copyright 2017 Jannik Hauptvogel -->\n<component type=\"desktop-application\">\n"
},
{
"path": "data/com.github.JannikHv.Gydl.desktop.in",
"chars": 253,
"preview": "[Desktop Entry]\nCategories=AudioVideo;\nComment=Download content from sites like YouTube\nEncoding=UTF-8\nExec=gydl.py\nGene"
},
{
"path": "data/meson.build",
"chars": 562,
"preview": "i18n_mod.merge_file(\n input: 'com.github.JannikHv.Gydl.appdata.xml.in',\n output: 'com.github.JannikHv.Gydl.appdata.xml"
},
{
"path": "meson.build",
"chars": 660,
"preview": "project('Gydl',\n version: '0.1.0'\n)\n\npy3_mod = import('python3')\ni18n_mod = import('i18n')\n\nmessage('Checking dependenc"
},
{
"path": "po/LINGUAS",
"chars": 3,
"preview": "sv\n"
},
{
"path": "po/POTFILES.in",
"chars": 86,
"preview": "data/com.github.JannikHv.Gydl.desktop.in\ndata/com.github.JannikHv.Gydl.appdata.xml.in\n"
},
{
"path": "po/meson.build",
"chars": 58,
"preview": "i18n_mod.gettext(meson.project_name(),\n preset: 'glib'\n)\n"
},
{
"path": "po/sv.po",
"chars": 2567,
"preview": "# Swedish localization for Gydl.\n# Copyright (C) 2017\n# This file is distributed under the same license as the Gydl pack"
},
{
"path": "src/gydl.py",
"chars": 10712,
"preview": "#!/usr/bin/env python3\n\n__author__ = \"Jannik Hauptvogel\"\n__maintainer__ = \"Jannik Hauptvogel\"\n__email__ = \"Jann"
}
]
About this extraction
This page contains the full source code of the JannikHv/gydl GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 12 files (39.0 KB), approximately 9.7k tokens, and a symbol index with 25 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.