After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 728525 - lua-factory: Add grl.unzip fetch function
lua-factory: Add grl.unzip fetch function
Status: RESOLVED FIXED
Product: grilo
Classification: Other
Component: plugins
unspecified
Other All
: Normal normal
: ---
Assigned To: grilo-maint
grilo-maint
Depends on:
Blocks:
 
 
Reported: 2014-04-18 19:17 UTC by Bastien Nocera
Modified: 2014-05-07 16:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
lua-factory: Ensure that fetches error out on non-UTF-8 (1.40 KB, patch)
2014-04-18 19:17 UTC, Bastien Nocera
committed Details | Review
lua-factory: Split out GrlNetWc option setting (3.43 KB, patch)
2014-04-18 19:17 UTC, Bastien Nocera
committed Details | Review
lua-factory: Simplify initial variable state (4.64 KB, patch)
2014-04-18 19:18 UTC, Bastien Nocera
committed Details | Review
lua-factory: Remove unneeded temporary name for struct (803 bytes, patch)
2014-04-18 19:18 UTC, Bastien Nocera
committed Details | Review
lua-factory: Add grl.unzip library function (10.18 KB, patch)
2014-04-18 19:18 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2014-04-18 19:17:39 UTC
The grl.unzip patch isn't quite done, error checking in particular.
This should allow me to implement a "Pluzz" plugin for catch up TV
of France's public TVs.
Comment 1 Bastien Nocera 2014-04-18 19:17:51 UTC
Created attachment 274707 [details] [review]
lua-factory: Ensure that fetches error out on non-UTF-8

This makes sure that we do not pass binary data as a result
for lua fetch operations.
Comment 2 Bastien Nocera 2014-04-18 19:17:56 UTC
Created attachment 274708 [details] [review]
lua-factory: Split out GrlNetWc option setting

We'll need this shortly.
Comment 3 Bastien Nocera 2014-04-18 19:18:01 UTC
Created attachment 274709 [details] [review]
lua-factory: Simplify initial variable state

That way, the compiler can actually tell us when something is
not initialised when we used it.
Comment 4 Bastien Nocera 2014-04-18 19:18:06 UTC
Created attachment 274710 [details] [review]
lua-factory: Remove unneeded temporary name for struct
Comment 5 Bastien Nocera 2014-04-18 19:18:11 UTC
Created attachment 274711 [details] [review]
lua-factory: Add grl.unzip library function

Script developers can use this to fetch a zip file, and extract
particular files inside that zip file.

This also adds a libarchive dependency for the lua-factory plugin.
Comment 6 Victor Toso 2014-04-25 00:46:55 UTC
Review of attachment 274711 [details] [review]:

This unzip function is really cool. Having to know the name of the files _inside_ could be a issue.

::: src/lua-factory/grl-lua-library.c
@@ +516,3 @@
 static GrlNetWc *
+net_wc_new_with_options(lua_State *L,
+                        guint      arg_offset)

This could go in the patch that create this function.

@@ +523,1 @@
   if (lua_istable (L, 3)) {

lua_istable (L, arg_offset)

Actually, in the grl_l_fetch and grl_l_unzip we already check that the parameter is a table.
Comment 7 Bastien Nocera 2014-05-07 16:19:10 UTC
Attachment 274707 [details] pushed as 2640e36 - lua-factory: Ensure that fetches error out on non-UTF-8
Attachment 274708 [details] pushed as c17f0d4 - lua-factory: Split out GrlNetWc option setting
Attachment 274709 [details] pushed as 91d5f67 - lua-factory: Simplify initial variable state
Attachment 274710 [details] pushed as ca48621 - lua-factory: Remove unneeded temporary name for struct
Attachment 274711 [details] pushed as 714c036 - lua-factory: Add grl.unzip library function