iamsudip tweetup v1 20130726    Posted:


The name is tweetup but unfortunately I do not like/use twitter so it works on facebook.

Installation procedure

$  sudo pip install tweetup

will do the job.

How to upload a pic?

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>

Notes

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.

Usage

(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"

Comments

ThyArmageddon Dummy Project 20130725    Posted:


Setup Script

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.

Code

#!/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',
        ]
    },
)

Comments

shaliniroy Dummy Project v2 20130725    Posted:


To design a package which we can install in our system for shell with commands stock and greet.

Download

click here to download the package

How to Install

Read the README file

Output

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]$

Comments

shaliniroy Dummy Project 20130725    Posted:


To design a package which we can install in our system for shell with commands stock and greet.

Download

click here to download the package

How to Install

Read the README file

Output

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]$

Comments

tenstormavi Dummy Project 20130725    Posted:


Problem

Assignment was to make a package which we can install in our system.It can find its dependency automatically and downlaod if necessary.

Download

The download the package click here

Installation

  1. Extract the tar.gz
  2. Go to that directory.
  3. Then run this command in terminal: sudo python setup.py install

Run

$ shell_demo

Output

(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

Comments

sheeshmohsin Dummy project 20130724    Posted:


To make a package which we can install in our system and to add dependencies in the setup.py project

Download

click here to download the package

How to Install

Extract the tar.gz file and change to the extracted directory from terminal and then type python setup.py install

Output

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]$

Comments

JCaselles dummy project 20130724    Posted:


Assignment:

Create a full project distribution, and register/upload it to TestPyPI server for installing via "pip". This project must contain the previous "myshell" script.

Solution:

In this assignment we face 2 big problems. Setting up setup.py properly, and configure it to install automatically the dependencies of our script.

setup.py

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.

Dependencies solution:

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.

Comments

iamsudip dummy project 20130724    Posted:


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

Download the package from here: shell_demo-0.4

How to install code

Read the README file provided in the package.

Example output

Here example output is given below:

sudip@sudip-mint $ shell_demo
(Cmd) hello buddy
Hello: buddy
(Cmd)

Comments

iowabeakster dummy project improved 20130724    Posted:


basic functions of script

  • import necessary modules
  • take 4 prompt inputs and give the requested outputs

instructions

  • open a terminal
  • $ mkdir virt12
  • $ cd virt12
  • $ virtualenv virt12
  • $ source virt12/bin/activate
  • $ pip install -i https://testpypi.python.org/pypi myshell
  • $ myshell
  • profit from your new awesome terminal emulator!

Comments

iowabeakster dummy project 20130724    Posted:


basic functions of script

  • import necessary modules
  • take 4 prompt inputs and give the requested outputs

instructions

  • open a terminal
  • $ mkdir virt12
  • $ cd virt12
  • $ virtualenv virt12
  • $ source virt12/bin/activate
  • $ pip install -i https://testpypi.python.org/pypi myshell
  • $ cd virt12/lib/python2.7/site-packages/command/
  • $ python myshell.py
  • profit from your new awesome terminal emulator!

Comments

Contents © 2013 dgplug - Powered by Nikola
Share
UA-42392315-1