Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9123139
D412.id1285.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
693 B
Subscribers
None
D412.id1285.diff
View Options
diff --git a/swh/loader/pypi/loader.py b/swh/loader/pypi/loader.py
--- a/swh/loader/pypi/loader.py
+++ b/swh/loader/pypi/loader.py
@@ -242,3 +242,19 @@
if self.done:
self.generate_and_load_snapshot()
self.flush()
+
+
+if __name__ == '__main__':
+ import logging
+ import sys
+ logging.basicConfig(level=logging.DEBUG)
+ if len(sys.argv) != 2:
+ logging.error('Usage: %s <module-name>' % sys.argv[0])
+ sys.exit(1)
+ module_name = sys.argv[1]
+ loader = PyPILoader()
+ loader.load(
+ module_name,
+ 'https://pypi.org/projects/%s/' % module_name,
+ 'https://pypi.org/pypi/%s/json' % module_name,
+ )
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jun 20, 5:06 PM (2 w, 8 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3232242
Attached To
D412: Add trivial command line for the PyPI loader
Event Timeline
Log In to Comment