chore: initial commit
This commit is contained in:
21
LICENCE
Normal file
21
LICENCE
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2023 M.D. Walters
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
@@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg height="128px" viewBox="0 0 128 128" width="128px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<linearGradient id="a" gradientTransform="matrix(0.196428 0 0 0.342105 2.59729 273.740051)" gradientUnits="userSpaceOnUse" x1="88.595886" x2="536.595886" y1="-449.394012" y2="-449.394012">
|
||||
<stop offset="0" stop-color="#f6d32d"/>
|
||||
<stop offset="0.0500001" stop-color="#f5c211"/>
|
||||
<stop offset="0.099807" stop-color="#e5a50a"/>
|
||||
<stop offset="0.900001" stop-color="#e5a50a"/>
|
||||
<stop offset="0.950001" stop-color="#f5c211"/>
|
||||
<stop offset="1" stop-color="#f6d32d"/>
|
||||
</linearGradient>
|
||||
<clipPath id="b">
|
||||
<rect height="128" width="128"/>
|
||||
</clipPath>
|
||||
<clipPath id="c">
|
||||
<rect height="128" width="128"/>
|
||||
</clipPath>
|
||||
<filter id="d" height="100%" width="100%" x="0%" y="0%">
|
||||
<feColorMatrix in="SourceGraphic" type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
|
||||
</filter>
|
||||
<mask id="e">
|
||||
<g clip-path="url(#c)" filter="url(#d)">
|
||||
<g clip-path="url(#b)">
|
||||
<path d="m 28 16 h 72 c 4.417969 0 8 3.582031 8 8 v 88 c 0 4.417969 -3.582031 8 -8 8 h -72 c -4.417969 0 -8 -3.582031 -8 -8 v -88 c 0 -4.417969 3.582031 -8 8 -8 z m 0 0" fill="url(#a)"/>
|
||||
<path d="m 28 8 h 72 c 4.417969 0 8 3.582031 8 8 v 92 c 0 4.417969 -3.582031 8 -8 8 h -72 c -4.417969 0 -8 -3.582031 -8 -8 v -92 c 0 -4.417969 3.582031 -8 8 -8 z m 0 0" fill="#99c1f1"/>
|
||||
<path d="m 28 26.742188 h 72 c 4.417969 0 8 2.960937 8 6.609374 v 76.035157 c 0 3.652343 -3.582031 6.613281 -8 6.613281 h -72 c -4.417969 0 -8 -2.960938 -8 -6.613281 v -76.035157 c 0 -3.648437 3.582031 -6.609374 8 -6.609374 z m 0 0" fill="#f9f06b"/>
|
||||
<path d="m 41.007812 50.324219 c 3.046876 0 5.519532 2.960937 5.519532 6.613281 v 33.070312 c 0 3.648438 -2.472656 6.609376 -5.519532 6.609376 c -3.046874 0 -5.515624 -2.960938 -5.515624 -6.609376 v -33.070312 c 0 -3.652344 2.46875 -6.613281 5.515624 -6.613281 z m 0 0" fill="#f5c211"/>
|
||||
<path d="m 63.007812 50.324219 c 3.046876 0 5.519532 2.960937 5.519532 6.613281 v 33.070312 c 0 3.648438 -2.472656 6.609376 -5.519532 6.609376 c -3.046874 0 -5.515624 -2.960938 -5.515624 -6.609376 v -33.070312 c 0 -3.652344 2.46875 -6.613281 5.515624 -6.613281 z m 0 0" fill="#f5c211"/>
|
||||
<path d="m 87.007812 50.324219 c 3.046876 0 5.519532 2.960937 5.519532 6.613281 v 33.070312 c 0 3.648438 -2.472656 6.609376 -5.519532 6.609376 c -3.046874 0 -5.515624 -2.960938 -5.515624 -6.609376 v -33.070312 c 0 -3.652344 2.46875 -6.613281 5.515624 -6.613281 z m 0 0" fill="#f5c211"/>
|
||||
</g>
|
||||
</g>
|
||||
</mask>
|
||||
<mask id="f">
|
||||
<g filter="url(#d)">
|
||||
<rect fill-opacity="0.8" height="128" width="128"/>
|
||||
</g>
|
||||
</mask>
|
||||
<linearGradient id="g" gradientTransform="matrix(0 0.37 -0.98462 0 295.38501 -30.360001)" gradientUnits="userSpaceOnUse" x1="300" x2="428" y1="235" y2="235">
|
||||
<stop offset="0" stop-color="#f9f06b"/>
|
||||
<stop offset="1" stop-color="#f5c211"/>
|
||||
</linearGradient>
|
||||
<clipPath id="h">
|
||||
<rect height="128" width="128"/>
|
||||
</clipPath>
|
||||
<clipPath id="i">
|
||||
<rect height="128" width="128"/>
|
||||
</clipPath>
|
||||
<path d="m 28 16 h 72 c 4.417969 0 8 3.582031 8 8 v 88 c 0 4.417969 -3.582031 8 -8 8 h -72 c -4.417969 0 -8 -3.582031 -8 -8 v -88 c 0 -4.417969 3.582031 -8 8 -8 z m 0 0" fill="url(#a)"/>
|
||||
<path d="m 28 8 h 72 c 4.417969 0 8 3.582031 8 8 v 92 c 0 4.417969 -3.582031 8 -8 8 h -72 c -4.417969 0 -8 -3.582031 -8 -8 v -92 c 0 -4.417969 3.582031 -8 8 -8 z m 0 0" fill="#99c1f1"/>
|
||||
<path d="m 28 26.742188 h 72 c 4.417969 0 8 2.960937 8 6.609374 v 76.035157 c 0 3.652343 -3.582031 6.613281 -8 6.613281 h -72 c -4.417969 0 -8 -2.960938 -8 -6.613281 v -76.035157 c 0 -3.648437 3.582031 -6.609374 8 -6.609374 z m 0 0" fill="#f9f06b"/>
|
||||
<g fill="#f5c211">
|
||||
<path d="m 41.007812 50.324219 c 3.046876 0 5.519532 2.960937 5.519532 6.613281 v 33.070312 c 0 3.648438 -2.472656 6.609376 -5.519532 6.609376 c -3.046874 0 -5.515624 -2.960938 -5.515624 -6.609376 v -33.070312 c 0 -3.652344 2.46875 -6.613281 5.515624 -6.613281 z m 0 0"/>
|
||||
<path d="m 63.007812 50.324219 c 3.046876 0 5.519532 2.960937 5.519532 6.613281 v 33.070312 c 0 3.648438 -2.472656 6.609376 -5.519532 6.609376 c -3.046874 0 -5.515624 -2.960938 -5.515624 -6.609376 v -33.070312 c 0 -3.652344 2.46875 -6.613281 5.515624 -6.613281 z m 0 0"/>
|
||||
<path d="m 87.007812 50.324219 c 3.046876 0 5.519532 2.960937 5.519532 6.613281 v 33.070312 c 0 3.648438 -2.472656 6.609376 -5.519532 6.609376 c -3.046874 0 -5.515624 -2.960938 -5.515624 -6.609376 v -33.070312 c 0 -3.652344 2.46875 -6.613281 5.515624 -6.613281 z m 0 0"/>
|
||||
</g>
|
||||
<g clip-path="url(#i)" mask="url(#e)">
|
||||
<g clip-path="url(#h)" mask="url(#f)">
|
||||
<path d="m 128 80.640625 v 47.359375 h -128 v -47.359375 z m 0 0" fill="url(#g)"/>
|
||||
<path d="m 13.308594 80.640625 l 47.355468 47.359375 h 21.214844 l -47.359375 -47.359375 z m 42.421875 0 l 47.363281 47.359375 h 21.214844 l -47.363282 -47.359375 z m 42.429687 0 l 29.839844 29.839844 v -21.210938 l -8.628906 -8.628906 z m -98.160156 7.90625 v 21.214844 l 18.238281 18.238281 h 21.214844 z m 0 0"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 5.3 KiB |
19
data/icons/hicolor/scalable/apps/ml.mdwalters.Lemonade.svg
Normal file
19
data/icons/hicolor/scalable/apps/ml.mdwalters.Lemonade.svg
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg height="128px" viewBox="0 0 128 128" width="128px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<linearGradient id="a" gradientTransform="matrix(0.196428 0 0 0.342105 2.59729 273.740051)" gradientUnits="userSpaceOnUse" x1="88.595886" x2="536.595886" y1="-449.394012" y2="-449.394012">
|
||||
<stop offset="0" stop-color="#f6d32d"/>
|
||||
<stop offset="0.0500001" stop-color="#f5c211"/>
|
||||
<stop offset="0.099807" stop-color="#e5a50a"/>
|
||||
<stop offset="0.900001" stop-color="#e5a50a"/>
|
||||
<stop offset="0.950001" stop-color="#f5c211"/>
|
||||
<stop offset="1" stop-color="#f6d32d"/>
|
||||
</linearGradient>
|
||||
<path d="m 28 16 h 72 c 4.417969 0 8 3.582031 8 8 v 88 c 0 4.417969 -3.582031 8 -8 8 h -72 c -4.417969 0 -8 -3.582031 -8 -8 v -88 c 0 -4.417969 3.582031 -8 8 -8 z m 0 0" fill="url(#a)"/>
|
||||
<path d="m 28 8 h 72 c 4.417969 0 8 3.582031 8 8 v 92 c 0 4.417969 -3.582031 8 -8 8 h -72 c -4.417969 0 -8 -3.582031 -8 -8 v -92 c 0 -4.417969 3.582031 -8 8 -8 z m 0 0" fill="#99c1f1"/>
|
||||
<path d="m 28 26.742188 h 72 c 4.417969 0 8 2.960937 8 6.609374 v 76.035157 c 0 3.652343 -3.582031 6.613281 -8 6.613281 h -72 c -4.417969 0 -8 -2.960938 -8 -6.613281 v -76.035157 c 0 -3.648437 3.582031 -6.609374 8 -6.609374 z m 0 0" fill="#f9f06b"/>
|
||||
<g fill="#f5c211">
|
||||
<path d="m 41.007812 50.324219 c 3.046876 0 5.519532 2.960937 5.519532 6.613281 v 33.070312 c 0 3.648438 -2.472656 6.609376 -5.519532 6.609376 c -3.046874 0 -5.515624 -2.960938 -5.515624 -6.609376 v -33.070312 c 0 -3.652344 2.46875 -6.613281 5.515624 -6.613281 z m 0 0"/>
|
||||
<path d="m 63.007812 50.324219 c 3.046876 0 5.519532 2.960937 5.519532 6.613281 v 33.070312 c 0 3.648438 -2.472656 6.609376 -5.519532 6.609376 c -3.046874 0 -5.515624 -2.960938 -5.515624 -6.609376 v -33.070312 c 0 -3.652344 2.46875 -6.613281 5.515624 -6.613281 z m 0 0"/>
|
||||
<path d="m 87.007812 50.324219 c 3.046876 0 5.519532 2.960937 5.519532 6.613281 v 33.070312 c 0 3.648438 -2.472656 6.609376 -5.519532 6.609376 c -3.046874 0 -5.515624 -2.960938 -5.515624 -6.609376 v -33.070312 c 0 -3.652344 2.46875 -6.613281 5.515624 -6.613281 z m 0 0"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.2 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><g color="#000" fill="#2e3436"><path d="M7.188 2.281c-.094.056-.192.125-.29.19L5.566 3.803a1.684 1.684 0 11-2.17 2.17L2.332 7.037c.506-.069 1.017-.136 1.2.026.242.214.139 1.031.155 1.656.213.088.427.171.657.219.04.008.085-.007.125 0 .337-.525.683-1.288 1-1.344.322-.057.905.562 1.406.937a3.67 3.67 0 00.656-.468c-.195-.595-.594-1.369-.437-1.657.158-.29 1.019-.37 1.625-.531.028-.183.062-.371.062-.562 0-.075-.027-.146-.031-.22-.587-.217-1.435-.385-1.562-.687-.128-.302.34-1.021.593-1.593a3.722 3.722 0 00-.593-.532zm3.875 3.25c-.165.475-.305 1.086-.47 1.563-.43.047-.84.14-1.218.312-.38-.322-.787-.773-1.156-1.093a5.562 5.562 0 00-.688.468c.177.46.453 1.001.625 1.469-.298.309-.531.67-.719 1.063-.494 0-1.102-.084-1.593-.094a5.68 5.68 0 00-.219.812c.435.24 1.006.468 1.438.72-.006.093-.032.185-.032.28 0 .333.049.66.125.97-.382.304-.898.63-1.28.937.015.044.04.083.058.127l.613.613c.417-.1.868-.223 1.266-.303.248.343.532.626.875.875-.027.135-.068.283-.104.428.174-.063.34-.155.482-.297l1.432-1.432a1.994 1.994 0 01.533-3.918c.919 0 1.684.623 1.918 1.467l1.338-1.338c.06-.06.11-.124.156-.191-.035-.062-.06-.13-.1-.188.096-.152.205-.31.315-.47.017-.348-.1-.7-.37-.971l-.177-.176c-.28.192-.561.387-.83.555-.345-.233-.746-.383-1.156-.5-.077-.507-.107-1.132-.187-1.625a5.44 5.44 0 00-.875-.063zm-9.247.608c-.087.068-.173.138-.254.205l.014.035z" style="marker:none" overflow="visible"/><path d="M8.707.293a1 1 0 00-1.415 0l-6.999 7a1 1 0 000 1.413l7 7.001a1 1 0 001.415 0l7-7a1 1 0 000-1.413zm-.708 2.121l5.587 5.587L8 13.586 2.414 7.999z" style="line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;text-orientation:mixed;shape-padding:0;isolation:auto;mix-blend-mode:normal;marker:none" font-weight="400" font-family="sans-serif" overflow="visible"/></g></svg>
|
After Width: | Height: | Size: 2.0 KiB |
13
data/icons/meson.build
Normal file
13
data/icons/meson.build
Normal file
@@ -0,0 +1,13 @@
|
||||
application_id = 'ml.mdwalters.Lemonade'
|
||||
|
||||
scalable_dir = join_paths('hicolor', 'scalable', 'apps')
|
||||
install_data(
|
||||
join_paths(scalable_dir, ('@0@.svg').format(application_id)),
|
||||
install_dir: join_paths(get_option('datadir'), 'icons', scalable_dir)
|
||||
)
|
||||
|
||||
symbolic_dir = join_paths('hicolor', 'symbolic', 'apps')
|
||||
install_data(
|
||||
join_paths(symbolic_dir, ('@0@-symbolic.svg').format(application_id)),
|
||||
install_dir: join_paths(get_option('datadir'), 'icons', symbolic_dir)
|
||||
)
|
39
data/meson.build
Normal file
39
data/meson.build
Normal file
@@ -0,0 +1,39 @@
|
||||
desktop_file = i18n.merge_file(
|
||||
input: 'ml.mdwalters.Lemonade.desktop.in',
|
||||
output: 'ml.mdwalters.Lemonade.desktop',
|
||||
type: 'desktop',
|
||||
po_dir: '../po',
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('datadir'), 'applications')
|
||||
)
|
||||
|
||||
desktop_utils = find_program('desktop-file-validate', required: false)
|
||||
if desktop_utils.found()
|
||||
test('Validate desktop file', desktop_utils, args: [desktop_file])
|
||||
endif
|
||||
|
||||
appstream_file = i18n.merge_file(
|
||||
input: 'ml.mdwalters.Lemonade.appdata.xml.in',
|
||||
output: 'ml.mdwalters.Lemonade.appdata.xml',
|
||||
po_dir: '../po',
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('datadir'), 'appdata')
|
||||
)
|
||||
|
||||
appstream_util = find_program('appstream-util', required: false)
|
||||
if appstream_util.found()
|
||||
test('Validate appstream file', appstream_util, args: ['validate', appstream_file])
|
||||
endif
|
||||
|
||||
install_data('ml.mdwalters.Lemonade.gschema.xml',
|
||||
install_dir: join_paths(get_option('datadir'), 'glib-2.0/schemas')
|
||||
)
|
||||
|
||||
compile_schemas = find_program('glib-compile-schemas', required: false)
|
||||
if compile_schemas.found()
|
||||
test('Validate schema file',
|
||||
compile_schemas,
|
||||
args: ['--strict', '--dry-run', meson.current_source_dir()])
|
||||
endif
|
||||
|
||||
subdir('icons')
|
9
data/ml.mdwalters.Lemonade.appdata.xml.in
Normal file
9
data/ml.mdwalters.Lemonade.appdata.xml.in
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component type="desktop">
|
||||
<id>ml.mdwalters.Lemonade.desktop</id>
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<project_license>MIT</project_license>
|
||||
<description>
|
||||
<p>No description</p>
|
||||
</description>
|
||||
</component>
|
8
data/ml.mdwalters.Lemonade.desktop.in
Normal file
8
data/ml.mdwalters.Lemonade.desktop.in
Normal file
@@ -0,0 +1,8 @@
|
||||
[Desktop Entry]
|
||||
Name=Lemonade
|
||||
Exec=lemonade
|
||||
Icon=ml.mdwalters.Lemonade
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=GTK;
|
||||
StartupNotify=true
|
5
data/ml.mdwalters.Lemonade.gschema.xml
Normal file
5
data/ml.mdwalters.Lemonade.gschema.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<schemalist gettext-domain="lemonade">
|
||||
<schema id="ml.mdwalters.Lemonade" path="/ml/mdwalters/Lemonade/">
|
||||
</schema>
|
||||
</schemalist>
|
20
meson.build
Normal file
20
meson.build
Normal file
@@ -0,0 +1,20 @@
|
||||
project('lemonade',
|
||||
version: '2023.06.17',
|
||||
meson_version: '>= 0.62.0',
|
||||
default_options: [ 'warning_level=2', 'werror=false', ],
|
||||
)
|
||||
|
||||
i18n = import('i18n')
|
||||
gnome = import('gnome')
|
||||
|
||||
|
||||
|
||||
subdir('data')
|
||||
subdir('src')
|
||||
subdir('po')
|
||||
|
||||
gnome.post_install(
|
||||
glib_compile_schemas: true,
|
||||
gtk_update_icon_cache: true,
|
||||
update_desktop_database: true,
|
||||
)
|
39
ml.mdwalters.Lemonade.json
Normal file
39
ml.mdwalters.Lemonade.json
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"app-id" : "ml.mdwalters.Lemonade",
|
||||
"runtime" : "org.gnome.Platform",
|
||||
"runtime-version" : "44",
|
||||
"sdk" : "org.gnome.Sdk",
|
||||
"command" : "lemonade",
|
||||
"finish-args" : [
|
||||
"--share=network",
|
||||
"--share=ipc",
|
||||
"--socket=fallback-x11",
|
||||
"--device=dri",
|
||||
"--socket=wayland"
|
||||
],
|
||||
"cleanup" : [
|
||||
"/include",
|
||||
"/lib/pkgconfig",
|
||||
"/man",
|
||||
"/share/doc",
|
||||
"/share/gtk-doc",
|
||||
"/share/man",
|
||||
"/share/pkgconfig",
|
||||
"*.la",
|
||||
"*.a"
|
||||
],
|
||||
"modules" : [
|
||||
"python3-requests.json",
|
||||
{
|
||||
"name" : "lemonade",
|
||||
"builddir" : true,
|
||||
"buildsystem" : "meson",
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "file:///home/mdwalters/Projects"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
0
po/LINGUAS
Normal file
0
po/LINGUAS
Normal file
6
po/POTFILES
Normal file
6
po/POTFILES
Normal file
@@ -0,0 +1,6 @@
|
||||
data/ml.mdwalters.Lemonade.desktop.in
|
||||
data/ml.mdwalters.Lemonade.appdata.xml.in
|
||||
data/ml.mdwalters.Lemonade.gschema.xml
|
||||
src/main.py
|
||||
src/window.py
|
||||
src/window.ui
|
1
po/meson.build
Normal file
1
po/meson.build
Normal file
@@ -0,0 +1 @@
|
||||
i18n.gettext('lemonade', preset: 'glib')
|
34
python3-requests.json
Normal file
34
python3-requests.json
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"name": "python3-requests",
|
||||
"buildsystem": "simple",
|
||||
"build-commands": [
|
||||
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"requests\" --no-build-isolation"
|
||||
],
|
||||
"sources": [
|
||||
{
|
||||
"type": "file",
|
||||
"url": "https://files.pythonhosted.org/packages/9d/19/59961b522e6757f0c9097e4493fa906031b95b3ebe9360b2c3083561a6b4/certifi-2023.5.7-py3-none-any.whl",
|
||||
"sha256": "c6c2e98f5c7869efca1f8916fed228dd91539f9f1b444c314c06eef02980c716"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"url": "https://files.pythonhosted.org/packages/ff/d7/8d757f8bd45be079d76309248845a04f09619a7b17d6dfc8c9ff6433cac2/charset-normalizer-3.1.0.tar.gz",
|
||||
"sha256": "34e0a2f9c370eb95597aae63bf85eb5e96826d81e3dcf88b8886012906f509b5"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"url": "https://files.pythonhosted.org/packages/fc/34/3030de6f1370931b9dbb4dad48f6ab1015ab1d32447850b9fc94e60097be/idna-3.4-py3-none-any.whl",
|
||||
"sha256": "90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"url": "https://files.pythonhosted.org/packages/70/8e/0e2d847013cb52cd35b38c009bb167a1a26b2ce6cd6965bf26b47bc0bf44/requests-2.31.0-py3-none-any.whl",
|
||||
"sha256": "58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"url": "https://files.pythonhosted.org/packages/8a/03/ad9306a50d05c166e3456fe810f33cee2b8b2a7a6818ec5d4908c4ec6b36/urllib3-2.0.3-py3-none-any.whl",
|
||||
"sha256": "48e7fafa40319d358848e1bc6809b208340fafe2096f1725d05d67443d0483d1"
|
||||
}
|
||||
]
|
||||
}
|
0
src/__init__.py
Normal file
0
src/__init__.py
Normal file
4
src/lemonade.gresource.xml
Normal file
4
src/lemonade.gresource.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<gresources>
|
||||
<gresource prefix="/ml/mdwalters/Lemonade"></gresource>
|
||||
</gresources>
|
51
src/lemonade.in
Executable file
51
src/lemonade.in
Executable file
@@ -0,0 +1,51 @@
|
||||
#!@PYTHON@
|
||||
|
||||
# MIT License
|
||||
#
|
||||
# Copyright (c) 2023 M.D. Walters
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in all
|
||||
# copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
import os
|
||||
import sys
|
||||
import signal
|
||||
import locale
|
||||
import gettext
|
||||
|
||||
VERSION = '@VERSION@'
|
||||
pkgdatadir = '@pkgdatadir@'
|
||||
localedir = '@localedir@'
|
||||
|
||||
sys.path.insert(1, pkgdatadir)
|
||||
signal.signal(signal.SIGINT, signal.SIG_DFL)
|
||||
locale.bindtextdomain('lemonade', localedir)
|
||||
locale.textdomain('lemonade')
|
||||
gettext.install('lemonade', localedir)
|
||||
|
||||
if __name__ == '__main__':
|
||||
import gi
|
||||
|
||||
from gi.repository import Gio
|
||||
resource = Gio.Resource.load(os.path.join(pkgdatadir, 'lemonade.gresource'))
|
||||
resource._register()
|
||||
|
||||
from lemonade import main
|
||||
sys.exit(main.main(VERSION))
|
36
src/main.py
Normal file
36
src/main.py
Normal file
@@ -0,0 +1,36 @@
|
||||
import sys
|
||||
import gi
|
||||
import json
|
||||
import requests
|
||||
|
||||
gi.require_version("Gtk", "4.0")
|
||||
gi.require_version("Adw", "1")
|
||||
|
||||
from gi.repository import Gtk, Adw
|
||||
|
||||
class MainWindow(Gtk.ApplicationWindow):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
self.set_default_size(400, 500)
|
||||
self.set_title("Lemonade")
|
||||
|
||||
self.box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
|
||||
self.set_child(self.box)
|
||||
|
||||
self.list = requests.get("https://lemmy.ml/api/v3/community/list?sort=Hot").json()
|
||||
for post in self.list["communities"]:
|
||||
self.box.append(Gtk.Label(label=post["community"]["title"]))
|
||||
|
||||
class Lemonade(Adw.Application):
|
||||
def __init__(self, **kwargs):
|
||||
super().__init__(**kwargs)
|
||||
self.connect('activate', self.on_activate)
|
||||
|
||||
def on_activate(self, app):
|
||||
self.win = MainWindow(application=app)
|
||||
self.win.present()
|
||||
|
||||
app = Lemonade(application_id="ml.mdwalters.Lemonade")
|
||||
app.run(sys.argv)
|
||||
|
34
src/meson.build
Normal file
34
src/meson.build
Normal file
@@ -0,0 +1,34 @@
|
||||
pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())
|
||||
moduledir = join_paths(pkgdatadir, 'lemonade')
|
||||
gnome = import('gnome')
|
||||
|
||||
gnome.compile_resources('lemonade',
|
||||
'lemonade.gresource.xml',
|
||||
gresource_bundle: true,
|
||||
install: true,
|
||||
install_dir: pkgdatadir,
|
||||
)
|
||||
|
||||
python = import('python')
|
||||
|
||||
conf = configuration_data()
|
||||
conf.set('PYTHON', python.find_installation('python3').path())
|
||||
conf.set('VERSION', meson.project_version())
|
||||
conf.set('localedir', join_paths(get_option('prefix'), get_option('localedir')))
|
||||
conf.set('pkgdatadir', pkgdatadir)
|
||||
|
||||
configure_file(
|
||||
input: 'lemonade.in',
|
||||
output: 'lemonade',
|
||||
configuration: conf,
|
||||
install: true,
|
||||
install_dir: get_option('bindir'),
|
||||
install_mode: 'r-xr--r--'
|
||||
)
|
||||
|
||||
lemonade_sources = [
|
||||
'__init__.py',
|
||||
'main.py',
|
||||
]
|
||||
|
||||
install_data(lemonade_sources, install_dir: moduledir)
|
Reference in New Issue
Block a user