Tiny Core Linux

Tiny Core Base => Raspberry Pi => Topic started by: Greg Erskine on December 22, 2015, 04:41:36 PM

Title: urlencode for piCore
Post by: Greg Erskine on December 22, 2015, 04:41:36 PM
Hi team,

I am looking for urlencode for piCore.

Can someone tell me, what this the proper procedure to find any utility?

I have looked for things like urlencode.tcz in all platforms and looked in various utility extensions thinking it might be buried in one of these.

I have exhausted my search capabilities.  :P

I ended up writing a shell script but it has proven to be way too slow for encoding large files.

Reason: I am using the pastebin API and it requires the paste text to be encoded before uploading it.

regards
Greg
Title: Re: urlencode for piCore
Post by: Paul_123 on December 22, 2015, 07:14:00 PM
run "tce"   then use the <P>rovides option.

In your case, it returns the extension Bluefish.tcz, which has a python program called urlencode.py   (may work for you, that is the only thing in piCore right now)

From an apt enabled machine, you can run "apt-file search urlencode"  and that will return all of the packages that include that file....urlencode is part of the gridsite-clients package.......which source code can be found  at www.gridsite.org  (which is currently down)  so you can get the debian source from http://http.debian.net/debian/pool/main/g/gridsite/gridsite_2.2.6.orig.tar.gz

I tried to compile it....but I need to hunt a few dependencies first.
Title: Re: urlencode for piCore
Post by: Paul_123 on December 22, 2015, 07:56:21 PM
I tried to compile it....but I need to hunt a few dependencies first.

Wow, that is a pretty heavy program for something that sounds so simple......requires libraries
libc-ares2 libcanl-c2 libgridsite2 libgsoap5

are you posting to a website?   have you looked into   curl --data-urlencode  option?

Title: Re: urlencode for piCore
Post by: Greg Erskine on December 22, 2015, 07:57:10 PM
Thanks Paul_123 for the time spent helping me.

I did use tce and saw Bluefish.tcz but didn't follow it through as you did. piCore now has micropython !

Thanks for the apt tips and links. I will investigate further.

I was hoping for a small program with no additional dependencies as we are trying to keep piCorePlayer as small and simple as possible.

regards
Greg

Title: Re: urlencode for piCore
Post by: Greg Erskine on December 22, 2015, 08:07:14 PM
I tried to compile it....but I need to hunt a few dependencies first.

Wow, that is a pretty heavy program for something that sounds so simple......requires libraries
libc-ares2 libcanl-c2 libgridsite2 libgsoap5

are you posting to a website?   have you looked into   curl --data-urlencode  option?

Hi Paul_123 link,

Yes, pastebin.com. I have used wget to post the files because it was already part of piCore, but in the end I used wget.tcz as the basic wget didn't have an option I needed.

curl was the other option that I did not pursue. Maybe I need to reconsider if it solves my urlencode issue.  :D

Thanks
Greg
Title: Re: urlencode for piCore
Post by: Paul_123 on December 22, 2015, 08:13:34 PM
Thanks Paul_123 for the time spent helping me.

I did use tce and saw Bluefish.tcz but didn't follow it through as you did. piCore now has micropython !

Thanks for the apt tips and links. I will investigate further.

I was hoping for a small program with no additional dependencies as we are trying to keep piCorePlayer as small and simple as possible.

regards
Greg

Hate to do it, but there is always an option of statically linking the binary to get around the need for a bunch of extra library extensions

curl is not that bloated if it works for you.
Title: Re: urlencode for piCore
Post by: bmarkus on December 23, 2015, 03:25:04 AM
You can try MicroPython library, see

https://github.com/micropython/micropython-lib

urlencode is here:

https://github.com/micropython/micropython-lib/blob/master/urllib.parse/urllib/parse.py#L730
Title: Re: urlencode for piCore
Post by: mocore on January 16, 2016, 08:20:58 AM
Or this urlencode_build script ?! http://forum.tinycorelinux.net/index.php/topic,18712.msg114569.html#msg114569