GNOME Bugzilla – Bug 728525
lua-factory: Add grl.unzip fetch function
Last modified: 2014-05-07 16:19:33 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.
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.
Created attachment 274708 [details] [review] lua-factory: Split out GrlNetWc option setting We'll need this shortly.
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.
Created attachment 274710 [details] [review] lua-factory: Remove unneeded temporary name for struct
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.
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.
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