GithubHelp home page GithubHelp logo

nitipit / appkit Goto Github PK

View Code? Open in Web Editor NEW
42.0 7.0 4.0 2.24 MB

Gnome desktop application framework based on Webkit, HTML5 and Python

Home Page: http://nitipit.github.io/appkit

License: MIT License

Python 100.00%

appkit's Issues

Stop maintain the old api

Define the specific version in setup.py or requirment.pip is preference
So, the way to import lib

from appkit import App

[Setup] library to install application based on appkit

In application's setup.py

from appkit.tool import setup
setup();

To Do.

  1. Be able to use pip install --user to Install app in ~/.local/lib/python2.7/site-packages/
  2. Collect information from '/' page to create .desktop file
    • Application name from <title>
    • Application icon from <link rel="icon">

Related topic ?
- Epiphany application mode

Be able to run appliation with QTWebkit

QTWebkit will make Appkit based applications wide open to other desktop, such as KDE, Mac and Windows.

Anyway, since QT isn't preinstalled on Mac and Windows. It's still hard for user to reach Appkit's based application

error on example

I get the following error when trying the example :
Traceback (most recent call last):
File "test.py", line 3, in
from appkit.api.v0_2_6 import App
File "/home/areski/.virtualenvs/appkit/local/lib/python2.7/site-packages/appkit/api/v0_2_6.py", line 1, in
from appkit.app import App
File "/home/areski/.virtualenvs/appkit/local/lib/python2.7/site-packages/appkit/app.py", line 3, in
from gi.repository import Gtk, Gdk, WebKit
ImportError: No module named gi.repository

I imagine that we should add PyGI as a dependency ?
https://wiki.gnome.org/PyGI

[doc] Add Docstring

Docstring let developers understand code faster, It's bad that appkit has very little docstring right now.

Application / Service Mode

Provide option in framework & application to run in 2 modes

  1. Application Mode, will open both service & UI window via WebKitGTK
  2. Service Mode, will open only service in background which can access through network via web-browser, No UI windows.
    • Good for muliple users application which is deployed on servers

NSSavePanel is not working in Mac OS Catalina

Hi Nitipit Nontasuwan,

Description of the issue:
NSSavePanel dialog is not working in Mac OS Catalina version.

Details:
I am using python 3.7.4 (64-bit) for building our web application in Mac OS.

Observation:
Before Catalina:

from AppKit import NSSavePanel
>>> NSSavePanel.savePanel()
<NSSavePanel: 0x7feb46a539e0>


In Catalina:

NSSavePanel.savePanel()
2020-01-29 10:53:05.691 Python[13337:56053] *** Assertion failure in +[NSServiceViewController currentAppIsViewService], /BuildRoot/Library/Caches/com.apple.xbs/Sources/ViewBridge/ViewBridge-462/NSViewService.m:140
2020-01-29 10:53:05.691 Python[13337:56053] *** Assertion failure in +[NSServiceViewController currentAppIsViewService], /BuildRoot/Library/Caches/com.apple.xbs/Sources/ViewBridge/ViewBridge-462/NSViewService.m:140
2020-01-29 10:53:05.736 Python[13337:56356] +[NSXPCSharedListener endpointForReply:withListenerName:]: an error occurred while attempting to obtain endpoint for listener 'com.apple.view-bridge': Connection interrupted

Expected behavior:
It shows save file dialog to user.

Actual behavior:
It is not showing save file dialog to user.

Install problems

i keep trying to install appkit but i keep running into the same problem. Yes i already have installed Quartz. When i try pip3 install AppKit or pip install AppKit i keep getting the following
`ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /private/tmp/pip-build-env-ejsn87m7/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel pycairo
cwd: None
Complete output (29 lines):
WARNING: The directory '/Users/xxx/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
WARNING: The directory '/Users/xxx/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting setuptools
Downloading https://files.pythonhosted.org/packages/54/28/c45d8b54c1339f9644b87663945e54a8503cfef59cf0f65b3ff5dd17cf64/setuptools-42.0.2-py2.py3-none-any.whl (583kB)
Collecting wheel
Downloading https://files.pythonhosted.org/packages/00/83/b4a77d044e78ad1a45610eb88f745be2fd2c6d658f9798a15e384b7d57c9/wheel-0.33.6-py2.py3-none-any.whl
Collecting pycairo
Downloading https://files.pythonhosted.org/packages/3c/1a/c0478ecab31baae50fda9956547788afbd0ca563adc52c9b03cab30f17eb/pycairo-1.18.2.tar.gz (200kB)
Installing collected packages: setuptools, wheel, pycairo
Running setup.py install for pycairo: started
Running setup.py install for pycairo: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-qynd_0kn/pycairo/setup.py'"'"'; file='"'"'/private/tmp/pip-install-qynd_0kn/pycairo/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-ajgenwxx/install-record.txt --single-version-externally-managed --prefix /private/tmp/pip-build-env-ejsn87m7/overlay --compile
cwd: /private/tmp/pip-install-qynd_0kn/pycairo/
Complete output (12 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.8
creating build/lib.macosx-10.9-x86_64-3.8/cairo
copying cairo/init.py -> build/lib.macosx-10.9-x86_64-3.8/cairo
copying cairo/init.pyi -> build/lib.macosx-10.9-x86_64-3.8/cairo
copying cairo/py.typed -> build/lib.macosx-10.9-x86_64-3.8/cairo
running build_ext
'pkg-config' not found.
Command ['pkg-config', '--print-errors', '--exists', 'cairo >= 1.13.1']
----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-qynd_0kn/pycairo/setup.py'"'"'; file='"'"'/private/tmp/pip-install-qynd_0kn/pycairo/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-ajgenwxx/install-record.txt --single-version-externally-managed --prefix /private/tmp/pip-build-env-ejsn87m7/overlay --compile Check the logs for full command output.

ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /private/tmp/pip-build-env-ejsn87m7/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel pycairo Check the logs for full command output.`

add external configuration file for applications

add XML configuration file for applications in the application root folder

config.xml

<appname>Myapp</appname>
<access>local</access> OR network restrict access in external browser
<window>
    <fullscreen>true</fullscreen>
     <toplevel>true</toplevel>
    <height>800<height>
    <width>600<width>   
    <Position>center</Position>
    <Icon>/path/to/myicon</icon>
</window>

thinking about using your application to build some cool stuff but is missing some features for easy devlopment maybe some options need to be added but am not very familiar with gtk webkit yet.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.