You are not logged in.

#1 2019-06-13 23:59:27

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 5,840

[SOLVED] Python script help

SOLVED:  See post #8 for samples and Post #4 to get the files.

This is a Debian 9 issue and since I've been running Debian 8 until just recently I only just noticed.


conkyemail_2.13_all.deb & conkymisc_1.06_all.deb are two python script (well conkymisc has a few files in it) that have been working forever.  OK, since 2008, but I use them a LOT!

Until now that is Gdebi reports:

Error: Dependency is not
satisfiable : python-central
(>= 0.6.7)
Debian Package search wrote:

You have searched for packages that names contain python-central in all suites, all sections, and all architectures.

Sorry, your search gave no results

Found this:  Transition to dh_python2
OK, that's all Martian to me.

Any Python experts around that wanna help an old man?

1. unpack the .debs
2. fix the python scripts, and
3. repack the debs.

PLEASE!

Last edited by Sector11 (2019-06-15 18:08:02)


The sun will never set if you keep walking towards it. - my son
He has finished the chemo and rang the Gong!
Finished the radiation treatment and rang the Gong!
Now to finish the immunology treatments.

Offline

#2 2019-06-14 07:52:42

earlybird
ほやほや
Registered: 2015-12-16
Posts: 738
Website

Re: [SOLVED] Python script help

I'll give it a shot over the weekend and try to bake you new packages. Should be simple enough, just some refactoring of the packaging (though I don't know what these even do). I've located the sources of conkyemail here <http://ppa.launchpad.net/conkyhardcore/ … onkyemail/> and the sources of conkymisc here <https://launchpad.net/~conky-companions … hive-extra>.

Cheers!

Offline

#3 2019-06-14 18:38:40

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 5,840

Re: [SOLVED] Python script help

earlybird wrote:

I'll give it a shot over the weekend and try to bake you new packages. Should be simple enough, just some refactoring of the packaging (though I don't know what these even do). I've located the sources of conkyemail here <http://ppa.launchpad.net/conkyhardcore/ … onkyemail/> and the sources of conkymisc here <https://launchpad.net/~conky-companions … hive-extra>.

Cheers!

GREAT!  You even found the conkyEmail version I was using.  The conkyemail_2.15_all.deb has a dependency on a "keyring" I didn't like.  And I never had the conkyemail_2.13.dsc or conkyemail_2.13.tar.gz files ... that I have now thanks to you.

conkymisc has these files:

SCRIPTS WITHIN PACKAGE
======================

conkyText - provides formatted output from a delimited text file
conkyLatLong - provides latitude/longtitude co-ordinates based on your IP address
conkyDateDiff - provides a difference in time between now/a date to another date#
conkyDatetimeDiff - provides a difference in time between now/a datetime to another datetime with varying input and output formatting
conkyDaysDiff - provides a difference in days between now/a date to another date
conkySlideshow - provides a locally stored image on each call based on an input file of image URLs.

conkyDateDiff and conkyDaysDiff in action:
Debian 8 : conky-quit.jpg
Debian 9 : today.jpg

The conky code:

${color6}${membar 0,42}${color5} Quit Smoking ${color6}${membar 0}${color}
  S11: 08/06/09: ${color1}${pre_exec conkyDateDiff 20090608}${goto 305}${color5}${pre_exec conkyDaysDiff 20090608}${color}
  S12: 29/06/09: ${color1}${pre_exec conkyDateDiff 20090629}${goto 305}${color5}${pre_exec conkyDaysDiff 20090629}${color}

${color6}${membar 0,42}${color5} Stents ${color6}${membar 0}${color}
   Op: 08/03/16: ${color1}${pre_exec conkyDateDiff 20160308}${goto 305}${color5}${pre_exec conkyDaysDiff 20160308}${color}

Very handy for someone that forgets {cough cough} birthdays and anniversaries and such.

And conkyLatLong would be handy on a laptop that "travels" with it's owner.  Even though it's not an "exact" pinpoint.  GUGL says I'm in the river just north of Buenos Aires, but my ISP's office is close to the river.  big_smile

Thank you for even considering looking at it.
Both of these files would be an AWESOME addition to BL - IMHO.


The sun will never set if you keep walking towards it. - my son
He has finished the chemo and rang the Gong!
Finished the radiation treatment and rang the Gong!
Now to finish the immunology treatments.

Offline

#4 2019-06-15 09:08:11

twoion
ほやほや
Registered: 2015-08-10
Posts: 2,601

Re: [SOLVED] Python script help

Hi S11, I built and uploaded conkymisc and conkyemail packages to our stretch-backports repo. The application logic is totally unchanged, only changed the packaging - let me know if it works or doesn't!

# Have BL stretch-backports repo activated
apt-get update
apt-get -t stretch-backports install conkymisc conkyemail

Alternatively you can grab the .deb here: <https://www.bunsenlabs.org/repoidx.html … conkyemail>


The show must go on.

Online

#5 2019-06-15 15:45:42

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 5,840

Re: [SOLVED] Python script help

No backports ...
Grabbed by method 2.

Gdebi installed them without a hitch.
They are all: Permissions: Allow this fine to run as a program

Still not working.

 15 Jun 19 @ 12:27:27 ~
   $ conkyLatLong.py
bash: conkyLatLong.py: command not found
 
 15 Jun 19 @ 12:27:29 ~
   $ conkyLatLong
bash: conkyLatLong: command not found
 
 15 Jun 19 @ 12:27:33 ~
   $ 

And they all should work in a terninal.


The sun will never set if you keep walking towards it. - my son
He has finished the chemo and rang the Gong!
Finished the radiation treatment and rang the Gong!
Now to finish the immunology treatments.

Offline

#6 2019-06-15 16:06:29

twoion
ほやほや
Registered: 2015-08-10
Posts: 2,601

Re: [SOLVED] Python script help

Well I know why they don't; they put their scripts in /usr/share/conkyemail and /usr/share/conkymisc. Seems like the old Debian Python build system some more stuff under the hood than I thought. Will fix.


The show must go on.

Online

#7 2019-06-15 16:24:06

twoion
ほやほや
Registered: 2015-08-10
Posts: 2,601

Re: [SOLVED] Python script help

twoion wrote:

Well I know why they don't; they put their scripts in /usr/share/conkyemail and /usr/share/conkymisc. Seems like the old Debian Python build system some more stuff under the hood than I thought. Will fix.

Fixed, please try the new builds (same place).


The show must go on.

Online

#8 2019-06-15 17:45:58

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 5,840

Re: [SOLVED] Python script help

twoion wrote:
twoion wrote:

Well I know why they don't; they put their scripts in /usr/share/conkyemail and /usr/share/conkymisc. Seems like the old Debian Python build system some more stuff under the hood than I thought. Will fix.

Fixed, please try the new builds (same place).

YES!  They work.  Thank you.  You just saved at least 8 conkys.

 15 Jun 19 @ 14:41:55 ~
   $ conkyDateDiff 20090608
10 yrs 7 days
 
 15 Jun 19 @ 14:42:08 ~
   $ conkyDaysDiff 20090608
3659
 
 15 Jun 19 @ 14:42:14 ~
   $ conkyLatLong
-34.612999 / -58.470001
 
 15 Jun 19 @ 14:42:20 ~
   $ conkyLatLong -i
34°36"46.7964'S / 58°28"12.0036'W
 
 15 Jun 19 @ 14:42:26 ~
   $ conkyDateDiff 21250101
105 yrs 6 mths 16 days

OH and conkyEmail is showing how many emails I have yet to read.

Again:  HUGE Thank you.


The sun will never set if you keep walking towards it. - my son
He has finished the chemo and rang the Gong!
Finished the radiation treatment and rang the Gong!
Now to finish the immunology treatments.

Offline

#9 2019-06-15 18:03:26

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 5,840

Re: [SOLVED] Python script help

Question ... what is the difference between: .tar.gz & .tar.xz

In files like:
name_2.13.orig.tar.gz
name_2.13-4.debian.tar.xz

??


The sun will never set if you keep walking towards it. - my son
He has finished the chemo and rang the Gong!
Finished the radiation treatment and rang the Gong!
Now to finish the immunology treatments.

Offline

#10 2019-06-15 18:13:49

twoion
ほやほや
Registered: 2015-08-10
Posts: 2,601

Re: [SOLVED] Python script help

Sector11 wrote:

Question ... what is the difference between: .tar.gz & .tar.xz

In files like:
name_2.13.orig.tar.gz
name_2.13-4.debian.tar.xz

??

Well .gz commonly identifies files (in this case, a tarball .tar) compressed using gzip. .xz identifies a different compressor, XZ. I usually generate gz but Debian tools default to xz so it's kind of a mix in packages I build (makes no difference).


The show must go on.

Online

#11 2019-06-15 18:14:54

twoion
ほやほや
Registered: 2015-08-10
Posts: 2,601

Re: [SOLVED] Python script help

Sector11 wrote:

Again:  HUGE Thank you.

My pleasure.


The show must go on.

Online

#12 2019-06-15 21:03:23

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 5,840

Re: [SOLVED] Python script help

Thank you for explanation and here's a conky done from Mark's little test.  Start date changed to the release date of BL RC1

BL-RC1.th.jpg

Code for those interested:

${alignc}conkyDatetimeDiff (BL RC1 2015-09-09)

1) Just a start datetime (YYYYMMDD = 20150909)
   so defaults all else (i.e. a due date):
   ${color6}${exec conkyDatetimeDiff -s 20150909}${color}
2) Same as above but with --shortoutput option:
   ${color6}${exec conkyDatetimeDiff -s 20150909 -S}${color}
3) Days difference from new year of 2000 to now:
   ${color6}${exec conkyDatetimeDiff -s 20150909 -o DAYS}${color}
4) same but with end date and in seconds:
   ${color6}${exec conkyDatetimeDiff -s 20150909 -e 20110401 -o SECONDS}${color}
5) Or how about weeks:
   ${color6}${exec conkyDatetimeDiff -s 20150909 -e 20110401 -o WEEKS}${color}
6) Or months:
   ${color6}${exec conkyDatetimeDiff -s 20150909 -e 20110401 -o MONTHS}${color}
7) How about a different datetime format giving
   date and time (spaces so quotes needed!):
   ${color6}${exec conkyDatetimeDiff -s "09/09/2015 00:00:00" -i "%d/%m/%Y %H:%M:%S"}${color}
8) How about the short form of it:
   ${color6}${exec conkyDatetimeDiff -s "09/09/2015 00:00:00" -i "%d/%m/%Y %H:%M:%S" -S}${color}
9) Just a time, the date element is auto filled
   rather than left to the default of the start
   of time (1900 in this case), -n option gives the same:
   ${color6}${exec conkyDatetimeDiff -s 18:25:12 -i %H:%M:%S}${color}
10) and between two times:
   ${color6}${exec conkyDatetimeDiff -s 18:25:12 -e 21:05:14 -i %H:%M:%S}${color}
11) Just for kicks added a month number on the front
    to show the diversity of input allowed:
   ${color6}${exec conkyDatetimeDiff -s 02-18:25:12 -i %m-%H:%M:%S}${color}

They all work in a terminal as well ... just not updated.

#1 from above:

 15 Jun 19 @ 18:00:17 ~
   $ conkyDatetimeDiff -s 20150909
3 yrs 9 mths 6 days

The sun will never set if you keep walking towards it. - my son
He has finished the chemo and rang the Gong!
Finished the radiation treatment and rang the Gong!
Now to finish the immunology treatments.

Offline

#13 2019-06-26 14:05:22

unklar
Member
Registered: 2015-10-31
Posts: 1,016

Re: [SOLVED] Python script help

Many thanks to @twoion and @Sector11 !

I installed this treasure today from the backports in helium.   smile

Last edited by unklar (2019-06-26 14:55:58)

Offline

Board footer

Powered by FluxBB