Skip to content
This repository has been archived by the owner on Feb 15, 2021. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
tam7t committed Apr 26, 2013
2 parents 7386ad7 + 8af1d40 commit 3b3672a
Show file tree
Hide file tree
Showing 24 changed files with 2,834 additions and 1,371 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ sdist
develop-eggs
.installed.cfg

# pg specific
requests
*.log

# Installer logs
pip-log.txt

Expand Down
502 changes: 502 additions & 0 deletions LICENSE-PySide-Qt.txt

Large diffs are not rendered by default.

773 changes: 773 additions & 0 deletions LICENSE-Python27.txt

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions LICENSE-requests.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright 2013 Kenneth Reitz

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
23 changes: 23 additions & 0 deletions PhotoGrabber.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# -*- mode: python -*-
a = Analysis(['pg.py'],
hiddenimports=[],
hookspath=None)

a.datas += [
('dep/pg.png', 'dep/pg.png', 'DATA'),
('dep/viewer.html', 'dep/viewer.html', 'DATA'),
('requests/cacert.pem', 'requests/cacert.pem', 'DATA'),
]
pyz = PYZ(a.pure)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
name=os.path.join('dist', 'PhotoGrabber.exe'),
debug=False,
strip=None,
upx=True,
console=False , icon='dep\\pg.ico')
app = BUNDLE(exe,
name=os.path.join('dist', 'PhotoGrabber.exe.app'))
29 changes: 15 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# PhotoGrabber
A cross platform desktop application to backup images from facebook. This repo
holds an experimental build that makes use of the Graph API, provides a command
line interface, and uses the wxPython GUI toolkit.
A cross platform desktop application to download images from Facebook.

## License
Copyright (R) 2012 Ourbunny
Copyright (C) 2013 Ourbunny

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
Expand All @@ -19,17 +17,20 @@ 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, see <http://www.gnu.org/licenses/>.

## Dependencies

* [Python](http://docs.python.org/2/license.html) - v2.7.3 (PSF)
* [Requests](http://python-requests.org) - v1.2.0, 20 Apr 13 (Apache 2.0)
* [PySide](http://qt-project.org/wiki/Category:LanguageBindings::PySide) - v1.1.2 (v1.1.1 on OSX) (LGPL v2.1)
* [Qt](http://qt-project.org) - v4.8.0 (LGPL v2.1)

## Built Using

* PyInstaller - v2.0
* py2app - v0.7.3

## Contributors
The following individuals have provided code patches that have been included in
a PhotoGrabber release.

Bryce Boe - bryceboe.com

## TODO
* eliminate app login from wx GUI code
* prevent use from accidentally pressing a button twice
* make code/comments uniform
* split up downloader function and utilize @repeat decorator
* cleanup path names to work with unicode on multiple filesystems
* add packaging details

Bryce Boe - [bryceboe.com](http://bryceboe.com)
Binary file added dep/pg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 34 additions & 17 deletions dep/viewer.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
#tags, #comments, #albumcomments{
margin-top:10px;
}
#tags a{
#tags a, #likes a{
margin:10px;
}
</style>
Expand Down Expand Up @@ -107,9 +107,9 @@

// heading
var title = document.createElement("h1");
if (typeof al['photos'][pid]['caption'] != 'undefined') {
// fix: find how to figure out the caption
title.innerHTML = "<h1>" + al['photos'][pid]['caption'] + "</h1>";
if (typeof al['photos'][pid]['name'] != 'undefined') {
// fix: find how to figure out the name
title.innerHTML = "<h1>" + al['photos'][pid]['name'] + "</h1>";
} else {
title.innerHTML = "<h1>Untitled</h1>";
}
Expand All @@ -125,6 +125,8 @@
oimg.id = "thepic";
// fix: size of the image
oimg.setAttribute('src', al['photos'][pid]['path']);
oimg.setAttribute('width', 'auto');
oimg.setAttribute('height', '500px');
imgp.appendChild(oimg);
mydiv.appendChild(imgp);

Expand All @@ -135,9 +137,9 @@
tagdiv.innerHTML = "<strong>Tagged:</strong> ";
mydiv.appendChild(tagdiv);

for (tag in al['photos'][pid]['tags']['data']) {
for (tag in al['photos'][pid]['tags']) {
var thetag = document.createElement('a');
thetag.innerHTML = al['photos'][pid]['tags']['data'][tag]['name'];
thetag.innerHTML = al['photos'][pid]['tags'][tag]['name'];
thetag.href="#";
var elem = {};
elem.tag = tag;
Expand All @@ -147,16 +149,31 @@
tagdiv.appendChild(thetag);
}
}

// fix: find how tags work
if (al['photos'][pid]['likes']) {
var likediv = document.createElement("div");
likediv.id = "likes";
likediv.innerHTML = "<strong>Likes:</strong> ";
mydiv.appendChild(likediv);

for (like in al['photos'][pid]['likes']) {
var thetag = document.createElement('a');
thetag.innerHTML = al['photos'][pid]['likes'][like]['name'];
thetag.href="#";
likediv.appendChild(thetag);
}
}

if (al['photos'][pid]['comments']) {
var cdiv = document.createElement("div");
cdiv.id = "comments";
mydiv.appendChild(cdiv);
for (comment in al['photos'][pid]['comments']['data']) {
for (comment in al['photos'][pid]['comments']) {
var thecomment = document.createElement('p');
var name = al['photos'][pid]['comments']['data'][comment]['from']['name'];
var text = al['photos'][pid]['comments']['data'][comment]['message'];
var time = al['photos'][pid]['comments']['data'][comment]['created_time'];
var name = al['photos'][pid]['comments'][comment]['from']['name'];
var text = al['photos'][pid]['comments'][comment]['message'];
var time = al['photos'][pid]['comments'][comment]['created_time'];
thecomment.innerHTML = "<strong>" + name + ":</strong> " + text + "<br/><i>" + time + "</i>";
cdiv.appendChild(thecomment);
}
Expand All @@ -170,8 +187,8 @@
var tb = document.getElementById('box');
tb.position = 'absolute';
// fix
tb.style.left = '' + (tp.offsetLeft - 70 + (al['photos'][pid]['tags']['data'][tag]['x']/100) * tp.offsetWidth) + 'px';
tb.style.top = '' + (tp.offsetTop - 70 + (al['photos'][pid]['tags']['data'][tag]['y']/100) * tp.offsetHeight) + 'px';
tb.style.left = '' + (tp.offsetLeft - 70 + (al['photos'][pid]['tags'][tag]['x']/100) * tp.offsetWidth) + 'px';
tb.style.top = '' + (tp.offsetTop - 70 + (al['photos'][pid]['tags'][tag]['y']/100) * tp.offsetHeight) + 'px';
tb.style.display = "block";
}

Expand Down Expand Up @@ -233,11 +250,11 @@

if (al['comments']) {
var cdiv = document.getElementById('albumcomments');
for (comment in al['comments']['data']) {
for (comment in al['comments']) {
var thecomment = document.createElement('p');
var name = al['comments']['data'][comment]['from']['name'];
var text = al['comments']['data'][comment]['message'];
var time = al['comments']['data'][comment]['created_time'];
var name = al['comments'][comment]['from']['name'];
var text = al['comments'][comment]['message'];
var time = al['comments'][comment]['created_time'];
thecomment.innerHTML = "<strong>" + name + ":</strong> " + text + "<br/><i>" + time + "</i>";
cdiv.appendChild(thecomment);
}
Expand Down Expand Up @@ -277,7 +294,7 @@ <h2>This page is best viewed in a modern web browser...</h2>
</div>

</div>
<div id="ft"><p>generated by <a href="http://code.google.com/p/photograbber">photograbber</a></p></div>
<div id="ft"><p>generated by <a href="http://www.photograbber.org">photograbber</a></p></div>
</div>
</body>
</html>
124 changes: 0 additions & 124 deletions downloader.py

This file was deleted.

Loading

1 comment on commit 3b3672a

@andrewparmet
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Tommy - I like this project and I'd like to use PhotoGrabber. Can you explain briefly why the Facebook API change broke things? I'd like to take a stab at fixing this myself.

Please sign in to comment.