Commit 3fbf9453 authored by onny's avatar onny

moved todo to gitlab

parent d774b504
#!/usr/bin/python3
# yaourt -S parched-git python3-aur python-requests python-xdg
# validate pkgbuild with namcap
# - or use http://jue.li/crux/ck4up/
# todo:
# - diff versions (wenn in einer zeile strings diffen, dann rot)
# - upstream releases (_watch mit regex)
# - argparse version
# unable to call -v alone, DIR still required?
# - print summary at the end of the program like
# x packages scanned, x outdated, x unlinsted, x errors
# - print stat while scanning
# - option: --test-locale / --test-remote. Packete werden in tmp geschoben /
# heruntergeladen und kompiliert zum test.
# - --ignore <packages>. Liste von Packetnamen, die nicht geprüft werden sollen
# - packages dict is still empty at the end :/
# - parse flagged out of date in AUR
# - unable to parse array of pkgbuilds
# - failed to parse:
# _watch=('http://www.joomla.org/download.html',' ([\d.]*) Full Package,')
# ["'http://www.joomla.org/download.html'", "' ([\\d.]*) Full Package", "'"]
# - strict and looseversion:
# http://stackoverflow.com/questions/1714027/version-number-comparison
# - add extra method (incrementing version numbers) https://github.com/anatol/pkglivecheck
# - thread pool support (-t)
# - export support (-e)
# _watch='uri','regex' [done]
# wenn kein _watch, dann md5sum auf page [done]
# wenn nur watch uri, dann md5sum auf watchuri
......@@ -62,8 +36,7 @@ parser.add_argument('-a', '--all', help='list all packages, even the up-to-date
action="store_true")
parser.add_argument('-t', '--thread', type=int, default=5, dest='thread',
nargs=1, help='number of threads to use')
parser.add_argument('-e', '--export', help='export list of packages in csv
format')
parser.add_argument('-e', '--export', help='export list of packages in csv format')
parser.add_argument('-v', '--version', help='print version of pkgcheck', action="store_true")
parser.add_argument('DIR', default='.', nargs=1,
help='''directory or file containing PKGBUILD(s)''')
......@@ -96,9 +69,9 @@ def check_md5(pkgname, md5sum):
if config.read(basedir.xdg_data_home+'/pkgcheck.session'):
if pkgname in config:
if config[pkgname]['md5sum'] == md5sum:
return "not changed since "+datetime.datetime.fromtimestamp(float(config[pkgname]['lastchecked'])).strftime('%Y-%m-%d')
return "not changed since xxx"#+datetime.datetime.fromtimestamp(float(config[pkgname]['lastchecked'])).strftime('%Y-%m-%d')
else:
return "changed since "+datetime.datetime.fromtimestamp(float(config[pkgname]['lastchecked'])).strftime('%Y-%m-%d')
return "changed since xxx"#+datetime.datetime.fromtimestamp(float(config[pkgname]['lastchecked'])).strftime('%Y-%m-%d')
else:
config[pkgname] = {'md5sum': md5sum, 'lastchecked': str(ts)}
with open(basedir.xdg_data_home+'/pkgcheck.session', 'w') as configfile:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment