The name is tweetup but unfortunately I do not like/use twitter so it works on facebook.
$ sudo pip install tweetup
will do the job.
The command is:
$ tweetup -f <path_to_image> -d <descrption>
The above will upload a picture with the given description. You can upload a picture without a description too. For this do:
$ tweetup -f <path_to_image>
When you give the command for the very first time in your computer it will open your default browser window. It will ask you to login. Authorize the application and then set up the settings for this application and all done.
(virt3)sudip@sudip-mint $ tweetup -h usage: tweetup.py [-h] [-f FILE] [-d DESCRIPTION] Post a file on your facebook account optional arguments: -h, --help show this help message and exit -f FILE, --file FILE Path to file to upload -d DESCRIPTION, --description DESCRIPTION Give the description of the file (virt3)sudip@sudip-mint $ tweetup -f /home/sudip/fb.jpg -d "It was awesome"
This assignment is meant to create a setup.py script that will install the previous project MyShell. Few changes has been made to the project to make it easily installable. The script will install all the dependencies required by the project so it would work perfectly and will make a armageddonshell executable command.
#!/usr/bin/env python2 from setuptools import find_packages, setup setup( name='armageddonshell', version=0.3, description="Armageddon's Shell", long_description="Armageddon's Shell is a Shell like assignment", platforms=["Linux"], author="Armageddon", author_email="ThyArmageddon@gmail.com", url="https://github.com/ThyArmageddon/dgplug/setup", license="MIT", install_requires=["requests", "cmd2"], packages=find_packages(), entry_points={ 'console_scripts': [ 'myshell = myshell:main', ] }, )
To design a package which we can install in our system for shell with commands stock and greet.
click here to download the package
Read the README file
This python script is meant to run in virtualenv. The dependencies if required is automatically installed during installation.
(virt1)[shalini@Shalini shellproject-1]$ shellproject (Cmd) stock GOOG 902.900000 (Cmd) stock FB 26.510000 (Cmd) greet hi shalini (Cmd) (virt1)[shalini@Shalini shellproject-1]$
To design a package which we can install in our system for shell with commands stock and greet.
click here to download the package
Read the README file
This python script is meant to run in virtualenv. The dependencies if required is automatically installed during installation.
(virt1)[shalini@Shalini shellproject-1]$ shellproject (Cmd) stock GOOG 902.900000 (Cmd) stock FB 26.510000 (Cmd) greet hi sheesh (Cmd) (virt1)[shalini@Shalini shellproject-1]$
Assignment was to make a package which we can install in our system.It can find its dependency automatically and downlaod if necessary.
The download the package click here
$ shell_demo
(Cmd) (virt1)[root@Avinash shell_demo-0.4]# shell_demo (Cmd) greet Hi! avinash (Cmd) hello Avinash Hello: Avinash (Cmd) stock GOOG Fetching recent share value of GOOG Current share price of company GOOG: 902.90 (Cmd) stock FB Fetching recent share value of FB Current share price of company FB: 26.51
To make a package which we can install in our system and to add dependencies in the setup.py project
click here to download the package
Extract the tar.gz file and change to the extracted directory from terminal and then type python setup.py install
This script is meant to run in virtualenv. The dependencies required to run it is automatically installed during installation.
(virt2)[sheesh@Sheesh shell-0.2]$ shell (Cmd) stock GOOG 902.900000 (Cmd) stock FB 26.510000 (Cmd) greet hi sheesh (Cmd) (virt2)[sheesh@Sheesh shell-0.2]$
Create a full project distribution, and register/upload it to TestPyPI server for installing via "pip". This project must contain the previous "myshell" script.
In this assignment we face 2 big problems. Setting up setup.py properly, and configure it to install automatically the dependencies of our script.
My setup.py follows the standard configuration described in pymbook, and adds few specifities:
setup (..., scripts = ["scripts/CasellesShell"], """ Installs the script in /usr/bin """ install_requires = ["cmd2", "requests"], """ Installs specified dependencies, to be found in the current server """ dependency_links = [ """ Specify the links for the dependencies: as they are not provided by testpypi, we need to add the link of them in standard pypi. """ "https://pypi.python.org/pypi/cmd2", "https://pypi.python.org/pypi/pyparsing/1.5.7", # cmd2 needs 1.5.7 "https://pypi.python.org/pypi/requests" ] )
Also with it comes MANIFEST.in where I specify all the files to include, and a README.rst, as stated in PYMBook.
Concretely, my script uses sys, getpass, cmd2 and requests modules. As sys and getpass are default modules preinstalled, the only ones required to be installed if they aren't already are cmd2 and request. We specify the dependencies required with "install_requires" parameter. Turns out, those dependencies aren't available in testpypi, as they are from standard pypi. In order to be able to install this package without manually installing those dependencies, we can use "dependency_link" parameter, used to specify the links of the dependencies if they aren't in the current server. Of course, if we were to publish this package in the standard pypi, we should remove this parameter.
The assignment was to make a package which we can install in our system. It was interesting to do so. It can find its dependency automatically and downlaod if necessary. Here it is:
Download the package from here: shell_demo-0.4
Read the README file provided in the package.
Here example output is given below:
sudip@sudip-mint $ shell_demo (Cmd) hello buddy Hello: buddy (Cmd)
note: This script was meant to be ran in a virutalenv. All necessary will be automatically installed during installation.
note: This script was meant to be ran in a virutalenv. All modules need will be automatically installed during installation.