limit width of --sync output
This commit is contained in:
parent
517e0f0e9e
commit
8957cda24e
|
@ -1,6 +1,7 @@
|
||||||
# Offpunk History
|
# Offpunk History
|
||||||
|
|
||||||
## 1.2 - Unreleased
|
## 1.2 - Unreleased
|
||||||
|
- Limit width of --sync output
|
||||||
- Fixed a crash when trying to save a folder
|
- Fixed a crash when trying to save a folder
|
||||||
|
|
||||||
## 1.1 - March 18th 2022
|
## 1.1 - March 18th 2022
|
||||||
|
|
12
offpunk.py
12
offpunk.py
|
@ -3730,7 +3730,11 @@ Argument : duration of cache validity (in seconds)."""
|
||||||
# - savetotour : if True, newly cached items are added to tour
|
# - savetotour : if True, newly cached items are added to tour
|
||||||
def add_to_tour(gitem):
|
def add_to_tour(gitem):
|
||||||
if gitem.is_cache_valid():
|
if gitem.is_cache_valid():
|
||||||
print(" -> adding to tour: %s" %gitem.url)
|
toprint = " -> adding to tour: %s" %gitem.url
|
||||||
|
width = term_width() - 1
|
||||||
|
toprint = toprint[:width]
|
||||||
|
toprint += " "*(width-len(toprint))
|
||||||
|
print(toprint)
|
||||||
self.list_add_line("tour",gi=gitem,verbose=False)
|
self.list_add_line("tour",gi=gitem,verbose=False)
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
|
@ -3746,7 +3750,11 @@ Argument : duration of cache validity (in seconds)."""
|
||||||
endline = None
|
endline = None
|
||||||
#Did we already had a cache (even an old one) ?
|
#Did we already had a cache (even an old one) ?
|
||||||
isnew = not gitem.is_cache_valid()
|
isnew = not gitem.is_cache_valid()
|
||||||
print("%s [%s/%s] Fetch "%(strin,count[0],count[1]),gitem.url,end=endline)
|
toprint = "%s [%s/%s] Fetch "%(strin,count[0],count[1]) + gitem.url
|
||||||
|
width = term_width() - 1
|
||||||
|
toprint = toprint[:width]
|
||||||
|
toprint += " "*(width-len(toprint))
|
||||||
|
print(toprint,end=endline)
|
||||||
#If not saving to tour, then we should limit download size
|
#If not saving to tour, then we should limit download size
|
||||||
limit = not savetotour
|
limit = not savetotour
|
||||||
self._go_to_gi(gitem,update_hist=False,limit_size=limit)
|
self._go_to_gi(gitem,update_hist=False,limit_size=limit)
|
||||||
|
|
Loading…
Reference in New Issue