pax_global_header 0000666 0000000 0000000 00000000064 11600137100 0014477 g ustar 00root root 0000000 0000000 52 comment=3c7d37c3be00210f3c4ba2ca419a1d00030abfeb
ilektrojohn-creepy-b7b83fc/ 0000775 0000000 0000000 00000000000 11600137100 0016014 5 ustar 00root root 0000000 0000000 ilektrojohn-creepy-b7b83fc/INSTALL 0000664 0000000 0000000 00000003506 11600137100 0017051 0 ustar 00root root 0000000 0000000 Requirements :
** tweepy https://github.com/joshthecoder/tweepy
** osmgpsmap 0.7 https://github.com/nzjrs/osm-gps-map
** python-flickrapi http://stuvel.eu/flickrapi
** BeautifulSoup http://www.crummy.com/software/BeautifulSoup/
** pyexiv2 http://tilloy.net/dev/pyexiv2/
** python-configobj
** python-simplejson
Ubuntu 10.10
Download and install the .deb package from https://github.com/ilektrojohn/creepy/downloads .
Alternatively add creepy's ppa with :
$ sudo add-apt-repository ppa:jkakavas/creepy
update the package list :
$ sudo apt-get update
and install creepy with :
$ sudo apt-get install creepy
creepy is now on the main menu, under Applications -> Internet
Ubuntu 10.04
add creepy's ppa with :
$ sudo add-apt-repository ppa:jkakavas/creepy-lucid
update the package list :
$ sudo apt-get update
and install creepy with :
$ sudo apt-get install creepy
creepy is now on the main menu, under Applications -> Internet
Backtrack 4 ( R2 )
--------------------------------------------------------------------------------
1) add `deb http://people.dsv.su.se/~kakavas/creepy binary/` to your /etc/apt/sources.list
2)`# apt-get update`
3)`# apt-get install creepy`
Off creepying you go!!!
MS Windows
----------------------------------------------------------------------------------------
Download the installer from https://github.com/ilektrojohn/creepy/downloads
Run it, Done.
All dependencies are included in the exe.
NOTE: In Windows XP systems, if when running the application you get a system error about the current configuration e.t.c , means that you don't have the MSVCR90.DLL needed for python interpreter. Download and install the [[http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a5c84275-3b97-4ab7-a40d-3802b2af5fc2]] Visual C++ distributable package and the problem will be solved. ilektrojohn-creepy-b7b83fc/LICENSE 0000664 0000000 0000000 00000077331 11600137100 0017034 0 ustar 00root root 0000000 0000000 GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. 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
them 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 prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. 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.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey 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;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If 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 convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU 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 that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
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.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
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.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
ilektrojohn-creepy-b7b83fc/README 0000664 0000000 0000000 00000005710 11600137100 0016677 0 ustar 00root root 0000000 0000000 #creepy
##Current Version : 0.1.93
##Author : Yiannis Kakavas
##Homepage : http://ilektrojohn.github.com/creepy/
##Installation Instructions : See INSTALL file
##Description:
geolocation information aggregator.
creepy is an application that allows you to gather geolocation related information
about users from social networking platforms and image hosting services.
The information is presented in a map inside the application where all the
retrieved data is shown accompanied with relevant information (i.e. what
was posted from that specific location) to provide context to the presentation.
##Features
1)Available map providers
*Google Maps
*Virtual Earth Maps
*OpenStreetMaps
2)Location information retrieval from :
*Twitter's tweet location
**Coordinates when tweet was posted from mobile device
**Place (geographical name) derived from users ip when posting on twitter's web interface.
Place gets translated into coordinates using geonames.com
**Bounding Box derived from users ip when posting on twitter's web interface.
The less accurate source , a corner of the bounding box is selected randomly.
*Geolocation information accessible through image hosting services API
*EXIF tags from the photos posted.
3)Social networking platforms currently supported :
*Twitter
*Foursquare (only checkins that are posted to twitter)
4)Image hosting services currently supported :
*flickr - information retrieved from API
*twitpic.com - information retrieved from API and photo exif tags
*yfrog.com - information retrieved from photo exif tags
*img.ly - information retrieved from photo exif tags
*plixi.com - information retrieved from photo exif tags
*twitrpix.com - information retrieved from photo exif tags
*foleext.com - information retrieved from photo exif tags
*shozu.com - information retrieved from photo exif tags
*pickhur.com - information retrieved from photo exif tags
*moby.to - information retrieved from API and photo exif tags
*twitsnaps.com - information retrieved from photo exif tags
*twitgoo.com - information retrieved from photo exif tags
5)Automatic caching of retrieved information in order to reduce API calls and the possibility of hitting limit rates.
6)GUI with navigable map for better overview of the accumulated information
7)Handling twitter authentication in an easy way using oAuth. User credentials are not shared with the application.
8)User/target search for twitter and flickr.
Creepy icon : © "eye of sauron" image by blood-solice on deviantart ( http://blood-solice.deviantart.com )
Inspired by
-- Johannes B. Ullrich (see original post about exif gps metadata on twitpic http://isc.sans.edu/diary.html?storyid=8203)
-- http://www.icanstalku.com
-- http://pleaserobme.com
Special thanks to Chris Hadnagy ( a.k.a @humanhacker ) for all the feedback and suggestions during development.
ilektrojohn-creepy-b7b83fc/creepy/ 0000775 0000000 0000000 00000000000 11600137100 0017303 5 ustar 00root root 0000000 0000000 ilektrojohn-creepy-b7b83fc/creepy/cree.py 0000664 0000000 0000000 00000005221 11600137100 0020573 0 ustar 00root root 0000000 0000000 '''
Copyright 2010 Yiannis Kakavas
This file is part of creepy.
creepy 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 3 of the License, or
(at your option) any later version.
creepy 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 creepy If not, see .
'''
import flickr
import twitter
import helper
class Cree():
"""
The controller class for the creepy application.
Cree is called from the GUI and acts as a wrapper for various functions that the GUI class
is not accessing directly. Configuration file is passed to Cree on instantiation and is used
in order to be passed to various modules that need access to configuration values.
"""
def __init__(self, conf_file):
self.f= flickr.Flickr(conf_file)
self.t = twitter.Twitter(conf_file)
def get_locations(self, twittername, flickrid):
""" Wrapper for the process of determining a users location through the
accessible modules.
Returns a tuple containing a list of location dictionaries, and a
dictionary of parameters
"""
hel = helper.Helper()
location_list = []
twitparams = {}
flickrparams={}
if twittername != '':
twitlocs, twitparams = self.t.get_twitter_locations(twittername)
if twitlocs:
location_list.extend(twitlocs)
if flickrid != '':
flickrlocs, flickrparams = self.f.return_locations(flickrid)
if flickrlocs:
location_list.extend(flickrlocs)
params = dict(twitparams, **flickrparams)
return (hel.remove_duplicates(location_list), params)
def search_for_users(self, service, query, param=''):
"""
Wrapper function for the search process from the accessible modules
Returns a list of users that match the search query
"""
if service == 'twitter':
users = self.t.search_user(query)
elif service == 'flickr':
if param == 'username':
users = self.f.search_user(query)
elif param == 'realname':
users = self.f.search_real_name(query)
return users
ilektrojohn-creepy-b7b83fc/creepy/creepymap.py 0000664 0000000 0000000 00000132705 11600137100 0021652 0 ustar 00root root 0000000 0000000 '''
Copyright 2010 Yiannis Kakavas
This file is part of creepy.
creepy 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 3 of the License, or
(at your option) any later version.
creepy 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 creepy If not, see .
'''
from threading import Thread
import cree
import helper
import gobject
import gtk.gdk
import os
import osmgpsmap
from tweepy import OAuthHandler as oauth
import webbrowser
from configobj import ConfigObj
import shutil
import pango
gobject.threads_init()
gtk.gdk.threads_init()
class CreepyUI(gtk.Window):
"""
The main GUI class
Provides all the GUI functionality for creepy.
"""
def __init__(self):
self.CONF_DIR = os.path.join(os.path.expanduser('~'), '.creepy')
self.locations = []
gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL)
self.set_default_size(800, 600)
self.connect('destroy', lambda x: gtk.main_quit())
self.set_title('Cree.py location creeper')
#If it is the first time creepy is run copy the config file and necessary images to .creepy
if not os.path.exists(self.CONF_DIR):
os.mkdir(self.CONF_DIR)
#If creepy was installed through the .deb package in ubuntu , the files needed would be in /usr/share/pyshared/creepy
if os.path.exists('/usr/share/pyshared/creepy'):
try:
shutil.copy('/usr/share/pyshared/creepy/include/creepy.conf', os.path.join(self.CONF_DIR, 'creepy.conf'))
shutil.copy('/usr/share/pyshared/creepy/include/evil_twitter.png', os.path.join(self.CONF_DIR, 'evil_twitter.png'))
shutil.copy('/usr/share/pyshared/creepy/include/flickr.png', os.path.join(self.CONF_DIR, 'flickr.png'))
shutil.copy('/usr/share/pyshared/creepy/include/index.png', os.path.join(self.CONF_DIR, 'index.png'))
shutil.copy('/usr/share/pyshared/creepy/include/default.jpg', os.path.join(self.CONF_DIR, 'default.jpg'))
except Exception, err:
print err
#If creepy is run from source folder (i.e. in Backtrack) with 'python creepymap.py' , needed files are in current dir
else:
try:
shutil.copy('include/creepy.conf', os.path.join(self.CONF_DIR, 'creepy.conf'))
shutil.copy('include/evil_twitter.png', os.path.join(self.CONF_DIR, 'evil_twitter.png'))
shutil.copy('include/flickr.png', os.path.join(self.CONF_DIR, 'flickr.png'))
shutil.copy('include/index.png', os.path.join(self.CONF_DIR, 'index.png'))
shutil.copy('include/default.jpg', os.path.join(self.CONF_DIR, 'default.jpg'))
except Exception, err:
print err
#create the temp folders
os.makedirs(os.path.join(self.CONF_DIR, 'cache'))
os.makedirs(os.path.join(self.CONF_DIR, 'images'))
os.makedirs(os.path.join(self.CONF_DIR, 'images', 'profilepics'))
#write to the initial configuration file
config_file = os.path.join(self.CONF_DIR, 'creepy.conf')
tmp_conf = ConfigObj(infile=config_file)
tmp_conf.create_empty=True
tmp_conf.write_empty_values=True
tmp_conf['directories']['img_dir'] = os.path.join(self.CONF_DIR, 'images')
tmp_conf['directories']['cache_dir'] = os.path.join(self.CONF_DIR, 'cache')
tmp_conf['directories']['profilepics_dir'] = os.path.join(self.CONF_DIR, 'images', 'profilepics')
tmp_conf.write()
#Fix only for version 0.1.73 to copy the creepy32.png to the config folder
if os.path.exists('/usr/share/pyshared/creepy'):
try:
shutil.copy('/usr/share/pyshared/creepy/include/creepy32.png', os.path.join(self.CONF_DIR, 'creepy32.png'))
except Exception, err:
print err
else:
try:
shutil.copy('include/creepy32.png', os.path.join(self.CONF_DIR, 'creepy32.png'))
except Exception, err:
print err
#Try to load the options file
try:
config_file = os.path.join(self.CONF_DIR, 'creepy.conf')
self.config = ConfigObj(infile=config_file)
self.config.create_empty=True
self.config.write_empty_values=True
self.set_auth(self.config)
self.profilepics_dir = self.config['directories']['profilepics_dir']
except Exception, err:
text = 'Error parsing configuration file : %s' % err
self.create_dialog('Error', text)
#check if dirs for temp data exist and if not try to create them
if not os.path.exists(self.config['directories']['img_dir']):
self.create_directory(self.config['directories']['img_dir'])
if not os.path.exists(self.config['directories']['profilepics_dir']):
self.create_directory(self.config['directories']['profilepics_dir'])
if not os.path.exists(self.config['directories']['cache_dir']):
self.create_directory(self.config['directories']['cache_dir'])
#Create an outer Vbox to include everything
outer_box = gtk.VBox(False, 0)
self.add(outer_box)
#Create a menu bar
mb = gtk.MenuBar()
filemenu = gtk.Menu()
file = gtk.MenuItem("Creepy")
file.set_submenu(filemenu)
select_source_menu = gtk.Menu()
select_source = gtk.MenuItem("Map Source")
select_source.set_submenu(select_source_menu)
google_sat = gtk.MenuItem('Google Satellite')
google_sat.connect('activate', self.reload_map, osmgpsmap.SOURCE_GOOGLE_SATELLITE)
select_source_menu.append(google_sat)
google_str = gtk.MenuItem('Google Street')
google_str.connect('activate', self.reload_map, osmgpsmap.SOURCE_GOOGLE_STREET)
select_source_menu.append(google_str)
google_hyb = gtk.MenuItem('Google Hybrid')
google_hyb.connect('activate', self.reload_map, osmgpsmap.SOURCE_GOOGLE_HYBRID)
select_source_menu.append(google_hyb)
openstreet = gtk.MenuItem('OpenStreetMap')
openstreet.connect('activate', self.reload_map, osmgpsmap.SOURCE_OPENSTREETMAP)
select_source_menu.append(openstreet)
mapsforfree = gtk.MenuItem('Maps For Free')
mapsforfree.connect('activate', self.reload_map, osmgpsmap.SOURCE_MAPS_FOR_FREE)
select_source_menu.append(mapsforfree)
virtualearth_sat = gtk.MenuItem('Virtual Earth Satellite ')
virtualearth_sat.connect('activate', self.reload_map, osmgpsmap.SOURCE_VIRTUAL_EARTH_SATELLITE)
select_source_menu.append(virtualearth_sat)
virtualearth_str = gtk.MenuItem('Virtual Earth Street')
virtualearth_str.connect('activate', self.reload_map, osmgpsmap.SOURCE_VIRTUAL_EARTH_STREET)
select_source_menu.append(virtualearth_str)
virtualearth_hyb = gtk.MenuItem('Virtual Earth Hybrid ( Default )')
virtualearth_hyb.connect('activate', self.reload_map, osmgpsmap.SOURCE_VIRTUAL_EARTH_HYBRID)
select_source_menu.append(virtualearth_hyb)
openaerial = gtk.MenuItem('OpenAerialMap')
openaerial.connect('activate', self.reload_map, osmgpsmap.SOURCE_OPENAERIALMAP)
select_source_menu.append(openaerial)
filemenu.append(select_source)
export_menu = gtk.Menu()
export = gtk.MenuItem("Export as..")
export.set_submenu(export_menu)
export_kml = gtk.MenuItem("Export as kml")
export_kml.connect('activate', self.export_locations, 'kml')
export_menu.append(export_kml)
export_csv = gtk.MenuItem("Export as csv")
export_csv.connect('activate', self.export_locations, 'csv')
export_menu.append(export_csv)
filemenu.append(export)
exit = gtk.MenuItem("Exit")
exit.connect("activate", gtk.main_quit)
filemenu.append(exit)
editmenu = gtk.Menu()
edit = gtk.MenuItem("Edit")
edit.set_submenu(editmenu)
settings = gtk.MenuItem('Settings')
settings.connect('activate', self.settings_dialog)
editmenu.append(settings)
helpmenu = gtk.Menu()
help = gtk.MenuItem("Help")
help.set_submenu(helpmenu)
report = gtk.MenuItem('Report a bug/problem')
report.connect('activate', self.open_url, 'https://github.com/ilektrojohn/creepy/issues')
helpmenu.append(report)
sep = gtk.SeparatorMenuItem()
helpmenu.append(sep)
about = gtk.MenuItem('About')
about.connect('activate', self.show_about_dialog)
helpmenu.append(about)
mb.append(file)
mb.append(edit)
mb.append(help)
menubox = gtk.VBox(False, 2)
menubox.pack_start(mb, False, False, 0)
outer_box.pack_start(menubox, False, False, 0)
# Creates the notebook layout
self.notebook = gtk.Notebook()
self.notebook.set_tab_pos(gtk.POS_TOP)
outer_box.pack_start(self.notebook)
#Creates the Map overview tab and adds it to the notebook
tab1 = gtk.VBox(False, 0)
label1 = gtk.Label("Map View")
self.notebook.append_page(tab1, label1)
#Load the map
self.osm = osmgpsmap.GpsMap(map_source=osmgpsmap.SOURCE_VIRTUAL_EARTH_HYBRID)
self.osm.layer_add(
osmgpsmap.GpsMapOsd(
show_dpad=True,
show_zoom=True))
#Added because default zoom level in google maps shows a white screen
self.osm.set_zoom(self.osm.props.zoom + 1)
#connect keyboard shortcuts for the map
self.osm.set_keyboard_shortcut(osmgpsmap.KEY_FULLSCREEN, gtk.gdk.keyval_from_name("F11"))
self.osm.set_keyboard_shortcut(osmgpsmap.KEY_UP, gtk.gdk.keyval_from_name("Up"))
self.osm.set_keyboard_shortcut(osmgpsmap.KEY_DOWN, gtk.gdk.keyval_from_name("Down"))
self.osm.set_keyboard_shortcut(osmgpsmap.KEY_LEFT, gtk.gdk.keyval_from_name("Left"))
self.osm.set_keyboard_shortcut(osmgpsmap.KEY_RIGHT, gtk.gdk.keyval_from_name("Right"))
self.osm.set_keyboard_shortcut(osmgpsmap.KEY_ZOOMIN , gtk.gdk.keyval_from_name("KP_Add"))
self.osm.set_keyboard_shortcut(osmgpsmap.KEY_ZOOMOUT, gtk.gdk.keyval_from_name("KP_Subtract"))
self.osm.connect('button_release_event', self.map_clicked)
#Create a table for map and locations list
maploc = gtk.Table(5, 5, True)
tab1.pack_start(maploc)
loclist_label = gtk.Label("Locations List")
self.loc_list = gtk.VBox(False, 8)
self.loc_list.add(loclist_label)
maploc.attach(self.loc_list, 0, 2, 0, 5)
self.update_location_list([])
self.mapVBox = gtk.VBox(False, 0)
self.mapVBox.pack_start(self.osm)
maploc.attach(self.mapVBox, 2, 5, 0, 5)
#
self.textview = gtk.TextView()
self.textbuffer = self.textview.get_buffer()
self.textview.connect("button-release-event", self.on_mouseovertextview_motion)
self.textview.set_editable(False)
self.textview.set_cursor_visible(False)
info = gtk.ScrolledWindow()
info.set_shadow_type(gtk.SHADOW_ETCHED_IN)
info.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
info.add(self.textview)
#Create the horizontal box that holds progressbar
progressbox = gtk.HBox(False, 0)
# Create the ProgressBar
self.pbar = gtk.ProgressBar()
self.pbar.show()
progressbox.pack_start(self.pbar, True, True, 40)
tab1.pack_end(info, False)
tab1.pack_end(progressbox, False)
#Create the targets tab
tab2 = gtk.VBox(False, 0)
label2 = gtk.Label('Targets')
self.notebook.prepend_page(tab2, label2)
#Create a table to hold all stuff here
search_table = gtk.Table(20, 10, True)
targets_instructions = gtk.Label('Fill in the details for your targets or use the search function below')
twitter_target_label = gtk.Label()
twitter_target_label.set_markup('Twitter Username')
self.twitter_target = gtk.Entry()
flickr_target_label = gtk.Label()
flickr_target_label.set_markup('Flickr UserID')
flickr_example_label = gtk.Label()
flickr_example_label.set_markup('( XXXXXXXX@XXX )')
showbuttontext = 'Geolocate \n Target'
self.show_button = gtk.Button(showbuttontext)
self.show_button.child.set_use_markup(True)
self.show_button.connect('clicked', self.thread_show_clicked)
separator = gtk.HSeparator()
self.flickr_target = gtk.Entry()
self.twitter_username = gtk.Entry()
tsearchtext = gtk.Label()
stext = "Use the form below to search for twitter users if necessary"
tsearchtext.set_markup(stext)
fsearchtext = gtk.Label()
ftext = "Use the form below to search for flickr users if necessary"
fsearchtext.set_markup(ftext)
t_label1 = gtk.Label('Search for:')
search_twitter_button = gtk.Button('Search')
search_twitter_button.connect('clicked', self.thread_search_twitter)
clear_twitter_button = gtk.Button('Clear')
clear_twitter_button.connect('clicked', self.clear_twitter_list)
twitter_im = gtk.Image()
pixbuf = gtk.gdk.pixbuf_new_from_file(os.path.join(self.CONF_DIR, 'evil_twitter.png'))
scaled_buf = pixbuf.scale_simple(50,50,gtk.gdk.INTERP_BILINEAR)
twitter_im.set_from_pixbuf(scaled_buf)
self.twitter_list = gtk.VBox(False, 0)
search_table.attach(targets_instructions, 0, 6, 0, 1)
search_table.attach(twitter_target_label, 0, 2, 1, 2)
search_table.attach(self.twitter_target, 2, 4 , 1, 2)
search_table.attach(flickr_target_label, 0, 2, 2, 3)
search_table.attach(self.flickr_target, 2, 4, 2, 3)
search_table.attach(flickr_example_label, 4, 6, 2, 3)
search_table.attach(self.show_button, 8, 10, 1, 3)
search_table.attach(separator, 0, 10, 3, 4)
search_table.attach(tsearchtext, 2, 8, 5, 6)
search_table.attach(twitter_im, 0, 1, 4, 6)
search_table.attach(t_label1, 0, 1, 6, 7)
search_table.attach(self.twitter_username, 1, 4, 6, 7)
search_table.attach(search_twitter_button, 5, 7, 6, 7)
search_table.attach(clear_twitter_button, 8, 10, 6, 7)
search_table.attach(self.twitter_list, 0, 10, 7, 12)
self.update_twitterusername_list([])
#add flickr search
flickr_im = gtk.Image()
pixbuf = gtk.gdk.pixbuf_new_from_file(os.path.join(self.CONF_DIR, 'flickr.png'))
scaled_buf = pixbuf.scale_simple(50,50,gtk.gdk.INTERP_BILINEAR)
flickr_im.set_from_pixbuf(scaled_buf)
self.flickr_list = gtk.VBox(False, 0)
t_label2 = gtk.Label('Search for:')
self.flickr_username = gtk.Entry()
search_flickr_button = gtk.Button('Search')
search_flickr_button.connect('clicked', self.thread_search_flickr)
search_flickrreal_button = gtk.Button('Search for real name')
search_flickrreal_button.connect('clicked', self.thread_search_flickr_realname)
clear_flickr_button = gtk.Button('Clear')
clear_flickr_button.connect('clicked', self.clear_flickr_list)
search_table.attach(fsearchtext, 2, 8, 13, 14)
search_table.attach(flickr_im, 0, 1, 12, 14)
search_table.attach(t_label2, 0, 1, 14, 15)
search_table.attach(self.flickr_username, 1, 4, 14, 15)
search_table.attach(search_flickr_button, 4, 5, 14, 15)
search_table.attach(search_flickrreal_button, 5, 8, 14, 15)
search_table.attach(clear_flickr_button, 8, 10, 14, 15)
search_table.attach(self.flickr_list, 0, 10, 15, 20)
self.update_flickrusername_list([])
tab2.pack_start(search_table)
self.notebook.set_current_page(0)
def settings_dialog(self, button):
settings = gtk.Dialog('Creepy Settings', None, 0, (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OK, gtk.RESPONSE_OK))
settings.set_default_size(400, 200)
self.settings_notebook = gtk.Notebook()
self.twitbox = gtk.VBox(False, 0)
#If creepy is already authorized, hide the option
if self.config['twitter_auth']['access_key'] !='' and self.config['twitter_auth']['access_secret'] != '':
self.set_twit_options(authorized=True)
else:
self.set_twit_options(authorized=False)
flickr_options = gtk.VBox(False, 0)
flabel = gtk.Label('Flickr')
flickr_key_label = gtk.Label('Flickr API key')
flickr_key_label.set_alignment(0,0.5)
self.flickr_key = gtk.Entry()
if self.config['flickr']['api_key'] != '':
self.flickr_key.set_text(self.config['flickr']['api_key'])
flickr_options.pack_start(flickr_key_label)
flickr_options.pack_start(self.flickr_key)
dir_label = gtk.Label('Photo locations')
img_options = gtk.VBox(False, 0)
img_options_label = gtk.Label('Saved images')
img_options_label.set_alignment(0,1)
prof_options_label = gtk.Label('Saved profile pictures')
prof_options_label.set_alignment(0,1)
self.img_options_entry = gtk.Entry()
self.prof_options_entry = gtk.Entry()
self.img_options_entry.set_text(self.config['directories']['img_dir'])
self.prof_options_entry.set_text(self.config['directories']['profilepics_dir'])
img_options.pack_start(img_options_label)
img_options.pack_start(self.img_options_entry)
img_options.pack_start(prof_options_label)
img_options.pack_start(self.prof_options_entry)
clear_cache_button = gtk.Button('Clear photos cache')
clear_cache_button.connect('clicked', self.clear_photo_cache)
img_options.pack_start(clear_cache_button)
self.settings_notebook.append_page(flickr_options, flabel)
self.settings_notebook.append_page(img_options, dir_label)
settings.vbox.pack_start(self.settings_notebook)
settings.show_all()
response = settings.run()
if response == gtk.RESPONSE_OK:
self.save_img_options()
self.save_prof_options()
self.save_flickr_config()
settings.destroy()
def startprogressbox(self):
# Add a timer callback to update the value of the progress bar
self.timer = gobject.timeout_add (100, self.progress_timeout, self.pbar)
def stopprogressbox(self):
gobject.source_remove(self.timer)
self.pbar.set_fraction(0)
# Update the value of the progress bar so that we get
# some movement
def progress_timeout(self, pbobj):
pbobj.pulse()
return True
def clear_photo_cache(self, button):
folders = (self.config['directories']['img_dir'], self.config['directories']['profilepics_dir'])
for folder in folders:
for the_file in os.listdir(folder):
file_path = os.path.join(folder, the_file)
try:
if os.path.isfile(file_path):
os.unlink(file_path)
except Exception, err:
error_text = 'Error deleting folders, please do it manually. Error was : %s' % err
self.create_dialog('Error ', error_text)
text = 'Contents of folder were successfully deleted'
self.create_dialog('Success', text)
def save_img_options(self):
self.config['directories']['img_dir'] = self.img_options_entry.get_text()
self.config.write()
def save_prof_options(self):
self.config['directories']['profilepics_dir'] = self.prof_options_entry.get_text()
self.config.write()
def save_flickr_config(self):
self.config['flickr']['api_key'] = self.flickr_key.get_text()
self.config.write()
def set_twit_options(self, authorized):
twit_label = gtk.Label('Twitter')
if self.twitbox:
for i in self.twitbox.get_children():
self.twitbox.remove(i)
else:
self.twitbox = gtk.HBox(False, 0)
if authorized == False :
auth_button = gtk.Button('Authorize Creepy')
auth_button.set_tooltip_text('Clicking this will open your browser to access twitter and get an authorization pin. Copy paste \
the pin to the box below, and hit OK')
auth_button.connect('clicked', self.button_authorize_twitter)
self.auth_pin = gtk.Entry()
auth_pin_label = gtk.Label('Pin :')
auth_pin_label.set_alignment(0,1)
self.auth_finalize_button = gtk.Button('OK')
self.auth_finalize_button.set_sensitive(0)
self.auth_pin.connect('changed', self.set_button_active)
self.auth_finalize_button.connect('clicked', self.fin_authorize_twitter)
self.twitbox.pack_start(auth_button, False, False, 15)
self.twitbox.pack_end(self.auth_finalize_button, False, False, 5)
self.twitbox.pack_end(self.auth_pin, False, False, 0)
self.twitbox.pack_end(auth_pin_label, False, False, 5)
self.settings_notebook.prepend_page(self.twitbox, twit_label)
self.settings_notebook.set_current_page(0)
self.settings_notebook.show_all()
else:
authorized_label = gtk.Label('Creepy is already authorized for Twitter.')
reset_button = gtk.Button('reset auth settings')
reset_button.connect('clicked', self.reset_auth_settings)
self.twitbox.pack_start(authorized_label, False, False, 0)
self.twitbox.pack_end(reset_button, False, False, 0)
self.settings_notebook.prepend_page(self.twitbox, twit_label)
self.settings_notebook.set_current_page(0)
self.settings_notebook.show_all()
def set_auth(self, conf_file):
self.creepy = cree.Cree(conf_file)
def reset_auth_settings(self, button):
self.config['twitter_auth']['access_key'] = ''
self.config['twitter_auth']['access_secret'] = ''
self.config.write()
self.settings_notebook.remove_page(0)
#self.settings_table.remove(self.twitbox)
self.set_twit_options(authorized=False)
def set_button_active(self, button):
self.auth_finalize_button.set_sensitive(1)
def button_authorize_twitter(self, button):
self.oauth = oauth(self.config['twitter_auth']['consumer_key'], self.config['twitter_auth']['consumer_secret'])
url = self.oauth.get_authorization_url(True)
webbrowser.open(url)
def fin_authorize_twitter(self, button):
verif = self.auth_pin.get_text().strip()
try:
self.oauth.get_access_token(verif)
message = 'Authentication successful'
key = self.oauth.access_token.key
secret = self.oauth.access_token.secret
self.config['twitter_auth']['access_key'] = key
self.config['twitter_auth']['access_secret'] = secret
self.config.write()
self.settings_notebook.remove_page(0)
#self.settings_table.remove(self.twitbox)
self.set_twit_options(authorized=True)
self.set_auth(self.config)
except Exception, err:
message = "Authentication failed with error %s" % (err)
dialog = gtk.MessageDialog(
parent = None,
flags = gtk.DIALOG_DESTROY_WITH_PARENT,
type = gtk.MESSAGE_INFO,
buttons = gtk.BUTTONS_OK,
message_format = message)
dialog.set_title('Twitter authentication')
dialog.run()
dialog.destroy()
def search_twitter(self, username):
users = self.creepy.search_for_users('twitter', username)
if not users or len(users) == 0 :
self.create_nonmodal_dialog('Error', 'No results for the search query')
elif users[0] == 'auth_error':
self.create_nonmodal_dialog('Error', 'Only authenticated users can search for users. Go to Edit->Settings->Twitter to authorize creepy to use your account')
else:
gobject.idle_add(self.update_twitterusername_list, users)
def thread_search_twitter(self, button):
username = self.twitter_username.get_text()
if username:
Thread(target=lambda : self.search_twitter(username)).start()
else :
self.create_dialog('error', 'You didn\'t specify a search query')
def search_flickr(self, username):
users = self.creepy.search_for_users('flickr', username, 'username')
if not users or len(users) == 0 :
self.create_nonmodal_dialog('Error', 'No results for the search query')
else:
gobject.idle_add(self.update_flickrusername_list, users)
def thread_search_flickr(self, button):
name = self.flickr_username.get_text()
if name:
Thread(target=lambda : self.search_flickr(name)).start()
else :
self.create_dialog('error', 'You didn\'t specify a search query')
def search_flickr_realname(self, name):
users = self.creepy.search_for_users('flickr', name, 'realname')
if not users or len(users) == 0 :
self.create_nonmodal_dialog('Error', 'No results for the search query')
else:
gobject.idle_add(self.update_flickrusername_list, users)
def thread_search_flickr_realname(self, button):
name = self.flickr_username.get_text()
if name:
Thread(target=lambda : self.search_flickr_realname(name)).start()
else :
self.create_dialog('error', 'You didn\'t specify a search query')
def clear_flickr_list(self, button):
self.update_flickrusername_list([])
def clear_twitter_list(self, button):
self.update_twitterusername_list([])
def update_twitterusername_list(self, users):
for child in self.twitter_list.get_children():
self.twitter_list.remove(child)
sw = gtk.ScrolledWindow()
sw.set_shadow_type(gtk.SHADOW_ETCHED_IN)
sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
self.twitter_list.pack_start(sw, True, True, 0)
store = self.twitterusername_list_model(users)
treeView = gtk.TreeView(store)
treeView.connect("row-activated", self.twitter_set_target)
treeView.set_rules_hint(True)
sw.add(treeView)
self.twitterusername_columns(treeView)
self.show_all()
def twitterusername_list_model(self, users):
store = gtk.ListStore(str, str, str, gtk.gdk.Pixbuf)
if users:
for user in users:
filename = 'profile_pic_%s' % user.screen_name
file = os.path.join(self.profilepics_dir, filename)
try:
profile_pic = gtk.gdk.pixbuf_new_from_file(file)
except Exception:
default_file = os.path.join(self.CONF_DIR, 'default.jpg')
profile_pic = gtk.gdk.pixbuf_new_from_file(default_file)
store.append([str(user.id), str(user.screen_name), str(user.name), profile_pic])
return store
def twitterusername_columns(self, treeView):
rendererText1 = gtk.CellRendererText()
col0 = gtk.TreeViewColumn("Screen Name")
col0.pack_start(rendererText1, True)
col0.set_attributes(rendererText1, text=1)
col0.set_sort_column_id(0)
treeView.append_column(col0)
rendererText2 = gtk.CellRendererText()
col1 = gtk.TreeViewColumn("Full Name")
col1.pack_start(rendererText2, True)
col1.set_attributes(rendererText2, text=2)
col1.set_sort_column_id(1)
treeView.append_column(col1)
rendererImage = gtk.CellRendererPixbuf()
col2 = gtk.TreeViewColumn("Photo")
col2.pack_start(rendererImage, True)
col2.set_attributes(rendererImage, pixbuf=3)
treeView.append_column(col2)
def twitter_set_target(self, widget, row, col):
model = widget.get_model()
self.twitter_target.set_text(model[row][1])
def update_flickrusername_list(self, users):
for child in self.flickr_list.get_children():
self.flickr_list.remove(child)
sw = gtk.ScrolledWindow()
sw.set_shadow_type(gtk.SHADOW_ETCHED_IN)
sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
self.flickr_list.pack_start(sw, True, True, 0)
store = self.flickrusername_list_model(users)
treeView = gtk.TreeView(store)
treeView.connect("row-activated", self.flickr_set_target)
treeView.set_rules_hint(True)
sw.add(treeView)
self.flickrusername_columns(treeView)
self.show_all()
def flickrusername_list_model(self, users):
store = gtk.ListStore( str, str, str, str, gtk.gdk.Pixbuf)
if users:
for user in users:
try:
file = '%sprofile_pic_%s' % (self.profilepics_dir, user['id'])
profile_pic = gtk.gdk.pixbuf_new_from_file(file)
except Exception:
file = os.path.join(self.CONF_DIR, 'default.jpg')
profile_pic = gtk.gdk.pixbuf_new_from_file(file)
store.append([str(user['id']), str(user['username']), str(user['realname']), str(user['location']), profile_pic])
return store
def flickrusername_columns(self, treeView):
rendererText1 = gtk.CellRendererText()
col0 = gtk.TreeViewColumn("Username")
col0.pack_start(rendererText1, True)
col0.set_attributes(rendererText1, text=1)
col0.set_sort_column_id(1)
treeView.append_column(col0)
rendererText2 = gtk.CellRendererText()
col1 = gtk.TreeViewColumn("Full Name")
col1.pack_start(rendererText2, True)
col1.set_attributes(rendererText2, text=2)
col1.set_sort_column_id(2)
treeView.append_column(col1)
rendererText3 = gtk.CellRendererText()
col2 = gtk.TreeViewColumn("Location")
col2.pack_start(rendererText3, True)
col2.set_attributes(rendererText3, text=3)
col2.set_sort_column_id(3)
treeView.append_column(col2)
rendererImage = gtk.CellRendererPixbuf()
col3 = gtk.TreeViewColumn("Photo")
col3.pack_start(rendererImage, True)
col3.set_attributes(rendererImage, pixbuf=4)
treeView.append_column(col3)
def flickr_set_target(self, widget, row, col):
model = widget.get_model()
self.flickr_target.set_text(model[row][0])
def update_location_list(self, locations):
for child in self.loc_list.get_children():
self.loc_list.remove(child)
sw = gtk.ScrolledWindow()
sw.set_shadow_type(gtk.SHADOW_ETCHED_IN)
sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
self.loc_list.pack_start(sw, True, True, 0)
store = self.location_list_model(locations)
treeView = gtk.TreeView(store)
treeView.connect("row-activated", self.location_activated)
treeView.connect('button-press-event' , self.on_button_press_event)
treeView.set_rules_hint(True)
sw.add(treeView)
self.location_columns(treeView)
self.show_all()
def location_list_model(self, locations):
store = gtk.ListStore(str, str, str, str, str)
if locations:
for loc in locations:
store.append([loc['context'][0], loc['context'][1], loc['latitude'], loc['longitude'], loc['time']])
return store
def location_columns(self, treeView):
rendererText = gtk.CellRendererText()
col = gtk.TreeViewColumn("Latitude", rendererText, text=2)
treeView.append_column(col)
rendererText = gtk.CellRendererText()
col = gtk.TreeViewColumn("Longitude", rendererText, text=3)
treeView.append_column(col)
rendererText = gtk.CellRendererText()
col = gtk.TreeViewColumn("Time", rendererText, text=4)
col.set_sort_column_id(4)
treeView.append_column(col)
def copy_to_clipboard(self, obj, coord):
string = '%s, %s' % (float(coord[0]), float(coord[1]))
clipboard = gtk.Clipboard(gtk.gdk.display_manager_get().get_default_display(), "CLIPBOARD")
clipboard.set_text(string)
def open_googlemaps(self, button, coord):
url = 'http://maps.google.com/maps?q=%s,%s' % (float(coord[0]), float(coord[1]))
webbrowser.open(url)
def open_url(self, button, url):
webbrowser.open_new_tab(url)
def on_mouseovertextview_motion(self, widget, event, data = None):
def check_if_link(iter):
tags = iter.get_tags()
for tag in tags:
page = tag.get_data("page")
if page != 0:
self.open_url(False, page)
break
if event.button == 1:
try:
start, end = self.textbuffer.get_selection_bounds()
except ValueError:
# If there is nothing selected, None is return
pass
else:
if start.get_offset() != end.get_offset():
return False
x, y = widget.window_to_buffer_coords(gtk.TEXT_WINDOW_WIDGET,int(event.x), int(event.y))
iter = widget.get_iter_at_location(x, y)
check_if_link(iter)
def on_button_press_event(self, treeview, event):
if event.button == 3:
x = int(event.x)
y = int(event.y)
time = event.time
pthinfo = treeview.get_path_at_pos(x, y)
if pthinfo is not None:
path, col, cellx, celly = pthinfo
treeview.grab_focus()
treeview.set_cursor( path, col, 0)
model = treeview.get_model()
location_popup = gtk.Menu()
copy_clipboard = gtk.MenuItem("Copy to clipboard")
open_googlemap = gtk.MenuItem("Open in browser (google maps)")
location_popup.append(copy_clipboard)
location_popup.append(open_googlemap)
copy_clipboard.connect('activate', self.copy_to_clipboard, (model[path[0]][2], model[path[0]][3]))
open_googlemap.connect('activate', self.open_googlemaps, (model[path[0]][2], model[path[0]][3]))
copy_clipboard.show()
open_googlemap.show()
location_popup.popup( None, None, None, event.button, time)
return True
def location_activated(self, widget, row, col):
model = widget.get_model()
self.osm.set_center_and_zoom(float(model[row][2]), float(model[row][3]), 12)
self.osm.set_zoom(self.osm.props.zoom + 3)
self.textbuffer.set_text(model[row][1])
tag = self.textbuffer.create_tag(None,
foreground="blue", underline=pango.UNDERLINE_SINGLE)
tag.set_data("page", model[row][0])
it = self.textbuffer.get_end_iter()
self.textbuffer.insert_with_tags(it, model[row][0], tag)
def reload_map(self, button, source):
#remove old map
if self.osm:
self.mapVBox.remove(self.osm)
try:
self.osm = osmgpsmap.GpsMap(map_source=source)
except Exception, e:
print "ERROR:", e
self.osm = osmgpsmap.GpsMap()
self.osm.layer_add(
osmgpsmap.GpsMapOsd(
show_dpad=True,
show_zoom=True))
#Added because default zoom level in google maps shows a white screen
self.osm.set_zoom(self.osm.props.zoom + 1)
self.mapVBox.pack_start(self.osm)
self.osm.show()
if self.locations:
self.draw_locations(self.locations)
def draw_locations(self, locations):
self.stopprogressbox()
pb = gtk.gdk.pixbuf_new_from_file_at_size(os.path.join(self.CONF_DIR, 'index.png'), 24,24)
if locations:
for l in locations:
self.osm.image_add(float(l['latitude']), float(l['longitude']), pb)
self.osm.set_center_and_zoom(float(locations[0]['latitude']), float(locations[0]['longitude']), 12)
self.notebook.set_current_page(-1)
def print_tiles(self):
if self.osm.props.tiles_queued != 0:
return True
def search_for_locations(self, twit, flickr):
self.startprogressbox()
#the username of the twitter target for the specific search
self.twitter_target_username = self.twitter_target.get_text()
#the username of the flickr target for the specific search
self.flickr_target_username = self.flickr_target.get_text()
self.locations, params = self.creepy.get_locations(self.twitter_target_username, self.flickr_target_username)
#gobject.idle_add(self.textbuffer.set_text, 'DONE !')
if params:
if 'flickr_errors' in params:
for err in params['flickr_errors']:
if err['from'] == 'flickr_photos':
textfl = 'Error was %s' % err['error']
self.create_nonmodal_dialog('Error connecting to flickr', textfl)
if 'twitter_errors' in params:
text = ''
for err in params['twitter_errors']:
if err['from'] == 'twitter_connection':
if err['error'] == 'Not found':
self.create_nonmodal_dialog('Wrong username', 'The selected target does not correspond to a twitter username. Please \
try the search function if you are unsure ')
elif err['error'] == 'Failed to send request: [Errno -2] Name or service not known':
self.create_nonmodal_dialog('Connection Error', 'Could not connect to twitter, please check your connection settings and try again')
elif err['error'] == 'Not authorized':
self.create_nonmodal_dialog('Authentication Error', 'Target\'s timeline is protected and you are not following him/her')
else:
self.create_nonmodal_dialog('Twitter error', 'We experienced some problems connecting to twitter. We were not able to retrieve all \
of the users tweets. \n ')
text += 'Error while accessing %s .The problem was : %s \n ' % (err['url'], err['error'])
text += ' \n %s tweets have been retrieved out of a total of %s. \n From them, we were able to extract %s locations. \n \
We encountered %s errors in total accessing various services. \n ' % (params['tweets'],
params['tweets_count'],
params['locations'],
len(params['twitter_errors']))
gobject.idle_add(self.textbuffer.insert, self.textbuffer.get_end_iter(), text)
gobject.idle_add(self.update_location_list, self.locations)
gobject.idle_add(self.draw_locations, self.locations)
gobject.idle_add(self.activate_search_button)
def thread_show_clicked(self, button):
if not self.twitter_target.get_text() and not self.flickr_target.get_text():
self.create_dialog('error', 'No targets selected. Please select at least one in targets tab')
else:
self.notebook.set_current_page(-1)
#clear locations from previous search and reload map
self.locations = []
self.reload_map(None, osmgpsmap.SOURCE_VIRTUAL_EARTH_HYBRID)
self.update_location_list([])
self.textbuffer.set_text('Searching for locations .. Be patient, I am doing my best. \n This can take a while, please hold ... \n')
Thread(target=lambda : self.search_for_locations(self.twitter_target.get_text(), self.flickr_target.get_text())).start()
self.show_button.set_sensitive(0)
def activate_search_button(self):
self.show_button.set_sensitive(1)
def create_directory(self, dir):
try:
os.makedirs(dir)
except Exception, err:
text = 'Could not create the directories for temporary data. Please check your settings. \
Error was ' % err
self.create_dialog('Error', text)
def export_locations(self, button, format):
if self.locations:
filesel = gtk.FileChooserDialog('Save as...',
None,
gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER,
(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
gtk.STOCK_OPEN, gtk.RESPONSE_OK))
filesel.set_default_response(gtk.RESPONSE_OK)
response = filesel.run()
if response == gtk.RESPONSE_OK:
dir = filesel.get_filename()
elif response == gtk.RESPONSE_CANCEL:
dir = None
filesel.destroy()
if dir:
if self.twitter_target_username:
export_id = self.twitter_target_username
elif self.flickr_target_username:
export_id = self.flickr_target_username
else:
self.create_nonmodal_dialog('Error', 'There are no results to export')
hel = helper.Helper()
if format == 'kml':
result = hel.create_kml(export_id, dir, self.locations)
elif format == 'csv':
result = hel.create_csv(export_id, dir, self.locations)
if result == 'Success':
self.create_nonmodal_dialog('Success', 'File created successfully and saved at %s' % dir)
else:
self.create_nonmodal_dialog('Error', 'We were unable to export locations . Error was : %s' % result[1] )
else:
self.create_nonmodal_dialog('Error', 'There are no results to export')
def map_clicked(self, osm, event):
lat,lon = self.osm.get_event_location(event).get_degrees()
if event.button == 1:
pass
elif event.button == 2:
pass
elif event.button == 3:
pass
def create_dialog (self, title, text):
dialog = gtk.MessageDialog(
parent = None,
flags = gtk.DIALOG_DESTROY_WITH_PARENT,
type = gtk.MESSAGE_INFO,
buttons = gtk.BUTTONS_OK,
message_format = text)
dialog.set_title(title)
dialog.run()
dialog.destroy()
def create_nonmodal_dialog (self, title, text):
dialog = gtk.MessageDialog(
parent = None,
flags = gtk.DIALOG_DESTROY_WITH_PARENT,
type = gtk.MESSAGE_INFO,
buttons = gtk.BUTTONS_OK,
message_format = text)
dialog.set_title(title)
dialog.connect('response', lambda dialog, response: dialog.destroy())
dialog.show()
def show_about_dialog(self, button):
about = gtk.AboutDialog()
about.set_program_name("Creepy")
about.set_version("0.1.9")
about.set_copyright("(c) Yiannis Kakavas")
about.set_comments("Creepy is a geolocation information gatherer")
about.set_website("http://ilektrojohn.github.com/creepy")
about.set_logo(gtk.gdk.pixbuf_new_from_file(os.path.join(self.CONF_DIR, "creepy32.png")))
about.run()
about.destroy()
def main(self):
self.show_all()
if os.name == "nt": gtk.gdk.threads_enter()
gtk.main()
if os.name == "nt": gtk.gdk.threads_leave()
if __name__ == '__main__':
u = CreepyUI()
u.main()
ilektrojohn-creepy-b7b83fc/creepy/flickr.py 0000664 0000000 0000000 00000016647 11600137100 0021145 0 ustar 00root root 0000000 0000000 '''
Copyright 2010 Yiannis Kakavas
This file is part of creepy.
creepy 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 3 of the License, or
(at your option) any later version.
creepy 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 creepy If not, see .
'''
import urllib
import flickrapi
from flickrapi.exceptions import FlickrError
import re
from BeautifulSoup import BeautifulSoup as bs
class Flickr():
"""
Wrapper class for the Flickr API.
provides functionality for user search and information retrieval
"""
def __init__(self, conf_file):
self.api = flickrapi.FlickrAPI(conf_file['flickr']['api_key'])
self.photo_dir = conf_file['directories']['profilepics_dir']
def search_real_name(self, input):
"""
Search user by real name
Provides search function by real name. This is not provided by flickr API so
it needs to be done the old(html-scrapping) way.
Returns a list of user dictionaries
"""
html = urllib.urlopen("http://www.flickr.com/search/people/?see=none&q=" + input + "&m=names").read()
'''
Removing some javascript that choked BeautifulSoup's parser
'''
html = re.sub("(?is)()", "", html)
soup = bs(html)
id = []
username = []
name = []
for r in soup.findAll('h2'):
id_temp = r.a['href'].replace("/photos/", "")[:-1]
if re.match(r'[\d]+@[A-Z][\d]+', id_temp):
id.append(id_temp)
else:
id.append(self.getid_from_name(r.a.string))
username.append(r.a.string)
try:
name.append(r.next.next.next.next.b.string)
except Exception:
name.append("")
pics = [p.img['src'] for p in soup.findAll(attrs={"class":"Icon"})]
user_list = zip(id, username, name, pics)
users = []
for user in user_list:
try:
temp_file = '%sprofile_pic_%s' % (self.photo_dir, user[0])
urllib.urlretrieve(user[3], temp_file)
except Exception, err:
pass
#print 'Error retrieving %s profile picture' % (user[1]), err
users.append({'id':user[0], 'username': user[1], 'realname':user[2], 'location':'' })
return users
def search_user(self, input):
"""
Wrapper to the search function provided by flickr API
Returns a list of user dictionaries
"""
if re.match("[\w\-\.+]+@(\w[\w\-]+\.)+[\w\-]+", input):
try:
results = self.api.people_findByEmail(find_email=input)
except FlickrError:
return
else:
try:
results = self.api.people_findByUsername(username=input)
except FlickrError, err:
#print 'Error from flickr api ', err
return
if results.attrib['stat'] == "ok":
user_list = []
#print results.find('user')
for i in results.find('user').items():
user_list.append(self.get_user_info(i[1]))
return user_list
def getid_from_name(self, username):
"""
Gets user's nsid from flickr
Returns user's nsid
"""
try:
result = self.api.people_findByUsername(username=username)
return result.find('user').attrib['nsid']
except FlickrError, err:
return
def get_user_info(self, id):
"""
Retrieves a user's username, real name and location as provided by flickr API
Returns a user dictionary
"""
results = self.api.people_getInfo(user_id=id)
if results.attrib['stat'] == 'ok':
user = {'id':id, 'username':'', 'realname':'', 'location':''}
res = results.find('person')
user['username'] = res.find('username').text
if res.find('realname'):
user['realname'] = res.find('realname').text
if res.find('location'):
user['location'] = res.find('location').text
return user
def get_user_photos(self, id, page_nr):
"""
Retrieves a users public photos.
Authentication and retrieval of protected photos is not yet implemented
Returns a list with all the photos
"""
try:
results = self.api.people_getPublicPhotos(user_id=id, extras="geo, date_taken", per_page=500, page=page_nr)
if results.attrib['stat'] == 'ok':
return results.find('photos').findall('photo')
except Exception , err:
conn_err = {'from':'flickr', 'tweetid':'', 'url': 'flickr' ,'error':err.message}
self.errors.append(conn_err)
def get_locations(self, photos):
"""
Determines location information from a list of photos
Extracts the geo data provided by flickr API and returns a
dictionary of locations
"""
locations = []
if photos:
for photo in photos:
if photo.attrib['latitude'] != '0':
loc = {}
loc['context'] = ('http://www.flickr.com/photos/%s/%s' % (photo.attrib['owner'], photo.attrib['id']), 'Photo from flickr \n Title : %s \n ' % (photo.attrib['title']))
loc['time'] = photo.attrib['datetaken']
loc['latitude'] = photo.attrib['latitude']
loc['longitude'] = photo.attrib['longitude']
loc['accuracy'] = photo.attrib['accuracy']
locations.append(loc)
return locations
def return_locations(self, id):
"""
Wrapper function for the location retrieval.
Returns all the locations detected from the user's photos
"""
self.errors = []
locations_list = []
result_params = {}
try:
results = self.api.people_getPublicPhotos(user_id=id, extras="geo, date_taken", per_page=500)
if results.attrib['stat'] == 'ok':
res = results.find('photos')
total_photos = res.attrib['total']
pages = int(res.attrib['pages'])
#print "pages :" + str(pages) + " , total :" + total_photos
if pages > 1:
for i in range(1, pages + 1, 1):
locations_list.extend(self.get_locations(self.get_user_photos(id, i)))
else:
locations_list.extend(self.get_locations(results.find('photos').findall('photo')))
except FlickrError, err:
conn_err = {'from':'flickr_photos', 'tweetid':'', 'url': 'flickr' ,'error':err.message}
self.errors.append(conn_err)
result_params['flickr_errors'] = self.errors
return (locations_list, result_params)
ilektrojohn-creepy-b7b83fc/creepy/helper.py 0000664 0000000 0000000 00000007306 11600137100 0021142 0 ustar 00root root 0000000 0000000 '''
Copyright 2010 Yiannis Kakavas
This file is part of creepy.
creepy 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 3 of the License, or
(at your option) any later version.
creepy 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 creepy If not, see .
'''
import os.path
import csv
try:
import cPickle as pickle
except:
import pickle
class Helper():
def __init__(self):
pass
def html_escape(self, text):
"""Produce entities within text."""
html_escape_table = {
"&": "&",
'"': """,
"'": "'",
">": ">",
"<": "<",
}
return "".join(html_escape_table.get(c,c) for c in text)
def create_kml(self, id, dir, locations):
"""
Takes id of a user as input and packs his locations into a kml file
"""
#Create the klm file
# kml is the list to hold all xml attribs. it will be joined in a string later
kml = []
kml.append('')
kml.append('')
kml.append('')
kml.append(' %s.kml' % id)
for loc in locations:
desc = '%s Link : %s' % (loc['context'][1], loc['context'][0])
kml.append(' ')
kml.append(' %s' % loc['time'])
kml.append(' %s' % self.html_escape(desc))
kml.append(' ')
kml.append(' ')
kml.append(' %s, %s, 0' % (loc['longitude'], loc['latitude']))
kml.append(' ')
kml.append(' ')
kml.append('')
kml.append('')
kml_string = '\n'.join(kml)
try:
#save the file to disk
filename = os.path.join(dir, '%s.kml' % id)
fileobj = open(filename, 'w')
fileobj.write(kml_string)
fileobj.close()
return 'Success'
except Exception, err:
return ('Error', err)
def create_csv(self, id, dir, locations):
try:
filename = os.path.join(dir, '%s.csv' % id)
fileobj = open(filename, 'w')
writer = csv.writer(fileobj, quoting=csv.QUOTE_ALL)
writer.writerow(('Time', 'Latitude', 'Longitude', 'Retrieved from', 'Context'))
for loc in locations:
writer.writerow( (loc['time'], loc['latitude'], loc['longitude'], loc['from'], '%s Link :%s'% (loc['context'][1], loc['context'][0]) ) )
fileobj.close()
return 'Success'
except Exception, err:
return ('Error', err)
def remove_duplicates(self, location_list):
known_timestamps = set()
processed_results = []
for loc in location_list:
timestamp = loc['time']
if timestamp in known_timestamps:
continue
else:
processed_results.append(loc)
known_timestamps.add(timestamp)
return processed_results ilektrojohn-creepy-b7b83fc/creepy/include/ 0000775 0000000 0000000 00000000000 11600137100 0020726 5 ustar 00root root 0000000 0000000 ilektrojohn-creepy-b7b83fc/creepy/include/creepy.conf 0000664 0000000 0000000 00000000506 11600137100 0023065 0 ustar 00root root 0000000 0000000
[twitter_auth]
consumer_secret = OJTCMwPDsl7HUfwvPk8SicZFehU2bYv8jRAoUBA8C2A
consumer_key = nW9dRFaHXMXWucxeTWiC8Q
access_key =
access_secret =
[flickr]
api_key = d42d9307a0ee4d9f81962e651defef4f
[misc]
moby_key = zorwfc859BnBOZHm
[directories]
img_dir = images/
profilepics_dir = images/profilepics/
cache_dir = cache/
ilektrojohn-creepy-b7b83fc/creepy/include/creepy.xpm 0000664 0000000 0000000 00000015450 11600137100 0022750 0 ustar 00root root 0000000 0000000 /* XPM */
static char * creepy22_xpm[] = {
"22 22 365 2",
" c None",
". c #000000",
"+ c #000601",
"@ c #000902",
"# c #000401",
"$ c #000802",
"% c #000E04",
"& c #011F0E",
"* c #0A241B",
"= c #000300",
"- c #000501",
"; c #00230C",
"> c #08724B",
", c #0C5F39",
"' c #145E46",
") c #137154",
"! c #208A6A",
"~ c #309D81",
"{ c #349783",
"] c #35806F",
"^ c #032D19",
"/ c #001306",
"( c #000C03",
"_ c #033016",
": c #5CB2AA",
"< c #51CBC6",
"[ c #74D6D7",
"} c #6CD0CF",
"| c #307664",
"1 c #19573F",
"2 c #186444",
"3 c #3A9480",
"4 c #3FA392",
"5 c #478773",
"6 c #04421F",
"7 c #001506",
"8 c #000903",
"9 c #2B6859",
"0 c #57BDB5",
"a c #3FB9A9",
"b c #67CDCA",
"c c #2F8262",
"d c #0E3611",
"e c #101C07",
"f c #1F0700",
"g c #456653",
"h c #8EDBDD",
"i c #207953",
"j c #1F623E",
"k c #ACE6EC",
"l c #7ECBCB",
"m c #0C5F3A",
"n c #000100",
"o c #044928",
"p c #4CAB9D",
"q c #56CEC9",
"r c #2BA182",
"s c #104E21",
"t c #10340F",
"u c #001502",
"v c #340700",
"w c #190200",
"x c #2E0900",
"y c #2E402E",
"z c #083B22",
"A c #0A0700",
"B c #3E9C80",
"C c #6FD7D2",
"D c #55CAC0",
"E c #07432C",
"F c #000200",
"G c #297A67",
"H c #86DDE4",
"I c #27875B",
"J c #3F3B2D",
"K c #160B09",
"L c #210300",
"M c #5A0E00",
"N c #230500",
"O c #3F1100",
"P c #430800",
"Q c #070000",
"R c #001B07",
"S c #102B0B",
"T c #2A7F61",
"U c #52B7A4",
"V c #033C1E",
"W c #00220A",
"X c #2D8E75",
"Y c #27795D",
"Z c #393A2F",
"` c #050000",
" . c #410800",
".. c #370800",
"+. c #5B1100",
"@. c #452205",
"#. c #592404",
"$. c #570D00",
"%. c #550D01",
"&. c #310500",
"*. c #030000",
"=. c #343126",
"-. c #7BCEC4",
";. c #26A482",
">. c #005B2C",
",. c #000B03",
"'. c #003B15",
"). c #0B7245",
"!. c #42A389",
"~. c #293320",
"{. c #24110E",
"]. c #571101",
"^. c #640F00",
"/. c #421000",
"(. c #953406",
"_. c #401A03",
":. c #471202",
"<. c #631801",
"[. c #5F1400",
"}. c #5A0D00",
"|. c #201E16",
"1. c #44B99D",
"2. c #6DBFB0",
"3. c #00210A",
"4. c #03371F",
"5. c #41B8A4",
"6. c #55C8BD",
"7. c #25664D",
"8. c #231006",
"9. c #310F00",
"0. c #5E0F01",
"a. c #711900",
"b. c #772002",
"c. c #994810",
"d. c #270900",
"e. c #340F00",
"f. c #942E07",
"g. c #7A2402",
"h. c #641500",
"i. c #4A0900",
"j. c #2F8557",
"k. c #62D1C5",
"l. c #277658",
"m. c #001807",
"n. c #013519",
"o. c #73D1CE",
"p. c #33AA8E",
"q. c #083911",
"r. c #1B0F01",
"s. c #260A00",
"t. c #611200",
"u. c #7A1F00",
"v. c #6E2304",
"w. c #8D3C0D",
"x. c #360D00",
"y. c #2E0C00",
"z. c #94390C",
"A. c #873508",
"B. c #540D00",
"C. c #360600",
"D. c #170200",
"E. c #395A32",
"F. c #186D47",
"G. c #A4E6EB",
"H. c #04542D",
"I. c #1F8C6B",
"J. c #88DFE3",
"K. c #044C22",
"L. c #1E1000",
"M. c #4B0E00",
"N. c #691800",
"O. c #561D01",
"P. c #853A13",
"Q. c #756640",
"R. c #361A0F",
"S. c #010000",
"T. c #8B2A0F",
"U. c #641D05",
"V. c #280400",
"W. c #250200",
"X. c #300500",
"Y. c #3D3B31",
"Z. c #25784D",
"`. c #7BDDDA",
" + c #278F6A",
".+ c #001C08",
"++ c #79CAC5",
"@+ c #459E8C",
"#+ c #0C3109",
"$+ c #160300",
"%+ c #5D1000",
"&+ c #4D0A00",
"*+ c #551303",
"=+ c #9F4216",
"-+ c #8D5729",
";+ c #2A0C05",
">+ c #0A0100",
",+ c #8D2B0E",
"'+ c #741B06",
")+ c #290400",
"!+ c #3C0700",
"~+ c #490B00",
"{+ c #3B312D",
"]+ c #538A7A",
"^+ c #76DBD7",
"/+ c #86D7CF",
"(+ c #001F0B",
"_+ c #000F04",
":+ c #51B9AC",
"<+ c #53BCB4",
"[+ c #331101",
"}+ c #110200",
"|+ c #621301",
"1+ c #641000",
"2+ c #370700",
"3+ c #6F2805",
"4+ c #78390E",
"5+ c #3F1B03",
"6+ c #3C1902",
"7+ c #86360E",
"8+ c #7D1E05",
"9+ c #6F1A01",
"0+ c #5D1800",
"a+ c #370C00",
"b+ c #724237",
"c+ c #0C1B04",
"d+ c #52B69E",
"e+ c #219778",
"f+ c #3E9C8C",
"g+ c #1C9873",
"h+ c #2D1303",
"i+ c #210600",
"j+ c #200500",
"k+ c #590D00",
"l+ c #300600",
"m+ c #7A2404",
"n+ c #893909",
"o+ c #2E2207",
"p+ c #341901",
"q+ c #91390E",
"r+ c #742804",
"s+ c #712702",
"t+ c #923202",
"u+ c #340D02",
"v+ c #474228",
"w+ c #5ABDA9",
"x+ c #82DBD8",
"y+ c #0C5939",
"z+ c #3C8675",
"A+ c #3AA087",
"B+ c #123712",
"C+ c #191B02",
"D+ c #250400",
"E+ c #4E0A00",
"F+ c #6D1300",
"G+ c #831B01",
"H+ c #7A2104",
"I+ c #40330E",
"J+ c #311603",
"K+ c #973F0E",
"L+ c #712907",
"M+ c #711F00",
"N+ c #791700",
"O+ c #342A12",
"P+ c #236D36",
"Q+ c #63CABA",
"R+ c #097C4D",
"S+ c #00240C",
"T+ c #023518",
"U+ c #278C6F",
"V+ c #33977C",
"W+ c #24210A",
"X+ c #2B0A00",
"Y+ c #410900",
"Z+ c #6A1700",
"`+ c #5B0E00",
" @ c #641101",
".@ c #52340C",
"+@ c #59360A",
"@@ c #792703",
"#@ c #601E00",
"$@ c #822000",
"%@ c #230C00",
"&@ c #2E7643",
"*@ c #45C9B6",
"=@ c #A6E7ED",
"-@ c #015524",
";@ c #001104",
">@ c #043118",
",@ c #2B9172",
"'@ c #5D8F78",
")@ c #2C0E01",
"!@ c #351000",
"~@ c #641400",
"{@ c #3C0600",
"]@ c #3B1C01",
"^@ c #3F1B05",
"/@ c #591B00",
"(@ c #511902",
"_@ c #220C00",
":@ c #0B0C00",
"<@ c #1A7E4D",
"[@ c #A7E8F0",
"}@ c #A7E7ED",
"|@ c #06482A",
"1@ c #116747",
"2@ c #5EC1B6",
"3@ c #44C1AB",
"4@ c #1B653A",
"5@ c #0F1400",
"6@ c #281600",
"7@ c #280600",
"8@ c #461700",
"9@ c #4F1901",
"0@ c #260900",
"a@ c #0B0F00",
"b@ c #1A492C",
"c@ c #35704D",
"d@ c #12652D",
"e@ c #62D4CE",
"f@ c #198968",
"g@ c #001205",
"h@ c #034522",
"i@ c #237656",
"j@ c #37B098",
"k@ c #8ADDDE",
"l@ c #247749",
"m@ c #1D4A14",
"n@ c #12511A",
"o@ c #0F4C24",
"p@ c #121400",
"q@ c #0A0A00",
"r@ c #1F3E19",
"s@ c #62CFC7",
"t@ c #61C9BF",
"u@ c #50BDA9",
"v@ c #0C6E45",
"w@ c #001305",
"x@ c #001B0A",
"y@ c #064F32",
"z@ c #1E674B",
"A@ c #308A70",
"B@ c #41BCA8",
"C@ c #75D5CE",
"D@ c #349571",
"E@ c #255C37",
"F@ c #215B30",
"G@ c #3A9B7F",
"H@ c #026136",
"I@ c #00401A",
"J@ c #1E7253",
"K@ c #000D04",
"L@ c #002009",
"M@ c #00280F",
"N@ c #53B6A9",
"O@ c #4BC3B4",
"P@ c #37A78B",
"Q@ c #2F7E66",
"R@ c #1D5542",
"S@ c #012910",
"T@ c #000A02",
"U@ c #000400",
"V@ c #00210D",
"W@ c #00260E",
"X@ c #00250B",
". . . . . . . + @ # $ % & * = . . . . . . . ",
". . . . . - ; > , ' ) ! ~ { ] ^ / . . . . . ",
". . . . ( _ : < [ } | 1 2 3 4 5 6 7 . . . . ",
". . 8 9 0 a b c d e f g h i j k l m $ . . . ",
". n o p q r s t u v w x y z A B C D E F . . ",
". F ( G H I J K L M N O P w Q R S T U V = . ",
". - W X Y Z ` ...+.@.#.$.%.&.*.=.-.;.>.,.. ",
"- '.).!.~.{.].^./.(._.:.<.[.}.v |.1.2.3.$ . ",
"4.5.6.7.8.9.0.a.b.c.d.e.f.g.h.i.Q j.k.l.m.F ",
"n.o.p.q.r.s.t.u.v.w.x.y.z.A.B.C.D.E.F.G.H.$ ",
"m.I.J.K.L.M.N.O.P.Q.R.S.T.U.V.W.X.Y.Z.`. +.+",
"7 ++@+#+$+%+&+*+=+-+;+>+,+'+)+!+~+{+]+^+/+(+",
"_+:+<+[+}+|+1+2+3+4+5+6+7+8+9+0+a+b+c+d+e+@ ",
"# f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y+F ",
"n z+A+B+C+D+E+F+G+H+I+J+K+L+M+N+O+P+Q+R+S+n ",
"n T+U+V+W+X+Y+Z+`+ @.@+@@@#@$@%@&@*@=@-@;@. ",
". - ,.>@,@'@)@!@~@{@]@^@/@(@_@:@<@[@}@|@n . ",
". . $ 1@2@3@4@5@6@7@8@9@0@a@b@c@d@e@f@g@. . ",
". . F h@i@j@k@l@m@n@o@p@q@r@s@t@u@v@w@n . . ",
". . . + x@y@z@A@B@C@D@E@F@G@H@I@J@K@. . . . ",
". . . . . = L@M@N@O@P@Q@R@S@T@;@+ . . . . . ",
". . . . . . n U@( V@W@X@T@= . . . . . . . . "};
ilektrojohn-creepy-b7b83fc/creepy/include/creepy32.png 0000664 0000000 0000000 00000005103 11600137100 0023067 0 ustar 00root root 0000000 0000000 PNG
IHDR szz sBIT|d IDATXyl\mx6/xKbCFBH!*QPEjR+
TjB(-ElD8qxǞx<ۛC(@?OOO;{/SJmh_!ĀynZ0[B
hڸvx~~d*:KbV
A\Uk`e#a`VS_W,J8:9a#y=fFwf *έgwPt'S.l{_[[E2f,jd6ͫ;f`[8g!9c/ ='غeeͷJ9ػcIq"}b (AU32~=o>͖˾mo`n&ݿ.B<*p7F͍hٰ-t
w?gɇ=Ș%XM۪+>W`6Ds/ļ"zp9# MWPqu 89Nŗ`\ʡ>-Bҁ$Sѱ!}$5>Vѓ3_0{'T|
@ʑw\tV<"[*c!CУ9Pô
enhuCdXw+a`"9:if)Hrish:(ތdc쟊RB.Y2,ER%H`#3jva~|CDV^#H &P7r71+#/=Wdx*J*
*K54t"suA#ronȲ2,h%
%~XQ
wxN09ŀKP"8*dsd40/(AШAA|Odž
Y4
6Yw![t70Չ)jUɺB `ZBEst O"Y^y^03e_ầhY`"~?7R#qup`"YX
~7㎠whl $d(`A>.ɪZN:}$ iȔ?/8w%DL$bPV$(PXQqٴW'Sd0b,7yVDo'mh[~*(X?:_9uՍ"B% AS=$]~+sxkQ{OE4Zƍbje9GFr*(XPTQ\<H9iSf]Q01jN1> ܫ,RE8yso]ąJEP%Zǡta3885#*3X$iPpEMғMC^
W$D~˛qtSL?Hy,6pMROjCƂ
@