From: "Jauhien Piatlicki" <piatlicki@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/g-sorcery:master commit in: gs_ctan/
Date: Thu, 18 Jul 2013 00:12:09 +0000 (UTC) [thread overview]
Message-ID: <1374106334.72e80df4afd6561b240f076471790bfdeda6df62.jauhien@gentoo> (raw)
commit: 72e80df4afd6561b240f076471790bfdeda6df62
Author: Jauhien Piatlicki (jauhien) <piatlicki <AT> gmail <DOT> com>
AuthorDate: Thu Jul 18 00:12:14 2013 +0000
Commit: Jauhien Piatlicki <piatlicki <AT> gmail <DOT> com>
CommitDate: Thu Jul 18 00:12:14 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/g-sorcery.git;a=commit;h=72e80df4
gs_ctan/ctan_db: process_data, some progress ;-)
---
gs_ctan/ctan_db.py | 51 +++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 49 insertions(+), 2 deletions(-)
diff --git a/gs_ctan/ctan_db.py b/gs_ctan/ctan_db.py
index 47d7160..a85488e 100644
--- a/gs_ctan/ctan_db.py
+++ b/gs_ctan/ctan_db.py
@@ -76,7 +76,54 @@ class CtanDB(PackageDB):
return result
def process_data(self, data):
+
+ self.add_category('dev-tex')
+
for entry in data["texlive.tlpdb"]:
- for key, value in entry.items():
- print(key + ": " + str(value))
+
+ realname = entry["name"]
+
+ #todo: work on common data vars processing: external deps, filtering etc.
+ #at the moment just copy necessary code from elpa_db.py
+ allowed_ords = set(range(ord('a'), ord('z'))) | set(range(ord('A'), ord('Z'))) | \
+ set(range(ord('0'), ord('9'))) | set(list(map(ord,
+ ['+', '_', '-', ' ', '.', '(', ')', '[', ']', '{', '}', ','])))
+
+ if "shortdesc" in entry:
+ description = entry["shortdesc"]
+ else:
+ description = entry["name"]
+ description = "".join([x for x in description if ord(x) in allowed_ords])
+
+ if "longdesc" in entry:
+ longdescription = entry["longdesc"]
+ longdescription = "".join([x for x in longdescription if ord(x) in allowed_ords])
+ else:
+ longdescription = description
+
+ if "catalogue-version" in entry:
+ version = entry["catalogue-version"]
+ else:
+ version = entry["revision"]
+
+ #todo: convert to gentoo licenses
+ if "catalogue-license" in entry:
+ license = entry["catalogue-license"]
+ else:
+ license = "unknown"
+
+ if "catalogue-ctan" in entry:
+ source_type = "zip"
+ base_src_uri = "http://www.ctan.org/tex-archive"
+ catalogue = entry["catalogue-ctan"]
+ else:
+ source_type = "tar.xz"
+ base_src_uri = "http://mirror.ctan.org/systems/texlive/tlnet/archive"
+ catalogue = ""
+
+ print("dev-tex/" + realname + "-" + version)
+ print(" license: " + license)
+ print(" " + description)
+ print
+ print(" " + longdescription)
print
next reply other threads:[~2013-07-18 0:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-18 0:12 Jauhien Piatlicki [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-08-01 15:58 [gentoo-commits] proj/g-sorcery:master commit in: gs_ctan/ Jauhien Piatlicki
2013-07-31 23:29 Jauhien Piatlicki
2013-07-22 16:57 Jauhien Piatlicki
2013-07-19 16:56 Jauhien Piatlicki
2013-07-19 11:23 Jauhien Piatlicki
2013-07-19 11:10 Jauhien Piatlicki
2013-07-19 8:36 Jauhien Piatlicki
2013-07-18 22:29 Jauhien Piatlicki
2013-07-18 0:12 Jauhien Piatlicki
2013-07-17 23:19 Jauhien Piatlicki
2013-07-17 17:05 Jauhien Piatlicki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1374106334.72e80df4afd6561b240f076471790bfdeda6df62.jauhien@gentoo \
--to=piatlicki@gmail.com \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox