packt-cli / Packt-Publishing-Free-Learning

Scripts that automatically claim and download free daily eBooks from https://www.packtpub.com/packt/offers/free-learning

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to install

ranrinc opened this issue · comments

Hi there,

would like to know how to install this new changes. Its seems I got error upon calling the packt-cli and unsure what to do. Previously I can easily install your script without any problem.

Following the new version without any luck.. anyone have step-by-step? Installing on ubuntu
also do I try to git clone and got no luck either. Any help will be gladly appreciated

screen shot 2019-03-03 at 4 46 35 pm

Have you tested with python version > = 3.4 ? We already dropped a support for python 2.7

@luk6xff thanks for the support. I check my ubuntu and its install both version. However its run on python 2. Is there a document to switch into python3 instead of python? Thanks

@luk6xff Hi there again thanks for the help, so I manage to have virtualenvs run and packt-cli is now asking for config. Should I clone the project first? Where should I put my conf files? Sorry not good with python

OK, so first of all you don't need to clone anything - you just create a new virtualenv and install the script via pip install git+https://github.com/luk6xff/Packt-Publishing-Free-Learning.git@master.

It doesn't matter where do you put configuration file as long as you pass the path to it to -c parameter. Alternatively you can put it inside working directory - that way you won't have to pass it.

"It doesn't matter where do you put configuration file as long as you pass the path to it to -c parameter. Alternatively you can put it inside working directory - that way you won't have to pass it." - @mjenczmyk - I think it would be good to write it down n the readme. Because now it's not stated anywhere

@mjenczmyk @luk6xff
I finally have it working again... wink wink...
So how can I help edit the readme files?

Anyway here is what I did on fresh install ubuntu 16.04
apt install python-pip
git clone https://github.com/luk6xff/Packt-Publishing-Free-Learning.git
pip install virtualenv
cd to_my_clone_dir
virtualenv venv
virtualenv -p /usr/bin/python3 venv
source venv/bin/activate
pip install git+https://github.com/luk6xff/Packt-Publishing-Free-Learning.git@master

packt-cli -sgd

Quick problem so far is --noauth_local_webserver did not allow me to grab the configurations required.. maybe I did it wrong. Luckily in my case copy paste the old config work.

I'm not sure what should be added. The -c parameter is documented in README (as all parameters are, there is also a default value given). Also there is nothing about cloning as running pip install ... is said to be sufficient... What would you propose to add?

@ranrinc Is cloning step necessary in that list of commands? I can't see where are those cloned files used. Maybe you could (as somebody who didn't take part in development after Pact website changes) propose some description, I could make a pull request then?