updating code

This commit is contained in:
Nathan Adams 2015-09-09 22:17:29 -05:00
parent dee9ce5ef7
commit 79958bbb97
6 changed files with 96 additions and 10 deletions

View File

@ -34,3 +34,9 @@ class Issue(IssueComment):
def getCommnets(self):
return self.comments
def __str__(self):
return self.getTitle()
def __repr__(self):
return str(self)

View File

@ -26,12 +26,78 @@ Currently srchub and google code are supported. To use:
shub = srchub()
projects = shub.getProjects()
### Sample structure
{'issues': [],
'releases': [],
'repoType': 1,
'repoURL': u'git://beta.datanethost.net/bug60.git',
'wikis': [test]}
or for google code
from services.googlecode import googlecode
gcode = googlecode()
project = gcode.getProject("android-python27")
### Sample structure
{'issues': [ libs/armeabi/libcom_googlecode_android_scripting_Exec.so read problem ,
How to stop Python Script Service ? ,
Does not work on GoogleTV ,
App crashes when trying to launch camera on phone ,
com.android.pyton27.process.Process does not write log ,
test.py from python_scripts_r13 does not run ,
End all services ,
SL4A Title grey bar ,
Can not import md5, sha1 ,
Patch for /apk/src/com/googlecode/android_scripting/facade/FacadeConfiguration.java ,
Add PyCrypto module ,
myScript.py wont work ,
Microsoft Acess DB(.mdb) in Python APK ,
Unable to generate PyDroid.apk from the sample project Pydroid ,
Python sl4a sendText not working ,
Patch for /python-build/functions.sh ,
Using Home/Recent button restarts apk ,
Add modules ,
Errors using the ADT Bundle for Windows with android-python27 clone ,
errors building python_27.zip and python_extras_27.zip ,
How to use PyQT? ,
Bluetooth-based Scripts cannot launch from APK ,
Undocumented how to distribute egg libraries in self-contained APK ,
How to retrieve errors? ,
android-python27 - Permission issues after bundling Python 3 into my app ,
cannot load library ,
Executed APK is crashing in every scenario ,
Support for Samsung Chord API ,
LookupError: unknown encoding: hex ,
Log traceback on broken hello.py ,
How to run a python script with root privileges using PythonAPK? ,
Is there any way to use python-2.7.5 ,
How to Import SL4A Libraries ,
How to use SL4A on PyDroid ,
android-python installs but cannot launch doInBackground() ,
libssl might be affected by heartbleed bug ,
How can I pass String value from EditText In Android Activity to Python Script and also make the activity able to retrieve the String result from a function in the python script ? ,
Interaction with python file ,
Install on external storage ,
Can't install android-python27 to Samsung Galaxy 4 ,
how to create android app in eclipse using python code on windows 8 ],
'releases': [PythonAPK.apk => https://android-python27.googlecode.com/files/PythonAPK.apk],
'repoType': 2,
'repoURL': 'https://code.google.com/p/android-python27/',
'wikis': [Tutorial on how to run Python from the shell,
Debugging your Python app in Android,
Tutorial on how to install the Android SDK and Eclipse,
Create scripts on your PC and run them on your Android device,
Tutorial on how to create a custom RPC facade,
Tutorial on how to create a custom APK,
Tutorial on how to update with latest SL4A,
Tutorial on how to change the Python builds,
Tutorial on how to use the APK template,
Tutorial on how to add your Python scripts to the template project,
Overview on how Python embedding works.]}
Sourcehub library will pull all public projects since this list is easily accessed. Google Code does not have a public list persay. And I didn't want to scrape the search results, so I developed it to require you to pass in the project name. If you were to get your hands on a list of google code projects you could easily loop through them:
from services.googlecode import googlecode

View File

@ -16,3 +16,9 @@ class Release(object):
def getChecksum(self):
return self.checksum
def __str__(self):
return self.getFileName() + " => " + self.getFileURL()
def __repr__(self):
return str(self)

View File

@ -20,3 +20,9 @@ class Wiki(object):
def getUpdated(self):
return self.updated
def __str__(self):
return self.getSummary()
def __repr__(self):
return str(self)

10
main.py
View File

@ -1,8 +1,10 @@
from services.srchub import srchub
from services.googlecode import googlecode
from pprint import pprint
#shub = srchub()
shub = srchub()
#projects = shub.getProjects()
gcode = googlecode()
project = gcode.getProject("android-python27")
projects = shub.getProjects()
#gcode = googlecode()
#project = gcode.getProject("android-python27")
pprint (vars(projects[0]))

View File

@ -31,13 +31,13 @@ class srchub(Service):
# get source
if "git clone" in sourceSoupText:
project.repoType = REPO_TYPES.git
project.repoURL = "git://" + self.DOMAIN + "/" + projectName + ".git"
project.repoURL = "git://beta.datanethost.net/" + projectName + ".git"
elif "svn co" in sourceSoupText:
project.repoType = REPO_TYPES.SVN
project.repoURL = "https://" + self.DOMAIN + "/svn/" + projectName + "/"
project.repoURL = self.DOMAIN + "/svn/" + projectName + "/"
else:
project.repoType = REPO_TYPES.hg
project.repoURL = "https://" + self.DOMAIN + "/hg/" + projectName + "/"
project.repoURL = self.DOMAIN + "/hg/" + projectName + "/"
# get downloads